This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

2 wires Modbus Control
#1
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.
Reply
#2
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.
Reply
#3
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?
Reply
#4
Only Modbus RTU/TCP is supported via profiles and luamodbus library. Modbus ASCII is not supported directly. One of our customers made a library for Modbus ASCII it but we haven't tested it: https://github.com/lucapalazzo/luamodbus-native
Reply
#5
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?
Reply
#6
What protocol is used over RS-485 does not matter. If your Modbus device has a DC power supply you can connect power supply negative pole to GND on LM. You can read why GND connection is recommended here: https://store.chipkin.com/articles/rs485...wire-rs485
Reply
#7
Thank you admin Smile That is a good article.

Except for the Modbus case,
LM RS485 supports ASCII character encoding or it should be HEX or Binary?
Reply
#8
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.
Reply


Forum Jump: