Call 51 – check cpu output image buffer, Call 51 – check cpu output image buffer -3, Purpose – Rockwell Automation 1746-BAS BASIC LANGUAGE User Manual

Page 133: Syntax, Example

Advertising
background image

Publication 1746-RM001A-US-P

Status Functions 11-3

CALL 51 – Check CPU
Output Image Buffer

Purpose

Use CALL 51 to determine if the SLC 500 controller output image buffer located
in the module has been updated since the last time it was checked. (In this case,
update means that the data was written to these buffers from the CPU, even if the
data is the same value.) This routine has no input arguments and one output
argument.

The output argument is equal to:

0 – if the Logic Processor has not written to the output image buffer since the
last time this CALL was executed or since the module was powered up,
whichever occurred last

1 – if the Logic Processor has written to the output image buffer 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 51
POP [output image buffer status]

Example

>1

REM EXAMPLE PROGRAM

>120 CALL 51 : REM WAIT ON SLC

>130 POP S

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

FUNCTION”

>150 IF (S = 2) THEN STOP

>160 IF (S = 0) THEN GOTO 120

>170 PRINT “OUTPUT IMAGE HAS BEEN UPDATED”

READY

>RUN

THE SLC DOES NOT SUPPORT THIS FUNCTION

STOP - IN LINE 160

READY

Advertising