#TCPERR
Ethernet communication error
#COMINT Communication
Interrupt
Routine
For example, the #ININT label could be used to designate an input interrupt subroutine. When the specified
input occurs, the program will be executed automatically.
NOTE: An application program must be running for automatic monitoring to function.
Example - Input Interrupt
Instruction Interpretation
#A Label
II0,0,1
Input Interrupt on 1
#LOOP;JP#LOOP;EN Loop
#ININT0 Input
Interrupt
MG “INPUT 1 IS HIGH”
Send Message to screen
RI0
Return from interrupt routine to Main Program and
do not re-enable trippoints
Example - Command Error
Instruction Interpretation
#BEGIN
Begin main program
IN "ENTER THE OUTPUT (0-15)", OUT Prompt for output number
SB OUT
Set the specified bit
JP #BEGIN
Repeat
EN
End main program
#CMDERR Command
error
utility
JP#DONE,_ED<>3
Check if error on line 3
JP#DONE,_TC<>6
Check if out of range
MG "VALUE OUT OF RANGE"
Send message
MG "TRY AGAIN"
Send message
ZS1 Adjust
stack
JP #BEGIN
Return to main program
#DONE
End program if other error
ZS0 Zero
stack
EN End
program
The above program prompts the operator to enter the output port to set. If the operator enters a number out
of range (greater than 15), the #CMDERR routine will be executed prompting the operator to enter a new
number.
In multitasking applications, there is an alternate method for handling command errors from different
threads. Using the XQ command along with the special operands described below allows the controller to
either skip or retry invalid commands.
OPERAND FUNCTION
_ED1
Returns the number of the thread that generated an error
_ED2
Retry failed command (operand contains the location of the failed command)
_ED3
Skip failed command (operand contains the location of the command after the
failed command)
The operands are used with the XQ command in the following format:
60 Chapter 5 Programming
RIO-47xxx
Содержание RIO-47120
Страница 2: ......
Страница 93: ...RIO Dimensions RIO 471xx Units in centimeters RIO 47xxx Appendix 87...
Страница 94: ...RIO 472xx Units in millimeters 88 Appendix RIO 47xxx...
Страница 107: ...Internal 56 64 Zero Stack 53 RIO 47xxx Index 101...