IBM CTI 2572 Network Card User Manual


 
CTI 2572 Installation and Operation Guide
89
8.5. PLC Logic Problems
As described previously, the Command Block located in V memory specifies the command to be
executed. The Command Slots (WY5-WY8) select which Command Blocks are to be processed. The
Command Control bits trigger the execution of the commands. A mistake in setting up and/or
manipulating these structures will cause erroneous results. Fortunately, the 2572 module provides
extensive error reporting which should assist you in correcting logic problems. See Appendix A for a
complete description and typical solutions to resolving the errors.
Following are some common errors in using the PLC interface to the 2572.
Command Block Errors
When you are first setting up the command blocks in V memory, it is easy to enter incorrect data into
the command block or to omit data from the command block. Some mistakes, such as an invalid
command or port number will be obvious, because the 2572 will return an error when they occur.
Command Slot Errors
Other errors can occur if you enter the wrong V memory address for the Command Block or when
you omit entering an address. If you enter a V memory address which does not contain a valid
command block or enter an address of 0, the 2572 will raise the PLC ERR bit as well as the CMD
ERR bit. No error code will be written, since there is no valid location in which to write one.
NOTE:
A command block is considered invalid if offset 2 (Connection Number) does not contain hex 4B is
the high byte of the word. This signature byte places all connection numbers are in the range of
19201-19299 decimal (4B01-4B63)
You might enter a V memory address of a valid command block, but it is not the command block you
want to process. In this case, you will probably not get an error, just the wrong result.
Command Control Errors
One common error in manipulating the Command Control bits is a failure to assert ERR ACK (Error
Acknowledge) after the module has raised the CMD ERR (Command Error bit). If you fail to
acknowledge the error, the associated command slot will appear to "lock up" on the command slot.
In actuality, the module software is waiting on the PLC acknowledgment before proceeding. You
can tell that the module is not really locked up by observing the timer value in the lower byte of
module WX1 increment and that you have a Command Error by examining the applicable error bit.
In addition, if you have triggered other commands, they will continue to operate (unless an error also
occurs on these command slots).
Another potential error is failing to observe the timing protocol for coupled mode. You must wait for
the module to assert CMD Busy and then lower CMD Trigger. Failure to observe the timing may
cause the command slot to appear to "lock up". Actually the module is waiting to see the PLC lower
the CMD trigger. See Appendix D for timing details.