Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 16 of 19

PLC-5 DeviceNet Scanner Module 1771-SDN User Manual: D - Data Map Example

Pages 123 to 132 of 149, from PLC-5 DeviceNet Scanner Module 1771-SDN User Manual

The original document is the PDF (3.4 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 1771-SDN

Page 123

Appendix

D

Data Map Example This appendix describes a basic mapping example that connects two DeviceNet networks (channels A and B of the 1771-SDN scanner) to 62 simple sensor-type devices. Each device sends one data byte that contains one data bit and one status bit. These are given in response to a strobe message. With channel A only, the scanner maps this data to the discrete I/O table if it is available; otherwise, the data is mapped to block transfer locations.

More

Example Input Mapping Scheme

See the 1771-SDN DeviceNet Scanner Installation Instructions (pub. no. 1771-IN014) for details on using block transfer read and write operations to communicate between your PLC-5 processor and 1771-SDN scanner. This example’s input mapping scheme is a simplified and fixed map of discrete input data and status bits for DeviceNet devices. It is mapped to discrete inputs and the device input data table. An example for each slot-addressing mode is given.

Example Characteristics • strobe is used to query DeviceNet devices • poll is disabled • Devicenet A and B ports are connected to separate networks • the input data bit is fixed and occupies the lowest-order bit in the lowest-order byte of the strobe (bit #0) • one bit of status data is accepted from each node responding to the strobe • the status data bit is fixed and occupies the next lowest-order bit in the next lowest-order byte (after the input data bit) of the strobe (i.e., bit #1) • input and status data bits accepted from each node are mapped to discrete inputs and the device input data table of the scanner • input and status data bits accepted from each node are fixed and predefined

1

Publication 1771-UM118C-EN-P - June 2003

Page 124

D-2

Data Map Example

Example Framework Based on the backplane addressing mode and the scanner’s block transfer support, the following number of discrete inputs are supported. Addressing Mode 2-slot 1-slot 1/2-slot

Discrete Inputs 0 8 24

This example adheres to the following structure: • only one master scanner can own a device; there may, however, be multiple masters on a network • interface nodes (KFDs, PCDs, etc.) should be assigned node numbers 62, 61, 60, etc. • node number 63 should always be left available to add a new default device • address 0 is normally used for the scanner. Scanners in multi-scanner networks are numbered 0, 1, 2, etc. • the first word in the device input data table contains the module command word (this is applicable under any mapping scheme) • input data and status bits received from nodes 1-62 on channel A are mapped to both the discrete inputs and the device input data table • no discrete inputs are used for channel B • the device input data table is segmented –one word for the module status word –four words each for channel A and B devices’ input data bits –four words each for channel A and B devices’ status data bits

Publication 1771-UM118C-EN-P - June 2003

Page 125

Data Map Example

D-3

Input Data Table Formats The manner in which bits are mapped to the input data table depends on the address density used. The following example is a 2-slot configuration. Note that discrete mapping is not possible in 2-slot mode. Bit numbering in the data table is right to left, beginning with zero.

Note: 1 word = 2 bytes 1 byte = 8 bits Each device’s status and data bits are mapped into the device input data table. Data bits from devices on channel A are mapped into the first four words after the module status word in ascending, numeric order according to the device’s node address. For example, node #1 is mapped then node #2, #3, #4, and so on. Input data bits from channel B as well as status bits from channels A and B are mapped into similar four-word groups. These bits are also ordered by node address in ascending numeric order.

15

0 Module Status

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 word 2

Input Data Bits from Channel A Devices bits 16-79 word 3 79 word 4

81 80 2D 1D

Device Input Input Data Bits from Channel B Devices Channel A word 5 word 6 bits 80-143

1 byte S D node #2 word 1

2D 1D

95 node #1 word 0

1 byte S D

Note: D = data bit S = status bit word 7 143 word 8

1D & 1S = data and status bits for node #1 159 2D & 2S = data and status bits for node #2

145 144 word 10

Status Bits from Channel A Devices to node #62 word 9

2S 1S bits 144-206 word 11

Channel B node #1

206

1 byte word 12

S D 222 node #2

208 207 2S 1S

1 byte Status Bits from Channel B Devices

S D word 13 word 14 bits 207-270 word 15 to node #62

270 word 16

Publication 1771-UM118C-EN-P - June 2003

Page 126

D-4

Data Map Example

In 1-slot addressing mode eight bits are available for discrete input mapping, as shown below. Note: 1 word = 2 bytes 1 byte = 8 bits

Bit numbering in the data table is right to left, beginning with zero. 15

Input Image Table

0 Module Status word 0

23 22 21 20 19 18 17 16 2D 1D 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 (for discrete input data bits)

word 1 word 2

Input Data Bits from Channel A Devices bits 24-79 word 3 In 1-slot addressing, the first eight bits after the module status word are used for the input image table. This table is for discrete input bits. Data bits for node addresses 1-8 are mapped to this area in ascending numeric order according to node address.

79 word 4

81 80

95 word 6

Input Data Bits from Channel B Devices Device Input bits 80-143 word 7

Channel A node #1

1 byte S D node #2 word 5

2D 1D

1 byte S D

Note: D = data bit S = status bit 1D & 1S = data and status bits for node #1 2D & 2S = data and status bits for node #2

143 word 8

145 144

159 word 9

2S 1S word 10

Status Bits from Channel A Devices bits 144-206 word 11 to node #62 206 Channel B node #1 word 12

1 byte S D

222

208 207 2S 1S node #2

1 byte

Status Bits from Channel B Devices word 13 word 14 bits 207-270

S D word 15 270 to node #62

Publication 1771-UM118C-EN-P - June 2003 word 16

Page 127

Data Map Example

D-5

In 1/2-slot addressing 24 bits are available for discrete input mapping, as shown below. Note: 1 word = 2 bytes 1 byte = 8 bits

Bit numbering in the data table is right to left, beginning with zero. 15

0 Module Status word 0

Input Image Table 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40

23 22 21 20 19 18 17 16 2D 1D 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24

Input Data Bits from Channel A Devices word 2 bits 40-79 (for discrete input data bits) In 1/2-slot addressing, the first 24 bits after the module status word are used for the input image table. This table is for discrete input bits. Data bits for channel A node addresses 1-24 are mapped to this area in ascending numeric order according to node address word 1

79 word 3 word 4

81 80

95 word 5

2D 1D word 6

Input Data Bits from Channel B Devices Device Input bits 80-143 word 7

Channel A node #1

1 byte S D node #2

1 byte S D

Note: D = data bit S = status bit 1D & 1S = data and status bits for node #1 2D & 2S = data and status bits for node #2

143 word 8

145 144

159 word 9

2S 1S word 10

Status Bits from Channel A Devices bits 144-206 word 11 to node #62 206 Channel B node #1 word 12

1 byte S D

222

208 207 2S 1S node #2

1 byte

Status Bits from Channel B Devices word 13 word 14 bits 207-270

S D word 15 270 to node #62 word 16

Publication 1771-UM118C-EN-P - June 2003

Page 128

D-6

Data Map Example

Example Output Mapping Scheme

This example’s output mapping scheme is a simplified and fixed map of the discrete outputs and data from the device output data table to DeviceNet devices. Devices present in the default database are strobed only; therefore, the output data map bits are mapped into each network’s strobe message. If the discrete table is available, it serves as a source for the strobe bits; otherwise, the source is found in block transfer locations.

Example Characteristics • strobe is used to send output to the DeviceNet devices • poll is disabled • DeviceNet A and B ports are connected to separate networks • one output data bit each is sent to nodes 1-62 on channel A • the output data bits are embedded in the 8 byte (64 bit) data portion of the DeviceNet strobe message • the output bit string source within the strobe message is divided across the discrete outputs (if any) assigned to the scanner and the device output data table

Example Framework Based on the backplane addressing mode and the scanner’s block transfer support, the following number of discrete outputs are supported: Addressing Mode 2-slot 1-slot 1/2-slot

Discrete Outputs 0 8 24

This example adheres to the following structure: • when a 1771-SDN scanner is running this configuration, there cannot be any other 1771-SDN scanner on that network • DeviceNet devices may reside only at nodes 1-62 • address 0 must be used for the scanner • the first word in the device output data table contains the module command word (this is applicable under any mapping scheme) • output bits intended for nodes 1-62 on channel A are mapped to both the discrete outputs and the device output data table • no discrete outputs are used for channel B Publication 1771-UM118C-EN-P - June 2003

Page 129

Data Map Example

D-7

Output Data Table Formats The following illustrates an output data mapping scheme example for a scanner in 2-slot addressing mode. Note: 1 word = 2 bytes 1 byte = 8 bits

16 bit number

N1 node number N1 = node #1

Bit numbering in the data table is right to left, beginning with zero.

15

0 Module Command

In 2-slot addressing mode, the output bits for channel A and channel B devices are written to the scanner’s output data table. The bits are stored in ascending numeric order, according to node address. The mapping begins with channel A devices at bit 16 of the table. There are 64 possible node addresses per network. Channel A devices fill the first four words (after the module status word). Channel B devices fill the last four words of the table.

31

16 word 0 word 1

N1 39 word 2

N23 word 3 Channel A 79 word 4

80

95 word 5

N1

Channel B word 6 125 word 7

N45 143 The scanner takes the output bits from its output data table and organizes them into a strobe message. The strobe message contains one bit for each node address, 0-63. In default mode, the scanner is node 63; therefore, this bit is empty. The scanner sends a separate strobe message to each network, via channel A and channel B.

word 8

Each node’s output bit is mapped to a bit number in the strobe message that directly corresponds to that particular node’s MAC ID. For example, the output bit for node #23 is mapped to strobe bit #23.

Bit numbering in the data table is right to left, beginning with zero.

Output Data Strobe Message channel A 63 - - - - - - - - - - - - - - - - - - - - - - - - -

23 - - - - - - - - - - - - - - N23

1 0 N1

Output Data Strobe Message channel B 63 - - - - - - - - - - -

45 - - - - - - - - - - - - - - - - - - - - - - - - - - - - N45

1 0 N1

Publication 1771-UM118C-EN-P - June 2003

Page 130

D-8

Data Map Example

The following is an output data mapping scheme example for a scanner in 1-slot addressing mode. Note: 1 word = 2 bytes 1 byte = 8 bits

16 bit number

N1 node number N1 = node #1

Bit numbering in the data table is right to left, beginning with zero.

15

Output Image Table

0 Module Command

23 22 21 20 19 18 17 16 N1

39

24

(for discrete output data bits) In 1-slot addressing mode, eight bits of the output data table are used for the output image table. The image table is for discrete output bits. In the default mode, the processor writes the output bits of the first eight nodes to the output image table via DIO. The output bits from the remaining nodes are written to the output data table.

word 2 word 3 Channel A 79 word 4

80

Channel B word 6 125 word 7

143 word 8

Each node’s output bit is mapped to a bit number in the strobe message that directly corresponds to that particular node’s MAC ID. For example, the output bit for node #23 is mapped to strobe bit #23.

Bit numbering in the data table is right to left, beginning with zero.

Output Data Strobe Message channel A 63 - - - - - - - - - - - - - - - - - - - - - - - - -

23 - - - - - - - - - - - - - - N23

1 0 N1

Output Data Strobe Message channel B 63 - - - - - - - - - - -

45 - - - - - - - - - - - - - - - - - - - - - - - - - - - - N45

Publication 1771-UM118C-EN-P - June 2003 word 5

N1

N45

The scanner takes the output bits from its output data table and organizes them into a strobe message. The strobe message contains one bit for each node address, 0-63. In default mode, the scanner is node 0; therefore, this bit is empty. The scanner sends a separate strobe message to each network, via channel A and channel B.

word 1

N9

95 Note that the output image table begins with bit #16, where the output bit for node #1 (MAC ID 1) is written. The output data table now begins with bit #40, where the output bit for node #25 (MAC ID 25) is written.

word 0

1 0 N1

Page 131

Data Map Example

D-9

The following is an output data mapping scheme example for a scanner in 1/2-slot addressing mode.

Note: 1 word = 2 bytes 1 byte = 8 bits

16 bit number

N1 node number N1 = node #1

Bit numbering in the data table is right to left, beginning with zero.

15

0 Module Command word 0

Output Image Table 55

23 22 21 20 19 18 17 16 N1

40 N25

39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 N23 word 2

(for discrete output data bits) In 1/2-slot addressing mode, 24 bits of the output data table are used for the output image table. The image table is for discrete output bits. In the default mode, the processor writes the output bits of the first 24 nodes to the output image table via DIO. The output bits from the remaining nodes are written to the output data table.

word 1

79 word 3

Channel A word 4

80

95 word 5

N1

Channel B word 6 Note that the output image table begins with bit #16, where the output bit for node #1 (MAC ID 1) is written. The output data table now begins with bit #40, where the output bit for node #25 (MAC ID 25) is written. The scanner takes the output bits from its output data table and organizes them into a strobe message. The strobe message contains one bit for each node address, 0-63. In default mode, the scanner is node 0; therefore, this bit is empty. The scanner sends a separate strobe message to each network, via channel A and channel B.

125 word 7

N45 143 word 8

Each node’s output bit is mapped to a bit number in the strobe message that directly corresponds to that particular node’s MAC ID. For example, the output bit for node #23 is mapped to strobe bit #23.

Bit numbering in the data table is right to left, beginning with zero.

Output Data Strobe Message channel A 63 - - - - - - - - - - - - - - - - - - - - - - - - -

23 - - - - - - - - - - - - - - N23

1 0 N1

Output Data Strobe Message channel B 63 - - - - - - - - - - -

45 - - - - - - - - - - - - - - - - - - - - - - - - - - - - N45

1 0 N1

Publication 1771-UM118C-EN-P - June 2003

Page 132

D-10

Data Map Example

Notes

Publication 1771-UM118C-EN-P - June 2003