Scanner Configuration; Example Program - Allen-Bradley 1747-SN User Manual

Remote i/o scanner
Table of Contents

Advertisement

7–6
Application Examples
Publication 1747 6.6 - July 1996

Scanner Configuration

The baud rate is 115.2K. DIP switch 1 should be in the ON position;
DIP switch 2 should be OFF.
The G file size is set to 3 using the Specialty I/O Configuration
function. The M0 and M1 file sizes are set to 32 in the Advanced Set
Up function.
Since only the first 12 words of the input and output files contain
valid information, the scanned input and output words can be set to
12. Reducing the number of scanned input and output words
decreases your SLC scan time.
Configuration information is entered in the Modify G File function.
Word 0 is reserved and, therefore, cannot be modified. Word 1
indicates the starting address of the device; word 2 indicates its size.

Example Program

The example program is shown on the following page. During
normal operation, the program moves input word 2 from the DCM
(I:1.10) to output word 2 of the RediPANEL (O:1.2). This allows the
DCM to select a message to be displayed on the RediPANEL. Bit 8
of the RediPANEL input word 0 (I:1.0/8) activates bit 1 of the DCM
output word 2 (O:1.10/1).
Upon the scanner's first scan, the application program copies the M1
file to integer file N7. The contents of the M1 file can then be
monitored by performing a data monitor of the N7 file. The baud
rate (M1:1.2), device address (M1:1.8), and device size (M1:1.9)
information will not change during operation. The general status
(M1:1.0) and active device status (M1:1.10) words are updated in the
integer file upon each scan.
The program monitors the active device status bits that are
transferred to the integer file. If the RediPANEL is not active, the
DCM is forced to a reset by setting the device reset bit (M0:1.17). If
the DCM is not active, an error message (message #4) is displayed
on the RediPANEL by moving 4 to output word 2 (O:1.2).
The active device status bits are conditioned with the communication
attempted bit (M1:1.1) before any fault actions are taken. This
ensures that the scanner has attempted to communicate with all
configured devices before an inactive device is considered faulted.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents