Syntax, Example – Rockwell Automation 1771-DB BASIC MODULE User Manual
Page 227
![background image](/manuals/579953/227/background.png)
Chapter
Call Routines 0–68
12
12 -37
Description
Status code
17
no DATA available for READ
18
DF1 cannot be enabled (JW4 in wrong position)
19
•
illegal use of PRT2 while DF1 is enabled
•
illegal use of PRT2 while background DF1 task is enabled
•
attempted to transmit DF1 packet before DF1 is enabled
•
attempted to transmit DF1 packet of incorrect length
20
arithmetic overflow (value too large for range)
21
bad line number
22
JW5 in 8-point position
30
arithmetic underflow (value too small for range)
40
bad argument
Syntax
PUSH
0 or 1
CALL 38
Example
>10 ONERR 160
>20 PUSH 1
>30 CALL 38
>40 PUSH 1000:REM PUSH NUMBER FOR CALL 20 CONVERSION +/–999
>50 PUSH 3:REM WORD 3 IN BTR BUFFER
>60 CALL 20:REM CONVERT TO 3-DIGIT SIGNED BCD
>70 X=100
>80 Y=0
>90 Z=X/Y
>100 END
>160 REM EXPANDED ONERR ROUTINE
>170 PRINT “ERROR CODE WAS”,XBY(257)
>180 PRINT “AT LINE ”,(256*XBY(69FDH)+XBY(69FEH))
>END