The text of a manual · part 19 of 22
1747-SDN DeviceNet Scanner Module User Manual: D - Data Organization
Pages 133 to 142 of 160, from 1747-SDN DeviceNet Scanner Module User Manual
The original document is the PDF (3.9 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Allen-Bradley 1747-SDN
Page 133
Appendix
D
Data Organization
Understand the Data Organization of the Module
The module has four data areas to transfer data, status, and command information between the module and the processor. • SLC input image table • SLC output image table • SLC M1 file • SLC M0 file
Input and Output Image Tables The following table describes the mapping of the 1747-SDN input and output image tables and the M1 and M0 files.
Words
SLC Input Image
Words
SLC Output Image
0
Status
0
Command
1…31
DeviceNet Input Data (31 words)
1…31
DeviceNet Output Data (31 words)
Words
SLC M1 File
Words
SLC M0 File
0…149
DeviceNet Input Data (150 words)
0…149
DeviceNet Output Data (150 words)
150…205
Reserved (56 words)
150…223
206…209
Device Active Table (4 words)
Reserved (74 words)
210
Node Address/Status Indicator (1 word)
211
Scan Counter (1 word)
212…215
Device Idle Table (4 words)
216…219
Device Failure Table (4 words)
220…223
Auto Verify Failure Table (4 words)
224…255
Explicit Message Program Control (32 words)
224…255
Explicit Message Program Control (32 words)
256…394
Pass-through (139 words)
256…394
Pass-through (139 words)
133
Publication 1747-UM655B-EN-P - June 2007
Page 134
134
Data Organization
Upload Input Data from the Module to the SLC Processor
The SLC 500 processor reads input data from the module by using two methods. • Input image table • M1 file transfer
Input Image Table The input image table is a 32-word table for the module slot that is updated by the processor with each program scan. The first word (word 0) is reserved for the module status register. The remaining 31 words can be used to transfer DeviceNet input data to the SLC input image table. The addressing format is: I:S.w/b Where S = slot w = word (0…31) b = bit (0…15)
Module Status Register The module status register is located at word 0 in the input image area for the slot. Bits 0…5 echo back to the processor, the current state of bits 0…5 of the module command register. The echoes verify that the commands were executed. The module sets the remaining bits when it detects a problem. The bits latch in the ON state until the problem clears. Bits 6 and 8 indicate that you should read the device failure table for more specific information about which devices failed. You can use bit 6 to keep the communication port in the Idle mode until the bit clears. When the bit clears, this indicates that all devices in the scanner’s scanlist are up and available. When the devices are available, you can put the port in Run mode. If a device failure is detected, you can put the communication into the Idle mode, so that all output devices go to a safe state. The SLC program can monitor the bits in the module status register and set the appropriate bits of the module command register to automatically control the operating mode of the module should a device failure occur.
Publication 1747-UM655B-EN-P - June 2007
Page 135
Data Organization
135
Bit Table Status Word I:s.0 Bit
Operating Mode
0
1 = Run mode, 0 = Idle mode (echoed from the module command register)
Operating Mode Description Run The module maps output data from its scanner output table (M0) and discrete outputs to each device on the network. Inputs are received and mapped into the scanner input table (M1) and discrete inputs. Outputs on the network are under SLC program control. Idle The scanner does not map output data to the devices, but keeps network connections to devices open so device failures can be detected. Input data is returned from devices, and mapped into the scanner input table (M1) and the discrete inputs. Outputs on the network are not under program control and will be in their configured Idle state. The scanner must be put into this mode to perform offline configuration of the scanner database tables.
1
1 = fault network (echoed from the module command register)
Fault Network The scanner has stopped communicating with devices on the network. No outputs or inputs are mapped. Outputs on the network are not under program control. If scanner was in Run mode, devices will go to their fault state.
2
Reserved
3
Reserved
4
1 = disable network (echoed from the module command register)
5
Reserved
6
1 = device failure (at least one device failed)
7
Reserved
8
1 = autoverify failure (at least Autoverify Failure one device has failed auto verify) One or more of the devices in the scanner’s scanlist is returning an incorrect number of bytes of data in response to a connection establishment, according to the information stored in the scanner’s scanlist.
9
Reserved
10
1 = communication failure
11
Reserved
12
1 = duplicate node address failure
13
Reserved
14
Reserved
15
1 = Explicit Message Program Control Response available in M1 file 0 = Empty
Disable Network The DeviceNet channel is disabled for communication. No communication may occur over this channel. Outputs on the network are not under program control. If scanner was in Run mode, devices will go to their fault state. Device Failure One or more of the devices in the scanner’s scanlist has failed to communicate with the scanner.
Communication Failure There is no communication on the port. Duplicate Node Address Failure There is another node with the same address as the scanner on the network.
Explicit Message Program Control A response to a previously sent Explicit Message is now available to be read/interpreted by the ladder program.
Publication 1747-UM655B-EN-P - June 2007
Page 136
136
Data Organization
SLC M1 File The SLC M1 file is a file with up to 256 words or more that can be used to transfer a large quantity of information to the module with a single SLC instruction.
IMPORTANT
Transferring data using this file takes more time than using the input image table.
The first 150 words are used for data transfer from the module. The remaining 106 words are reserved for: • device active table. • node status. • scan counter. • device idle table. • device failure table. • auto verify table. • explicit message program control. For a details on the mapping of input and output image tables, refer to page 133.
Device Active Table Words 206…209 in the M1 file are used for the Device Active Table. The scanner assigns one bit in consecutive order to consecutive device addresses starting at node 0 at M1.S.206/0. If a bit is set, it indicates that the node is in the scanner’s scanlist and has successfully communicated with the module. The bit is reset if the scanner tries to communicate to the node but the node has gone offline.
Node Address/Status Indicator Word 210 is used for node address and scanner diagnostic information displayed in numeric codes. The high byte is the node address and the low byte is the status for that node. These codes and their descriptions are listed on page 91.
Publication 1747-UM655B-EN-P - June 2007
Page 137
Data Organization
137
Scan Counter Word 211 is used for the module scan counter. The module increments this counter whenever a scan of the DeviceNet devices is completed. The counter rolls over when it reaches a maximum value of 65,535. It is located at M1:S.211.
Device Idle Table Words 212…215 in the M1 file are used for the device idle table. This table indicates that there are devices on the network in Idle mode. The module tracks devices in Idle mode by assigning one of the 64 bits in the table to each device on the network. The bits are assigned in consecutive order to consecutive device addresses starting at mode 0 at M1.S.212/0.
Device Failure Table Words 216…219 in the M1 file are used for the device failure table. This table indicates communication failures of devices on the network. The module tracks device failures by assigning one of the 64 bits in the table to each device on the network. The bits are assigned in consecutive order to consecutive device addresses starting at mode 0 at M1.S.216/0.
Auto Verify Failure Table Words 220…223 in the M1 file are used for the auto verify failure table. The auto verify failure table is used to verify that data size received from the device matches the setting in the scanner’s scanlist entry for that node. This check occurs at connection establishment time. The module tracks auto verify failures by assigning one of the 64 bits in the table to each device on the network. The bits are assigned in consecutive order to consecutive device addresses starting with node 0 at M1:S.220/0. If the bit is set, the corresponding node has failed to verify.
Publication 1747-UM655B-EN-P - June 2007
Page 138
138
Data Organization
Explicit Message Program Control Words 224…255 are used for Explicit Message Program Control. Use this feature to configure device parameters on your DeviceNet network via the M0 and M1 files in the SLC processor that is controlling these devices.
Download Output Data to the Module
The SLC 500 processor writes output data to the module by using two methods. • Output image table • M0 file transfer
Output Image Table The output image table is a 32-word table for the module slot that is updated from the processor with each program scan. The first word (word 0) of this table is reserved for the module command register. The remaining 31 words can be used to transfer data from the SLC output table to the DeviceNet nodes.
Module Command Register The module command register is located at word 0 in the output image area for the slot. To execute a command, set the appropriate bits in the module command word by using SLC ladder instructions. The following table describes the functionality of the command register bits.
Publication 1747-UM655B-EN-P - June 2007
Page 139
Data Organization
139
Command Register Bits Command Word 0:S.0 Bit
Operating Mode
0
1 = Run mode 0 = Idle mode
Operating Mode Description Run The module maps output data from its scanner output table (M0) and discrete outputs to each device on the network. Inputs are received and mapped into the scanner input table (M1) and discrete inputs. Outputs on the network are under SLC program control. Idle The scanner does not map output data to the devices, but keeps network connections to devices open so device failures can be detected. Input data is returned from devices, and mapped into the scanner input table (M1) and the discrete inputs. Outputs on the network are not under program control and will be in their configured idle state. The scanner is put into this mode to perform online configuration of the scanner database tables.
1
1 = fault network
Fault Network The scanner stops communicating with devices on the network. No outputs or inputs are mapped. Outputs on the network are not under program control. If scanner was in Run mode, devices will go to their fault state.
2
1 = restore to factory defaults/flush memory
Restore to Factory Defaults/Flush Memory The scanner may receive a scanlist or configuration that causes inappropriate scanner behavior. It may be necessary to restore to the module’s factory defaults to recover from this state. This procedure is described below.
3
Reserved(1)
4
1 = disable network
5
Reserved(1)
6
1 = halt scanner
Halt Scanner All scanner operations stop when this command is issued. No communication occur over either DeviceNet port. No M-file or discrete I/O mapping occurs. Outputs on the network are not under program control. If scanner was in Run mode, devices will go to their fault state.
7
1 = reboot
Reboot This command causes the scanner to reset as though power had been cycled. When this command is issued, all scanner communication stops for the duration of the scanner’s initialization sequence. Outputs on the network are no longer under program control. If scanner was in Run mode, devices will go to their fault state.
8…15
Reserved(1)
(1)
Disable Network The DeviceNet channel is disabled for communication. No communication may occur over this channel. Outputs on the network are not under program control. If scanner was in Run mode, devices will go to their fault state.
All reserve bits must be set to zero or improper operation may result.
Publication 1747-UM655B-EN-P - June 2007
Page 140
140
Data Organization
Restore Factory Default Settings/Flush Memory Follow these steps to restore the module’s factory default settings. 1. While the SLC processor in Program mode, clear the module command word 0 and set bit 2 of word 0 for the module to ON or 1 (starting with bit 0 going from right to left, this is the third bit). IMPORTANT
If other bits in the module command word are set, then the module will generate an error.
2. Set bit 0 of word 0 for the module to OFF or 0. 3. On the SLC processor, cycle the keyswitch from Program mode to Run mode then back to Program mode. IMPORTANT
The ladder logic may set bit 0 of word 0 for the module. If this happens, then you must disable or delete this rung from the ladder program.
4. When the code E9 is displayed on the Address/Error status display, the default settings have been restored. 5. Set bit 2 of word 0 for the module to OFF or 0. 6. Cycle power to the 1746 chassis to restore normal operation to the module. The module will now have its factory default settings: • node 63. • 125 Kbps. • no scanlist.
Publication 1747-UM655B-EN-P - June 2007
Page 141
Data Organization
141
SLC M0 File The SLC M0 file is a 256 word file that can be used to transfer a large quantity of information to the module with a single SLC instruction. Transferring data by using this file can take several scans and more time than by using the output image table. The first 150 words are used for sending data to DeviceNet nodes. The next 74 words are reserved for future use, the next 32 words are used for explicit message program control, and the final 139 words are used for pass-through. Please see page 133 for more details on the mapping of the input and output image tables and the M1 and M0 files.
Publication 1747-UM655B-EN-P - June 2007
Page 142
142
Data Organization
Publication 1747-UM655B-EN-P - June 2007