Syntax, Example, Sample ladder logic – Rockwell Automation 1771-DB BASIC MODULE User Manual

Page 223: Destination port number and/or internal string, String number, Byte swap selection, Call 34 status

Advertising
background image

Chapter
Call Routines 0–68

12

12 -33

Syntax

PUSH

destination port number and/or internal string

PUSH 0

PUSH 1

PUSH

string number

PUSH

byte swap selection

CALL 34

POP

CALL 34 status

Example

>01 PUSH 64 : CALL 4 : REM SET BLOCK TRANSFER WRITE

LENGTH

>10 REM ENABLE CALL 34 INTERRUPTS

>20 PUSH 2 : REM SEND DATA TO PRT1

>30 PUSH 0 : REM ALWAYS 0

>40 PUSH 1 : REM ALWAYS 1

>50 PUSH 0 : REM STRING NUMBER/NOT USED HERE

>60 PUSH 1 : REM ENABLE BYTE SWAPPING

>70 CALL 34

>80 POP S : REM STATUS OF CALL SETUP

>90 IF (S<>0) THEN PRINT “UNSUCCESSFUL CALL 34 SETUP”

Sample Ladder Logic

(L)

O:001

11

BTW

BLOCK TRANSFER WRITE

Rack

Group

Module

00

1

0

N7:0

N10:10

64

Control Block

Data file

Length

Rung 2:0

11 PRT1

I:001

Rung 2:2

[END OF FILE]

(EN)

(DN)

(ER)

N

Continuous

N10:0

0

Rung enable bit

(N10:0 used as example)

(U)

N10:0

This bit is O:001/13
if using PRT2

Rung 2:1

(U)

O:001

11 (or 13)

0

O:001

(or 13 PRT2)

11 PRT1

(or 13 PRT2)

Advertising