vb.netautomationserial-portrs485industrial

vb.net application RS485 ascii communication


I have built a vb.net application that ran on a pc using RS232 and communicated with a serial device. The application worked great. The application has migrated to use an industrial PC with a RS485 port that will automatically convert my RS232 to RS485. My question is the device I am working with has a default RS485 address of 7. I am unsure how this address works with ascii RS485. I know how the addressing works with modbus over 485 but not with ascii communication (the specifical type of communication is SCPI Standard Commands for Programmable Instruments).

I am using the standard .net System.IO.Ports.SerialPort class and not sure how this RS485 address fits in with this communication scheme.

Any thoughts would be great.


Solution

  • The solution is to prefix the command with the address number like this

    Public Property GateAddress As String = "A007"
    SerialPort.Write(GateAddress + "Some ASCII Command" + vbCrLf)