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.

Variable availability in Modbus


kcopeland Feb 27, 2017 04:56 PM

Hi All-

We're having some trouble with the modbus protocol and need some background information on the implementation in Campell Devices. 

Background:

We have CR1000/800/3000's set up as Modbus Slave devices.  We have a master device polling every second.  The master device can not handle NaN's (65355) because that number is out of range of the expected measurement.  So I put a simple for/next loop at the end of the scan to find all NaN's and change them to a number with in the measurement range. (1.23456)  I am still showing NaN's in my polled data though.

Question:

I know when viewing data with campbell software, the data values only appear to update at the top of the scan.  When using Modbus, are the instantaneous values available to be polled as soon as they are calculated?  It seems that I'm making a modbus poll after my values are calculated and before my for/next loop can execute.

Thanks

Kyle


jtrauntvein Feb 28, 2017 12:41 AM

The public table is a strange beast in that it reports a record number that is equal to the number of scans and the current rel time for its time stamp.  The values reported are NOT the values at the top of the scan but are rather the current values of the public variables at the time the poll took place.  It seems to me that you will need to introduce another array for the ModBus master to poll rather than having the ModBus master instruction refer directly to the array that can contain NaN values.

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