Configuration for Use as X4-Counting Device

The function module DC541-CM supports an encoder counting mode with channels A/B. This counting mode usually just supports to count 1 edge out of possible 4 edges from the 2 encoder lines. These are connected to C0 and C1 on DC541-CM.

../_images/f97631ade38b52590a33139000eba54e1 Counting in X1-mode
Counting in X4-mode

For increasing the accuracy, it is possible to use a special mode with counting all 4 edges. This mode just supports a frequency up to 4 kHz. Despite of counting 4 edges on a lower frequency, the functionality is the same as 32 bit encoder on channel 0 and 1 and also the same Function Block DC541_32BIT_CNT: DC541_32BIT_CNT DC541_32BIT_CNT has to be used.

For use of DC541-CM as a counting device, the operating mode of the device has to be configured:

  1. In the device tree, add a new object to the DC541-CM node and select DC541 Encoder X4 mode from the list.

  2. Double-click the added object and configure the I/O channels:

    ../_images/ef0b69c945fefab60a33139000eba54e1

The channels C0..C3 are to be used for the encoder mode. In the module parameters, the channels C4..C7 can be configured as:

Input -Input
Output -Output

To do so, select the corresponding value for each channel.

Note

The channels C1..C3 are automatically used, too. In the PLC configuration, these channels are left at the default setting “Input”.

The specified configuration can be read using the Function Block DC541_GET_CFG: DC541_GET_CFG