Real Time Automation, Inc.
37
1-800-249-1612
ASCII Configuration
– ASCII Message Counter
There is an additional ASCII variable that is very useful to access within the gateway’s mating protocol.
This data variable will need to be added manually since it will not be mapped using Auto-Map.
RecvCount
- indicates how many ASCII messages have been successfully read by the gateway for that
device. A successful incoming message means that at least one of our three end cases (Max Length,
Timeout or Delimiters) has been met. This will match the Diagnostic Variable Successful Receive Count
for each ASCII device.
This variable can be mapped to the mating protocol using the Data Mapping webpage. It is mapped just
like the Status_XY variable described in the Data Mapping- Adding Diagnostic Information section of this
user guide.
Example
: For this example, the other protocol in the gateway is the Allen-Bradley PLC. As you can see
from the picture below, the RecvCount for ASCII Device 1 is mapped to the first index of a PLC tag array
called test_cnt. The data type of this tag is an Int32 to match the data type of RecvCount. The tag
test_cnt[0] will now hold the number of successfully read messages from ASCII Device 1.
Application Use:
This is particularly useful for applications connecting devices like barcode scanners and
weigh scales. The gateway will cyclically update the mating protocol with the last ASCII message sent, a
change in the RecvCount is the only way to identify a new message if the messages are identical.