176
ifm Programming Manual ecomatmobile BasicController (CR0403) Runtime System V03.02 2015-04-01
ifm function elements ifm function elements for the device CR0403
>
Parameters of the inputs
8124
ENABLE BOOL TRUE: execute this function element
FALSE: unit is not executed
> initiated processes continue in the background
> FB outputs are not updated
CHANNEL BYTE (MODE = 14 / 19 / 20)
Number of the fast input channel (0...3)
0...3 for the input IN0...IN3
(MODE = 25)
Number of the fast input A channel (0 / 2)
0 / 2 for the inputs IN0 / IN2
B channel = A channel + 1
MODE BYTE Operating mode of the function block:
0 = 0x00 = no measurement
14 = 0x0E = frequency measurement
19 = 0x13 = interval measurement
20 = 0x14 = invertal and ratio measurement
25 = 0x19 = phase shift of two input signals
PERIODS BYTE Number of periods to be averaged (1...4)
• if MODE = 14 / 19 / 20 average arithmetically
• if MODE = 25 average geometrically
• if PERIODS = 1 no averaging
TIMEBASE TIME (only relevant if MODE = 14)
time for counting the edges in [ms]
permissible values = 1...2 000
>
Parameters of the outputs
8125
VALUE_CYCLE DWORD
period duration of the input signal in [µs]
VALUE_FREQ REAL frequency of the input signal in [Hz]
VALUE_TIME TIME time elapsed since the last positive edge
VALUE_RATIO WORD mark-to-space ratio of the input signal in [‰]
RESULT BYTE feedback of the function block
(possible messages → following table)
Possible results for RESULT:
Value
dec | hex
Description
0 00 FB is inactive
1 01 FB execution completed without error – data is valid
2 02 function block is active (action not yet completed)
3 03 function block is active – valid values not yet available
130 82 channel setting is invalid
132 84 mode setting is invalid
137 89 value for PERIODS or TIMEBASE is invalid
146 92 Period duration is too long