
User Manual
Appendix B
GFK-1742F
Jan 2020
DSM314 Communications Request Instructions
394
B-1.2
Monitoring the Status Word
Error Detection and Handling
Figure 180
As shown in the table above, a value of 1 is returned to the Status Word if communications
proceed normally, but if any error condition is detected, a negative value is returned. If you
require error detection in your ladder program, you can use a Less Than (LT) compare
instruction to determine if the value in the Status Word is negative (less than zero). An
example of this is shown in the following figure. If an error occurs, the Less Than’s output
(Q) will go high. A coil driven by the output can be used to enable fault handling or error
reporting logic.
The FT output of the COMM REQ, described later in this appendix, goes high for certain
faults and can be used for fault detection also. Additionally, the Status Word can be
monitored by error message logic for display on an Operator Interface device, in which case,
Status Word codes would correspond to appropriate error messages that would display on
the operator screen. For example, if a
–
1 was detected in the Status Word, a message could
be displayed that says something like “Error
communicating with the DSM module in an
expansion rack.”
To dynamically check the Status Word, write a non-significant positive number (0 or 99 are
typically used) into the Status Word each time before its associated COMM REQ is executed.
Then, if the instruction executes successfully, the CPU will write the number 1 there. This
method lets you know that if the number 1 is present, the last COMM REQ definitely
executed successfully, and that the 1 was not just “left over” from a previous execution. In
the example presented at the end of this appendix, the number 99 is moved into the Status
Word (%R0195) in a rung prior to the rung that contains the COMM REQ instruction.
When multiple DSM COMM REQs are used, it is recommended that each be verified for
successful communications before the next is enabled. Monitoring the Status Word is one
way to accomplish this.