Allen-Bradley 1203-GD2 User Manual page 46

Rs232/422/485 (using df1 protocol)
Hide thumbs Also See for 1203-GD2:
Table of Contents

Advertisement

Chapter 5
Configuration and Interfacing
10
REM ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
20
REM
30
REM This file is a program for the 1746–BAS module.
40
REM
50
REM It performs a PLC2 Unprotected Write (08) followed by
60
REM a PLC2 Unprotected Read (01) over the DF1 link on port #2
70
REM
80
REM ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
90
STOP
100 STRING 0,0
110 STRING 512,127
120 $(1)="THIS IS A TEST! "
130 REM
140 REM ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
150 REM Setup port 1 to 9600 baud, no parity, 8 bits, 1 stop bit,
160 REM software handshaking, and battery backed ram data storage.
170 REM
180 REM ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
190 MODE (PRT1,9600,N,8,1,S,R)
200 REM ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
210 REM
220 REM Setup port 2 to 300 baud, no parity, 8 bits, 1 stop bit,
230 REM software handshaking, and battery backed ram data storage.
240 REM
250 REM ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
260 MODE (PRT2,300,N,8,1,S,R)
270 REM ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
280 REM
290 REM Enable DF1 driver
300 REM (20
310 REM
320 REM (200 = Wait 1 second for polling by Master)
330 REM (2
340 REM (0= No RTS on delay)
350 REM (0
360 REM (8
370 REM ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
380 PUSH 20
390 PUSH 200
400 PUSH 2
410 PUSH 0
420 PUSH 0
430 PUSH 8
440 CALL 108
450 REM DF1 PLC REMOTE WRITE COMMAND
460 PUSH 2 :
470 PUSH 1 :
480 PUSH 11 :
490 PUSH ASC(N) :
500 PUSH 623 :
510 PUSH 10 :
520 PUSH 50 :
5-10
DF1 Messaging with a 1746-BAS Module Example
(Write 10 Parameters then read 10 parameters)
!!!!REMEMBER TO SET TERMINAL TO MATCH!!!!
= Setup for Full Duplex, Auto–Detect Embedded Responses,
Disable Duplicate Packet Detection, BCC error checking)
= 2 retries)
= No RTS off delay)
= 1746–BAS module address)
REM PLC2 Unprotected Write
REM Communications Module Node Address
REM File Number (ignored in this example)
REM Communications Module File Type
REM Starting Word in File
REM Number of Words to Transfer
REM Command Time–out (x100ms)

Advertisement

Table of Contents
loading

This manual is also suitable for:

1203-gk21203-gm2

Table of Contents