04.02.2026, 04:42
(02.02.2026, 13:01)admin Wrote: You can't use a profile because this is a custom protocol not Modbus.
For testing purposes use an event script. Change baudrate, parity and command bytes as needed.
Code:require('serial')
port = serial.open('/dev/RS485-1', {
baudrate = 9600,
parity = 'even',
duplex = 'half'
})
command = string.char(0x55, 0x01, 0x01, 0x03, 0x02, 0xF9, 0x01)
port:write(command)
If the test script works then it can be modified to send different commands depending on the input value. 4-bit value should work (e.g. up/down/stop).
Thanks its working. Now i have another question, is it possible to give it a range with event script?