beautypg.com

ProSoft Technology MVI56-BAS User Manual

Page 179

background image

MVI56-BAS ♦ ControlLogix Platform

BASIC CALLs Syntax

BASIC Module (DB/BAS Compatible)

User Manual

ProSoft Technology, Inc.

Page 179 of 234

December 13, 2011

CALL 20: Enable Processor Interrupt

Use CALL 20 to allow the ControlLogix to interrupt the current BASIC program.

When word 0 bit 15 in the output image (Local:x:O:Data[0].15) toggles from OFF

to ON, the program jumps to the line number specified by the CALL 20

parameter.

Use the RETI command in order to return to the point the program was before
being interrupted.

Syntax:

PUSH [A]
CALL 20

Where:
A = BASIC line number

Example:

10 PUSH 50: REM JUMPS TO LINE NUMBER 50
20 CALL 20
30 GOTO 30
35 PRINT "LINE 35"
40 PRINT "LINE 40"
50 PRINT "LINE 50"
60 PRINT "LINE 60"
70 RETI
80 END