5 - How Communication Takes Place and I/O Image Table Mapping with the DeviceNet Adapter. Allen-Bradley FLEX I/O 1794-ID2
Advertisement
Advertisement
Chapter
5
How Communication Takes
Place and I/O Image Table
Mapping with the DeviceNet
Adapter
What This Chapter
Contains
About DeviceNetManager
Software
More
In this chapter, we tell you about:
For information on See page
About DeviceNetManager Software . . . . . . . . . . . . . . . . . . . . . . 5–1
Polled I/O Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–1
Adapter Input Status Word . . . . . . . . . . . . . . . . . . . . . . . . . . 5–2
System Throughput . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–3
Mapping Data into the Image Table . . . . . . . . . . . . . . . . . . . . . . . 5–3
Incremental Encoder Module (1794-ID2) Image Table Mapping . . .
Block Transfer Read Word Assignments . . . . . . . . . . . . . . . . 5–4
Block Transfer Write Word Assignments . . . . . . . . . . . . . . . . . 5–4
Word/Bit Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–5
Defaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–8
DeviceNetManager software is a tool used to configure your FLEX
I/O DeviceNet adapter and its related modules. This software tool can be connected to the adapter via the DeviceNet network.
You must understand how DeviceNetManager software works in order to add a device to the network. Refer to the DeviceNetManager
Software User Manual, publication 1787-6.5.3.
Polled I/O Structure
Network READ
Output data is received by the adapter in the order of the installed
I/O modules. The Output data for Slot 0 is received first, followed by the Output data for Slot 1, and so on up to slot 7.
The first word of input data sent by the adapter is the Adapter Status
Word. This is followed by the input data from each slot, in the order of the installed I/O modules. The Input data from Slot 0 is first after the status word, followed by Input data from Slot 2, and so on up to slot 7.
DeviceNet Adapter
Read Data
Adapter Status
Slot 0 Input Data
Slot 1 Input Data
Slot 7 Input Data
Read
Write
I/O Module
Slot 0
I/O Module
...
I/O Module
Slot 1 Slot 7
Write Data
Slot 0 Output Data
Slot 1 Output Data
Network WRITE
Slot 7 Output Data
Allen-Bradley Motors
Publication 1794-6.5.15 – December 1998
5–2
How Communication Takes Place and I/O Image Table Mapping with the DeviceNet Adapter
Adapter Input Status Word
Bit:
The input status word consists of:
•
I/O module fault bits – 1 status bit for each slot
• node address changed – 1 bit
•
I/O status – 1 bit
15 10 through 15 9 8 7 6
I/O Module Fault Bits
5 4 3 2 1 0
Not Used
I/O State Bit
Node Address Changed Bit
The adapter input status word bit descriptions are shown in the following table.
Bit Description
Node Address Changed
I/O State
Bit Explanation
6
7
4
5
2
3
0
1
This bit is set (1) when an error is detected in slot position 0.
This bit is set (1) when an error is detected in slot position 1.
This bit is set (1) when an error is detected in slot position 2.
This bit is set (1) when an error is detected in slot position 3.
This bit is set (1) when an error is detected in slot position 4.
This bit is set (1) when an error is detected in slot position 5.
This bit is set (1) when an error is detected in slot position 6.
This bit is set (1) when an error is detected in slot position 7.
8
This bit is set (1) when the node address switch setting has been changed since power up.
9
Bit = 0 – idle
Bit = 1 – run
10 thru 15 Not used – sent as zeroes.
Possible causes for an I/O Module Fault are:
• transmission errors on the Flex I/O backplane
• a failed module
• a module removed from its terminal base
• incorrect module inserted in a slot position
• the slot is empty
The node address changed bit is set when the node address switch setting has been changed since power up. The new node address does not take affect until the adapter has been powered down and then powered back up.
Publication 1794-6.5.15 – December 1998
How Communication Takes Place and I/O Image Table Mapping with the DeviceNet Adapter
System Throughput
System throughput, from incremental encoder to backplane, is a function of:
• the configured minimum frequency sample time
• the number of channels actually configured for connection to a specific sensor (0 or 1)
You can set the minimum frequency time during module configuration. The selection influences the sample data rate, thus affecting system throughput.
The number of channels included in each input scan also affects system throughput.
5–3
Mapping Data into the
Image Table
I/O Image
Input Size
1 to 8 Words
FLEX I/O incremental encoder module data table mapping is shown below.
Incremental Encoder Module (1794-ID2) Image Table Mapping
Module Image
R PD1 PD0 S1 S0 C1 C0 G1 Z1 B1 A1 G0
Store 0 – Saved Counter Value on channel 0
Z0 B0 A0
Store 1 – Saved Counter Value on channel 1
Channel 0 – current counter value on channel 0
Channel 1 – current counter value on channel 1
Channel 0 – Counter word readback
Channel 1 – Counter word readback
Code for identification of software version
Output Size
0 to 7 Words
Channel 0 Control Word– sets the function of counter 0
Channel 1 Control Word – sets the function of counter 1
Channel 0 Preset – value to load or compare with counter 0
Channel 1 Preset – value to load or compare with counter 1
Not used
Not used
Not used
Allen-Bradley Motors
Publication 1794-6.5.15 – December 1998
5–4
How Communication Takes Place and I/O Image Table Mapping with the DeviceNet Adapter
Block Transfer Read Word Assignments for the Incremental
Encoder Module (1794-ID2)
(Octal Bit
⇒
) 17
Dec. Bit
⇒
Word
⇓
1
2
15
16
14
Not used
15 14 13 12 11 10 07 06 05 04
13 12 11 10 09 08 07 06
Read
05 04
PR1 PR0 S1 S0 C1 C0 G1 Z1 B1
Channel 0 – Stored counter value on channel 0
A1
Channel 1 – Stored counter value on channel 1
Channel 0 – current counter value on channel 0
3
4
5
6
Channel 1 – current counter value on channel 1
Channel 0 – Counter word 0 readback
7
8
Channel 1 – Counter word 1 readback
Revision read – software version code
Where: A0 = Status of input A, channel 0 – bit = 1 when input is on
B0 = Status of input B, channel 0 – bit = 1 when input is on
Z0 = Status of input Z, channel 0 – bit = 1 when input is on
G0 = Status of input G, channel 0 – bit = 1 when input is on
G1 = Status of input G, channel 1 – bit = 1 when input is on
A1 = Status of input A, channel 1 – bit = 1 when input is on
B1 = Status of input B, channel 1 – bit = 1 when input is on
Z1 = Status of input Z, channel 1 – bit = 1 when input is on
C0 = Cal 0 – when bit is set, counter 0 has been calibrated (reset by CalReset)
C1 = Cal 1 – when bit is set, counter 1 has been calibrated (reset by CalReset)
S0 = Stored 0 – when bit is set, counter 0 value has been saved in Store 0 (reset by StoreReset)
S1 = Stored 1 – when bit is set, counter 1 value has been saved in Store 1 (reset by StoreReset)
Once a Store occurs, L0 and L1 are on until cleared by StoreReset (counter word bit 14)
PR0 = Preset 0 reached – when bit is set, counter 0 has reached value of preset
(reset by PresetReset)
PR1 = Preset 1 reached – when bit is set, counter 1 has reached value of preset
(reset by PresetReset)
03
03
G0
02
02
Z0
01
01
B0
00
00
A0
(Octal Bit)
⇒
17
Dec. Bit
⇒
Word
⇓
15
1
2
3
4
5–7
16
14
15
13
Block Transfer Write Word Assignments for the Incremental
Encoder Module (1794-ID2)
14 13 12 11 10 07 06 05 04 03
12 11 10 09 08
Write
07 06 05 04 03
Channel 0 Control Word – control word for setting the function of counter 0
Channel 1 Control Word – control word for setting the function of counter 1
Channel 0 Preset – value to load or compare with counter 0
Channel 1 Preset – value to load or compare with counter 1
Not used
02
02
01
01
00
00
Publication 1794-6.5.15 – December 1998
How Communication Takes Place and I/O Image Table Mapping with the DeviceNet Adapter
Word
Read
Read
Word 2
Read
Word 3
Read
Word 4
Read
Word 5
Read
Word 6
Read
Word 7
Read
Word 8
Bit/Word Definitions
for the incremental encoder Module (1794–ID2)
Bit 14–15
(16–17)
Bits 00–15
(00–17)
Bits 00–15
(00–17)
Bits 00–15
(00–17)
Bits 00–15
(00–17)
Bits 00–15
(00–17)
Bits 00–15
(00–17)
Bits 00–15
(00–17)
Bit
Bit 00
Bit 01
Bit 02
Bit 03
Bit 04
Bit 05
Definition
Status for input A (pulse transmitter 0) – This bit, when set, indicates a signal at A.
Status for input B (pulse transmitter 0) – This bit, when set, indicates a signal at B.
Status for input Z (pulse transmitter 0) – This bit, when set, indicates a signal at Z.
Status for input G (pulse transmitter 0) –This bit, when set, indicates a signal at G.
Status for input A (pulse transmitter 1) – This bit, when set, indicates a signal at A.
Status for input B (pulse transmitter 1) – This bit, when set, indicates a signal at B.
Bit 06
Bit 07
Status for input Z (pulse transmitter 1) – This bit, when set, indicates a signal at Z.
Status for input G (pulse transmitter 1) – This bit, when set, indicates a signal at G.
Bit 08 (10) Cal 0 – This bit, when set (1), indicates that counter 0 has been calibrated. This bit is reset by CalReset.
Bit 09 (11) Cal 1 – This bit, when set (1), indicates that counter 1 has been calibrated. This bit is reset by CalReset.
Bit 10 (12) Store 0 – This bit, when set (1), indicates a counter value is saved in store 0. This bit is reset by StoreReset.
Bit 11 (13) Store 1 – This bit, when set (1), indicates a counter value is saved in store 1. This bit is reset by StoreReset.
Bit 12 (14)
Bit 13 (15)
Preset Reached 0 (PR0) – When this bit is set (1), in all configuration modes, the counter 0 value equals the preset 0 value, either in a positive or negative direction. This bit is reset by PresetReset0 and can only be set again after at least 1 more pulse.
Preset Reached 1 (PR1) – When this bit is set (1), in all configuration modes, the counter 1 value equals the preset 1 value, either in a positive or negative direction. This bit is reset by PresetReset1 and can only be set again after at least 1 more pulse.
Not used – set to 0
Store 0 – Saved counter value on channel 0
Store 1 – Saved counter value on channel 1
Channel 0 Current Counter Value– Current value in counter 0
Channel 1 Current Counter Value– Current value in counter 1
Counter 0 Readback – Counter word readback – last value written to write word 1
Counter 1 Readback – Counter word readback – last value written to write word 2
Revision Read – identification of latest software version code
5–5
Allen-Bradley Motors
Publication 1794-6.5.15 – December 1998
5–6
How Communication Takes Place and I/O Image Table Mapping with the DeviceNet Adapter
Word
Write
Bit Definition
0–15 (0–17) Control 0 – Control word for setting the function of counter 0.
Bits 00–02 02 01 00 Mode Selection bits
Bit 03
Bit 04
Bit 05
Bits 06–08
Bits 09–10
Bits 11–12
0 0 0 Counting on positive (rising) edge of input signal A. (Up/dwn counting determined by B.)
0 0 1 Quadrature encoder X1
0 1 0 Quadrature encoder X2
0 1 1 Quadrature encoder X4
1 0 0 Counting up on the positive edge of input signal A, and down on positive edge of input signal B.
1 0 1 No count function.
1 1 0 No count function.
1 1 1 No count function.
Preset (Reset) bit – A positive edge on this bit moves the value in Preset X to Counter X, independent of Preset
Enable. NOTE: To use Preset as Reset, use a count value of 0000 in the Preset value word.
Enable Z Preset bit – When this bit is set (1), a positive edge on Z preloads Counter X = Preset X, independent of
Cal Enable. NOTE: If Z is configured to do Store and Preset (Reset), the Store will occur first.
Count Enable bit – When this is set (1), the incremental encoder is enabled.
Calibration Control bits – bits 06, 07 and 08
06 Enable bit – When this bit is set (1), the counter can be calibrated.
07 Direction bit – When this bit set (1), calibration is performed in a negative direction; when reset (0), calibration is performed in a positive direction.
08 Reset bit – Calibration is acknowledged and a new calibration is enabled on a positive edge on this bit.
10 09
Gate Control bits
0 0 No gate function on input G
0 1 Counting only if G is high (active)
1 0 Counting only if G is low (inactive)
1 1 The counter can be calibrated when G is high (active).
12 11
Store Control bits
0 0 Save the counter value on the positive edge of Z (if Stored X = 0)
0 1 Save the counter value on the positive edge of G (if Stored X = 0)
1 0 Save the counter value on the negative edge of G (if Stored X = 0)
1 1 Save the counter value on the positive edge and negative edge of G (if Stored X = 0)
Bit 13 (15) Rollover bit – When set (1), the counter counts up to the preset and then restarts at 0. If this bit is reset (0) (not rollover), the rollover preset value = FFFF (hex = 65535 (decimal).
Bit 14 (16) Store Reset bit – A positive edge on this bit resets Stored X in Signals.
Bit 15 (17) Preset Reset bit – A positive edge on this bit resets Preset Detected in Signals.
Publication 1794-6.5.15 – December 1998
How Communication Takes Place and I/O Image Table Mapping with the DeviceNet Adapter
Word
Write
Write
Word 3
Write
Word 4
Write
Words
5–7
Bit Definition
Channel 1 Control Word – Control word for setting the function of counter 1.
Bits 00–02 Bit 02 01 00
Mode Selection bits
Bit 03
Bit 04
Bit 05
Bits 06–08
Bits 09–10
Bits 11–12
0 0 0 Counting on positive (rising) edge of input signal A. (Up/dwn counting determined by B.)
0 0 1 Quadrature encoder X1
0 1 0 Quadrature encoder X2
0 1 1 Quadrature encoder X4
1 0 0 Counting up on the positive edge of input signal A, and down on positive edge of input signal B.
1 0 1 No count function.
1 1 0 No count function.
1 1 1 No count function.
Preset bit – A positive edge on this bit moves the value in Preset X to Counter X, independent of Preset Enable.
Preset Enable bit – When this bit is set (1), a positive edge on Z preloads Counter X = Preset X, independent of
Cal Enable.
Count Enable bit – When this is set (1), the incremental encoder is counting.
Calibration Control bits – bits 06, 07 and 08
06 Enable bit – When this bit is set (1), the counter can be calibrated.
07 Direction bit – When this bit set (1), calibration is performed in a negative direction; when reset (0), calibration is performed in a positive direction.
08 Reset bit – Calibration is acknowledged and a new calibration is enabled on a positive edge on this bit.
10 09
Gate Control bits
0 0 No gate function on input G
0 1 Counting only if G is high (active)
1 0 Counting only if G is low (inactive)
1 1 Calibration if G is high (active) and ???
12 11
Latch Control bits
0 0 Save the counter value on the positive edge of Z (if Stored X = 0)
0 1 Save the counter value on the positive edge of G (if Stored X = 0)
1 0 Save the counter value on the negative edge of G (if Stored X = 0)
1 1 Save the counter value on the positive edge and negative edge of G (if Stored X = 0)
Bit 13 (15) Rollover bit – When set (1), the counter counts up to the preset and then restarts at 0. If this bit is reset (0) (not rollover), the rollover preset value = FFFF (hex = 65535 (decimal).
Bit 14 (16) Store Reset bit – A positive edge on this bit resets Stored X in Signals.
Bit 15 (17) Store Reset bit – A positive edge on this bit resets Preset Reached in Signals.
Bits 00–15
(00–17)
Preset 0 – Value to load or compare with counter 0
Bits 00–15
(00–17)
Bits 00–15
(00–17)
Preset 1 – Value to load or compare with counter 1
Not used – set to 0.
Allen-Bradley Motors
Publication 1794-6.5.15 – December 1998
5–7
5–8
Defaults
How Communication Takes Place and I/O Image Table Mapping with the DeviceNet Adapter
More
Each I/O module has default values associated with it. At default, each module will generate inputs/status and expect outputs/configuration.
Catalog
Number
1794-ID2
Module Defaults for:
Description
incremental encoder Module
Factory Defaults Real Time Size
Input
Default
9
Output
Default
7
Input
Default
4
Output
Default
0
Factory defaults are the values assigned by the adapter when you:
• first power up the system, and
• no previous stored settings have been applied.
For incremental encoder modules, the defaults reflect the actual number of input words/output words. For example, for the incremental encoder module, you have 9 input words, and 7 output words.
You can change the I/O data size for a module by reducing the number of words mapped into the adapter module, as shown in “real time sizes.”
Real time sizes are the settings that provide optimal real time data to the adapter module.
The incremental encoder modules have 15 words assigned to them.
This is divided into input words/output words. You can reduce the
I/O data size to fewer words to increase data transfer over the backplane.
For information on using DeviceNetManager software to configure your adapter, refer to the DeviceNetManager Software User Manual, publication 1787-6.5.3.
Publication 1794-6.5.15 – December 1998

Public link updated
The public link to your chat has been updated.
Advertisement