6100 MPS-B Programming Manual

WRITING APPLICATIONS THAT USE 6100 MPS-B
Response Fields
Modifier. This byte contains a number representing an
option within a function. For example, if the
function is POLL/SELECT LIST CONTROL, a zero in
this field means "define the poll/select list,"
while a 1 means "enable continuous polling."
Request ID. This word contains a value from 1 to 32767, which
identifies this request among pending requests
for the line. Because this ID is echoed in the
response to the request, you can always tell
which request completed, even if SETMODE 30
applies. If multiple applications use the same
6100 MPS-B line, they should assign ID values in
different ranges to avoid duplication.
Text Out. This word contains the length, in bytes, of the
text field within the request.
Text In. This word contains the length, in bytes, of the
text field in the expected response. If the
request is a READ or WRITEREAD with variable
length data, the value is the maximum number of
characters expected. If the response has a fixed
length, as in a FETCH CONFIGURATION request, the
value of Text In is ignored and may be zero.
Text. This string contains additional data needed for
the request. For example, if the function is
WRITE, the string contains the message to be
transmitted. It is this field whose length is
noted in the Text Out field.
The write count in the WRITEREAD call must be equal to the value
of Text Out plus 8. The extra eight characters accommodate the
other fields in the request. Similarly, the read count in the
WRITEREAD call must equal or exceed the value of Text In plus 8.
Response Fields
When the request completes, the buffer has the same structure as
before, but some of the fields have different meanings, as
follows:
Response. This byte contains the same number that denoted
the function in the request. For example, the
number 1 is echoed in the response to a SET
CONFIGURATION request.
3-10