Call 59 – check m1 file, Call 59 – check m1 file -6, Purpose – Rockwell Automation 1746-BAS BASIC LANGUAGE User Manual

Page 136: Syntax, Example

Advertising
background image

Publication 1746-RM001A-US-P

11-6 Status Functions

CALL 59 – Check M1 File

Purpose

Use CALL 59 to determine if the Module File M1 located in the module has been
read by the Logic Processor since the last time it was checked. This routine has no
input arguments and one output argument.

The output argument is equal to:

0 if the Logic Processor has not read from the Module File M1 since the last
time this CALL was executed or since the module was powered up, whichever
occurred last

1 if the Logic Processor has read from the Module File M1 since the last time
this CALL was executed or since the module was powered up, whichever
occurred last

2 if the Logic Processor does not support this capability (as with the SLC 5/01
processor)

Syntax

CALL 59
POP [module file M1 read status]

Example

>1

REM EXAMPLE PROGRAM

>100 PUSH 64

>110 CALL 56 : REM COPY BASIC OUTPUT BUFFER TO M1

>120 POP A

>130 IF (A=2) THEN PRINT “SLC DOES NOT SUPPORT THIS

FUNCTION”

>140 IF (A=2) THEN STOP

>150 IF (A<>0)THE GOTO 110

>160 CALL 59 : REM START WAITING NOW

>170 POP S

>180 IF (S=2) THEN PRINT “SLC DOES NOT SUPPORT THIS

FUNCTION”

>190 IF (S=2)THE STOP

>200 IF (S=0) THEN GOTO 170

>210 PRINT “CALL 59 OUTPUT IS ”,S

READY

>RUN

CALL 59 OUTPUT IS 1

Advertising