Setup guide

Chapter 3 Driver and Protocol Objects
©
Automationdirect.com 3-29 Object Reference Manual
The simplest format specification contains only the percent sign and a type
character (for example, %s). That would place the value in the response
frame in the RSV1.txt data member.
The request format string also has a precision value in the form
%[width].[precision][type]. This specifies the number of digits to the
right of the decimal point, if any, in the request frame. If you use a float
(%f) and do not specify a precision value, the ASCII object assumes a
default of 6.
Characters are converted and stored in RSV data members from response
frames in the order they are encountered in the response format. However,
fewer than [width] characters may be read if a white-space character
(space, tab, or newline) or a character that cannot be converted according
to the given format occurs before [width] is reached.
Values needed for request frames come from the RQV data members, and
are also used in the order in which they occur in the request format.
To read strings not delimited by space characters, or that contain spaces,
you can substitute a set of characters in brackets (
[
]) s (string) type
b* Byte (binary)
*For the %b data type:
Number of bytes can be specified,
for example %3b, %2b.
Response format can read as
either signed or unsigned, for
example %^b and %3^b are
signed and %b is unsigned.
Endian order can be specified, for
example %3~b is big endian and
%3b is little endian. %5~^b and
%2^~b forms are also valid.
Request Format
String
RQV1 Request Frame
>%5d 34 > 34
>%05d 34 >00034
Table 3-6. Data Types Allowed by ASCII