Posts: 87
Threads: 29
Joined: Feb 2022
Reputation:
0
Good day!
We would like to use Modbus with LM light RS485 port.
However, the device we want to control has 2 wires Modbus only.
Can we use 2 wires Modbus with LM5 RS485?
If yes how is the wiring diagram should be like?
LM light has A, B, and GND.
Thanks in advance.
Posts: 7773
Threads: 42
Joined: Jun 2015
Reputation:
447
Provide a datasheet of the device you want to connect. You can try connecting just A/B but GND is recommended for more robust operation.
Posts: 87
Threads: 29
Joined: Feb 2022
Reputation:
0
Thank you admin,
the engineers of the device we want to connect can adjust the communication protocol for the convenience of LM....so there is no offiial documents.
We will ask if they can do with A/B and GND.
LM will be master, the device we want to connect will be the slave and the following is what they suggest as our protocol.
Interface RS-485(2 wires)
Protocol Modbus ASCI
Data rate 19200Bps
Data length 8bit
Parity None
Stop bit 1bit
Modbus ASCI will be structured by the following elements
Start Code : (3AH)
Slave Address Length 1byte
Function Code 1byte
Resister Address
Number of Resisters
LRC
End Code
We might need to calculate checksum.
Do you see any difficulity in LM composing message in this kind?
Posts: 87
Threads: 29
Joined: Feb 2022
Reputation:
0
Oh! Okay ... that is good to hear.
I will ask if they can change the protocol to Modbus RTU or Modubs TCP.
If it's not modbus, just RS-485 with ASCII codes, will we have a problem?
Posts: 7773
Threads: 42
Joined: Jun 2015
Reputation:
447
You can transmit any kind of data over RS485. For Modbus ASCII the serial port should be set to 7-bit mode in some cases.