I am having problems reading the data that my scanner takes, it is connected via MODBUS and in Ignition it tells me that it is connected but when trying to read it through a tag it is difficult for me to write its address.
Thanks to your answers my tag no longer shows bad but now it only shows ‘0’ in the value, I have been testing but I don’t know what is the error in my addressing.
The presence of sequence numbers in the address table suggests that you might have to perform some acknowledgement handshake (writes to other addresses) to get the next buffered item to show up. Link to the manual, please?
(A zero in the 16-bit register is a pair of null characters, so an empty string is expected at that point.)
OK. You do need a handshake. Also, you need to be looking for your scan data in the Fragment Data section, HRS9:450. After reading any particular scan/fragment combination, you need to echo HR5 & HR6 over to HR236 and HR237. That tells the scanner to load the next item, if already scanned, into the input buffer. (Input is to you, Output is to the scanner.)
Also, if you expect to be scanning true binary data, you will not be able to use the HRS data type, as that expects encoded characters for string data, and stops on null values. To handle raw binary, you would read the 225 16-bit registers as a group, render them into a suitable buffer, and extract the raw bytes. Kinda’ ugly.