6- Input, Output and Configuration Files for Analog Modules when used with ControlNet. Allen-Bradley FLEX I/O 1794-ID2
Advertisement
Advertisement
Chapter
6
Input, Output and
Configuration Files for Analog
Modules when used with
ControlNet
Chapter Objectives
In this chapter you will learn about:
•
ControlNet Adapter
•
I/O structure
• safe state data
• communication fault data
• idle state behavior
• input data behavior upon module removal
About the ControlNet
Adapter
The FLEX I/O ControlNet adapters (cat. no. 1794–ACN15 and
–ACNR15) interfaces up to 8 FLEX I/O modules and a ControlNet processor or scanner. The adapter can support ControlNet real–time data connections to individual modules or module groups. Each connection is independent of the others and can be from different processors or scanners.
Communication Over the
FLEX I/O Backplane
One 1794-ACN15 and -ACNR15 ControlNet adapter can interface up to eight terminal base units with installed FLEX I/O modules, forming a FLEX I/O system of up to eight slots. The adapter communicates to other network system components (typically one or more controllers or scanners, and/or programming terminals) over the ControlNet network. The adapter communicates with its I/O modules over the backplane.
I/O Module
0
Inputs
I/O Module
Inputs
I/O Module
Inputs
Read
Status
Read
Words
Status Status
ControlNet
Adapter
Network
Write
Outputs
Configuration
15
Slot 0
Write
Words
Outputs
Configuration
Slot 1
Outputs
Configuration
Slot 7
Data is exchanged scheduled (when mapped) or unscheduled (using
CIO instructions).
Allen-Bradley Motors
6–2
Input, Output and Configuration Files for Analog Modules when used with ControlNet
Scheduled Data-Transfer
Scheduled data transfer:
• is continuous
• is asynchronous to the ladder-logic program scan
• occurs at the actual rate displayed in the Actual Packet Interval field on the programming software ControlNet I/O mapping
(monitor) screen
Unscheduled Data-Transfer
Unscheduled operations include:
• unscheduled non-discrete I/O data transfers—through ControlNet
I/O Transfer (CIO) instructions
• peer-to-peer messaging—through Message (MSG) instructions
• messaging from programming devices
Unscheduled messaging on a ControlNet network is non-deterministic. Your application and your configuration—number of nodes, application program, NUT, amount of scheduled bandwidth used, etc.—determine how much time there is for unscheduled messaging.
Module I/O Mapping
The I/O map for a module is divided into read words and write words. Read words consist of input and status words, and write words consist of output and configuration words. The number of read words or write words can be 0 or more. The length of each I/O module’s read words and write words vary in size depending on module complexity. Each I/O module will support at least 1 input word or 1 output word. Status and configuration are optional, depending on the module.
For example, a 16 point discrete input module will have up to 2 read words and 1 write word.
16-point Discrete Input Module
ControlNet Image
Input Size
1 or 2 Words
Configuration Size
0 or 1 Word
Module Image
Inputs
Not used
Not used
Delay
Time
Delay
Time
Check the I/O map for each module for the exact mapping.
Publication 1794-6.5.15 – December 1998
I/O Structure
Input, Output and Configuration Files for Analog Modules when used with ControlNet
6–3
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.
ControlNet Adapter
Read Data
Adapter Status
Slot 0 Input Data
Slot 1 Input Data
Slot 7 Input Data
Output Data
Slot 0 Output Data
Slot 1 Output Data
Read
Write
I/O Module
Slot 0
I/O Module
...
Slot 1
I/O Module
Slot 7
Network WRITE
Slot 7 Output Data
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 (created by PLC–5 controller)
•
I/O status – 1 bit (created by PLC–5 controller)
15 10 through 15 9 8 7 6
I/O Module Fault Bits
5 4 3 2 1 0
Not Used
Created by PLC–5 controller
I/O State Bit
Node Address Changed Bit
The adapter input status word bit descriptions are shown in the following table.
Allen-Bradley Motors
Publication 1794-6.5.15 – December 1998
6–4
Input, Output and Configuration Files for Analog Modules when used with ControlNet
Bit Description
Node Address Changed
(Created by PLC–5 controller.)
I/O State (Created by
PLC–5 controller.)
Bit
5
6
7
2
3
0
1
4
Explanation
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 – set to 0.
Safe State Data
Device Actions
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 slot contains a non–discrete module
The ControlNet adapter provides storage for alternate module output data during communication faults or processor idle state. This “safe state data” assures that a known output will be applied to the output devices to maintain a previously designated safe operating condition during the previously mentioned failure modes. The processor or scanner software must include the means to specify this safe state data for each module. If applicable, this data is sent in the configuration block (see Image Table Mapping later in this chapter).
Device actions include:
• communication fault behavior
• idle state behavior
• input data behavior upon module removal
Publication 1794-6.5.15 – December 1998
Input, Output and Configuration Files for Analog Modules when used with ControlNet
6–5
Communication Fault Behavior
You can configure the adapter response to a communication fault for each I/O module in its system. Upon detection of a communication fault, the adapter can:
• leave the module output data in its last state (hold last state)
• reset the module output data to zero (reset)
• apply safe state data to the module output
Idle State Behavior
The ControlNet adapter can detect the state of the controlling processor or scanner. Only 2 states can be detected: run mode, or program mode (idle).
When run mode is detected, the adapter copies the output data received from the processor to the corresponding module output.
When program mode is detected, the adapter can be configured to:
• leave the module output data in its last state (hold last state)
• reset the module output data to zero (reset)
• apply safe state data to the module output
Input Data Behavior upon Module Removal
I/O module input data sent by the adapter upon module removal is configurable. The adapter can:
• reset the module output data to zero (reset)
• leave the module output data in the last state before module removal (hold last state)
Allen-Bradley Motors
Publication 1794-6.5.15 – December 1998
6–6
Input, Output and Configuration Files for Analog Modules when used with ControlNet
ControlNet Files
Input File Size
1 to 8 Words
Incremental Encoder Module (1794-ID2) Image Table Mapping
Module Image
R PD1 PD0 S1 S0 C1 C0 G1 Z1 B1 A1 G0 Z0 B0 A0
Store 0 – Stored Counter Value on channel 0
Store 1 – Stored Counter Value on channel 1
Channel 0 – current counter value
Channel 1 – current counter value
Channel 0 – Counter word readback
Channel 1 – Counter word readback
Code for identification of software version
Output File Size
0 to 4 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
Configuration File Size
0 to 4 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
Input Word Bit
Bit 00
Bit 01
Bit 02
Bit 03
Bit 04
Bit 05
Bit/Word Definitions for Block Transfer Read Words
for the
Incremental Encoder Module
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.
Publication 1794-6.5.15 – December 1998
Input, Output and Configuration Files for Analog Modules when used with ControlNet
Input Word
Word 0
Word 1
Word 2
Word 3
Word 4
Word 5
Word 6
Word 7
Bit Definition
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 (PR0) – 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.
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)
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
Channel 0 Readback– Counter word readback)
Channel 0 Readback– Counter word readback)
Software identification
6–7
Allen-Bradley Motors
Publication 1794-6.5.15 – December 1998
6–8
Input, Output and Configuration Files for Analog Modules when used with ControlNet
Output
Word
Word 0
Bit
Definition
Channel 0 Control Word – 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
0
0
0
0
0 0
0 1
1 0
1 1
Counting on positive (rising) edge of input signal A. (Up/dwn counting determined by B.)
Quadrature encoder X1
Quadrature encoder X2
Quadrature encoder X4
1
1
1
1
0
0
1
1
0
1
0
1
Counting up on the positive edge of input signal A, and down on positive edge of input signal B.
No count function.
No count function.
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 pulse counter 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
Bits 09–10
Bits 11–12
1
1
0
0
0
1
0
1
No gate function on input G
Counting only if G is high (active)
Counting only if G is low (inactive)
The counter can be calibrated when G is high (active).
12 11 Store Control bits – These bits will trigger a Store only if the channel Store status bit (L0 or L1) is cleared (0).
0 0 Save the counter value on the positive edge of Z (if Stored X = 0)
0
1
1 Save the counter value on the positive edge of G (if Stored X = 0)
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 Store X in Signals.
Bit 15 (17) Preset Reset bit – A positive edge on this bit resets Preset Reached in Signals.
Publication 1794-6.5.15 – December 1998
Input, Output and Configuration Files for Analog Modules when used with ControlNet
6–9
Output
Word
Word 1
Word 2
Word 3
Bit
Definition
Channel 1 Control Word – Control word for setting the function of counter 1.
Bits 00–02 02 01 00
Mode Selection bits
Bit 03
Bit 04
Bit 05
Bits 06–08
1
1
1
1
0
0
0
0
0 0
0 1
1 0
1 1
0 0
0 1
1 0
1 1
Counting on positive (rising) edge of input signal A. (Up/dwn counting determined by B.)
Quadrature encoder X1
Quadrature encoder X2
Quadrature encoder X4
Counting up on the positive edge of input signal A, and down on positive edge of input signal B.
No count function.
No count function.
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 pulse counter 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.
Bits 09–10 10 09
Gate Control bits
0 0 No gate function on input G
0
1
1
0
Counting only if G is high (active)
Counting only if G is low (inactive)
Bits 11–12
1 1 Calibration if G is high (active) and ???
12 11 Store Control bits – These bits will trigger a Store only if the channel Store status bit (L0 or L1) is cleared (0).
0 0 Save the counter value on the positive edge of Z (if Store X = 0)
0
1
1
1 Save the counter value on the positive edge of G (if Store X = 0)
0 Save the counter value on the negative edge of G (if Store X = 0)
1 Save the counter value on the positive edge and negative edge of G (if Store X = 0)
Bit 13 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).
Store Reset bit – A positive edge on this bit resets Store X in Signals.
Bit 14
Bit 15 Store Reset bit – A positive edge on this bit resets Preset Detected in Signals.
Bits 00–15 Preset 0 – Value to load or compare with counter 0
Bits 00–15 Preset 1 – Value to load or compare with counter 1
Allen-Bradley Motors
Publication 1794-6.5.15 – December 1998
6–10
Input, Output and Configuration Files for Analog Modules when used with ControlNet
Configuration
Word
Word 0
Bit
Definition
Channel 0 Control Word – 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
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 pulse counter 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.
Bits 09–10
Bits 11–12
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 – These bits will trigger a Store only if the channel Store status bit (L0 or L1) is cleared (0).
0 0 Save the counter value on the positive edge of Z (if Latched X = 0)
0 1 Save the counter value on the positive edge of G (if Latched X = 0)
1 0 Save the counter value on the negative edge of G (if Latched X = 0)
1 1 Save the counter value on the positive edge and negative edge of G (if Latched 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 Store 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
Input, Output and Configuration Files for Analog Modules when used with ControlNet
6–11
Configuration
Word
Word 1
Word 2
Word 3
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
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
Bit 03
Bit 04
Bit 05
Bits 06–08
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 pulse counter 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.
Bits 09–10 10 09
Gate Control bits
Bits 11–12
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 Store Control bits – These bits will trigger a Store only if the channel Store status bit (L0 or L1) is cleared (0).
0 0 Save the counter value on the positive edge of Z (if Store X = 0)
Bit 13
0 1 Save the counter value on the positive edge of G (if Store X = 0)
1 0 Save the counter value on the negative edge of G (if Store X = 0)
1 1 Save the counter value on the positive edge and negative edge of G (if Store X = 0)
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
Bit 15
Store Reset bit – A positive edge on this bit resets Store X in Signals.
Store Reset bit – A positive edge on this bit resets Preset Detected in Signals.
Bits 00–15 Preset 0 – Value to load or compare with counter 0
Bits 00–15 Preset 1 – Value to load or compare with counter 1
Allen-Bradley Motors
Publication 1794-6.5.15 – December 1998
6–12
Input, Output and Configuration Files for Analog Modules when used with ControlNet
Publication 1794-6.5.15 – December 1998

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