Davarius Posted March 13, 2009 Share Posted March 13, 2009 I found a problem with Modbus RTU where the checksum passes but data is not for the proper device id. calling sequence is something like: try myread=device.mydevice.readholdings16(id,start,100) some text here to display "read o.k." and time stamp (debug) catch() some text here to show last error and time stamp (debug) endcatch The catch statement is used to throw some flags to ignore a channel fill sequence called by my read sequence. Trending data showed some blips where the data went totally out of a reasonable tolerance. Using the debug text i placed in the Code above and the comm monitor, I found successful reads reported by debug text where the comm monitor shows a response from a different device. This was causing the data from a different device to be accepted and therefore filled into a channel. What is the deal there? Does the CRC used in Mod-RTU take into account device id? Each time the read sequence runs the start address and number of registers remains the same; only the id changes. There is 1000 ms delay for timeout and 300ms delay between requests, also a 1 sec delay at the end of each call of the read sequence. Is there any way I can get the actual response stream or at the very least which device the response came from? That way I could verify the id. Link to comment Share on other sites More sharing options...
This topic is now archived and is closed to further replies.