Scanner Configuration and Programming. Allen-Bradley SLC 5/02, 1747 ASB, 1747 SN, Remote I/O Scanner
Below you will find brief information for Remote I/O Scanner 1747 SN, Remote I/O Scanner 1747 ASB. The 1747-SN Remote I/O Scanner is used to connect an SLC 500 processor to remotely located I/O devices, such as the 1746 I/O chassis. This allows you to extend the reach of your control system and access signals from a distance. The scanner transmits data between the processor and the remote I/O devices, enabling you to monitor and control processes in areas where you can't have the processor directly available. It also allows for the use of complementary I/O, where two adapters can share the same image space to increase the number of I/O points supported.
Advertisement
Advertisement
Chapter
4
Scanner Configuration and Programming
This chapter contains information necessary to:
• understand remote I/O image files
• understand RIO configuration using G files
• control and view RIO devices using the M0 and M1 files
• understand slot addressing
• quickly configure the RIO Scanner
Understanding Remote
Input and Output Image
Files
The SLC system allows you to assign up to 32 words of input and output image data to a scanner. This allows your scanner to access a maximum of 4 full logical racks (512 input and output points) of data from remote devices.
1 Publication 1747-UM013B-EN-P - January 2005
4-2 Scanner Configuration and Programming
SN Series B Scanner
(RIO Master)
Bit Number Octal 17
Bit Number Decimal 15
Logical
Rack 0
Logical
Rack 1
Logical
Rack 2
Logical
Rack 3
Word 0
Word 1
Word 2
Word 3
Word 4
Word 5
Word 6
Word 7
Word 8
Word 9
Word 10
Word 1 1
Word 12
Word 13
Word 14
Word 15
Word 16
Word 17
Word 18
Word 19
Word 20
Word 21
Word 22
Word 23
Word 24
Word 25
Word 26
Word 27
Word 28
Word 29
Word 30
Word 31
Output Image
10
8
7
7
0
0
Scanner Input and Output Images
Input Image
Note that some RIO devices (e.g.,
1771) use octal bit numbers.
10
8
7
7
0
0
Bit Number Octal 17
Bit Number Decimal 15
The scanner accommodates up to 32 words of output for remote devices.
Logical
Rack 0
Logical
Rack 1
Logical
Rack 2
Logical
Rack 3
Word 0
Word 1
Word 2
Word 3
Word 4
Word 5
Word 6
Word 7
Word 8
Word 9
Word 10
Word 1 1
Word 12
Word 13
Word 14
Word 15
Word 16
Word 17
Word 18
Word 19
Word 20
Word 21
Word 22
Word 23
Word 24
Word 25
Word 26
Word 27
Word 28
Word 29
Word 30
Word 31
The scanner accommodates up to 32 words of input from remote devices.
The illustration below shows how logical racks, logical groups, and words are allocated within the I/O image files. Note that this illustration describes the input image file. The scanner’s output image file is the same, except that its addressing scheme starts with O:e.0 and ends with 0:e.31.
Publication 1747-UM013B-EN-P - January 2005
Scanner Configuration and Programming 4-3
Bit Number (decimal)
Logical
Rack 0
Logical
Rack 1
Logical
Rack 2
Logical
Rack 3
Logical Rack 0 Group 0
Logical Rack 0 Group 1
Logical Rack 0 Group 2
Logical Rack 0 Group 3
Logical Rack 0 Group 4
Logical Rack 0 Group 5
Logical Rack 0 Group 6
Logical Rack 0 Group 7
Logical Rack 1 Group 0
Logical Rack 1 Group 1
Logical Rack 1 Group 2
Logical Rack 1 Group 3
Logical Rack 1 Group 4
Logical Rack 1 Group 5
Logical Rack 1 Group 6
Logical Rack 1 Group 7
Logical Rack 2 Group 0
Logical Rack 2 Group 1
Logical Rack 2 Group 2
Logical Rack 2 Group 3
Logical Rack 2 Group 4
Logical Rack 2 Group 5
Logical Rack 2 Group 6
Logical Rack 2 Group 7
Logical Rack 3 Group 0
Logical Rack 3 Group 1
Logical Rack 3 Group 2
Logical Rack 3 Group 3
Logical Rack 3 Group 4
Logical Rack 3 Group 5
Logical Rack 3 Group 6
Logical Rack 3 Group 7
Word 11
Word 12
Word 13
Word 14
Word 15
Word 16
Word 17
Word 18
Word 19
Word 20
Word 21
Word 22
Word 23
Word 2 4
Word 25
Word 26
Word 27
Word 28
Word 29
Word 30
Word 31
Word 0
Word 1
Word 2
Word 3
Word 4
Word 5
Word 6
Word 7
Word 8
Word 9
Word 10
Bit Number (octal)
15 14 e = slot number of the SLC chassis containing the scanner
13 12 11 10 9 8 7 6 5 4 3 2 1
17
8
16
8
15
8
14
8
13
8
12
8
11
8
10
8
7
8
6
8
5
8
4
8
3
8
2
8
1
8
0
I:e.24
I:e.25
I:e.26
I:e.27
I:e.28
I:e.29
I:e.30
I:e.31
I:e.19
I:e.20
I:e.21
I:e.22
I:e.23
I:e.14
I:e.15
I:e.16
I:e.17
I:e.18
SLC Input
File Address
I:e.0
I:e.1
I:e.2
I:e.3
I:e.4
I:e.5
I:e.6
I:e.7
I:e.8
I:e.9
I:e.10
I:e.11
I:e.12
I:e.13
0
8
The 1747-SN Scanner’s I/O image structure is described below:
• The I/O image file consists of four logical racks (numbered
0,1,2, and 3) of input image and four logical racks of output image.
• Each logical rack consists of eight logical groups
(numbered 0, 1, 2, 3, 4, 5, 6, and 7).
• Each logical group consists of two words (an input word and an output word).
• Each word consists of two bytes (a high and a low byte). Low byte is bits 0 to 7 and high byte is bits 8 to 15.
• Each byte consists of 8 bits with each bit having the ability to control one discrete I/O point.
Publication 1747-UM013B-EN-P - January 2005
4-4 Scanner Configuration and Programming
RIO Configuration Using G
Files
When you program your SLC system you use the G file to configure the scanner’s I/O image file. Your scanner’s G file configuration is based on the devices that you have on the RIO link. G file configuration consists of setting logical device starting addresses and the logical device image size of each physical device/adapter with which the scanner communicates.
Publication 1747-UM013B-EN-P - January 2005
For RSLogix 500 version 5.50 and later, configure the 1747-BSN M0/M1 size for 5548 words so that this non-generic G file configuration screen appears after you click on the configure G file button. For
RSLogix 500 versions prior to 5.50, configure the 1747-BSN M0/M1 size for 5547 words in order for this non-generic G file configuration screen to appear after you click on the configure G file button.
Neither your application program nor your programming device can access or alter the G file while online with the processor. To change the G file you must go offline into the program file, make any necessary changes, and download the program containing the altered
Scanner Configuration and Programming 4-5 configuration. The G file consists of five words which are described below.
Word 0 - contains scanner information for the SLC processor. Your programming device automatically sets up Word 0. Do not attempt to alter word 0.
IMPORTANT
The term “primary” is used in conjunction with the term “complementary,” when referring to a complementary I/O configuration. “Primary” refers to
I/O image space found in Logical Racks 0 through 3 when in complementary I/O mode and “normal” refers to the same image space (racks 0 through 3) when not in complementary I/O mode.
Word 1, Primary/Normal Logical Device Address - specifies the logical starting address of each primary/normal RIO link device. The logical address consists of the logical rack number (0, 1, 2, or 3) and starting logical group (0, 2, 4, or 6). Each bit in this word represents a logical address. To specify an address you place a 1 at the bit corresponding to the starting logical address of each logical device.
Word 2, Primary/Normal Device Logical Image Size - specifies the logical image size (amount of scanner I/O image) of the devices set in word 1. As with word 1, these bits correspond to RIO logical rack and logical group numbers. To specify image size, you place a 1 at each group a device occupies.
Word 3, Complementary Logical Device Address - specifies the logical starting address of each complementary RIO link device. The logical address consists of the logical rack number (8, 9, 10, or 11 because a complementary device is always 8 above its primary) and starting logical group (0, 2, 4, or 6). Each bit in this word represents a logical address. To specify an address you place a 1 at the bit corresponding to the starting logical address of each logical device.
Word 4, Complementary Device Logical Image Size - specifies the logical image size (amount of scanner I/O image) of the complementary devices set in word 3. As with word 3, these bits correspond to RIO logical rack and logical group numbers. To specify image size you place a 1 at each group a device occupies.
Publication 1747-UM013B-EN-P - January 2005
4-6 Scanner Configuration and Programming
IMPORTANT
Setting device addresses in word 3 of the G file configures the system to operate in the complementary I/O mode. Not setting device addresses in word 3 causes the system to operate only in the primary/normal mode. If you wish to operate in the complementary mode and you only have primary devices configured, word 3 of the G file must be set to a decimal “1,” and word 4 of the G file must be equal to zero.
Bit Number
I/O Mix, Word 0
Primary/Normal Logical Device Address,
Word 1
G File
15 14 13 12
0 0 1
6
0
RIO Logical Rack 3
Starting Logical Group
4
0
2
1
0
0
0
11 10 9 8
0 0 0 0
RIO Logical Rack 2
Starting Logical Group
6
0
4
0
2
1
0
0
7 6 5 4
0 0 1 0
RIO Logical Rack 1
Starting Logical Group
6
0
4
0
2
0
0
1
3 2 1 0
0 0 0
RIO Logical Rack 0
Starting Logical Group
6
1
4
0
2
0
0
1
0
Primary/Normal Logical Image Size,
Word 2
1
6
RIO Rack 3
Image Size
4 2
1 1 0
0
0
6
RIO Rack 2
Image Size
4 2
1 1 0
0
1
6
RIO Rack 1
Image Size
4 2
1 1 1
0 6
1
RIO Rack 0
Image Size
4 2
0 0 1
0
Contains scanner information for the SLC.
Your programming device automatically sets the scanner information.
Specifies the RIO starting addresses of primary/normal logical devices.
Specifies the logical image size assigned to primary/normal logical devices set in Word 1.
Complementary Logical Device Address,
Word 3
6
0
RIO Logical Rack 1 1
Starting Logical Group
4
0
2
1
0
0
RIO Logical Rack 10
Starting Logical Group
6
0
4
0
2
1
0
0
RIO Logical Rack 9
Starting Logical Group
6
0
4
0
2
0
0
1
RIO Logical Rack 8
Starting Logical Group
6
1
4
0
2
0
0
1
Complementary Logical Image Size,
Word 4
1
6
RIO Rack 1 1
Image Size
4 2 0
1 1 0 0
6
RIO Rack 10
Image Size
4 2
1 1 0
0
1
6
RIO Rack 9
Image Size
4 2
1 1 1
0
1
6
RIO Rack 8
Image Size
4 2
0 0
0
1
Note: A complementary logical rack is always numbered 8 above its primary logical rack. Also, logical racks 8, 9, 10, and 11 are sometimes referred to as complementary logical racks 0, 1, 2, and 3.
Specifies the RIO starting addresses of complementary logical devices.
Specifies the logical image size assigned to complementary logical devices set in Word 3.
Quarter Logical Rack Devices
Full Logical Rack Device
Half Logical Rack Device
Three Quarter Logical Rack Device
Publication 1747-UM013B-EN-P - January 2005
Scanner Configuration and Programming 4-7
Rules for Configuring the Scanner
General
• The smallest portion of the scanner’s I/O image that can be allocated to a single RIO device is two logical groups (1/4 logical rack).
• If a device is configured in word 1, there must be image allocated to it in word 2. This rule also applies to words 3 and 4 with the following exception: if word 3 = 1 and word 4 = 0, the complementary mode is selected even though no complementary devices are configured.
• A logical device’s starting group must begin at even group numbers (0, 2, 4, or 6). Each bit in words 2 and 4 represent an even logical group number.
Concerning Complementary I/O
• It is valid for you to have a complementary device configured even if no associated primary device exists. Also, complementary devices do not have to be the same logical image size as the primary device.
• G file words 1 and 2 can both be zero (no primary devices).
However, in this case there must be at least one complementary device configured in G file words 3 and 4.
Publication 1747-UM013B-EN-P - January 2005
4-8 Scanner Configuration and Programming
• If there is at least one primary device configured in G file words
1 and 2, words 3 and 4 can both be zero, or the G file size can be set to 3 (complementary mode not selected).
• The starting group of the primary and complementary chassis should be the same if they share the same image space. If the starting group is not the same, the image of the complementary device must not “cross over” into the space of a primary device.
For example, if a primary device exists at Logical Rack 1 Logical
Group 4, the maximum size of a complementary device at
Logical Rack 9 Logical Group 0 is a half logical rack, so its image does not cross over into Logical Group 4.
• A complementary device cannot be configured at locations where primary devices are configured unless they both start at the same location.
• If you configure your system so that complementary I/O is not selected (words 3 and 4 are zero), you must not set up any of the actual devices to be in the primary mode. If you do, the system will flag the device as faulted and prevent the device from running.
• Control functions (i.e., device inhibit, device reset, and device output reset) are only selectable for the primary device, but also apply to the complementary device. Control functions for complementary devices cannot be exclusively enabled.
Example G File Showing Primary and Complementary Device Configurations
In the example that follows, we configured the scanner to communicate with primary and complementary devices. These are the device addresses and image sizes:
• Logical Racks 0/8, Logical Group 2 contain a primary 3/4 logical rack device, and a complementary 3/4 logical rack device.
• Logical Racks 1/9, Logical Group 0 contain no primary device, and a complementary 1/2 logical rack device.
• Logical Racks 1/9, Logical Group 6 contain a primary 1/4 logical rack device, and a complementary 1/4 logical rack device.
• Logical Racks 2/10, Logical Group 0 contain a primary 3/4 logical rack device, and a complementary 1/4 logical rack device.
• Logical Racks 3/11, Logical Group 2 contain a primary 1/4 logical rack device, and a complementary 1/2 logical rack device.
• Logical Racks 3/11, Logical Group 6 contain a primary 1/4 logical rack device, and no complementary device.
Publication 1747-UM013B-EN-P - January 2005
Scanner Configuration and Programming 4-9
Bit Number
I/O Mix, Word 0
Primary/Normal Logical Device Address,
Word 1
G File
15
0
14
0
13
1
12
0
6
1
RIO Logical Rack 3
Starting Logical Group
4
0
2
1
0
0
11
0
10
0
9
0
RIO Logical Rack 2
Starting Logical Group
6
0
4
0
2
0
0
1
8
0
7
0
6
0
5
1
6
1
RIO Logical Rack 1
Starting Logical Group
4
0
2
0
0
0
4
0
3
0
2
0
1
0
RIO Logical Rack 0
Starting Logical Group
6
0
4
0
2
1
0
0
0
0
Primary/Normal Logical Image Size,
Word 2
1
6
RIO Rack 3
Image Size
4 2
0 1 0
0
0
6
RIO Rack 2
Image Size
4 2
1 1 1
0
1
6
RIO Rack 1
Image Size
4 2
0 0 0
0
1
6
RIO Rack 0
Image Size
4 2
1 1
0
0
Complementary Logical Device Address,
Word 3
RIO Logical Rack 1 1
Starting Logical Group
6
0
4
0
2
1
0
0
RIO Logical Rack 10
Starting Logical Group
6
0
4
0
2
0
0
1
6
1
RIO Logical Rack 9
Starting Logical Group
4
0
2
0
0
1
RIO Logical Rack 8
Starting Logical Group
6
0
4
0
2
1
0
0
Complementary Logical Image Size,
Word 4
0
6
RIO Rack 1 1
Image Size
4 2 0
1 1 0 0
6
RIO Rack 10
Image Size
4 2
0 0 1
0
1
6
RIO Rack 9
Image Size
4 2
0 1 1
0 6
1
RIO Rack 8
Image Size
4 2
1 1
0
0
Publication 1747-UM013B-EN-P - January 2005
4-10 Scanner Configuration and Programming
Illegal Configuration Examples
Having a primary device configured at Logical Rack 1, Logical Group
2 (bit 5) would be illegal since this image space is already being used by a complementary device. Having a complementary device configured at Logical Rack 10, Logical Group 2 (bit 9) would also be illegal since this image space is already being used by a primary device.
Note that the complementary device at Logical Rack 8, Logical Group
2 could be an ASB using 10 words (1-1/4 logical racks) of data, and thereby cross into RIO Logical Rack 9.
The G file configuration on page 2-6 would provide the primary and complementary input images to the scanner, which are illustrated on the following pages. Note that the output images would be the same.
Example Scanner Input Image of the Primary Devices
Below are the primary device addresses and sizes. The following page contains complementary device addresses and sizes.
• Device 1 - starting at Logical Rack 0, Logical Group 2 is a primary 3/4 logical rack device.
• Logical Rack 1, Logical Group 0 contains no primary device.
• Device 2 - starting at Logical Rack 1, Logical Group 6 is a primary 1/4 logical rack device.
• Device 3 - starting at Logical Rack 2, Logical Group 0 is a primary 3/4 logical rack device.
• Device 4 - starting at Logical Rack 3, Logical Group 2 is a primary 1/4 logical rack device.
• Device 5 - starting at Logical Rack 3, Logical Group 6 is a primary 1/4 logical rack device.
Publication 1747-UM013B-EN-P - January 2005
Scanner Configuration and Programming 4-11
Logical Rack 0 Group 0
Logical Rack 0 Group 1
Logical
Logical Rack 0 Group 2
Logical Rack 0 Group 3
Rack 0
Logical Rack 0 Group 4
Logical Rack 0 Group 5
Logical Rack 0 Group 6
Logical Rack 0 Group 7
Logical Rack 1 Group 0
Logical Rack 1 Group 1
Logical
Logical Rack 1 Group 2
Logical Rack 1 Group 3
Rack 1
Logical Rack 1 Group 4
Logical Rack 1 Group 5
Logical Rack 1 Group 6
Logical Rack 1 Group 7
Logical Rack 2 Group 0
Logical
Logical Rack 2 Group 1
Logical Rack 2 Group 2
Logical Rack 2 Group 3
Rack 2
Logical Rack 2 Group 4
Logical Rack 2 Group 5
Logical Rack 2 Group 6
Logical Rack 2 Group 7
Logical Rack 3 Group 0
Logical Rack 3 Group 1
Logical
Logical Rack 3 Group 2
Logical Rack 3 Group 3
Rack 3
Logical Rack 3 Group 4
Logical Rack 3 Group 5
Logical Rack 3 Group 6
Logical Rack 3 Group 7
Bit Number (decimal)
Word 16
Word 17
Word 18
Word 19
Word 20
Word 21
Word 22
Word 23
Word 24
Word 25
Word 26
Word 27
Word 28
Word 29
Word 30
Word 31
Word 8
Word 9
Word 10
Word 11
Word 12
Word 13
Word 14
Word 15
Word 0
Word 1
Word 2
Word 3
Word 4
Word 5
Word 6
Word 7
Bit Number (octal)
15 14 e = slot number of the SLC chassis containing the scanner
13 12 11 10 9 8 7 6 5
17
8
16
8
15
8
14
8
13
8
12
8
11
8
10
8
7
8
6
8
5
8
4
8
4
3
8
3 2 1
2
8
1
8
0
I:e.18
I:e.19
I:e.20
I:e.21
I:e.22
I:e.23
I:e.10
I:e.1 1
I:e.12
I:e.13
I:e.14
I:e.15
I:e.16
I:e.17
SLC Input
File Address
I:e.0
I:e.1
I:e.2
I:e.3
I:e.4
I:e.5
I:e.6
I:e.7
I:e.8
I:e.9
I:e.24
I:e.25
I:e.26
I:e.27
I:e.28
I:e.29
I:e.30
I:e.31
0
8
= not used
Device 1
Device 2
Device 3
Device 4
Device 5
Example Scanner Input Image of the Complementary Devices
Below are the complementary device addresses and sizes. The previous page contains primary device addresses and sizes.
• Device 6 - starting at Logical Rack 8, Logical Group 2 is a complementary 3/4 logical rack device.
• Device 7 - starting at Logical Rack 9, Logical Group 0 is a complementary 1/2 logical rack device.
• Device 8 - starting at Logical Rack 9, Logical Group 6 is a complementary 1/4 logical rack device.
• Device 9 - starting at Logical Rack 10, Logical Group 0 is a complementary 1/4 logical rack device.
• Device 10 - starting at Logical Rack 11, Logical Group 2 is a complementary 1/2 logical rack device.
• Logical Rack 11, Logical Group 6 has no complementary device.
Publication 1747-UM013B-EN-P - January 2005
4-12 Scanner Configuration and Programming
Bit Number (decimal)
Logical Rack 8 Group 0
Logical Rack 8 Group 1
Logical Rack 8 Group 2
Logical
Rack 8
Logical Rack 8 Group 3
Logical Rack 8 Group 4
Logical Rack 8 Group 5
Logical
Logical Rack 8 Group 6
Logical Rack 8 Group 7
Logical Rack 9 Group 0
Logical Rack 9 Group 1
Logical Rack 9 Group 2
Logical
Rack 9
Logical Rack 9 Group 3
Logical Rack 9 Group 4
Logical Rack 9 Group 5
Logical Rack 9 Group 6
Logical Rack 9 Group 7
Logical Rack 10 Group 0
Logical Rack 10 Group 1
Logical Rack 10 Group 2
Logical Rack 10 Group 3
Rack 10
Logical Rack 10 Group 4
Logical Rack 10 Group 5
Logical Rack 10 Group 6
Logical Rack 10 Group 7
Logical Rack 1 1 Group 0
Logical Rack 1 1 Group 1
Logical Rack 1 1 Group 2
Logical
Logical Rack 1 1 Group 3
Rack 11
Logical Rack 1 1 Group 4
Logical Rack 1 1 Group 5
Logical Rack 1 1 Group 6
Logical Rack 1 1 Group 7
Word 8
Word 9
Word 10
Word 11
Word 12
Word 13
Word 14
Word 15
Word 16
Word 17
Word 18
Word 19
Word 20
Word 21
Word 22
Word 23
Word 24
Word 25
Word 26
Word 27
Word 28
Word 29
Word 30
Word 31
Word 0
Word 1
Word 2
Word 3
Word 4
Word 5
Word 6
Word 7
Bit Number (octal)
15 14 e = slot number of the SLC chassis containing the scanner
13 12 11 10 9 8 7 6 5
17
8
16
8
15
8
14
8
13
8
12
8
11
8
10
8
7
8
6
8
5
8
4
8
4 3 2 1
3
8
2
8
1
8
0 SLC Input
File Address
I:e.0
I:e.1
I:e.2
I:e.3
I:e.4
I:e.5
I:e.6
I:e.7
I:e.8
I:e.9
I:e.10
I:e.11
I:e.12
I:e.13
I:e.14
I:e.15
I:e.16
I:e.17
I:e.18
I:e.19
I:e.20
I:e.21
I:e.22
I:e.23
I:e.24
I:e.25
I:e.26
I:e.27
I:e.28
I:e.29
I:e.30
I:e.31
0
8
= not used
Device 6
Device 7
Device 8
Device 9
Device 10
Considerations When
Configuring Remote I/O
The following sections contain information that you must understand before you configure your scanner’s G file.
G File Considerations
• You can only change the RIO configuration by modifying the G file while offline in your program file. Your application program cannot access the G file, nor can you access it while online with your programming device. However, your SLC control program can dynamically inhibit and uninhibit RIO devices via the M0 file.
• RIO devices larger than 1 logical rack appear as multiple devices on the RIO link. Refer to the Crossing Logical Rack Boundaries section below.
Publication 1747-UM013B-EN-P - January 2005
Scanner Configuration and Programming 4-13
• The address and size of the devices you list in the G file must match the settings of each RIO device.
Crossing Logical Rack Boundaries
You express remote I/O image boundaries in an even number of groups. For example, the 1747-ASB image can be any size from two logical groups up to 32 logical groups (four logical racks), in 2 logical group increments.
If the scanner image assigned to an adapter is greater than 8 logical groups (one logical rack), the image crosses logical rack boundaries.
If the scanner image assigned to an adapter is less than 8 logical groups, it too can cross a logical rack boundary depending upon the starting logical group number. The significance of crossing logical rack boundaries is discussed in the next section.
Examples of Crossing Logical Rack Boundaries
Examples 1 and 2 that follow show adapters with logical image sizes that cross logical racks 0 and 1. The image size of the adapter in example 1 consumes all of logical rack 0 (eight logical groups) and half of logical rack 1 (four logical groups). The image size of the adapter in example 2 consumes two groups in logical rack 0 and four groups in logical rack 1.
Crossing Logical Rack Boundaries - Example 1
Scanner Input or Output Image
Bit Number (Decimal)
Logical
Rack 0
Logical
Rack 1
Group 0
Group 1
Group 2
Group 3
Group 4
Group 5
Group 6
Group 7
Group 0
Group 1
Group 2
Group 3
Group 4
Group 5
Group 6
Group 7
15 8 7 0
Adapter image is 12 logical groups in size and crosses a logical rack boundary due to its size.
Adapter
Image
Crossing Logical Rack Boundaries - Example 2
Scanner Input or Output Image
Bit Number (Decimal)
Logical
Rack 0
Logical
Rack 1
Group 0
Group 1
Group 2
Group 3
Group 4
Group 5
Group 6
Group 7
Group 0
Group 1
Group 2
Group 3
Group 4
Group 5
Group 6
Group 7
15 8 7 0
Adapter
Image
Adapter image is 6 logical groups in size and crosses a logical
Creating More than One Logical Rack Device
RIO discrete transfers occur on a logical device basis, not on an adapter basis. A logical device is any portion of a logical rack that is assigned to a single adapter.
Publication 1747-UM013B-EN-P - January 2005
4-14 Scanner Configuration and Programming
When the scanner image assigned to an adapter is more than one logical device, the scanner sees the single physical device as multiple logical devices on the RIO link. The scanner communicates with each logical device independently, even if the logical devices are all assigned to one adapter. If a physical device image is more than one logical device, the following is true:
• The scanner does not update all of the adapter image at the same time. The number of logical devices determines the number of RIO discrete transfers that are needed to update the entire adapter image.
• The adapter may receive different communication commands for each logical device. In this case, the adapter decides which command it responds to.
In this example the adapter is configured to start at Logical
Rack 0, Logical Group 0, and uses 14 words of I/O image.
Note that two RIO discrete transfers are required for the scanner to update the adapter image containing two logical devices.
Scanner Input or Output Image
Bit Number (Decimal)
Logical
Rack 0
Logical
Rack 1
Group 0
Group 1
Group 2
Group 3
Group 4
Group 5
Group 6
Group 7
Group 0
Group 1
Group 2
Group 3
Group 4
Group 5
Group 6
Group 7
15 8 7 0
Logical
Device
Logical
Device
Adapter
Image
Understanding M Files
M Files Overview
The scanner provides RIO device control and status information through the M0 and M1 files. The M0 file is a control file. The M1 file is a status file
The SLC processor does not automatically update M file data during the end of the program scan as it does I/O scans. Instead, M file values act as interrupts and are immediately read from or written to upon the execution of the ladder logic instruction in which they are used. When M file data (bits or words) is addressed in the ladder program, the processor stops scanning the program to read or write the M file data to/from the scanner module. M file bits/words in the ladder program will, therefore, impact the ladder scan time. If scan time is critical, it is better to set binary file bits and copy them all at once to the M0 file, or copy a portion of the M1 file to a binary file and then address the binary file in the program. Refer to the ladder example that follows. For more information on M files, refer to
Publication 1747-UM013B-EN-P - January 2005
Scanner Configuration and Programming 4-15
Appendix B. You can find M file information relating to Block Transfer operations in Chapter 5, Block Transfer.
Rung 2:0
To decrease program scan time, copy the first four words of the M1 File to a binary file and use these addresses throughout the program to access block transfer done, error, data, etc. information without interrupting the program scan many times.
| +COP±±±±±±±±±±±±±±±±+
|±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±+COPY FILE +±|
| |Source #M1:1.100|
| |Dest #B3:0|
| |Length 4|
| +±±±±±±±±±±±±±±±±±±±+
Rung 2:1
Examine B3/13 (B3:0/13), an internal storage bit, to determine when a block transfer is done. Note that examining multiple individual M±file bits directly (every scan) can measurably increase processor scan time.
| ºBT DONEº
| B3 +COP±±±±±±±±±±±±±±±±+
|±±±±] [±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±+COPY FILE +±|
| 13 |Source #B3:10|
| |Dest #N10:0|
| |Length 64|
| +±±±±±±±±±±±±±±±±±±±+
|
Rung 2:2
Examine B3/12 (an internal storage bit) to determine if a BT error occurred. Buffer the BT status from B3:3 if an error does occur.
| ºBT ERRORº
|
| B3 +MOV±±±±±±±±±±±±±±±±+
|±±±±] [±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±+MOVE +±
| 12 |Source B3:3|
| | 0000000000000000|
| |Dest N10:64|
| | 0|
| +±±±±±±±±±±±±±±±±±±±+
Rung 2:3
|
|±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±+END+±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
|
IMPORTANT
If you are using an SLC 5/02 processor, M file data cannot be directly monitored. To monitor M files, you must move the M file words into an SLC file that can be monitored, e.g., an integer “N” file. SLC 5/03 or later processors allow you to monitor M files directly. However, do not address M file bits more than necessary throughout your application program.
The processor accesses M files like immediate I/O.
Therefore, excessive addressing of M files can greatly increase SLC processor scan time. For more information on M files, refer to Appendix B.
Publication 1747-UM013B-EN-P - January 2005
4-16 Scanner Configuration and Programming
M0 Control File Description
You can control the operation of individual devices on the RIO link with M0 word 8 through M0 word 27 (M0:e.8 through M0:e.27).
Through your application program, you can use the M0 file to:
• Device Inhibit - command the 1747-SN RIO Scanner to stop scanning an RIO device by using words 8 through 11.
• Device Reset - command an RIO device’s outputs to reset while the SLC processor is in Run or Test mode by using words 16 through 19.
• Remote Output Reset - command an RIO device’s outputs to reset upon the SLC processor leaving Run mode (regardless of the RIO device’s Hold Last State setting), or while in Test mode by using words 24 through 27.
If you do not modify the Device Reset and Remote Output Reset words, the device outputs reflect the scanner output image whenever the SLC processor is in Run mode. If the SLC processor is in Program,
Test, or Fault mode, it instructs the device to reset its outputs.
M file data is nonretentive. Upon entering Run or Test modes, the SLC processor sets the M0 file to a default state. The processor does not use the M0 file until a full program scan occurs (after entering Run mode). This allows you to change the M file settings before they take effect.
IMPORTANT
The 1747-SN RIO Scanner does not use M0 words 0 through 7.
Publication 1747-UM013B-EN-P - January 2005
Scanner Configuration and Programming 4-17
M0 (Control) File - RIO Device Control Words
Device
Inhibit
Control
Bit Number
Logical Rack 0 Device Inhibit Word 8
Logical Rack 1 Device Inhibit Word 9
Logical Rack 2 Device Inhibit Word 10
Logical Rack 3 Device Inhibit Word 11
Output
Reset
Control
Device
Reset
Control
Logical Rack 0 Device Reset Word 16
Logical Rack 1 Device Reset Word 17
Logical Rack 2 Device Reset Word 18
Logical Rack 3 Device Reset Word 19
Logical Rack 0 Remote Output Reset Word 24
Logical Rack 1 Remote Output Reset Word 25
Logical Rack 2 Remote Output Reset Word 26
Logical Rack 3 Remote Output Reset Word 27
15 x x x x
14 x x x x
13 x x x x
12 x x x x
11 x x x x
10 x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
9 x x x x x x x x x x x x
7 x x x x x x x x x x x x
6 x x x x x x x x x x x x
8 x x x x x x x x x x x x
4 x x x x
0
0
0
0
1
0
0
0
3
0
0
1
0 x x x x x x x x
5 x x x x
0
0
0
0
0
0
0
0
2
1
0
0
0
0
0
0
0
0
0
1
1
1
1
0
0
0
0
0
0
0
1
1
0
0
0
0
0
1
1 e = slot number of the SLC rack containing the scanner x = bit not used/defined
M0:e.8
M0:e.9
M0:e.10
M0:e.11
M0:e.12
M0:e.13
M0:e.14
M0:e.15
M0:e.16
M0:e.17
M0:e.18
M0:e.19
IMPORTANT
Control functions (i.e., device inhibit, device reset, and device output reset) are only selectable for the primary device, but also apply to the complementary device. Control functions for complementary devices cannot be exclusively enabled.
M0 File - RIO Device Inhibit Control
M0 Words 8 through 11 - you use these words to command the scanner to stop scanning logical racks 0, 1, 2, and 3. Bits 0 to 3 in each word correspond to I/O group locations within logical racks 0, 1, 2, and 3.
To stop scanning (inhibit) a device listed in the configuration (G) file, set the bit corresponding to the starting group address of the device to
1. Setting bits that do not correspond to the device logical starting
group address will not inhibit the device. To resume scanning a device, reset the bit (which corresponds to the starting group address of the device) to 0.
Inhibiting a device does not affect the current settings of the Device
Fault Status (words 12 to 15 of the M1 file). Inhibited devices
eventually time out and either return to their last state or reset
(depending on the device’s last state setting).
Publication 1747-UM013B-EN-P - January 2005
4-18 Scanner Configuration and Programming
Default:
When the processor enters the Run mode, the scanner automatically inhibits any device not configured in the G file (bit set to 1). Attempting to inhibit an unconfigured device has no effect.
Bit Number (decimal)
Logical Rack 0 Device Inhibit Word 8
Logical Rack 1 Device Inhibit Word 9
Logical Rack 2 Device Inhibit Word 10
Logical Rack 3 Device Inhibit Word 11 x x x x
M0 (Control) File W ords 8 through 11
15 14 13 12 11
Not Defined
10 9 8 7 x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
6 x x x x
5 x x x x
4 x x x x
1
0
0
0
6
3
Starting Group
4 2
2 1 0
0
0
0
1
0
0
0
1
0
1
1
0
0 e = slot number of the SLC rack containing the scanner x = not used/defined
M0 File
M0:e.8
M0:e.9
M0:e.10
M0:e.11
Example of Device Inhibit Control
The 1747-SN Scanner inhibits (sets to 1) the bits in M0:e.8 through
M0:e.11 (by default) wherever there are no configured devices present. The illustration below compares the configured devices
(G file word 2) to the groups that the scanner automatically inhibits.
G File
Device Address, Word 1
M0 (Control) File
Bit Number (decimal)
Logical Rack 0 Device Inhibit Word 8
Logical Rack 1 Device Inhibit Word 9
Logical Rack 2 Device Inhibit Word 10
Logical Rack 3 Device Inhibit Word 11
6
RIO Logical Rack 3
Starting Group
4 2
1 1 1
0
0
6
RIO Logical Rack 2
Starting Group
4 2
0 1 1
0
0
6
RIO Logical Rack 1
Starting Group
4 2 0
1 1 1 1
6
RIO Logical Rack 0
Starting Group
4 2
1 0 0
0
1
15 x x x x
14 x x x x
13 x x x x
12 x x x x
11 x x x x
10 x x x x
9 x x x x
8 x x x x
7 x x x x
6 x x x x
5 x x x x
4 x x x x e = slot number of the SLC rack containing the scanner x = not used/defined
3
1
0
0
0
2
0
0
1
0
1
0
0
1
0
0
1
1
0
0
M0 File
M0:e.8
M0:e.9
M0:e.10
M0:e.11
M0 File - RIO Device Reset Control
M0 Words 16 through 19 - you use these words to command a reset
(0) of RIO device outputs when the SLC processor is in Run or Test mode. This allows you to selectively reset logical device outputs based on a previous condition(s) that you defined. Bits 0 to 3 correspond to the logical I/O group locations within logical racks 0, 1,
2, and 3.
To command an RIO device to a reset (0) condition (from Run or Test mode), set the bit corresponding to the starting logical address of the device to 1. Setting bits that do not correspond to a device starting
Publication 1747-UM013B-EN-P - January 2005
Scanner Configuration and Programming 4-19 address will not force a reset. To remove the reset condition, reset the bit (corresponding to the device logical starting address) to 0. See the
Default:
The SLC processor resets all bits in this field to 0 when it enters Run or Test mode.
Bit Number (decimal)
Logical Rack 0 Device Reset Word 16
Logical Rack 1 Device Reset Word 17
Logical Rack 2 Device Reset Word 18
Logical Rack 3 Device Reset Word 19
15 x x x x
M0 (Control) File W ords 16 through 19
14 x x x x
13 x x x x
12 x x x x
11 x x x x
Not Defined
10 9 8 x x x x x x x x x x x x
7 x x x x
6 x x x x
5 x x x x
4 x x x x
0
0
0
0
6
3
Starting Group
4 2
2 1
0
0
0
0
0
0
0
0
0
0
0
0
0
0 e = slot number of the SLC rack containing the scanner x = bit not used/defined
M0 File
M0:e.16
M0:e.17
M0:e.18
M0:e.19
Example of Device Reset Control
The application has commanded the device starting at Logical Rack 0,
Group 0 (M0:e.16/0) to a reset condition (bit set to 1). The default setting for all device reset bits is 0.
G File
Device Address, Word 1
M0 (Control) File
Bit Number (decimal)
Logical Rack 0 Device Reset Word 16
Logical Rack 1 Device Reset Word 17
Logical Rack 2 Device Reset Word 18
Logical Rack 3 Device Reset Word 19
6
RIO Logical Rack 3
Starting Group
4 2 0
0 0 1 0
6
RIO Logical Rack 2
Starting Group
4 2 0
0 0 1 0
6
RIO Logical Rack 1
Starting Group
4 2 0
0 0 0 1
6
RIO Logical Rack 0
Starting Group
4 2 0
1 0 0 1
15 x x x x
14 x x x x
13 x x x x
12 x x x x
11 x x x x
10 x x x x
9 x x x x
8 x x x x
7 x x x x
6 x x x x
5 x x x x e = slot number of the SLC rack containing the scanner x = bit not used/defined
4 x x x x
3
0
0
0
0
2
0
0
0
0
1
0
0
0
0
0
0
0
1
0
M0 File
M0:e.16
M0:e.17
M0:e.18
M0:e.19
M0 File - Remote Output Reset Control
M0 Words 24 through 27 - you use these words to command a logical device to reset all of its outputs when the SLC processor leaves the Run mode and enters the Test, Program, or Fault mode (regardless of the device’s Hold Last State setting).
Resetting the bit (corresponding to the starting address of a device) to
0 allows the Hold Last State switch on the logical device to determine output operation when the SLC processor leaves the Run mode.
Publication 1747-UM013B-EN-P - January 2005
4-20 Scanner Configuration and Programming
Setting the bit to 1 will command all outputs off (regardless of the device’s Hold Last State setting).
Only the device’s logical starting address bit matters. Setting other bits has no effect. Bits 0 to 3 correspond to I/O group locations within logical racks 0, 1, 2, and 3.
Default:
When the processor enters Run or Test mode, the scanner sets the starting address bit of each device configured in the G file to 1.
ATTENTION
The use of the device’s Hold Last State switch can result in its outputs remaining energized when not under control of the SLC processor. We recommend the use of this function only by experienced SLC programmers.
Bit Number (decimal)
Logical Rack 0 Remote Output Reset Word 24
Logical Rack 1 Remote Output Reset Word 25
Logical Rack 2 Remote Output Reset Word 26
Logical Rack 3 Remote Output Reset Word 27
M0 (Control) File W ords 24 through 27
Not Defined
15 14 13 12 11 10 9 8 7 x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
6 x x x x
5 x x x x e = slot number of the SLC rack containing the scanner x = not used/defined
4 x x x x
0
0
1
0
6
Starting Group
4 2
3 2 1
0
0
0
0
0
0
1
1
0
0
0
0
1
1
M0 File
M0:e.24
M0:e.25
M0:e.26
M0:e.27
Example of Remote Output Reset Control
By default the scanner sets the bits in M0:e.24 through M0:e.27 to 1 wherever there are configured devices present. This commands all devices’ outputs to reset regardless of their Hold Last State switch. The application program can remove commanded reset of devices by resetting bits to 0.
G File
Device Address, Word 1
M0 (Control) File
Bit Number (decimal)
Logical Rack 0 Remote Output Reset Word 24
Logical Rack 1 Remote Output Reset Word 25
Logical Rack 2 Remote Output Reset Word 26
Logical Rack 3 Remote Output Reset Word 27
0
6
RIO Rack 3
Starting Group
4 2
0 1 0
0
0
6
RIO Rack 2
Starting Group
4 2
0 1 0
0
0
6
RIO Rack 1
Starting Group
4 2
0 0 1
0 6
1
RIO Rack 0
Starting Group
4 2
0 0
0
1
15 x x x x
14 x x x x
13 x x x x
12 x x x x
11 10 9 8 7 6 5 4 3 x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x 0 e = slot number of the SLC rack containing the scanner x = not used/defined
1
0
0
2
0
0
0
0
1
0
0
1
1
0
1
1
0
0
M0 File
M0:e.24
M0:e.25
M0:e.26
M0:e.27
Publication 1747-UM013B-EN-P - January 2005
Scanner Configuration and Programming 4-21
Device Reset and Remote
Output Reset
Considerations
The 1747-SN Scanner Device Reset words (M0:e.16 to M0:e.19) and the Remote Output Reset words (M0:e.24 to M0:e.27) operate in conjunction with each RIO device to determine the state of that RIO device’s outputs. The output control information that the scanner sends to the RIO device depends on how you configure these bits.
The RIO device acts on the output control information in accordance with its functionality and configuration. To fully understand how a specific device responds to the Device Reset and Remote Output
Reset words, you must determine the operation of the RIO device. To determine RIO device output operation, refer to that device’s user manual.
ATTENTION
When using the Device Reset and Remote Output
Reset words, you must completely understand and fully test all device output operations before beginning normal system operation.
To properly use the Device Reset and Remote Output Reset words, you must consider the output control information sent to the devices during two SLC processor operating conditions:
• The SLC processor is in any given mode (Run, Program, Test, or
Fault).
• The SLC processor is leaving any mode and entering another.
If you do not modify the Device Reset and Remote Output Reset words, the device outputs reflect the scanner output image whenever the SLC processor is in Run mode. If the SLC processor is in Program,
Test, or Fault mode, it instructs the device to reset its outputs.
If you modify the default settings, the Device Reset and Remote
Output Reset words change. The table on the following page contains examples of what changes occur. We base the information in the table
on the assumption that the scanner’s slot is always enabled and the
RIO link device is communicating with the scanner.
To determine how the Device Reset and Remote Output Reset words operate, locate the box where the row and column are headed by the modes in question. The shaded boxes represent the Device Reset and
Remote Output Reset word operation while in that mode.
Example 1 - When powering up into Run mode, the scanner, by default, resets the appropriate bit in the Device Reset word to 0. The appropriate bit in the Remote Output Reset word is set to 1. As a result, the RIO link device outputs reflect the scanner’s output image.
Publication 1747-UM013B-EN-P - January 2005
4-22 Scanner Configuration and Programming
Example 2 - Once the SLC processor is in Run mode, the bits in the
Remote Output Reset word have no effect on the RIO link device’s outputs. Setting the appropriate bits in the Device Reset Word to 1 instructs the RIO link device to reset its outputs.
Example 3 - When going from Run to Program mode, if both of the appropriate bits in the Device Reset and Remote Output Reset words are reset to 0 before leaving Run mode, the RIO link device is instructed to decide whether to hold its last output state or to reset its outputs.
Power up
Run
Test
Run
DR = 0
(1)
ROR = 1
(2)
Default values are set automatically.
Outputs reflect those of the scanner output image.
ROR = X
DR = 0 Outputs are unchanged.
DR = 1 Outputs are turned off.
To This Module
Test
DR = 0
ROR = 1
Default values are set automatically.
Program
DR = X
(3)
ROR = X
DR = 0 In this instance, the last
ROR = 0 state switch setting is valid.
DR = X
ROR = 1 These two combinations will reset device outputs.
DR = 1
ROR = X
DR = 0 In this instance, the last
ROR = 0 state switch setting is valid.
DR = 0 In this instance, the last
ROR = state switch setting is valid.
DR = X
ROR = 1 These two combinations will reset device outputs.
DR = 1
ROR = X
Outputs remain unchanged.
Outputs reflect those of the scanner output image.
Once these outputs are reset, they remain reset regardless of the DR and
ROR settings.
Program DR = 0
ROR = 1
Default values are set automatically.
Outputs reflect those of the scanner output image.
DR = X
ROR = 1 These two combinations will reset device outputs.
DR = 1
ROR = X
DR = 0
ROR = 1
These default values are set automatically. Outputs are reset, unless ROR is changed to 0 on the first scan.
DR = X
ROR = X
(1) DR = Device Reset
(2) ROR = Remote Output Reset
(3) X = Setting does not matter
Publication 1747-UM013B-EN-P - January 2005
Scanner Configuration and Programming 4-23
M1 Status File Description
M1 file words 0 through 47 contain the status of all devices on the scanner’s RIO link. M1 is a read only file; do not write to this file.
Words 0 to 47 of the M1 file provide the following information:
• Word 0 (M1:e.0) - general communication status (overall device fault and communications attempted)
• Word 2 (M1:e.2) - RIO baud rate status
• Word 3 (M1:e.3) - complementary device starting address status
• Word 4 (M1:e.4) - complementary logical image size status
• Word 5 (M1:e.5) - complementary active device status
• Word 8 (M1:e.8) - primary/normal device starting address status
• Word 9 (M1:e.9) - primary/normal logical image size status
• Word 10 (M1:e.10) - active device status
• Words 12-15 (M1:e.12 -15) - device fault status
• Words 16-31 (M1:e.16-31) - primary/normal device retry counters
• Words 32-47 (M1:e.32-47) - complementary device retry counters
General Communication Status - Enable Device Fault Bit
Word 0, bit 0 - is the Enabled Device Fault status bit. When any enabled device is faulted, this bit is set to 1. A fault may be caused by a communication problem with a remote device.
M1 (Status) File W ord 0
Bit Number (decimal)
General Communication Status Word, Word 0
15 x
14 x
13 x
12 x
11 x
10 x
9 x
8 x
7 x
6 x
5 x
4 x
3 x
2 x
1
1
0
1
Enabled Device
Fault Bit
M1 File
M1:e.0
General Communication Status - Communication Attempted Bit
Word 0, bit 1 - is the Communications Attempted status bit. When
RIO communication has been attempted with all configured devices, this bit is set to 1. There are no further transitions of this bit until a processor change of state occurs (i.e., Program mode to Run mode or
Test mode, or Test mode to Run mode).
Until this bit is set, all devices in M1 file word 10 (active device status) appear to be inactive. This bit can be used to condition the Enabled
Publication 1747-UM013B-EN-P - January 2005
4-24 Scanner Configuration and Programming
Device Fault bit. If the Communications Attempted bit is 1, the
Enabled Device Fault bit is valid.
M1 (Status) File W ord 0
Bit Number (decimal)
General Communication Status Word, Word 0
15 x
14 x
13 x
12 x
11 x
10 x
9 x
8 x
7 x
6 x
5 x
4 x
3 x
2 x
1
1
0
1
M1 File
M1:e.0
Communications
Attempted
Status Bit
Enable Device
Fault Bit
RIO Baud Rate Status
Word 2, bits 0 to 1 - displays the RIO communication/baud rate you have set the scanner to via its DIP switch. Writing to word 2 does not change the scanner baud rate.
M1 (Status) File - W ord 2
Bit Number (decimal)
RIO Baud Rate, Word 2
15 x
14 x
13 x
12 x
11 x
10 x
9 x
8 x
7 x
6 x
5 x
4 x
3 x
Baud Rate
2 x
1
0
0
1
As illustrated by the table below, bit 0 = SW1 and bit 1 = SW2.
M1 File
M1:e.2
Bit 1 - 0
11
01
10
00
Baud Rate
57.6K Baud
115.2K Baud
230.4K Baud
230.4K Baud
SW 1 - 2
11
10
01
00
Logical Device Starting Address Status
Word 8 - provides status/feedback of the logical device starting addresses you configured in word 1 of the G file (primary/normal logical devices). Writing to M1 file word 8 will not alter the contents of the G file.
Publication 1747-UM013B-EN-P - January 2005
Scanner Configuration and Programming 4-25
M1 (Status) File - W ord 8
Bit Number (decimal)
Primary Logical Device Address, Word 8
15
0
14
0
13
1
12
0
11
0
10
0
9
1
8
0
7
0
6
0
5
0
4
1
3
1
2
0
1
0
0
1
G File - W ord 1
Primary Logical Device Address, Word 1
Starting Group
6 4 2
0 0 1
0
0
Starting Group
6 4 2
0 0 1
0
0 0
6
Starting Group
4 2
0 0
0
1
6
1
Starting Group
4 2
0 0
0
1
M1 File
M1:e.8
RIO Logical Rack 3
Starting Group 2
RIO Logical Rack 2
Starting Group 2
RIO Logical Rack 1
Starting Group 0
RIO Logical Rack 0
Starting Group 6
RIO Logical Rack 0
Starting Group 0
Word 3 - provides status/feedback of the logical device starting addresses you configured in word 3 of the G file (complementary devices). Writing to M1 file word 3 will not alter the contents of the
G file.
M1 (Status) File - W ord 3
Bit Number (decimal)
Complementary Logical Device Address,
Word 3
15
0
G File - W ord 3
Complementary Logical Device Address,
Word 3
14
0
13
1
Starting Group
6 4 2
0 0 1
12
0
0
0
11
0
10
0
9
1
Starting Group
6 4 2
0 0 1
8
0
7
0
0
0
6
0
5
0
4
1
3
1
2
0
1
0
0
1
0
6
Starting Group
4 2
0 0
0
1
6
Starting Group
4 2
1 0 0
0
1
M1 File
M1:e.3
RIO Logical Rack 11
Starting Group 2
RIO Logical Rack 10
Starting Group 2
RIO Logical Rack 9
Starting Group 0
RIO Logical Rack 8
Starting Group 6
RIO Logical Rack 8
Starting Group 0
Logical Device Image Size Status
Word 9 - provides status/feedback of the logical device image size you configure in word 2 of the G file (primary/normal devices). A bit set to 1 shows the logical image size of each logical device. Writing to word M1 file word 9 will not alter the contents of the G file.
M1 (Status) File - W ord 9
Bit Number (decimal)
Primary Logical Device Image Size, Word 9
15
1
14
1
13
1
12
0
11
0
10
1
9
1
8
0
7
1
6
1
5
1
4
1
3
1
2
0
1
0
0
1
M1 File
M1:e.9
G File - W ord 2
RIO Rack 3
6
Image Size
4 2
Primary Logical Device Image Size, Word 2
1 1 1
0
0
6
0
RIO Rack 2
Image Size
4 2
1 1
0
0
6
1
RIO Rack 1
Image Size
4 2
1 1
0
1
6
1
RIO Rack 0
Image Size
4 2
0 0
0
1
Publication 1747-UM013B-EN-P - January 2005
4-26 Scanner Configuration and Programming
Word 4 - provides status/feedback of the logical device image size you configure in word 4 of the G file (complementary devices). A bit set to 1 shows the logical image size of each logical device. Writing to word M1 file word 4 will not alter the contents of the G file.
M1 (Status) File - W ord 4
Bit Number (decimal)
Complementary Logical Device Image Size, Word 4
15
1
14
1
13
1
12
0
11
0
10
1
9
1
8
0
7
1
6
1
5
1
4
1
3
1
2
0
1
0
0
1
M1 File
M1:e.4
G File - W ord 4
RIO Rack 11
6
Image Size
4 2
1 1 1
Complementary Logical Device Image Size, Word 4
0
0
6
0
RIO Rack 10
Image Size
4 2
1 1
0
0
6
1
RIO Rack 9
Image Size
4 2
1 1
0
1
6
1
RIO Rack 8
Image Size
4 2
0 0
0
1
Active Device Status
Word 10 - provides active device status for primary/normal devices.
When a RIO device is communicating with the scanner the bit corresponding to the device’s logical starting group is set to 1.
Devices that are inhibited in the M0 file (M0:e.8 through M0:e.11) are represented by a 0. Unless devices are inhibited, not responding to communications, or configured to an incorrect logical rack size, this word is identical to the device configuration (M1:e.8).
M1 (Status) File - Word 10
Bit Number (decimal)
Primary Logical Device Address, Word 8
Primary Logical Image Size, Word 9
Primary Active Device Status, Word 10
15
0
1
0
6
14 13
RIO Rack 3
Starting Group
4 2
12
0
0
1
0
1
1
0
0
0
0
11
0
0
0
6
10 9
RIO Rack 2
Starting Group
4 2
0
1
0
1
1
1
8
0
0
0
0
0
1
0
7
6
6 5
RIO Rack 1
Starting Group
4 2
0
1
0
0
1
0
4
0
1
1
1
3
6
1
1
1
2 1
RIO Rack 0
Starting Group
4 2
0
0
0
0
0
0
0
0
1
1
1
M1 File
M1:e.8
M1:e.9
M1:e.10
A 0 indicates that the device is inhibited, not responding to communications, or configured to an incorrect logical rack size.
A 1 indicates that the configured device is active.
Word 5 - provides active device status for complementary devices.
When a RIO device is communicating with the scanner the bit corresponding to the device’s logical starting group is set to 1.
Devices that are inhibited in the M0 file are represented by a 0. Unless devices are inhibited, not responding to communications, or configured to an incorrect logical rack size, this word is identical to the device configuration (M1:e.3).
Publication 1747-UM013B-EN-P - January 2005
Scanner Configuration and Programming 4-27
IMPORTANT
When a primary device is inhibited, its complementary device is also inhibited. A complementary device cannot be exclusively inhibited.
M1 (Status) File - W ord 5
Bit Number (decimal)
Complementary Logical Device Address, Word 3
Complementary Logical Image Size, Word 4
Complementary Active Device Status, Word 5
15
0
1
0
6
14 13
RIO Rack 1 1
Starting Group
4 2
12
0
0
1
0
1
1
0
0
0
0
11
6
0
0
0
10 9
RIO Rack 10
Starting Group
4 2
0
1
0
1
1
1
8
0
0
0
0
7
0
1
0
6
6 5
RIO Rack 9
Starting Group
4 2
0
1
0
0
1
0
4
1
1
1
0
1
1
1
3
6
2 1
RIO Rack 8
Starting Group
4 2
0
0
0
0
0
0
0
0
1
1
1
M1 File
M1:e.3
M1:e.4
M1:e.5
A 0 indicates that the device is inhibited, not responding to communications, or configured to an incorrect logical rack size.
A 1 indicates that the configured device is active.
Logical Device Fault Status
Words 12 through 15, bits 0 to 7 - indicate the device fault status for logical racks 0, 1, 2, 3, 8, 9, 10, and 11. Bits 0 through 3 are for primary/normal devices and bits 4 through 7 are for complementary devices. Each bit corresponds to a quarter logical rack location. If a device is not responding to communications, has gone off line, or is configured to an incorrect logical rack size, all bits corresponding to the device will be set to 1. This is highlighted in the example below.
Publication 1747-UM013B-EN-P - January 2005
4-28 Scanner Configuration and Programming
M1 (Status) File Primary/Normal Device Fault Status
Bit Number (decimal)
Primary Device Address, Word 8
Primary Device Size, Word 9
Primary Active Device Status, Word 10
The information contained in words 8, 9, and 10 indicates a three quarter logical rack device beginning at
Logical Rack 3 Logical Group 2 is faulted or configured to an incorrect logical rack size. This device status is confirmed in bits 1, 2, and 3 of Device Fault Status Word
15.
15 14 13 12
6
0
1
0
RIO Rack 3
Starting Group
4 2
0
1
0
1
1
0
0
0
0
0
11 10 9 8
6
0
0
0
RIO Rack 2
Starting Group
4 2
0
1
0
1
1
1
0
0
0
0
7 6 5 4
0
1
0
6
RIO Rack 1
Starting Group
4 2
0
1
0
0
1
0
1
1
1
0
Logical Rack 0 Device Fault Status Word 12
Logical Rack 1 Device Fault Status Word 13
Logical Rack 2 Device Fault Status Word 14
Logical Rack 3 Device Fault Status Word 15 x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
0
0
0
1
3 2 1
6
1
1
1
RIO Rack 0
Starting Group
4 2
0
0
0
0
0
0
0
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
0
M1 File
M1:e.8
M1:e.9
M1:e.10
M1:e.12
M1:e.13
M1:e.14
M1:e.15
e = slot number of the SLC rack containing the scanner x = not used/defined
M1 (Status) File Complementary Device Fault Status
Bit Number (decimal)
Complementary Device Address, Word 3
Complementary Device Size, Word 4
Complementary Active Device Status, Word 5
The information contained in word 3, 4, and 5 indicates a three quarter logical rack device beginning at group 2 is inhibited, faulted, or configured to an incorrect logical rack size. This device status is confirmed in bits 5, 6, and 7 of Device Fault Status Word 15.
15 14 13 12
6
0
1
0
RIO Rack 1 1
Starting Group
4 2
0
1
0
1
1
0
0
0
0
0
11 10 9 8
0
0
0
6
RIO Rack 10
Starting Group
4 2
0
1
0
1
1
1
0
0
0
0
7 6 5
0
1
0
6
RIO Rack 9
Starting Group
4 2
0
1
0
0
1
0
4
0
1
1
1
3 2 1
6
1
1
1
RIO Rack 8
Starting Group
4 2
0
0
0
0
0
0
0
0
1
1
1
M1 File
M1:e.3
M1:e.4
M1:e.5
Logical Rack 8 Device Fault Status Word 12
Logical Rack 9 Device Fault Status Word 13
Logical Rack 10 Device Fault Status Word 14
Logical Rack1 1 Device Fault Status Word 15 x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
0
1
0
0
0
1
0
0
0
1
0
0
0
0
0
0 x x x x x x x x x x x x x x x x
M1:e.12
M1:e.13
M1:e.14
M1:e.15
e = slot number of the SLC rack containing the scanner x = not used/defined
RIO Status Example
The following example illustrates an M1 status file example. It shows a typical M1 file and the G file used to configure the scanner. There are no inhibited devices specified in the M0 file (not shown). Notice that:
• M1:e.8 is an image of word 1 (primary/normal logical device address) of the G file.
Publication 1747-UM013B-EN-P - January 2005
Scanner Configuration and Programming 4-29
• M1:e.3 is an image of word 3 (complementary logical device address) of the G file.
• M1:e.9 is an image/copy of word 2 (primary/normal logical device size) of the G file.
• M1:e.4 is an image/copy of word 4 (complementary logical device size) of the G file.
• The three quarter logical rack device located in logical rack 3
(M1:e.9/13) is not active. The fault is indicated by the Enabled
Device Fault status bit, bit 0, word 0 (M1:e.0/0).
• The three quarter logical rack device located in logical rack 11
(M1:e.4/13) is not active. The fault is indicated by the Enabled
Device Fault status bit, bit 0, word 0 (M1:e.0/0).
Because the device at M1:e.8/13 is faulted, bit 13 of word 10
(M1:e.10/13) is 0. M1:e.15/1 through M1:e.15/3, which correspond to M1:e.9/13 through M1:e.9/15 are also set to 1, indicating a problem with the device in logical rack 3.
Because the device at M1:e.3/13 is faulted, bit 13 of word 5
(M1:e.5/13) is 0. M1:e.15/5 through M1:e.15/7, which correspond to M1:e.4/13 through M1:e.4/15 are also set to 1, indicating a problem with the device in logical rack 11.
Logical Rack 0 Device Fault Status Word 12
Logical Rack 1 Device Fault Status Word 13
Logical Rack 2 Device Fault Status Word 14
Logical Rack 3 Device Fault Status Word 15
M1 (Status) File Primary/Normal
Bit Number (decimal)
Status Word, Word 0
Baud Rate, Word 2
Primary Device Address, Word 8
Primary Device Size, Word 9
Primary Active Device Status, Word 10 x x x x
15 x x x x x
14 x x
0
1
0 x x
RIO Logical
Rack 3
0 1
1
0
1
0
13 x
12 x x
0
0
0
11 x
10 x x
0
0
0 x x
RIO Logical
Rack 2
0 1
1
0
1
1
9 x
8 x x
0
0
0
7 x x
0
1
0
6 x
5 x x x
RIO Logical
Rack 1
0 0
1
0
1
0 x
1
1
1
4 x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x e = slot number of the SLC rack containing the scanner x = not used/defined x x x x x x x x
0
1
0
0
1
1
1
3 x x
2 x
1
1 x 0
RIO Logical
Rack 0
0 0
0
0
0
0
1
1
1
1
0
1
0
1
0
0
0
1
0
0
0
0
0
0
G File
6
RIO Logical Rack 3
Starting Group
4 2 0
Primary Logical Device Address, Word 1
Primary Logical Image Size, Word 2
0
1
0
1
1
1
0
0
0
0
6
RIO Logical Rack 2
Starting Group
4 2 0
0
1
1
1
0
0
0
1
6
RIO Logical Rack 1
Starting Group
4 2 0
0
1
0
1
1
1
1
1
6
RIO Logical Rack 0
Starting Group
4 2 0
0
0
0
0
1
1
M1 File
M1:e.0
M1:e.2
M1:e.8
M1:e.9
M1:e.10
M1:e.12
M1:e.13
M1:e.14
M1:e.15
Publication 1747-UM013B-EN-P - January 2005
4-30 Scanner Configuration and Programming
M1 (Status) File Complementary
Bit Number (decimal)
Status Word, Word 0
15 x
14 x
13 x
12 x
11 x
10 x
9 x
Baud Rate, Word 2
Complementary Device Starting Address, Word 3
Complementary Device Image Size, Word 4
Complementary Active Device Status, Word 5 x
0
1
0 x x
RIO Logical
Rack 1 1
0
1
1
1
0 0 x
0
0
0 x
0
0
0 x x
RIO Logical
Rack 10
0
1
1
1
0 1
Logical Rack 8 Device Fault Status Word 12
Logical Rack 9 Device Fault Status Word 13
Logical Rack 10 Device Fault Status Word 14
Logical Rack 11 Device Fault Status Word 15 x x x x x x x x
8 x x
0
0
0
7 x x
0
1
0
6 x
5 x x x
RIO Logical
Rack 9
0
1
0
1
0 0 x
1
1
1
4 x x x x x x x x x x x x x x x x x x x x x x x x x
0
0
0
1
0
0
0
1
0
1
0
0 e = slot number of the SLC rack containing the scanner x = not used/defined
0
0
0
0
3 x x x x x x
1
1
1
2 x
1
1 x 0
0
0
RIO Logical
Rack 8
0
0
0 0
1
1
1
1
0
1 x x x x x x x x x x x x
Complementary Logical Device Address, Word 3
Complementary Logical Image Size, Word 4
G File
6
RIO Logical Rack 1 1
Starting Group
4 2 0
0
1
0
1
1
1
0
0
0
0
6
RIO Logical Rack 10
Starting Group
4 2 0
0
1
1
1
0
0
0
1
6
RIO Logical Rack 9
Starting Group
4 2 0
0
1
0
1
1
1
1
1
6
RIO Logical Rack 8
Starting Group
4 2 0
0
0
0
0
1
1
M1 File
M1:e.0
M1:e.2
M1:e.3
M1:e.4
M1:e.5
M1:e.12
M1:e.13
M1:e.14
M1:e.15
IMPORTANT
Individual quarter logical racks within a device cannot be faulted. Therefore, only the starting logical group of the device needs to be monitored.
RIO Communication Retry
Counter (M1:e.16 -47)
M1 File Status Words 16 through 47 - indicate how many RIO communication retries the scanner makes to each adapter on the RIO link if communication problems occur. Each word (16 through 47) contains a retry counter for each configured quarter logical rack
(words 16 through 31 are for primary logical racks, 0 through 3, and
32 through 47 are for complementary racks, 8 through 11). Retry counters are useful for troubleshooting communication problems
(such as electrical noise or poor communication line connections) between the scanner and any adapters. The scanner clears the retry counters when going from Program to Run mode, Test to Run mode, and when going from Program to Test mode. Note that the display (in words M1:e.16 through 31) of retry counters corresponds to the bits set in the Primary Logical Device Address - Word 1 of the G file.
Likewise, the display (in words M1:e.32 through 47) correspond to the bits set in the Complementary Logical Device Address - Word 3 of the
G file.
Publication 1747-UM013B-EN-P - January 2005
Scanner Configuration and Programming 4-31
IMPORTANT
Your SLC control program cannot initialize/clear retry counters.
Retry Counter Example for Primary Devices
The scanner’s I/O image tables are configured as shown with M1 status files displaying the corresponding retry counters:
G File - P rimary
Bit Number
Primary Logical Device Address, Word 1
15
1
14
0
13
RIO Logical Rack 3
Starting Group
6 4 2 0
0
12
1
11
0
10
0
9
RIO Logical Rack 2
Starting Group
6 4 2 0
1
8
0
7
0
6
0
5
RIO Logical Rack 1
Starting Group
6 4 2 0
0
4
1
3 2
RIO Logical Rack 0
Starting Group
6 4 2 0
0 1
1
0
0
1
Specifies RIO addresses for primary logical devices.
G File - Comp lementary
Bit Number
Complementary Logical Device Address,
Word 3
15 14 13 12
RIO Logical Rack 1 1
Starting Group
6 4 2 0
0 0 1 1
11 10 9 8
RIO Logical Rack 10
Starting Group
6 4 2 0
0 0 0 1
7 6 5 4
RIO Logical Rack 9
Starting Group
6 4 2 0
0 0 0 1
3 2 1 0
RIO Logical Rack 8
Starting Group
6 4 2 0
0 0 0 1
Specifies RIO addresses for complementary devices.
M1:e.16 - communication retry counter for RIO logical rack 0, group 0
M1:e.17 - not used in this example
M1:e.18 -communication retry counter for RIO logical rack 0, group 4
M1:e.19 - not used in this example
M1:e.20 - communication retry counter for RIO logical rack 1, group 0
M1:e.21 - not used in this example
M1:e.22 - not used in this example
M1:e.23 - not used in this example
M1:e.24 - not used in this example
M1:e.25 - communication retry counter for RIO logical rack 2, group 2
M1:e.26 - not used in this example
M1:e.27 - not used in this example
M1:e.28 - communication retry counter for RIO logical rack 3, group 0
M1:e.29 - not used in this example
M1:e.30 - not used in this example
M1:e.31 - communication retry counter for RIO logical rack 3, group 6
Publication 1747-UM013B-EN-P - January 2005
4-32 Scanner Configuration and Programming
Understanding Slot
Addressing
M1:e.32 - communication retry counter for RIO logical rack 8, group 0
M1:e.33 - not used in this example
M1:e.34 - not used in this example
M1:e.35 - not used in this example
M1:e.36 - communication retry counter for RIO logical rack 9, group 0
M1:e.37 - not used in this example
M1:e.38 - not used in this example
M1:e.39 - not used in this example
M1:e.40 - communication retry counter for RIO logical rack 10, group 0
M1:e.41 - not used in this example
M1:e.42 - not used in this example
M1:e.43 - not used in this example
M1:e.44 - communication retry counter for RIO logical rack 11, group 0
M1:e.45 - communication retry counter for RIO logical rack 11, group 2
M1:e.46 - not used in this example
M1:e.47 - not used in this example
This section provides information about:
• 2-slot addressing
• 1-slot addressing
• 1/2-slot addressing
Understanding slot addressing is critical to most efficiently allocate your scanner’s I/O image files.
Slot addressing refers to how each remote chassis slot is assigned a specific amount of the I/O image. The amount depends on which type of slot addressing you choose at your adapter; 2-slot, 1-slot, and
1/2-slot addressing is available, as shown below:
Publication 1747-UM013B-EN-P - January 2005
Scanner Configuration and Programming 4-33
2-Slot
Addressing
Remote Chassis
15
Slot 2
Two slots are addressed as one logical group.
Input Image
8 7 0 15
Output Image
8 7
Slot 1 Slot 2 Slot 1
0
1-Slot
Addressing
Remote Chassis
15
One slot is addressed as one logical group.
Input Image
8 7 0 15
Output Image
8 7
Slot 1 Slot 1
0
1/2-Slot
Addressing
Remote Chassis
15
One slot is addressed as two logical groups.
Input Image
8 7 0 15
Output Image
8 7
Slot 1
0
Slot 1
For more information on slot addressing, refer to your ASB module user manual.
Note that slot addressing (e.g., 1/2-, 1-, and 2-slot) may not apply to all types of RIO devices. Refer to each RIO device’s user manual to determine the type of slot addressing required.
SLC/Scanner Configuration
Your SLC 5/02 processor can be programmed with an HHT
(1)
(Hand-Held Terminal). Although the configuration steps are similar, they are not identical. Therefore, the following basic steps are provided. For specific instructions, refer to the user manual included with your programming device. For more information on M and G files, refer to appendix B.
1. Locate an open slot in your SLC chassis. Remember that you must use an SLC 5/02 or later processor.
(1) The SLC 5/03 and SLC 5/04 processors cannot be programmed with the HHT.
Publication 1747-UM013B-EN-P - January 2005
4-34 Scanner Configuration and Programming
2. Assign the scanner to a physical slot in the SLC processor’s chassis by selecting Scanner from the list. If the scanner selection is not available, select OTHER from the I/O
Configuration Screen and enter the Code ID number: 13608.
3. Enter the number of Scanned Input and Output Words using the
Specialty I/O and Advanced Setup menus.
The default value is 32 I/O words. You can specify less than 32 and reduce the processor scan time by transferring only the part of the input and output image that your application requires.
IMPORTANT
Do not set either of these values to 0. If you do, the scanner will not work correctly.
4. Using the Specialty I/O Configuration menu, set the M1 and M0 file sizes to 32 words (48 words if using complementary I/O). 32 words is the minimum required for operation. If you do not set the M1 and M0 file sizes to at least 32 words the programming device will not allow you to access the M files in the SLC control program.
If you are using the block transfer (BT) function, you should set the M1 and M0 file sizes to 3,300. Refer to Chapter 5 before completing this selection.
5. Set the G file size to 3 (5 if using complementary I/O) using the
Specialty I/O Configuration menu.
6. Enter your setup information using the Modify G File menu.
IMPORTANT
SLC 5/02 processors scan chassis I/O slots left to right starting at slot 1, regardless of the module type. SLC 5/03 and later processors scan slots with discrete I/O modules first, left to right starting at slot 1, and then slots with specialty modules, left to right starting at slot 1.
Publication 1747-UM013B-EN-P - January 2005

Public link updated
The public link to your chat has been updated.
Advertisement
Key features
- Supports communication with remotely located I/O devices
- Provides discrete I/O and block transfers
- Maximum communication distance of 3,048 meters (10,000 feet)
- Supports complementary I/O
- Extended node capability for up to 32 devices
- Asynchronous operation with the SLC processor
- Supports a maximum of 4 logical racks
- User-configurable G files for flexible configuration
- M0 and M1 status files for device monitoring
- LEDs for easy fault identification