Hi Ben,
I am using the Modbus master component to communicate with a slave i/o device. The component functions appear to work fine with the data being sent and received as expected. However from when one command is sent to the module to another being sent, there is a larger than expected delay.
I am aware of the delay created by the "silent interval" but it also seems that the "UART receive timeout" and the "timeout count" are also contributing to this delay. With the "UART receive timeout" set to 220 mS and the "timeout count" set to 2, there is a 1 second delay from receiving the data until the next command is sent out. Reducing the timeout and the timeout counts, the delay decreases.
Looking at the screen shot there is only approximately 6mS delay between the last of the data being received by the slave module until its response is sent to the master. Since the master is being sent back a response, the timeout delay should not run its full length, but it looks like it is.
The green is the transmitted data to the slave and the blue is the received data from the slave
Any help with this would be most appreciated.
Thanks
Larger than expected delay between Modbus commands
Moderator: Benj
-
- Flowcode v5 User
- Posts: 199
- Joined: Thu Sep 10, 2009 10:57 pm
- Location: New Zealand
- Has thanked: 93 times
- Been thanked: 76 times
- Contact:
Larger than expected delay between Modbus commands
- Attachments
-
- Flowcode1.fcfx
- (10.73 KiB) Downloaded 238 times
-
- Flowcode v5 User
- Posts: 199
- Joined: Thu Sep 10, 2009 10:57 pm
- Location: New Zealand
- Has thanked: 93 times
- Been thanked: 76 times
- Contact:
Re: Larger than expected delay between Modbus commands
Hi Ben,
Wondering if you have been able to look at this yet.
Thanks
Wondering if you have been able to look at this yet.
Thanks
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: Larger than expected delay between Modbus commands
Hi,
Have you tried reducing the UART receive timeout?
I've found in practice that 20 works for most devices, and as low as 10 for some.
As you note, there seems to be some extra waiting for characters, but it's just the way the component works at present.
It will hopefully get reviewed at some point, after other priorities.
Have you tried reducing the UART receive timeout?
I've found in practice that 20 works for most devices, and as low as 10 for some.
As you note, there seems to be some extra waiting for characters, but it's just the way the component works at present.
It will hopefully get reviewed at some point, after other priorities.
-
- Flowcode v5 User
- Posts: 199
- Joined: Thu Sep 10, 2009 10:57 pm
- Location: New Zealand
- Has thanked: 93 times
- Been thanked: 76 times
- Contact:
Re: Larger than expected delay between Modbus commands
Hi Leigh,
Thanks for your reply. I have done some additional testing and found that with each data transaction, the correct data was being sent and received with no timeouts so proving that the delay was not a result of a timeout situation.
I noticed it was not working as expected so have let you know. I have reduced the timeout delay, adjusting the values to get the results i need and will do the job i need it to.
Keep us informed with any updates.
Thanks
Thanks for your reply. I have done some additional testing and found that with each data transaction, the correct data was being sent and received with no timeouts so proving that the delay was not a result of a timeout situation.
I noticed it was not working as expected so have let you know. I have reduced the timeout delay, adjusting the values to get the results i need and will do the job i need it to.
Keep us informed with any updates.
Thanks