Setup guide

Chapter 3 Driver and Protocol Objects
Object Reference Manual 3-32 www.Automationdirect.com
The space between the words terminates the conversion. See the preceding
bracketed character example in order to span a space or other special
characters.
The response format uses a space as a delimiter.
Using Sum Data Members
The ASCII object includes summing data members you can use to calculate
checksum characters. This can be a checksum you want to write into an
outgoing request frame or a checksum you want to verify in an incoming
response frame.
For example, if you want to calculate a checksum for the request
A00B,
you would use an
RQSum (request sum) data member. In the case of A00B,
you would use
RQSum1:4, which would give you a sum of the ASCII byte
values of characters 1 through 4. Once you have this sum, you can
manipulate it mathematically any way necessary for the checksum value
you need. You can then insert this value at the end of your frame as a byte
(
%b) or a series of bytes.
The same technique works in reverse for
RSSum
(response sum) data
members.
For example, consider the response
Z00A@. You know that you are
expecting 4 bytes plus a checksum. Assuming that this checksum
calculation involves the first four characters, use
RSSum1:4 to get the byte
sum of characters 1 through 4. After performing the appropriate
mathematical manipulation, you can compare this value with the actual
byte read from the frame, and determine when there is a checksum failure.
Note
There are many different methods for calculating checksums, and these data
members cannot support all of them. Before attempting to use them for checksum
calculation, make sure your checksum can be calculated from a simple byte sum of
characters in the frame.
Response
Frame
Response
Format String
RSV
>>Test Text<< >>%s%s<< RSV1.txt=Test
RSV2.txt=Text
>>DogCat<< >>%3s%3s<< RSV1.txt=Dog
RSV2.txt=Cat