1771–db basic module simplex example, Valve number 1 open – Rockwell Automation 2706-F11J_F11JC_F21J_F21JC DL50 INSTALLATION MANUAL User Manual
Page 78

Chapter 6
Slave Mode Operation / Examples
6–14
1771–DB BASIC Module Simplex Example
The following is an example of print statement using a BASIC Module
(Catalog No. 1771-DB) as a host. The example assumes that the DL50 slave
has an address of 1.
100: PRINT #“VALVE NUMBER 1 OPEN”,CHR(1),CHR(2),CHR(13)
Where:
(1) specifies slave address 1
(2) specifies line 2 of the display
(13) is equivalent to a Carriage Return (CR
)
After receiving this message, the DL50 will display:
VALVE NUMBER 1 OPEN
on the second line of the display. When using the BASIC module, you must
use the print CHR (decimal equivalent character) function.
Note: The alarm program for BASIC on page 6-12 may also be used on the
BASIC modules (Catalog No. 1771-DB or 1746-BAS) with the following
changes and additions:
1 STRING 200,40
10 CALL 119 : REM SETS PERIPHERAL PORT TO DEFAULTS
99 REM N= 0 1 2 3 4 5 6 7 8
100 ON N GOSUB 2000, 1005, 1010, 1015, 1020, 1025, 1030, 1035, 2000
110 IF N=9 GOTO 35
120 PRINT # $(1), CHR(A), CHR (LN ), CHR (13)
4030 INPUT “Alarm No.” N: REM ###THIS IS FOR PROGRAM TEST ONLY###
4040 IF N=0 THEN END: REM ###THIS LINE IS FOR PROGRAM TEST ONLY###
On Lines 1005 t0 1035 change:
ADDRESS to A
M$ to $(1)