Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.

Log in or register to post/reply in the forum.

No response from modbus sensor when reading it after other modbus sensor [CR1000X]

Italo_ Aug 20, 2019 06:02 AM

I'm trying to read two modbus sensors (Datasol MET), but I get no response at the first attempt of reading the second sensor after the first.

Here's my main scan


    'Main Scan
        'Default CR1000X Datalogger Battery Voltage measurement 'BattV'
        'Default CR1000X Datalogger Wiring Panel Temperature measurement 'PTemp_C'


        'Call Data Tables and Store Data
        CallTable Table1


If I run this code in my CR1000X the first sensor will work fine (Cel1), but will never get response from the second sensor. If I change it to read 'Cel2' first and then 'Cel1', so I won't get response from 'Cel1', only 'Cel2'.

This issue can be solved if I set the 'Tries' to 2, but I don't think this is the optimal solution, since in every loop I will lost 300ms and these sensors will be in a much more time complex program, so every msec is important to not get skipped scan.

Has anyone experiencied this kind of issue? Is there any workaround?

JDavis Aug 20, 2019 01:26 PM

I think it is a something particular to the sensors you have connected. On other projects, I have connected a lot of Modbus devices with no such trouble. Try adding a delay between the commands, and adjust it to find the minimum time between commands your sensors need..

Log in or register to post/reply in the forum.