0% found this document useful (0 votes)
34 views60 pages

7CM211.7 Datasheet

Uploaded by

My Channel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views60 pages

7CM211.7 Datasheet

Uploaded by

My Channel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 60

CM211

11.1 CM211

11.1.1 Order Data

Model No. Short Description Image


7CM211.7 2003 Combination Module, 8 inputs, 24 VDC, 4 ms, sink,
3 one channel or 2 two channel counters or 2 incremental
encoders, 20 kHz, 8 transistor outputs, 24 VDC, 0.5 A,
comparator function, short-circuit protection, 2 inputs,
±10 V / 0-20 mA, 12 bit, 2 outputs, ±10 V, 12 bit. Order
TB718 terminal block separately.
7TB718.9 Terminal block, 18 pin, screw clamps
7TB718.91 Terminal block, 18 pin, cage clamps
7TB718:90-02 Terminal block, 18 pin, 20 pcs., screw clamps
7TB718:91-02 Terminal block, 18 pin, 20 pcs., cage clamps
7TB736.9 2003 terminal block, 36 pin, screw clamps
7TB736.91 2003 terminal block, 36 pin, cage clamps
7TB754.9 2003 terminal block, 54 pin, screw clamps
7TB754.91 2003 terminal block, 54 pin, cage clamps
Terminal blocks are not included in the delivery.

Table 18: CM211 order data

11.1.2 Technical Data

Product ID CM211
General Information
C-UL-US Listed In preparation
B&R ID Code $C3
Module Type B&R 2003 I/O module
Amount 1)
CP430, EX270, EX470, EX770 2
CP470, CP770, CP474, CP476, CP774 4
EX477, EX777 4
External Voltage Monitoring Yes (LED: OK), supply voltage >18 V
Electrical Isolation
Analog - PLC No
Digital - PLC No
Digital - Analog No
Power Consumption Max. 1.5 W

Table 19: CM211 technical data

B&R SYSTEM 2003 User’s Manual 57


CM211

Product ID CM211
Analog Inputs
Input Type Asymmetric
Number of Inputs 2
Input Signal - Nominal ±10 V / 0 - 20 mA can be set for each channel with switch
Maximum Continuous Overload (without damage) ±15 V / ±50 mA
Digital Converter Resolution 12 bit
Data Format Delivered to the Application Program 16 bit 2s complement
Value Range
Voltage
+10 V $7FFF
0V $0000
-10 V $8001
Current
20 mA $7FFF
0 mA $0000
Measurement Range Monitoring
Open Inputs $7FFF
Range Exceeded (neg.)
Voltage $8001
Current $0000
Range Exceeded (pos.) $7FFF
General Error $8000
Conversion Method Successive approximation
Conversion Time <4 ms for both channels, the channels are converted cyclically
Input Impedance in Signal Range for voltage input ≥1 MΩ
input impedance in signal range for current input 95 - 200 Ω
(load)
Measurement Precision at 25 °C Voltage Current
Offset ±2.62 mV ±5.29 µA
Gain ±0.2 % 2) ±0.2 % 2)
Offset Drift ±2 mV/°C ±5.9 µA/°C
Gain Drift ±65 ppm/°C 3) ±75 ppm/°C 3)
LSB Value (12 Bit) ±2.53 mV ±0.09 mV ±5.09 µA ±0.2 µA
Non-Linearity ±2 LSB
Input Filter Cut-off Frequency 500 Hz
Analog Outputs
Number of Outputs 2
Output Signal ±10 V
Load Max. ±10 mA
Digital Converter Resolution 12 bit
Data Format in Application Program 16 bit 2s complement

Table 19: CM211 technical data (cont.)

58 B&R SYSTEM 2003 User’s Manual


CM211

Product ID CM211
Value Range
+10 V $7FFF
0V $0000
-10 V $8001
Conversion Time <4 ms for both channels
Load Impedance ≥1 kΩ
Measurement Precision at 25 °C
Offset ±5.14 mV
Gain ±0.2 % 2)
Offset Drift ±1.2 mV/°C
Gain Drift ±40 ppm / °C 3)
LSB Value (12 Bit) ±5.01 mV ±0.13 mV
Non-Linearity ±3.5 LSB
Short Circuit Protection Yes
Digital Inputs
Number of Inputs 8
Type of Inputs 3 x event counters, 3 x period measurement, 3 x gate measurement, 2 x incremental
encoder ABR (+24 V), 1 x comparator
Input Voltage
Minimum 18 VDC
Nominal 24 VDC
Maximum 30 VDC
Input Current at Nominal Voltage Approx. 4 mA
Wiring Sink
Switching Threshold
LOW Range <5V
HIGH Range > 15 V
Delay 0 to 1
with SW Filter <4 ms (default)
without SW Filter < 0.01 ms
Delay 1 to 0
with SW Filter <4 ms (default)
without SW Filter < 0.01 ms
Status Display 8 Green LEDs

Table 19: CM211 technical data (cont.)

B&R SYSTEM 2003 User’s Manual 59


CM211

Product ID CM211
Incremental Encoder Operation
Signal Form Square wave pulse
Evaluation 4-fold, cyclic counter
Input Frequency 20 kHz
Count Frequency 80 kHz
Counter Size 32 bit

Input 1 Reference enable switch 1


Input 2 Channel A1
Input 3 Channel B1
Input 4 Channel R1

Input 5 Channel A2
Input 6 Channel B2
Input 7 Channel R2
Input 8 Reference enable switch 2
Event Counter Operation
Signal Form Square wave pulse
Evaluation Each edge, cyclic counter
Input Frequency 20 kHz
Count Frequency 40 kHz
Counter Size 16 bit
Input 2 Counter 1
Input 3 Counter 2
Input 5 Counter 3
Period measurement
Signal Form Square wave pulse
Evaluation Positive edge - Positive edge
Input Frequency 20 kHz
Internal Counter Frequency 16 MHz, 4 MHz, 1 MHz, 250 kHz
External Counter Frequency Max. 20 kHz
Counter Size 16 bit
Input 3 Period channel 1
Input 4 Period channel 2
Input 7 Period channel 3
Input 2 External counter frequency for channels 1 and 2
Input 5 External counter frequency for channel 3
Gate measurement
Signal Form Square wave pulse
Evaluation Positive edge - Negative edge
Input Frequency 10 kHz
Internal Counter Frequency 16 MHz, 4 MHz, 1 MHz, 250 kHz
External Counter Frequency Max. 20 kHz
Counter Size 16 bit
Gate Pause 50 µs
Input 3 Gate channel 1
Input 4 Gate channel 2
Input 7 Gate channel 3
Input 2 External counter frequency for channels 1 and 2
Input 5 External counter frequency for channel 3

Table 19: CM211 technical data (cont.)

60 B&R SYSTEM 2003 User’s Manual


CM211

Product ID CM211
Comparator

Comparator Output Output 1


Reaction time <500 µs
Evaluation
Incremental Encoder Operation Actual value comparison of the counter status of incremental encoder 1
Event Counter Operation Comparison of the counter status of counter 2 (window comparator)

Comparator Output Output 2


Reaction time < 2 ms
Evaluation
Incremental Encoder Operation Actual value comparison of the counter status of incremental encoder 2
Event Counter Operation Comparison of the counter status of counter 3 (window comparator)
Electrical Isolation Input - Input No
Digital Outputs
Number and Type of Outputs 8 transistor outputs
Rated Current Max. 0.5 A
Total Output Current Max. 4 A
Rated Voltage 24 VDC
Switching Voltage Range 18 - 30 VDC
Leakage Current (0 signal) 12 µA
Wiring Source
Short Circuit Protection Yes
Overload Protection Yes
Braking Voltage when Switching Off Inductive Loads 47 V
Delay 0 to 1 < 1.5 ms
Delay 1 to 0 < 1.5 ms
Status Display 8 orange LEDs
Electrical Isolation Output - Output No
Mechanical Characteristics
Dimensions B&R 2003 single width

Table 19: CM211 technical data (cont.)

1) Two logical module slots are required by the module.


2) Referring to the maximum positive limit.
3) Referring to the current measurement value.

11.1.3 Status LEDs

LED Description
OK This orange LED is lit when the external supply voltage for the outputs is within the
defined range (> 18 VDC).
LED 1 - 8, green Logical status of the respective digital input.
LED 1 - 8, orange Control status of the respective digital output.

Table 20: CM211 status LEDs

B&R SYSTEM 2003 User’s Manual 61


CM211

11.1.4 Input Circuit Diagram

Analog Inputs

Figure 42: CM211 input circuit diagram for analog inputs

Digital Inputs

Figure 43: CM211 input circuit diagram for digital inputs

62 B&R SYSTEM 2003 User’s Manual


CM211

11.1.5 Output Circuit Diagram

Analog Outputs

Figure 44: CM211 output circuit diagram for analog outputs

Digital Outputs

Figure 45: CM211 output circuit diagram for digital outputs

11.1.6 Monitoring the Supply Voltage

Figure 46: CM211 monitoring the supply voltage

B&R SYSTEM 2003 User’s Manual 63


CM211

11.1.7 Module Design

General Information

The design of the combination module CM211 corresponds to an adapter module AF101 with
four screw-in modules installed and a digital mixed module.

Figure 47: CM211 module deisgn

Module Addresses

Because of this special module design, the combination module CM211 requires two module
addresses.

A CPU, a combination module CM211 and a digital input module DI435 are used in the example
shown below. The module address assignments are to be made as shown in the diagram.

Figure 48: CM211 module addresses

64 B&R SYSTEM 2003 User’s Manual


CM211

Variable Declaration

To avoid conflicts in the register, the settings listed below must be used in the variable
declaration for the module address and for the slot. In this case, the module is accessed with
module addresses 1 and 2.

Figure 49: CM211 variable declaration

11.1.8 Configuration Options for the Counter

Counter Inputs

Section "Module Design" explains that the combination module corresponds to an adapter
module AF101 with four screw-in modules and a digital mixed module. Two of the four screw-in
modules are used for counter inputs.

Figure 50: CM211 configuration options counter inputs

B&R SYSTEM 2003 User’s Manual 65


CM211

Counter Inputs in Slot 3

The counter inputs on the screw-in module installed in slot 3 can be configured using software.
The desired function is set by defining bits 12 and 13 in configuration word 14. One of three
functions can be selected.

Function Bit 12 Bit 13


1 x incremental encoder 0 0
2 x event counter 1 0
2 x gate/period measurement 1 1

Table 21: CM211 counter inputs in slot 3

Counter Inputs in Slot 4

The counter inputs on the screw-in module installed in slot 4 can be configured using software.
The desired function is set by defining bits 12 and 13 in configuration word 14. One of three
functions can be selected.

Function Bit 12 Bit 13


1 x incremental encoder 0 0
1 x event counter 1 0
1 x gate/period measurement 1 1

Table 22: CM211 counter inputs in slot 4

66 B&R SYSTEM 2003 User’s Manual


CM211

11.1.9 Timing

The following three factors must be taken into consideration for timing when a B&R 2003 CPU
is used as controller:

• Internal Bus Cycle


• I/O-AF Cycle
• I/O CPU Load

Figure 51: CM211 response time

Internal Bus Cycle

All combination modules, AF modules and digital I/O modules are processed during this time.
The internal bus cycle for a CM211 is calculated as follows:

There is no AF101 adapter module on the bus

tint_cycle = n * 36 µs * 12 + 12 * 120 µs +1200 µs = 3072 µs (n = 1)

n ................ Number of CM211 modules


36 µs ......... Time for a combination module CM211
12 .............. Number of data words for a CM211
120 µs ....... Combination module CM211 busy
1200 µs ..... Offset

B&R SYSTEM 2003 User’s Manual 67


CM211

There is an AF101 adapter module on the bus or a CPx74 is used as CPU

tint_cycle = n * 36 µs * 12 + 12 * 200 µs +1200 µs = 4032 µs (n = 1)

n ................Number of CM211 modules


36 µs .........Time for a combination module CM211
12 ..............Number of data words for a CM211
200 µs .......AF101 or CPx74 busy
1200 µs .....Offset

I/O AF cycle for digital data points

During this time, all digital data points on the combination module CM211 are updated or read in
internally.

tdig_IO_AF ≤ 1 ms

I/O AF cycle for analog data points

During this time, all analog data points on the combination module CM211 are updated or read
in internally.

Counter values ............................tan_IO_AF ≤ 2 ms


Analog I/O values .......................tan_IO_AF ≤ 4 ms

I/O CPU Load

This time determines how long the CPU requires to process the I/O data passed on by the
combination module CM211. The CPU is loaded considerably by the analog I/O data.

A CP430 or CPx70 is used as CPU

tIO_CPU = 12 * 100 µs = 1200 µs

12 ..............Number of data words for a CM211


100 µs .......Analog data point on CP430 or CPx70

A CPx74 is used as CPU

tIO_CPU = 12 * 70 µs = 840 µs

12 ..............Number of data words for a CM211


70 µs .........Analog data point on CPx74

68 B&R SYSTEM 2003 User’s Manual


CM211

A CP476 is used as CPU

tIO_CPU = 12 * 50 µs = 600 µs

12 ..............Number of data words for a CM211


50 µs .........Analog data point on CP476

Task Class

Fastest Task Class Recommended: 6 ms

11.1.10 Legend Sheets

A legend sheet can be slid into the front of the module from above. The module circuit is shown
on the back. The inputs/outputs can be labelled on the front.

Figure 52: CM211 legend sheet

11.1.11 Connections

Ground Screw

Figure 53: CM211 ground screw

B&R SYSTEM 2003 User’s Manual 69


CM211

Terminal Block X1

Terminal Block X1 Pin Assignments


Pin Assignment
1 +24 VDC
2 +24 VDC
3 +24 VDC
4 NC
5 Digital input DI1
6 Digital input DI2
7 Digital input DI3 X1

8 Digital input DI4


9 Digital input DI5
10 Digital input DI6
11 Digital input DI7
12 Digital input DI8
13 Shield
14 Analog input AI1 +
15 Analog input 1 GND (AGND)
16 Shield
17 Analog input AI2 +
18 Analog input 2 GND (AGND)

Table 23: CM211 pin assignment for terminal block X1

70 B&R SYSTEM 2003 User’s Manual


CM211

Terminal Block X2

Terminal Block X2 Pin Assignments


Pin Assignment
1 GND
2 GND
3 GND
4 NC
5 Digital output DO1
6 Digital output DO2
7 Digital output DO3 X2

8 Digital output DO4


9 Digital output DO5
10 Digital output DO6
11 Digital output DO7
12 Digital output DO8
13 Shield
14 Analog output AO1 +
15 Analog output 1 GND (AGND)
16 Shield
17 Analog output AO2 +
18 Analog output 2 GND (AGND)

Table 24: CM211 pin assignment for terminal block X2

B&R SYSTEM 2003 User’s Manual 71


CM211

11.1.12 Analog Inputs Connection Example

The combination module CM211 has two analog inputs which may be used as either voltage or
current input. Mixed operation is also possible.

Mode Switch

Figure 54: CM211 mode switch

An input can be used as either voltage or current input. The selection is made with the respective
mode switch on the bottom of the housing. Place the switch in the respective position for the
desired signal:

U......... Voltage Input


I.......... Current Input

72 B&R SYSTEM 2003 User’s Manual


CM211

Module Wiring

In the following example, input 1 is used as voltage input.

Figure 55: CM211 analog input connection example

11.1.13 Analog Output Connection Example

Figure 56: CM211 analog output connection example

B&R SYSTEM 2003 User’s Manual 73


CM211

11.1.14 Incremental Encoder Operation Operation

Figure 57: CM211 incremental encoder operation connection example

74 B&R SYSTEM 2003 User’s Manual


CM211

11.1.15 Event Counter Operation Connection Example

Figure 58: CM211 event counter operation connection example

11.1.16 Period Measurement Connection Example

The period can be measured from a signal connected to input 3, 4 or 7. The resolution is 16 bit.
The frequency of the signal to be measured can be a maximum of 20 kHz. An internal or external
counter frequency can be selected for the measurement.

• Internal counter frequency (16 MHz, 4 MHz, 1 MHz or 250 kHz)


• External counter frequency (max. 20 kHz)
The external counter frequency is connected to input 2 (for inputs 3 and 4) and 5 (for input 7).

B&R SYSTEM 2003 User’s Manual 75


CM211

Period Measurement Principle

Figure 59: CM211 period measurement principle

Pulse counting is started by a rising edge on the input and stopped by the next rising edge. The
count is placed in a temporary register. The counter is started again by the same rising edge.

During period measurement, the count stored last (the period) can be read by the active
application program. The value in the temporary register is only updated after at the end of the
active measurement. If a counter overflow occurs (broken line or incorrect counter frequency),
the value is limited to $7FFF.

Figure 60: CM211 period measurement connection example

76 B&R SYSTEM 2003 User’s Manual


CM211

11.1.17 Gate Measurement Connection Example

A signal connected to input 3, 4 or 7 can be evaluated using gate measurement. The resolution
is 16 bit. The frequency of the signal to be measured can be a maximum of 10 kHz. The signal
to be measured is also called the gate frequency. The pause between two gate measurements
must be larger than 50 µs.

An internal or external counter frequency can be selected for the measurement.

• Internal counter frequency (16 MHz, 4 MHz, 1 MHz or 250 kHz)


• External counter frequency (max. 20 kHz)
The external counter frequency is connected to input 2 (for inputs 3 and 4) and 5 (for input 7).

Gate Measurement Principle

Figure 61: CM211 gate measurement principle

Pulse counting is started by a rising edge on the gate and stopped by a falling edge. The count
is placed in a temporary register when the falling edge occurs. The counter is started again by
the next rising edge.

B&R SYSTEM 2003 User’s Manual 77


CM211

During gate measurement, the count stored last (the gate) can be read by the active application
program. The value in the temporary register is only updated after at the end of the active
measurement (falling edge). If a counter overflow occurs (incorrect counter frequency), the value
is limited to $7FFF.

Figure 62: CM211 gate measurement connection example

78 B&R SYSTEM 2003 User’s Manual


CM211

11.1.18 Digital Output Connection Example

Figure 63: Digital Output Connection Example

11.1.19 Variable Declaration for the Analog Inputs

The variable declaration is valid for the following controllers:

• CPU for the PLC 2003


• Remote I/O Bus Controller
• CAN Bus Controller
The variable declaration is made in PG2000. The variable declaration is provided in Chapter 4
"Module Addressing".

Automation Studio™ Support: See Automation Studio™ Help starting with V 1.40

B&R SYSTEM 2003 User’s Manual 79


CM211

Accessing screw-in modules is also explained in the sections "AF101" and "CPU". Data access
takes place using data and configuration words. The following table provides an overview of
which data and configuration words are used for the analog inputs.

VD
VD VD
Data Access Module R W Description
Data Type Chan.
Type
Data word 0 INT16 Analog In 1 ● Analog input value channel 1
Data word 1 INT16 Analog In 2 ● Analog input value channel 2
Configuration word 12 WORD Transp. In 24 ● Module status
Configuration word 14 WORD Transp. In 28 ● Module Type

Table 25: CM211 variable declaration for the analog inputs

Access using CAN Identifier

Access via CAN Identifiers is used if the slave is being controlled by a device from another
manufacturer. Access via CAN Identifiers is described in an example in Chapter 4, "Module
Addressing". The transfer modes are explained in Chapter 5, "CAN Bus Controller Functions" .

In the example below, the combination module CM211 is accessed with module addresses 1 and
2. Analog input data cannot be packed. Only the first object from this group of four will be created
and sent.

Slot CAN-ID 1) Word 1 Word 2 Word 3 Word 4


1 542 Channel 1L Channel Channel 2L Channel Not used
1H 2H
2 543 Not used
3 544 Not used
4 545 Not used

Table 26: CM211 access using CAN identifier, analog inputs

1) CAN-ID = 542 + (nd - 1) x 16 + (ma - 1) x 4 + (sl - 1)


nd......Node number for the CAN slaves = 1
ma.....Module address = 1
sl .......Slot number = 1

B&R 2000 users have to exchange the data so that the high data is first (Motorola format)

For more information on ID allocation, see Chapter 5 , "CAN Bus Controller Functions".

80 B&R SYSTEM 2003 User’s Manual


CM211

Description of Data and Configuration Words

Data Words 0 and 1 (read)

16 bit standardized values representing either voltage or current.

Configuration Word 12 (read)

Configuration word 12 contains the module status.

Bit Description
12 - 15 x ... Not defined, masked out
11 0 ... Converter values ready
1 ... Converter values not yet ready
6 - 10 x ... Not defined, masked out
5 0 ... Channel 2: Current measurement
1 ... Channel 2: Voltage measurement
4 0 ... Channel 1: Current measurement
1 ... Channel 1: Voltage measurement
2-3 x ... Not defined, masked out
1 0 ... Channel 2: No error
1 ... Channel 2: Error present
0 0 ... Channel 1: No error
1 ... Channel 1: Error present
x x x x x x x x x x x
15 8 7 0

Configuration Word 14 (read)

The High Byte of configuration word 14 defines the module code.

Bit Description
8 - 15 Module code = $40
0-7 x ...Not defined, masked out
0 1 0 0 0 0 0 0 x x x x x x x x
15 8 7 0

B&R SYSTEM 2003 User’s Manual 81


CM211

11.1.20 Variable Declaration for Analog Outputs

The variable declaration is valid for the following controllers:

• CPU for the PLC 2003


• Remote I/O Bus Controller
• CAN Bus Controller
The variable declaration is made in PG2000. The variable declaration is provided in Chapter 4
"Module Addressing".

Automation Studio™ Support: See Automation Studio™ Help starting with V 1.40

Accessing screw-in modules is also explained in the sections "AF101" and "CPU".

Data access takes place using data and configuration words. The following table provides an
overview of which data and configuration words are used for the analog outputs.

VD
VD VD
Data Access Module R W Description
Data Type Chan.
Type
Data word 0 INT16 Analog Out 1 ● Analog output value channel 1
Data word 1 INT16 Analog Out 2 ● Analog output value channel 2
Configuration word 14 WORD Transp. In 28 ● Module Type

Table 27: CM211 variable declaration for analog outputs

82 B&R SYSTEM 2003 User’s Manual


CM211

Access using CAN Identifier

Access via CAN Identifiers is used if the slave is being controlled by a device from another
manufacturer. Access via CAN Identifiers is described in an example in Chapter 4, "Module
Addressing". The transfer modes are explained in Chapter 5, "CAN Bus Controller Functions" .

In the example below, the combination module CM211 is accessed with module addresses 1 and
2. Analog output data cannot be packed. Only the second object from this group of four will be
created.

Slot CAN-ID 1) Word 1 Word 2 Word 3 Word 4


1 1054 Not used
2 1055 Channel 1L Channel Channel 2L Channel Not used
1H 2H
3 1056 Not used
4 1057 Not used

Table 28: CM211 access using CAN identifier, analog outputs

1) CAN-ID = 1054 + (nd - 1) x 16 + (ma - 1) x 4 + (sl - 1)


nd......Node number for the CAN slaves = 1
ma.....Module address = 1
sl .......Slot number = 2

B&R 2000 users have to exchange the data so that the high data is first (Motorola format)

For more information on ID allocation, see Chapter 5 , "CAN Bus Controller Functions".

Description of Data and Configuration Words

Data Words 0 and 1 (write)

The 16 bit standardized values for voltage are written to the module output channel.

Configuration Word 14 (read)

The High Byte of configuration word 14 defines the module code.

Bit Description
8 - 15 Module code = $40
0-7 x ...Not defined, masked out
0 1 0 0 0 0 0 0 x x x x x x x x
15 8 7 0

B&R SYSTEM 2003 User’s Manual 83


CM211

11.1.21 Variable Declaration for Incremental Encoder Operation

The variable declaration is valid for the following controllers:

• CPU for the PLC 2003


• Remote I/O Bus Controller
• CAN Bus Controller
The variable declaration is made in PG2000. The variable declaration is provided in Chapter 4
"Module Addressing".

Automation Studio™ Support: See Automation Studio™ Help starting with V 1.40

Accessing screw-in modules is also explained in the sections "AF101" and "CPU".

The module CM211 is equipped with a maximum of two incremental encoders. The incremental
encoders are distributed on slots 3 and 4.

84 B&R SYSTEM 2003 User’s Manual


CM211

Incremental encoder 1 (slot 3) with PLC 2003 CPU and remote slaves

Data access takes place using data and configuration words. The following table provides an
overview of which data and configuration words are used for the first incremental encoder.

VD
VD VD
Data Access Module R W Description
Data Type Chan.
Type
Data word 0 WORD Transp. In 0 ● Module status
Data word 1 INT32 Transp. In 2 ● Counter value
Configuration word 4 INT32 Transp. In 8 ● Counter value with pos. edge on the reference input 1)
INT32 Transp. Out 8 ● Threshold value 1 / min. latch difference 1)
Configuration word 6 INT32 Transp. In 12 ● Counter value with neg. edge on the reference input 1)
INT32 Transp. Out 12 ● Threshold value 2 / force value1)
Configuration word 8 WORD Transp. Out 16 ● Incremental encoder control1)
Configuration word 12 WORD Transp. In 24 ● Module status
Configuration word 14 WORD Transp. In 28 ● Module type
WORD Transp. Out 28 ● Module configuration

Table 29: CM211 variable declaration for incremental encoder operation using the CPU and remote slaves

1) Starting with Rev. D0

Incremental encoder 1 (Slot 3) with CAN slaves

Data access takes place using data and configuration words. The following table provides an
overview of which data and configuration words are used for the first incremental encoder.

VD
VD VD
Data Access Module R W Description
Data Type Chan.
Type
Data word 0 INT32 Transp. In 0 ● Counter value
Data word 2 WORD Transp. In 4 ● Module status
Configuration word 4 INT32 Transp. In 8 ● Counter value with pos. edge on the reference input 1)
INT32 Transp. Out 8 ● Threshold value 1 / min. latch difference 1)
Configuration word 6 INT32 Transp. In 12 ● Counter value with neg. edge on the reference input 1)
INT32 Transp. Out 12 ● Threshold value 2 / force value1)
Configuration word 8 WORD Transp. Out 16 ● Incremental encoder control1)
Configuration word 12 WORD Transp. In 24 ● Module status
Configuration word 14 WORD Transp. In 28 ● Module type
WORD Transp. Out 28 ● Module configuration

Table 30: CM211 variable declaration for incremental encoder operation using CAN slaves

1) Starting with Rev. D0

B&R SYSTEM 2003 User’s Manual 85


CM211

B&R 2000 users have to exchange the two counter status words so that the high word
is first (Motorola format)

Access using CAN Identifier

Access via CAN Identifiers is used if the slave is being controlled by a device from another
manufacturer. Access via CAN Identifiers is described in an example in Chapter 4, "Module
Addressing". The transfer modes are explained in Chapter 5, "CAN Bus Controller Functions" .

In the example below, the combination module CM211 is accessed with module addresses 1 and
2.

Slot CAN-ID 1) Word 1 Word 2 Word 3 Word 4


1 542 Not used
2 543 Not used
3 544 Counter LL Counter ML Counter Counter Status L Status H Not used
MH HH
4 545 Not used

Table 31: CM211 access using CAN identifier, incremental encoder operation

1) CAN-ID = 542 + (nd - 1) x 16 + (ma - 1) x 4 + (sl - 1)


nd......Node number for the CAN slaves = 1
ma.....Module address = 1
sl .......Slot number = 3

B&R 2000 users have to exchange the data so that the high data is first (Motorola format)
For more information on ID allocation, see Chapter 5 , "CAN Bus Controller Functions".

86 B&R SYSTEM 2003 User’s Manual


CM211

Description of Data and Configuration Words

Data Word 0 (read)

Data word 0 includes the module status time constant for the counter value.

Bit Description
12 - 15 x ... Not defined, masked out
11 0 ... Counter value not taken
1 ... Counter value is taken with the first positive edge on the reference input
10 0 ... Counter value not taken
1 ... Counter value is taken with the first negative edge on the reference input
8-9 x ... Not defined, masked out
7 0 ... Referencing is taking place
1 ... Counter is referenced (resetting takes place when the reference command
is received)
6 Changes state each time referencing takes place
5 0 ... Supply voltage < 18 V
1 ... Supply voltage > 18 V, outputs OK
4 Output status of the comparator
3 Level of encoder input A
2 Level of encoder input B
1 Level of the reference enable switch
0 Level of the reference pulse
x x x x x x
15 8 7 0

Data Word 1 (read)

Counter Value MSW

Data Word 2 (read)

Counter Value LSW

Configuration Words 4+5 (read) - Starting with rev. D0

After setting bit 11 in configuration word 8, the configuration words receive the latched counter
value with the first positive edge on the reference input. The value is valid if bit 11 is set in data
word 0. The maximum delay, from the edge on the input to the value is latched, is 50 µs.

B&R SYSTEM 2003 User’s Manual 87


CM211

Configuration Words 4+5 (write)

Either threshold value 1 or the minimum latch difference is defined with configuration words 4+5.

1) Threshold value 1 (32 Bit):

a) Number format 32 bit with sign:

Bit 10 in configuration word 14 (write) is set to 0.


Threshold value 1 must always be ≤ threshold value 2 .
Threshold values are internally arranged in increasing order including sign.

b) Number format 32 bit without sign - cyclic operation:

Bit 10 in configuration word 14 (write) is set to 1.


The threshold values are not placed in order internally. The sign is not used in the
comparator calculation.

2) Minimum Latch Difference (32 Bit) - Starting with Rev. D0: D0:

Definition of the minimum latch difference for latching counters. This is done using bit 8 in
configuration word 8.

Configuration Words 6+7 (read) - Starting with rev. D0

After setting bit 10 in configuration word 8, the configuration words receive the latched counter
value with the first negative edge on the reference input. The value is valid if bit 10 is set in data
word 0. The maximum delay, from the edge on the input to the value is latched, is 50 µs.

Configuration Words 6+7 (write)

Either threshold value 2 (32 bit) or the force value (32 bit) is defined with configuration words
6+7. The definition of the force value is possible starting with rev. D0. The force value is defined
using bit 8 in cofiguration word 8. The maximum delay, until the the force value definition is
accepted, is 1 ms.

88 B&R SYSTEM 2003 User’s Manual


CM211

Configuration Word 8 (read) - Starting with rev. D0 D0

The incremental encoder is configured using configuration word 8.

Bit Description
14 - 15 0
13 0 ... No effect on the incremental encoder
1 ... Inverts the reference enable switch for forcing
Using bit 13, the polarity of the reference enable switch can be inverted.
12 0 ... No effect on the incremental encoder
1 ... Forcing the counter with the reference enable switch
With a positive edge on bit 12, bit 7 is deleted in data word 0 and positive
edge creation for the reference enable switch is activated. When the edge is
recognized, the counter is set to the predefined value (default 0). In data
word 0, bit 7 is set and bit 6 is inverted.
The precision is limited compared to latch operation.
11 0 ... Counter value not taken
1 ... Counter value is taken with the first positive edge on the reference input (see
configuration words 4+5) 1) 1)
10 0 ... Counter value not taken
1 ... Counter value is taken with the first negative edge on the reference input
(see configuration words 6+7) 1)
9 0/1 ...Start output state for the latch input filter
With bit 9, the start condition for edge creation and filtering of the latch signal
can be defined. If the state of bit 9 is not the same as the current state of the
reference input, an edge change is recognized internally and evaluated
using the filter.
8 0 ... No effect on the incremental encoder
1 ... With a positive edge, configuration words 4+5 are used as minimum latch
value and configuration words 6+7 are used as force value
0-7 0
0 0 0 0 0 0 0 0 0 0
15 8 7 0

1) The counter value is only taken once. Bit 10 and bit 11 must be reset for the value to be taken again. Bit 10 and bit 11 can be set again
in configuration word 8 after the corresponding bit in the module status bit has gone to 0.

Latching the counter value using the reference input:

Bit 0 in configuration word 14 must be 0. That means, the comparator is switched off.

General:

The same internal interrupts or inputs are used for referencing, comparator operation and
latching the counter value. Therefore the following priority is defined:

1. Homing
2. Comparator
3. Latching

B&R SYSTEM 2003 User’s Manual 89


CM211

Make sure there is a clean transition between the types of operation. That means the respective
control bits are not allowed to be activated at the same time.

Latching the counter value:

Latching is started by a positive edge on bit 10 or bit 11 in configuration word 8. The current
counter value is taken as comparison value for the minimum latch difference.

1) Minimum latch difference is 0:

If the minimum latch difference is set to 0 (default), the counter value is latched immediately
when the respective edge occurs on the reference input.

2) Minimum latch difference is not 0:

If the minimum latch difference is not set to 0, the counter value is placed in temporary memory
when the respective edge occurs on the reference input.

• Difference > minimum latch difference:


If the difference between the value in temporary memory minus the comparison value is
larger than the minimum latch difference, the value is accepted and bit 10 or bit 11 in data
word 0 is set.

• Difference < minimum latch difference:


If the difference between the value in temporary memory minus the comparison value is
smaller than the minimum latch difference, the value is not yet accepted. The comparison is
made again when the next corresponding edge occurs on the reference input.

The value is only accepted and bit 10 or bit 11 in data word 0 is only set if the difference is
larger than the minimum latch difference.

Configuration Word 12 (read)

Configuration word 12 contains the module status (current status unlatched). The module status
is written to data word 0.

Configuration Word 14 (read)

The High Byte of configuration word 14 defines the module code.

Bit Description
8 - 15 Module code = $40
0-7 x ...Not defined, masked out
0 1 0 0 0 0 0 0 x x x x x x x x
15 8 7 0

90 B&R SYSTEM 2003 User’s Manual


CM211

Configuration word 14 (write)

The module is configured using configuration word 14.

Bit Description
14 - 15 0
13 0 ... Incremental Encoder Operation
12 0 ... Incremental Encoder Operation
11 0 ... No effect on count direction
1 ... Count direction inverted as compared to counter wiring
10 0 ... Number format: 32 bit with sign
1 ... Number format: 32 bit without sign - cyclic operation
In continuous operation, the internal order of the threshold values are kept.
If a counter overflow occurs, the behavior of the comparator does not have
to be changed. Comparator operation takes place without consideration of
the sign.
8-9 0 ... Incremental encoder operation with 4-fold evaluation
7 0 ... No effect on reference pulse
1 ... Reference pulse is inverted. This setting is used for encoders with a high
pulse.
6 0 ... Set counter immediately to 0. In data word 0 (module status), bit 7 is
immediately set to 1 and the counter is cleared.
1 ... Counter remains functioning. In data word 0 (module status), bit 7 is
immediately set to 0 (referencing required).
5 0 ... Ignore reference enable switch (referencing using reference pulse). Setting
refers to bit 4
1 ... Actively switch reference enable switch (referencing using reference pulse
and reference enable switch)
4 0 ... No effect on counter
1 ... Clear counter (reference)
3 0 ... Comparator off
Output 1 is handled as defined in the variable declaration for digital outputs.
1 ... Comparator on
2 0 ... The comparator output is set to the level given in bit 0, if threshold value 1
≤ counter ≤ threshold value 2
1 ... The comparator output is set to the inverted level given in bit 0, if threshold
value 1 ≤ counter ≤ threshold value 2
1 0
0 Level of the comparator output
0 0 0 0 0 0 0
15 8 7 0

B&R SYSTEM 2003 User’s Manual 91


CM211

Incremental encoder 2 (slot 4) with PLC 2003 CPU and remote slaves

Data access takes place using data and configuration words. The following table provides an
overview of which data and configuration words are used for the second incremental encoder.

VD
VD VD
Data Access Module R W Description
Data Type Chan.
Type
Data word 0 WORD Transp. In 0 ● Module status
Data word 1 INT32 Transp. In 2 ● Counter value
Configuration word 4 INT32 Transp. In 8 ● Counter value with pos. edge on the reference input 1)
INT32 Transp. Out 8 ● Threshold value 1 2) / min. latch difference 1)
Configuration word 6 INT32 Transp. In 12 ● Counter value with neg. edge on the reference input 1)
INT32 Transp. Out 12 ● Threshold value 2 2) / force value 1)
Configuration word 8 WORD Transp. Out 16 ● Incremental encoder control1)
Configuration word 12 WORD Transp. In 24 ● Module status
Configuration word 14 WORD Transp. In 28 ● Module Type
WORD Transp. Out 28 ● Module configuration

Table 32: CM211 variable declaration for incremental encoder operation using the CPU and remote slaves

1) Starting with Rev. D0


2) Starting with Rev. G0

Incremental encoder 2 (Slot 4) with CAN slaves

Data access takes place using data and configuration words. The following table provides an
overview of which data and configuration words are used for the second incremental encoder.

VD
VD VD
Data Access Module R W Description
Data Type Chan.
Type
Data word 0 INT32 Transp. In 0 ● Counter value
Data word 2 WORD Transp. In 4 ● Module status
Configuration word 4 INT32 Transp. In 8 ● Counter value with pos. edge on the reference input 1)
INT32 Transp. Out 8 ● Threshold value 1 2) / min. latch difference 1)
Configuration word 6 INT32 Transp. In 12 ● Counter value with neg. edge on the reference input 1)
INT32 Transp. Out 12 ● Threshold value 2 2) / force value 1)
Configuration word 8 WORD Transp. Out 16 ● Incremental encoder control1)
Configuration word 12 WORD Transp. In 24 ● Module status
Configuration word 14 WORD Transp. In 28 ● Module Type
WORD Transp. Out 28 ● Module configuration

Table 33: CM211 variable declaration for incremental encoder operation using CAN slaves

1) Starting with Rev. D0


2) Starting with Rev. G0

92 B&R SYSTEM 2003 User’s Manual


CM211

B&R 2000 users have to exchange the two counter status words so that the high word
is first (Motorola format)

Access using CAN Identifier

Access via CAN Identifiers is used if the slave is being controlled by a device from another
manufacturer. Access via CAN Identifiers is described in an example in Chapter 4, "Module
Addressing". The transfer modes are explained in Chapter 5, "CAN Bus Controller Functions" .

In the example below, the combination module CM211 is accessed with module addresses 1 and
2.

Slot CAN-ID 1) Word 1 Word 2 Word 3 Word 4


1 542 Not used
2 543 Not used
3 544 Not used
4 545 Counter LL Counter ML Counter Counter Status L Status H Not used
MH HH

Table 34: CM211 access using CAN identifier, incremental encoder operation

1) CAN-ID = 542 + (nd - 1) x 16 + (ma - 1) x 4 + (sl - 1)


nd......Node number for the CAN slaves = 1
ma.....Module address = 1
sl .......Slot number = 4

B&R 2000 users have to exchange the data so that the high data is first (Motorola format)
For more information on ID allocation, see Chapter 5 , "CAN Bus Controller Functions".

B&R SYSTEM 2003 User’s Manual 93


CM211

Description of Data and Configuration Words

Data Word 0 (read)

Data word 0 includes the module status time constant for the counter value.

Bit Description
12 - 15 x ... Not defined, masked out
11 0 ... Counter value not taken
1 ... Counter value is taken with the first positive edge on the reference input
10 0 ... Counter value not taken
1 ... Counter value is taken with the first negative edge on the reference input
8-9 x ... Not defined, masked out
7 0 ... Referencing is taking place
1 ... Counter is referenced (resetting takes place when the reference command
is received)
6 Changes state each time referencing takes place
5 0 ... Supply voltage < 18 V
1 ... Supply voltage > 18 V, outputs OK
4 x ... Not defined, masked out
3 Level of encoder input A
2 Level of encoder input B
1 Level of the reference enable switch
0 Level of the reference pulse
x x x x x x x
15 8 7 0

Data Word 1 (read)

Counter Value MSW

Data Word 2 (read)

Counter Value LSW

Configuration Words 4+5 (read) - Starting with rev. D0

After setting bit 11 in configuration word 8, the configuration words receive the latched counter
value with the first positive edge on the reference input. The value is valid if bit 11 is set in data
word 0. The maximum delay, from the edge on the input to the value is latched, is 50 µs.

94 B&R SYSTEM 2003 User’s Manual


CM211

Configuration Words 4+5 (write)

Either threshold value 1 or the minimum latch difference is defined with configuration words 4+5.

1) Threshold value 1 (32 bit) - Starting with rev. G0:

a) Number format 32 bit with sign:

Bit 10 in configuration word 14 (write) is set to 0.


Threshold value 1 must always be ≤ threshold value 2 .
Threshold values are internally arranged in increasing order including sign.

b) Number format 32 bit without sign - cyclic operation:

Bit 10 in configuration word 14 (write) is set to 1.


The threshold values are not placed in order internally. The sign is not used in the
comparator calculation.

2) Minimum Latch Difference (32 Bit) - Starting with Rev. D0: D0:

Definition of the minimum latch difference for latching counters. This is done using bit 8 in
configuration word 8.

Configuration Words 6+7 (read) - Starting with rev. D0

After setting bit 10 in configuration word 8, the configuration words receive the latched counter
value with the first negative edge on the reference input. The value is valid if bit 10 is set in data
word 0. The maximum delay, from the edge on the input to the value is latched, is 50 µs.

Configuration Words 6+7 (write)

Either threshold value 2 or the minimum force value is defined with configuration words 4+5.
1) Threshold value 2 (32 bit) - Starting with rev. G0:

2) Force Value (32 bit) - Starting with rev. D0:

The force value is defined using bit 8 in cofiguration word 8. The maximum delay, until the
the force value definition is accepted, is 1 ms.

B&R SYSTEM 2003 User’s Manual 95


CM211

Configuration Word 8 (read) - Starting with rev. D0 D0

The incremental encoder is configured using configuration word 8.

Bit Description
14 - 15 0
13 0 ... No effect on the incremental encoder
1 ... Inverts the reference enable switch for forcing
Using bit 13, the polarity of the reference enable switch can be inverted.
12 0 ... No effect on the incremental encoder
1 ... Forcing the counter with the reference enable switch
With a positive edge on bit 12, bit 7 is deleted in data word 0 and positive
edge creation for the reference enable switch is activated. When the edge is
recognized, the counter is set to the predefined value (default 0). In data
word 0, bit 7 is set and bit 6 is inverted.
The precision is limited compared to latch operation.
11 0 ... Counter value not taken
1 ... Counter value is taken with the first positive edge on the reference input (see
configuration words 4+5) 1) 1)
10 0 ... Counter value not taken
1 ... Counter value is taken with the first negative edge on the reference input
(see configuration words 6+7) 1)
9 0/1 ...Start output state for the latch input filter
With bit 9, the start condition for edge creation and filtering of the latch signal
can be defined. If the state of bit 9 is not the same as the current state of the
reference input, an edge change is recognized internally and evaluated
using the filter.
8 0 ... No effect on the incremental encoder
1 ... With a positive edge, configuration words 4+5 are used as minimum latch
value and configuration words 6+7 are used as force value
0-7 0
0 0 0 0 0 0 0 0 0 0
15 8 7 0

1) The counter value is only taken once. Bit 10 and bit 11 must be reset for the value to be taken again. Bit 10 and bit 11 can be set again
in configuration word 8 after the corresponding bit in the module status bit has gone to 0.

Latching the counter value using the reference input:

Bit 0 in configuration word 14 must be 0. That means, the comparator is switched off.

General:

The same internal interrupts or inputs are used for referencing, comparator operation and
latching the counter value. Therefore the following priority is defined:

1. Homing
2. Comparator
3. Latching

96 B&R SYSTEM 2003 User’s Manual


CM211

Make sure there is a clean transition between the types of operation. That means the respective
control bits are not allowed to be activated at the same time.

Latching the counter value:

Latching is started by a positive edge on bit 10 or bit 11 in configuration word 8. The current
counter value is taken as comparison value for the minimum latch difference.

1) Minimum latch difference is 0:

If the minimum latch difference is set to 0 (default), the counter value is latched immediately
when the respective edge occurs on the reference input.

2) Minimum latch difference is not 0:

If the minimum latch difference is not set to 0, the counter value is placed in temporary memory
when the respective edge occurs on the reference input.

• Difference > minimum latch difference:


If the difference between the value in temporary memory minus the comparison value is
larger than the minimum latch difference, the value is accepted and bit 10 or bit 11 in data
word 0 is set.

• Difference < minimum latch difference:


If the difference between the value in temporary memory minus the comparison value is
smaller than the minimum latch difference, the value is not yet accepted. The comparison is
made again when the next corresponding edge occurs on the reference input.

The value is only accepted and bit 10 or bit 11 in data word 0 is only set if the difference is
larger than the minimum latch difference.

Configuration Word 12 (read)

Configuration word 12 contains the module status (current status unlatched). The module status
is written to data word 0.

Configuration Word 14 (read)

The High Byte of configuration word 14 defines the module code.

Bit Description
8 - 15 Module code = $40
0-7 x ...Not defined, masked out
0 1 0 0 0 0 0 0 x x x x x x x x
15 8 7 0

B&R SYSTEM 2003 User’s Manual 97


CM211

Configuration Word 14 (write)

The module is configured using configuration word 14.

Bit Description
14 - 15 0
13 0 ... Incremental Encoder Operation
12 0 ... Incremental Encoder Operation
11 0 ... No effect on count direction
1 ... Count direction inverted as compared to counter wiring
10 Starting with revision G0:
0 ... Number format: 32 bit with sign
1 ... Number format: 32 bit without sign - cyclic operation
In continuous operation, the internal order of the threshold values are kept.
If a counter overflow occurs, the behavior of the comparator does not have
to be changed. Comparator operation takes place without consideration of
the sign.
8-9 0 ... Incremental encoder operation with 4-fold evaluation
7 0 ... No effect on reference pulse
1 ... Reference pulse is inverted. This setting is used for encoders with a high
pulse.
6 0 ... Set counter immediately to 0. In data word 0 (module status), bit 7 is
immediately set to 1 and the counter is cleared.
1 ... Counter remains functioning. In data word 0 (module status), bit 7 is
immediately set to 0 (referencing required).
5 0 ... Ignore reference enable switch (referencing using reference pulse). Setting
refers to bit 4
1 ... Actively switch reference enable switch (referencing using reference pulse
and reference enable switch)
4 0 ... No effect on counter
1 ... Clear counter (reference)
3 Starting with revision G0:
0 ... Comparator off
Output 1 is handled as defined in the variable declaration for digital outputs.
1 ... Comparator on
2 Starting with revision G0:
0 ... The comparator output is set to the level given in bit 0, if threshold value 1
≤ counter ≤ threshold value 2
1 ... The comparator output is set to the inverted level given in bit 0, if threshold
value 1 ≤ counter ≤ threshold value 2
1 0
0 Starting with revision G0:
Level of the comparator output
0 0 0 0 0 0 0
15 8 7 0

98 B&R SYSTEM 2003 User’s Manual


CM211

11.1.22 Variable Declaration for Event Counter Operation

The variable declaration is valid for the following controllers:

• CPU for the PLC 2003


• Remote I/O Bus Controller
• CAN Bus Controller
The variable declaration is made in PG2000. The variable declaration is provided in Chapter 4
"Module Addressing".

Automation Studio™ Support: See Automation Studio™ Help starting with V 1.40

Accessing screw-in modules is also explained in the sections "AF101" and "CPU".

The module CM211 is equipped with a maximum of two event counters. The event counters are
distributed on slots 3 and 4.

Event Counter 1 and 2 (Slot 3)

Data access takes place using data and configuration words. The following table provides an
overview of which data and configuration words are used for event counters 1 and 2.

VD
VD VD
Data Access Module R W Description
Data Type Chan.
Type
Data word 0 WORD Transp. In 0 ● Module status
Data word 1 WORD Transp. In 2 ● Counter value of counter 1
Data word 2 WORD Transp. In 4 ● Counter value of counter 2
Configuration word 5 WORD Transp. Out 10 ● Threshold value 1 for counter 2
Configuration word 7 WORD Transp. Out 14 ● Threshold value 2 for counter 2
Configuration word 14 WORD Transp. In 28 ● Module type
WORD Transp. Out 28 ● Module configuration

Table 35: CM211 variable declaration for event counter 1 and 2 (slot 3)

B&R SYSTEM 2003 User’s Manual 99


CM211

Access using CAN Identifier

Access via CAN Identifiers is used if the slave is being controlled by a device from another
manufacturer. Access via CAN Identifiers is described in an example in Chapter 4, "Module
Addressing". The transfer modes are explained in Chapter 5, "CAN Bus Controller Functions" .

In the example below, the combination module CM211 is accessed with module addresses 1 and
2.

Slot CAN-ID 1) Word 1 Word 2 Word 3 Word 4


1 542 Not used
2 543 Not used
3 544 Counter 2 L Counter 2 Counter 1 L Counter 1 Status L Status H Not used
H H
4 545 Not used

Table 36: CM211 access using the CAN identifier, event counter 1 and 2 (slot 3)

1) CAN-ID = 542 + (nd - 1) x 16 + (ma - 1) x 4 + (sl - 1)


nd......Node number for the CAN slaves = 1
ma.....Module address = 1
sl .......Slot number = 3

B&R 2000 users have to exchange the data so that the high data is first (Motorola format)
For more information on ID allocation, see Chapter 5 , "CAN Bus Controller Functions".

Description of Data and Configuration Words

Data Word 0 (read)

Data word 0 includes the module status time constant for both counter values.

Bit Description
6 - 15 x ... Not defined, masked out
5 0 ... Supply voltage < 18 V
1 ... Supply voltage > 18 V, outputs OK
4 Output status of the comparator
3 Level of the encoder input for counter 1
2 Level of the encoder input for counter 2
0-1 x ... Not defined, masked out
x x x x x x x x x x x x
15 8 7 0

Data Word 1 (read)

Counter value of counter 1.

100 B&R SYSTEM 2003 User’s Manual


CM211

Data Word 2 (read)

Counter value of counter 2.

Configuration Word 5 (write)

Threshold value 1 (16 Bit) for counter 2:

a) Number format: 16 bit without sign

Bit 10 in configuration word 14 (write) is set to 0.


Threshold value 1 must always be ≤ threshold value 2 .
Threshold values are internally arranged in increasing order. The sign is ignored.

b) Number format: 16 bit without sign - cyclic operation

Bit 10 in configuration word 14 (write) is set to 1.


The threshold values are not placed in order internally. The sign is ignored.

Configuration Word 7 (write)

Threshold value 2 (16 Bit) for counter 2.

Configuration Word 14 (read)

The High Byte of configuration word 14 defines the module code.

Bit Description
8 - 15 Module code = $40
0-7 x ...Not defined, masked out
0 1 0 0 0 0 0 0 x x x x x x x x
15 8 7 0

B&R SYSTEM 2003 User’s Manual 101


CM211

Configuration Word 14 (write)

The module is configured using configuration word 14.

Bit Description
14 - 15 0
13 0 ... Event Counter Operation
12 1 ... Event Counter Operation
11 0 ... No effect on count direction
1 ... Count direction inverted as compared to counter wiring
10 0 ... Number format: 16 bit without sign
1 ... Number format: 16 bit without sign - cyclic operation
In continuous operation, the internal order of the threshold values are kept.
If a counter overflow occurs, the behavior of the comparator does not have
to be changed.
9 0
8 0 ... Counter 1 and 2: Only count positive edges
1 ... Counter 1 and 2: Count both edges
6-7 0
5 0 ... No effect on counter 2
1 ... Immediately clear counter 2
4 0 ... No effect on counter 1
1 ... Immediately clear counter 1
3 0 ... Comparator off
Output 1 is handled as defined in the variable declaration for digital outputs.
1 ... Comparator on
2 0 ... The comparator output is set to the level given in bit 0, if threshold value 1
≤ counter ≤ threshold value 2
1 ... The comparator output is set to the inverted level given in bit 0, if threshold
value 1 ≤ counter ≤ threshold value 2
1 0
0 Level of the comparator output
0 0 0 1 0 0 0 0
15 8 7 0

102 B&R SYSTEM 2003 User’s Manual


CM211

Event Counter 3 (Slot 4)

Data access takes place using data and configuration words. The following table provides an
overview of which data and configuration words are used for event counter 3.

VD
VD VD
Data Access Module R W Description
Data Type Chan.
Type
Data word 0 WORD Transp. In 0 ● Module status
Data word 1 WORD Transp. In 2 ● Counter value of counter 3
Configuration word 5 WORD Transp. Out 10 ● Threshold value 1 for counter 31)
Configuration word 7 WORD Transp. Out 14 ● Threshold value 2 for counter 31)
Configuration word 14 WORD Transp. In 28 ● Module type
WORD Transp. Out 28 ● Module configuration

Table 37: CM211 variable declaration for event counter 3 (slot 4)

1) Starting with Rev. G0

Access using CAN Identifier

Access via CAN Identifiers is used if the slave is being controlled by a device from another
manufacturer. Access via CAN Identifiers is described in an example in Chapter 4, "Module
Addressing". The transfer modes are explained in Chapter 5, "CAN Bus Controller Functions" .

In the example below, the combination module CM211 is accessed with module addresses 1 and
2.

Slot CAN-ID 1) Word 1 Word 2 Word 3 Word 4


1 542 Not used
2 543 Not used
3 544 Not used
4 545 Not used Counter 3 L Counter 3 Status L Status H Not used
H

Table 38: CM211 access using the CAN identifier, event counter 3 (slot 4)

1) CAN-ID = 542 + (nd - 1) x 16 + (ma - 1) x 4 + (sl - 1)


nd......Node number for the CAN slaves = 1
ma.....Module address = 1
sl .......Slot number = 4

B&R 2000 users have to exchange the data so that the high data is first (Motorola format)

For more information on ID allocation, see Chapter 5 , "CAN Bus Controller Functions".

B&R SYSTEM 2003 User’s Manual 103


CM211

Description of Data and Configuration Words

Data Word 0 (read)

Data word 0 includes the module status time constant for the counter value.

Bit Description
4 - 15 x ... Not defined, masked out
3 Level of the encoder input for counter 3
0-2 x ... Not defined, masked out
x x x x x x x x x x x x x x x
15 8 7 0

Data Word 1 (read)

Counter value of counter 3.

Configuration Word 5 (read) - Starting with rev. D0 G0

Threshold value 1 (16 Bit) for counter 3:

a) Number format: 16 bit without sign

Bit 10 in configuration word 14 (write) is set to 0.


Threshold value 1 must always be ≤ threshold value 2 .
Threshold values are internally arranged in increasing order. The sign is ignored.

b) Number format: 16 bit without sign - cyclic operation

Bit 10 in configuration word 14 (write) is set to 1.


The threshold values are not placed in order internally. The sign is ignored.

104 B&R SYSTEM 2003 User’s Manual


CM211

Configuration Word 7 (read) - Starting with rev. D0 G0

Threshold value 2 (16 Bit) for counter 3.

Configuration Word 14 (read)

The High Byte of configuration word 14 defines the module code.

Bit Description
8 - 15 Module code = $40
0-7 x ...Not defined, masked out
0 1 0 0 0 0 0 0 x x x x x x x x
15 8 7 0

B&R SYSTEM 2003 User’s Manual 105


CM211

Configuration Word 14 (write)

The module is configured using configuration word 14.

Bit Description
14 - 15 0
13 0 ... Event Counter Operation
12 1 ... Event Counter Operation
11 0 ... No effect on count direction
1 ... Count direction inverted as compared to counter wiring
10 Starting with revision G0:
0 ... Number format: 16 bit without sign
1 ... Number format: 16 bit without sign - cyclic operation
In continuous operation, the internal order of the threshold values are kept.
If a counter overflow occurs, the behavior of the comparator does not have
to be changed.
9 0
8 0 ... Counter 3: Only count positive edges
1 ... Counter 3: Count both edges
5-7 0
4 0 ... No effect on counter 3
1 ... Immediately clear counter 3
3 Starting with revision G0:
0 ... Comparator off
Output 1 is handled as defined in the variable declaration for digital outputs.
1 ... Comparator on
2 Starting with revision G0:
0 ... The comparator output is set to the level given in bit 0, if threshold value 1
≤ counter ≤ threshold value 2
1 ... The comparator output is set to the inverted level given in bit 0, if threshold
value 1 ≤ counter ≤ threshold value 2
1 0
0 Starting with revision G0:
Level of the comparator output
0 0 0 1 0 0 0 0 0
15 8 7 0

106 B&R SYSTEM 2003 User’s Manual


CM211

11.1.23 Variable Declaration for Gate and Period Measurement

The variable declaration is valid for the following controllers:

• CPU for the PLC 2003


• Remote I/O Bus Controller
• CAN Bus Controller
The variable declaration is made in PG2000. The variable declaration is provided in Chapter 4
"Module Addressing".

Automation Studio™ Support: See Automation Studio™ Help starting with V 1.40

Accessing screw-in modules is also explained in the sections "AF101" and "CPU".

The module CM211 is equipped with a maximum of three channels for gate and period
measurement. The channels are distributed on slots 3 and 4.

Gate and Period Measurement 1 and 2 (Slot 3)

Data access takes place using data and configuration words. The following table provides an
overview of which data and configuration words are used.

VD
VD VD
Data Access Module R W Description
Data Type Chan.
Type
Data word 0 WORD Transp. In 0 ● Module status
Data word 1 WORD Transp. In 2 ● Counter value gate / period 1
Data word 2 WORD Transp. In 4 ● Counter value gate / period 2
Configuration word 14 WORD Transp. In 28 ● Module type
WORD Transp. Out 28 ● Module configuration

Table 39: CM211 variable declaration for gate and period measurement (slot 3)

B&R SYSTEM 2003 User’s Manual 107


CM211

Access using CAN Identifier

Access via CAN Identifiers is used if the slave is being controlled by a device from another
manufacturer. Access via CAN Identifiers is described in an example in Chapter 4, "Module
Addressing". The transfer modes are explained in Chapter 5, "CAN Bus Controller Functions" .

In the example below, the combination module CM211 is accessed with module addresses 1 and
2.

Slot CAN-ID 1) Word 1 Word 2 Word 3 Word 4


1 542 Not used
2 543 Not used
3 544 Counter 2 L Counter 2 Counter 1 L Counter 1 Status L Status H Not used
H H
4 545 Not used

Table 40: CM211 access using the CAN identifier gate and period measurement 3 (slot 3)

1) CAN-ID = 542 + (nd - 1) x 16 + (ma - 1) x 4 + (sl - 1)


nd......Node number for the CAN slaves = 1
ma.....Module address = 1
sl .......Slot number = 3

B&R 2000 users have to exchange the data so that the high data is first (Motorola format)
For more information on ID allocation, see Chapter 5 , "CAN Bus Controller Functions".

108 B&R SYSTEM 2003 User’s Manual


CM211

Description of Data and Configuration Words

Data Word 0 (read)

Data word 0 includes the module status time constant for both counter values.

Bit Description
3 - 15 x ... Not defined, masked out
2 Level of the encoder input for gate / period 1
1 x ... Not defined, masked out
0 Level of the encoder input for gate / period 2
x x x x x x x x x x x x x x
15 8 7 0

Data Word 1 (read)

Counter Value Gate / Period 1.

Data Word 2 (read)

Counter Value Gate / Period 2.

Configuration Word 14 (read)

The High Byte of configuration word 14 defines the module code.

Bit Description
8 - 15 Module code = $40
0-7 x ...Not defined, masked out
0 1 0 0 0 0 0 0 x x x x x x x x
15 8 7 0

B&R SYSTEM 2003 User’s Manual 109


CM211

Configuration Word 14 (write)

The module is configured using configuration word 14.

Bit Description
14 - 15 0
13 1 ... Gate / period measurement
12 1 ... Gate / period measurement
11 0 ... Channel 2: No effect on counter value
1 ... Channel 2: Set counter value to zero (retrigger)
10 0 ... Channel 1: No effect on counter value
1 ... Channel 1: Set counter value to zero (retrigger)
8-9 0
7 0 ... Channel 2: Gate measurement
1 ... Channel 2: Period measurement
4-6 Channel 2: Definition of counter frequency
0 ... Internal 16 MHz
1 ... Internal 4 MHz
2 ... Internal 1 MHz
3 ... Internal 250 kHz
4 ... External only rising edges
5 ... External, both edges
3 0 ... Channel 1: Gate measurement
1 ... Channel 1: Period measurement
0-2 Channel 1: Definition of counter frequency
0 ... Internal 16 MHz
1 ... Internal 4 MHz
2 ... Internal 1 MHz
3 ... Internal 250 kHz
4 ... External only rising edges
5 ... External, both edges
0 0 1 1 0 0
15 8 7 0

Gate and Period Measurement 3 (Slot 4)

Data access takes place using data and configuration words. The following table provides an
overview of which data and configuration words are used.

VD
VD VD
Data Access Module R W Description
Data Type Chan.
Type
Data word 0 WORD Transp. In 0 ● Module status
Data word 1 WORD Transp. In 2 ● Counter value gate / period 3
Configuration word 14 WORD Transp. In 28 ● Module type
WORD Transp. Out 28 ● Module configuration

Table 41: CM211 variable declaration for gate and period measurement (slot 4)

110 B&R SYSTEM 2003 User’s Manual


CM211

Access using CAN Identifier

Access via CAN Identifiers is used if the slave is being controlled by a device from another
manufacturer. Access via CAN Identifiers is described in an example in Chapter 4, "Module
Addressing". The transfer modes are explained in Chapter 5, "CAN Bus Controller Functions" .

In the example below, the combination module CM211 is accessed with module addresses 1 and
2.

Slot CAN-ID 1) Word 1 Word 2 Word 3 Word 4


1 542 Not used
2 543 Not used
3 544 Not used
4 545 Not used Counter 3 L Counter 3 Status L Status H Not used
H

Table 42: CM211 access using the CAN identifier gate and period measurement 4 (slot 3)

1) CAN-ID = 542 + (nd - 1) x 16 + (ma - 1) x 4 + (sl - 1)


nd......Node number for the CAN slaves = 1
ma.....Module address = 1
sl .......Slot number = 4

B&R 2000 users have to exchange the data so that the high data is first (Motorola format)
For more information on ID allocation, see Chapter 5 , "CAN Bus Controller Functions".

Description of Data and Configuration Words

Data Word 0 (read)

Data word 0 includes the module status time constant for the counter value.

Bit Description
1 - 15 x ... Not defined, masked out
0 Level of the encoder input for gate / period 3
x x x x x x x x x x x x x x x
15 8 7 0

Data Word 1 (read)

Counter Value Gate / Period 3.

B&R SYSTEM 2003 User’s Manual 111


CM211

Configuration Word 14 (read)

The High Byte of configuration word 14 defines the module code.

Bit Description
8 - 15 Module code = $40
0-7 x ...Not defined, masked out
0 1 0 0 0 0 0 0 x x x x x x x x
15 8 7 0

Configuration Word 14 (write)

The module is configured using configuration word 14.

Bit Description
14 - 15 0
13 1 ... Gate / period measurement
12 1 ... Gate / period measurement
11 0
10 0 ... Channel 3: No effect on counter value
1 ... Channel 3: Set counter value to zero (retrigger)
4-9 0
3 0 ... Channel 3: Gate measurement
1 ... Channel 3: Period measurement
0-2 Channel 3: Definition of counter frequency
0 ... Internal 16 MHz
1 ... Internal 4 MHz
2 ... Internal 1 MHz
3 ... Internal 250 kHz
4 ... External only rising edges
5 ... External, both edges
0 0 1 1 0 0 0 0 0 0 0
15 8 7 0

112 B&R SYSTEM 2003 User’s Manual


CM211

11.1.24 Variable Declaration for Digital Inputs/Outputs

The variable declaration is valid for the following controllers:

• CPU for the PLC 2003


• Remote I/O Bus Controller
• CAN Bus Controller
The variable declaration is made in PG2000. The variable declaration is provided in Chapter 4
"Module Addressing".

Automation Studio™ Support: See Automation Studio™ Help starting with V 1.40

VD
VD VD
Name Module R W Description
Data Type Chan.
Type
Digital inputs 1 - 8 BIT Digit. In 1 ... 8 ● Level of the digital inputs
Digital outputs 1 - 8 BIT Digit. Out 1 ... 8 ● Level of the digital outputs
Module status BYTE Status In 0 ● Module status

Table 43: CM211 variable declaration digital inputs/outputs

Access using CAN Identifier

Access via CAN Identifiers is used if the slave is being controlled by a device from another
manufacturer. Access via CAN Identifiers is described in an example in Chapter 4, "Module
Addressing". The transfer modes are explained in Chapter 5, "CAN Bus Controller Functions" .

Digital Inputs

A maximum of eight digital I/O modules can be run in the packed mode.

The CM211 modules uses two module addresses. If two CM211 modules are used, only four
additional digital I/O modules can be used.

The following example shows the structure of the CAN object if two CM211 and four DI435
modules are used.

CAN-ID 1) Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Byte 7 Byte 8


CM211 CM211 CM211 CM211
286 DI435 DI435 DI435 DI435
Not used I1-8 Not used I1-8

Table 44: CM211 access using CAN identifier, digital inputs, packed

1) CAN-ID = 286 + (nd - 1) x 4


nd......Node number for CAN slaves = 1

A maximum of four digital I/O module can be run in unpacked mode.

B&R SYSTEM 2003 User’s Manual 113


CM211

The following example shows the structure of the CAN object if one CM211 and two DI435
modules are used.

Module CAN-ID 1) Byte


286 Not used
CM211
287 Inputs 1 - 8
DI435 288 Inputs 1 - 8
DI435 289 Inputs 1 - 8

Table 45: CM211 access using CAN identifier, digital inputs, unpacked

1) CAN-ID = 286 + (nd - 1) x 4 + (ma - 1)


nd......Node number for CAN slaves = 1
ma.....Module address for the digital I/O module = 1 - 4

Digital Outputs

A maximum of eight digital I/O modules can be run in the packed mode.

The CM211 modules uses two module addresses. If two CM211 modules are used, only four
additional digital I/O modules can be used.

The following example shows the structure of the CAN object if two CM211 and four DO722
modules are used.

CAN-ID 1) Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Byte 7 Byte 8


CM211 CM211 CM211 CM211
414 DO722 DO722 DO722 DO722
Not used O1-8 Not used O1-8

Table 46: CM211 access using CAN identifier, digital outputs, packed

1) CAN-ID = 414 + (nd - 1) x 4


nd......Node number for CAN slaves = 1

A maximum of four digital I/O module can be run in unpacked mode.

114 B&R SYSTEM 2003 User’s Manual


CM211

The following example shows the structure of the CAN object if one CM211 and two DO722
modules are used.

Module CAN-ID 1) Byte


414 Not used
CM211
415 Outputs 1 - 8
DO722 416 Outputs 1 - 8
DO722 417 Outputs 1 - 8

Table 47: CM211 access using CAN identifier, digital outputs, unpacked

1) CAN-ID = 414 + (nd - 1) x 4 + (ma - 1)


nd......Node number for CAN slaves = 1
ma.....Module address for the digital I/O module = 1 - 4

For more information on ID allocation, see Chapter 5 , "CAN Bus Controller Functions".

Module status

Bit Description
7 0 ... No supply voltage or supply voltage too low for digital inputs/outputs
1 ... Module voltage OK
6 Digital module = 0
5 0 ... No error
1 ... Error (short circuit, over-temperature, etc.)
0-4 Module code = $17
0 1 0 1 1 1
7 0

B&R SYSTEM 2003 User’s Manual 115


CM211

116 B&R SYSTEM 2003 User’s Manual

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy