Modbus Coils
Dear Support
I got a problem with the Modbus. I exchange variables with the PLC (Beckhoff) using Coils… I created some buttons in the Comfort click pages and I used them to turn on and off the lights. As well I have some buttons in the Comfort Click page that show the status of the lights based on the output of the light feedback (light on or off)
When I push the light button from ComfortClick (for e.g. to turn on the light) the Modbus updates the coil status and the I see the new coils status in the PLC immediately (around 100 ms) To read the coils status from Comfort Click I used the modbus function code 01 (loading the status of all coils coming from comfortclick in one array of boolevery PLC scan)
Instead when the PLC software change the status of a coil (to update the status of the light) the comfort click tool takes up to 10 seconds to update the coil status in the ComfortClick (I monitor the Modbus bool tag status time to change from 1 to 0 or vice versa directly on the comfortclick tag value page)
To write the coils for comfortclick I used the modbus function 15 writing every 2 plc scan the status of all the coils directed to the comfortclick in an array of bool
The coils that I used to turn on the light and monitor its status are different (2 different coils with different address)
Can you help me to make the update of the coils to comfort click faster? As it is now is a pain...
Regards
Marco
Customer support service by UserEcho
Hi again
I did other test using a generic Modbus software client and here the feedback is almost in Real Time: the coils statuses in the Modbus are update and visualized in the software test HMI almost in Real Time (100ms delay)
To me it seems a problem of BOS software to refresh the coils status received from Modbus (to write instead is quick)… In BOS I seated up read interval to 100 and Command Delay to 50 but I don t see a big change it takes almost 8/10 seconds
Marco
Hello Marco.
The read function in Modbus node is reading each data point separately, with the delay in between each data point reading defined by read interval. Let's say you have 10 data points and read interval set to 200ms. It will take more than 2 seconds to refresh a value.
That means, the more data points you have, the longer it will take for a specific value to refresh.
Try to find the lowest time for command delay and read interval. If you set those values too low, the communication might not work anymore.
Another suggestion is to build your system in a way that it will be using only one address for command and status.
Best regards,
Tilen