Basic module basic program listing – Rockwell Automation 1747-ACNR15 ControlNet Adapter Module User Manual User Manual

Page 72

Advertising
background image

Publication 1747-UM003A-EN-P

4-44

When the Basic module is placed into the RUN mode, any data placed into
the SLC processor’s data table beginning with N12:0 is sent to the
1747-SCNR, which sends it to the 1747-ACN15 via ControlNet and then to
the Basic module. The Basic module sends the data out PRT1 and this data is
looped right back in the Basic module’s PRT2. The module sends the data to
the 1747-ACN15, which sends it to the SCNR via ControlNet. The SLC
processor then retrieves this data and places it into its data table beginning at
N13:0.

Basic Module BASIC Program Listing

10 REM Test Program for CNET

20 MODE(PRT1,9600,N,8,1,N,R)

30 MODE(PRT2,9600,N,8,1,N,R)

40 PUSH 2

50 CALL 37

60 PUSH 2

70 CALL 96

80 REM CALL 23 for PRT1

90 PUSH 2

100 REM SEND DATA OUT PRT1

110 PUSH 1

120 REM GET DATA FROM M0 FILE

130 PUSH 0

140 REM NO OFFSET

150 PUSH 0

160 REM NO STRING USED

170 PUSH 1

180 REM ENABLE BYTE SWAPPING

190 CALL 23

200 POP S1

210 REM STATUS OF CALL 23 SETUP

220 IF (S1<>0) THEN P. "UNSUCCESSFUL CALL 23 SETUP"

230 REM CALL 22 FOR PRT2

240 PUSH 2

250 REM GET DATA FROM PRT2

260 PUSH 126

270 REM MAXIMUM OF 126 CHARACTERS PER TRANSFER

280 PUSH 13

290 REM CR TERMINATION CHARACTER

300 PUSH 1

310 REM SEND DATA TO M1 FILE

320 PUSH 0

330 REM NO OFFSET

340 PUSH O

350 REM NO STRING

360 PUSH 1

370 REM ENABLE BYTE SWAPPING

380 CALL 22

390 POP S2

400 REM CALL 22 SETUP STATUS

410 IF (S2<>0) THEN P. "UNSUCCESSFUL CALL 22 SETUP"

420 GOTO 420

Advertising
This manual is related to the following products: