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.

Status delay Modbus.
#1
Hi All!
Currently I am having problems creating visuals on LM. Modbus RTU response status is slow, making it difficult to control. Is there a way to speed up object status? Thank you for your help!
Reply
#2
You can set the poll interval to a lower value.
Reply
#3
(05.12.2022, 07:30)admin Wrote: You can set the poll interval to a lower value.
Thank you for the very quick response!
I have set the poll interval to the lowest value of 1 but the status does not update faster. If I increase baud rate to 19200 don't know the state will respond faster? The device parameter can be upgraded to 19200 baud rate but in the LM log it gives an error: (RTU 1 slave 1) read failed: Invalid CRC.

Attached Files Thumbnail(s)
   
Reply
#4
It won't be much faster at higher bitrate. Modbus is not meant for fast communication due to polling.
As a work-around you can map an event script to the control object to update the status immediately.
Reply
#5
(06.12.2022, 07:42)admin Wrote: It won't be much faster at higher bitrate. Modbus is not meant for fast communication due to polling.
As a work-around you can map an event script to the control object to update the status immediately.
Thanks admin!
I can write it directly in 6.1.2 as the on/off control address for state updates:
if event.getvalue()
  then
grp.write('6/1/1', true) --Status on/off
  else
grp.write('6/1/1', false) --Status on/off
end
Admin have any better ideas?
Reply
#6
Script can be made a bit shorter, but the general idea is correct.
Code:
value = event.getvalue()
grp.write('6/1/1', value)
Reply
#7
(06.12.2022, 10:47)admin Wrote: Script can be made a bit shorter, but the general idea is correct.
Code:
value = event.getvalue()
grp.write('6/1/1', value)
Thank you so much admin!
Reply


Forum Jump: