Purpose, Syntax, Example – Rockwell Automation 1746-BAS BASIC LANGUAGE User Manual

Page 208

Advertising
background image

Publication 1746-RM001A-US-P

13-18 Input Functions

CALL 56 – Transfer CPU
M0 File to BASIC Input
Buffer

Purpose

Use CALL 56 to transfer up to 64 words starting at word 0 of the CPU M0 file to
the module input buffer starting at word 100. This routine has one input argument
and one output argument. The input argument is the number of words to be
transferred (0 to 64). If the number is not within the range 0 to 64, no transfer
occurs, and the output argument sets to 10. If the input argument is valid number,
the output argument is the status of the Logic Processor. It can have one of the
following values:

0 – Successful Transfer, Logic Processor in Run mode

1 – Successful Transfer, Logic Processor in Program mode

2 – Successful Transfer, Logic Processor in Test mode

10 – Illegal length specified

11 – Logic Processor does not support this capability

Word integrity is guaranteed during this transfer. File integrity is not. Handshaking
bits can be used in your application program to provide file integrity.

Syntax

PUSH [number of words to be transferred]
CALL 56
POP [processor status]

Example

>1

REM EXAMPLE PROGRAM

>30 PUSH 64 :

REM TRANSFER 64 WORDS

>40 CALL 56 :

REM TRANSFER M0 TO BASIC INPUT BUFFER

>50 POP X :

REM LOGIC PROCESSOR STATUS IS IN X

>60 IF (X=10) PRINT “ILLEGAL INPUT ARGUMENT”

>70 IF (X<>0).AND.(X<>10) THEN

PRINT “PROCESSOR NOT IN RUN

MODE”

READY

>RUN

Advertising