I have been trying to use the ModbusFB functions so I can put some code into libraries, but it seems to be very slow for me.
I have a Modbus device with 100ms registers.
I previously setup 10 channels in the 'traditional' Modbus Slave with channels and mappings - and set a cyclic trigger at 100ms - this worked fine.
I then tried the ModbusFB example, and setup reading the same 10 blocks of modbus addresses, copying the example and putting all of the requests into an array and triggering the requests sequentially.
I timed how long the requests are taking to get round to each one, and it is around 1s 450ms.
I did try a semi-coded way using the IoDrvModbusTCP library, and setting the slave com settings, then 10 commands and 10 requests, then using a TP on xDone as a pause, before triggering another request - this is time the delay is around 120ms - so the device is fine with the speed, just something I am doing wrong in the ModbusFB method I am sure.
Hello,
I have been trying to use the ModbusFB functions so I can put some code into libraries, but it seems to be very slow for me.
I have a Modbus device with 100ms registers.
I previously setup 10 channels in the 'traditional' Modbus Slave with channels and mappings - and set a cyclic trigger at 100ms - this worked fine.
I then tried the ModbusFB example, and setup reading the same 10 blocks of modbus addresses, copying the example and putting all of the requests into an array and triggering the requests sequentially.
I timed how long the requests are taking to get round to each one, and it is around 1s 450ms.
How do I speed this up to match the cyclic time?
I did try a semi-coded way using the IoDrvModbusTCP library, and setting the slave com settings, then 10 commands and 10 requests, then using a TP on xDone as a pause, before triggering another request - this is time the delay is around 120ms - so the device is fine with the speed, just something I am doing wrong in the ModbusFB method I am sure.
Related
Talk.ru: 1
Talk.ru: 2
Talk.ru: 3