Create ladder logic and basic module programs, Create ladder logic and basic module programs -43 – Rockwell Automation 1747-ACNR15 ControlNet Adapter Module User Manual User Manual

Page 71

Advertising
background image

Publication 1747-UM003A-EN-P

4-43

Create Ladder Logic and Basic Module Programs

The final step is to write a ladder program for the SLC processor and a BASIC
program for the Basic module. After downloading the program to your
processor and to your basic module, place the processor into the RUN mode
and run your BASIC program as well. Your programs should now be able to
read data from the 1746-IA16 in word I:3.3 and write to the 1746-OB16 in
word O:3.2.

The attached BASIC program contains a CALL 23 interrupt CALL for PRT1
and a CALL 22 interrupt CALL for PRT2. The CALL 23 sends data out PRT1
when data is received from the SLC processor and CALL 22 transfers data sent
in PRT2 to the SLC. Remember, the first 8 words beginning with M1:3.3 and
M0:3.3 are from the Basic module’s Input and Output image. The following
64 words are from the Basic module’s M1 and M0 files. The handshaking
required between the SLC processor and the Basic module to transfer data, is
shown in the ladder logic program to follow.

Please refer to the 1746-BAS User Manual for a complete description of CALL
22 and 23, as well as the required handshaking. The only difference in the
handshake logic when using these Basic module CALLs is that the I/O image
words used for the handshaking are stored in the SCNR’s M-files, so they
appear as M-file addresses in the ladder logic instead of I/O addresses.

Connect an RS-232 cable between PRT1 and PRT2 on the Basic module. A
1747-CP3 cable works for this purpose. When up to 64 words of data are
placed into the SLC processor’s data table beginning at N12:0, it is sent to the
1747-SCNR, then to the Basic module via ControlNet and the 1747-ACN15
and is ultimately sent out PRT1 of the BAS module. If you used a cable to loop
the data back in PRT2, this data is sent to the 1747-SCNR via ControlNet and
ultimately appears in the SLC processor’s data table beginning with address
N13:0.

Note that your ladder program should also contain an unconditional rung with
an OTE instruction addressed to the 1747-SCNR scanner’s RUN/IDLE bit,
O:3.0/10 for this example. When the SLC processor is placed into the RUN
mode, this rung sets the 1747-SCNR scanner’s RUN/IDLE bit and places the
scanner into the RUN mode as well. The scanner begins executing the
configured connections when the RUN/IDLE bit is set.

Advertising
This manual is related to the following products: