Logic Machine Forum
RS485 - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: RS485 (/showthread.php?tid=5746)



RS485 - omarlachhab - 15.11.2024

Hello everyone,

Is it possible to convert RS485 command this to modbus RTU.

if not port then
require('serial')
port = serial.open('/dev/RS485-1', { baudrate = 9600, parity = 'none', databits = 8, stopbits = 1  ,duplex = 'half'})
port:flush()
end

if port then
  commandWrite = string.char(0x63, 0x67, 0x67, 0xD5, 0xD5, 0x67, 0x67, 0x66,0x66 ,0xD)
port:write(commandWrite)
  port:close()
 
end

.pdf   FN485 All Units Communication Protocol v121.pdf (Size: 1.71 MB / Downloads: 11)



RE: RS485 - admin - 19.11.2024

It's a custom protocol that's not compatible with Modbus. You have to use a single resident script for integration because RS485 port cannot be shared between multiple scripts.