Setup guide

Chapter 3 Driver and Protocol Objects
©
Automationdirect.com 3-27 Object Reference Manual
of data which should be found there, such as five characters read as an
unsigned integer, for example. The ASCII object constructs a request frame
by processing the sequence of static characters and markers in the request
format string, and including data from RQV data members.
The response format string decodes a response frame using an analogous
process, storing the results in RSV data members.
To construct a request frame, the ASCII object parses the request format
string character by character. Static characters are copied directly to the
request frame. When a marker is encountered the ASCII object reads a
value from the appropriate RQV variable and places it into the request
frame.
There are 512 RQV and RSV values provided for in the ASCII object data
member collection. The first marker in a format string uses the value from
RQV1 (or RQV1.txt or RQV1.logical), the next marker uses the value
RQV2, and so on. Values taken from Response strings are stored in RSV
data members in the same way.
Keep in mind that writing into RQV1 changes the value both for RQV1.text
and RQV1.logical. Their only difference is the format in which they are
represented. The same principle applies to the RSV data members.
Note
There is no precedence to the order in which multiple objects connected to the same
variable number initialize upon opening the process file. Consider, for example, the case
in which a Pot object is connected to RQV1 while a TextEntry object is connected to
RQV1.txt. You should take care to initialize such variables to the proper value after
opening a process file.
To decode a response frame, the ASCII object compares the response frame
to the response format string character by character. The static characters in
the response frame must match those in the response format string or the
decoding process terminates. Static characters are, in effect, discarded
by the ASCII object as they are matched between the response format
string and the response frame.
When the ASCII object encounters a marker, it places the data indicated by
the marker into the appropriate RSV data member.
The conversion of a portion of the response frame to a data type specified
by a marker in the response format string must be valid, or the process will
terminate.