MVI69-GSC ♦ CompactLogix or MicroLogix Platform
Generic ASCII Serial Communication Module
The ladder logic required to properly handle transfer of terminated strings longer than 50
characters per port is more complex than the simpler version of ladder logic discussed
above. If the terminated string is larger than 50 characters, multiple blocks will be used
to transfer the data to the controller. The first block will contain a value of -1 in the
"Number of Characters Received" data field. This indicates that there will be more blocks
to follow and that the current block contains 50 ASCII character codes. As long as more
than 50 characters remain in the buffer waiting to be sent to the ladder logic, successive
Read Blocks will continue to show the "Number of Characters Received" as -1. When 50
or fewer ASCII characters remain in the buffer, the module will send the last block with a
positive number in the length field. The value passed represents the number of
characters present in the data area, which is the last characters of the complete,
terminated string. The ladder logic must recognize the presence of one or more
successive blocks with -1 lengths and then the positive number of the last block as
indication that a single, complete, long string has been completely transferred.
The two byte values at bytes 1 (port 1 transmit count) and 29 (port 2 transmit count)
inform the processor of the number of ASCII characters transferred in the last write block
to the respective port transmit buffers. If a value of zero is returned in one of these words
and data was sent in the last write block, the ladder logic must re-send the data in the
next write block because the port was in a busy state and could not transmit the last data
to be written at the time the Write Block was receive by the module from the ladder logic.
If a non-zero value is returned in one of these bytes, the value represents the number of
ASCII characters from the last write block that were successfully moved into the port's
transmit buffer.
The status information transferred in the read block can be used by the processor to
determine the state and "health" of the module and the device(s) attached to each
application port. An important member of the value in the status object is error word for
each port. This value contains the configuration error flags for each port and the receive
buffer overflow error flag.
ProSoft Technology, Inc.
Contents
User Manual
Page 70 of 83
Need help?
Do you have a question about the MVI69-GSC CompactLogix and is the answer not in the manual?