CMS-IO Library for Modul HandlingΒΆ

Preconditions

The function blocks of the CMS-IO library are only working in the RUN mode of the Processor Module. Using the library in the SIMULATION mode will not provide any valid or usable diagnostic information.

The encoder/counter interface inside the FM502_CMS can be used in different configurable operation modes. The operation mode is activated during the initialization phase (power-on, cold start, warm start).

The data exchange from and to the user program is performed using input and output operands. These necessary operands are created and reserved automatically, when the Function Module is added into the configuration.

Operation Modes

Inputs and outputs which are not used by the counters are available for other tasks.

Table legend: A = input channel A, B = input channel B, Z = output channel Z.

Operation Mode Function Used inputs Description Function block
0-1 No counter None This operating mode is selected, if the integrated high-speed counter is not needed. -
1-1 Up/down counter (A) A = Counting input 1 up/down 32 bit counter on input A (dynamic changes) with set and reset input operation, end value reached indicator, touch/catch value and overflow flag. CMS_IO_32BIT_CNT
2-1 Up/down with release input (B)

A = Counting input

B = Enable input

1 up/down 32 bit counter with enable input. Counting is valid when input B is TRUE. Dynamic up/down count possibility, with set and reset input operation, end value reached indicator, touch/catch value and overflow flag. CMS_IO_32BIT_CNT
3-2 Up/down counters (A,B)

A = Counting input 0

B = Counting input 1

2 up/down 16 bit counter (on rising edge count) functions, with separate up/down, reset operation and overflow flag. CMS_IO_16BIT_2CNT
4-2 Up/down (A, B on falling edges)

A = Counting input 0

B = Counting input 1

2 up/down 16 bit counter functions (with A on rising edge count and B on falling edge count), With separate up/down, reset operation and overflow flag. CMS_IO_16BIT_2CNT
5-1 Up/down dynamic set (B) / rising edge

A = Counting input

B = Dynamic set input

1 up/down 32 bit counter with set and reset input, end value reached indicator, touch/catch value and overflow flag. Additional function to mode 1 is the dynamic set input (B) on rising edge sets START_VALUE. CMS_IO_32BIT_CNT
6-1 Up/down dynamic set (B) / falling edge

A = Counting input

B = Dynamic set input

1 up/down 32 bit counter with set and reset input, end value reached indicator, touch/catch value and overflow flag. Additional function to mode 1 is the dynamic set input (B) on falling edge sets START_VALUE. CMS_IO_32BIT_CNT
7-1 Reserved None - -
8-1 Up/down with release (B), 0 cross detection

A = Counting input

B = Enable input

1 up/down 16 bit counter (in range of -32768 to 32767) with enable input and zero crossover detection (CF). Counting is valid when input B is TRUE. With set and reset input operation and touch/catch value. CMS_IO_16BIT_CNT
9-1 Reserved None - -
10-1 Reserved None - -
11-1 Incremental encoder

A = Trace A of the encoder

B = Trace B of the encoder

Z = Trace Z  of the encoder (mechanical zero)

1 up/down counter for encoder x1 count, touch/catch value, RPI function, reset and set

Function block counts rising edges at input A.

CMS_IO_32BIT_ENCODER
12-1 Incremental encoder X2

A = Trace A of the encoder

B = Trace B of the encoder

Z = Trace Z  of the encoder (mechanical zero)

1 up/down counter for position sensor x2 count, with possibility of touch/catch value, RPI function, set and reset actions.

Function block counts rising and falling edges at input A.

CMS_IO_32BIT_ENCODER
13-1 Incremental encoder X4

A = Trace A of the encoder

B = Trace B of the encoder

Z = Trace Z  of the encoder (mechanical zero)

1 up/down counter for position sensor x4 count, with possibility of touch/catch value, RPI function, set and reset actions.

Function block counts rising and falling edges at input A and B.

CMS_IO_32BIT_ENCODER
14-1 SSI, absolute encoder

A = Data signal

B = Clock signal

Absolute positioning sensor using SSI interface CMS_IO_SSI_CNT
15-1 Time frequency meter Z = Input signal Time measurement of Z signal, rising edge, falling edge, rotation per minute and frequency calculation CMS_IO_FREQ_SCAN

Identifying a FM502_CMS at the Function Block

The function blocks have to identify every FM502_CMS connected to the Processor Module. Therefore the Automation_Builder automatically creates an instance description of the module. This instance description is available as a global variable in IEC 61131-3 editor. Use the input INST to connect the address of the instance <no title>.

../_images/819a3186568228d40a317d317ec9e27e

Global variable in Automation_Builder

../_images/e2ad098c5682ef940a317d314ef809c9

Global variable in IEC 61131-3 editor