175
ifm
Programming Manual BasicDisplay CR0452 v03.02
05 / 2018
ifm function elements
ifm function elements for the device CR0452
TIMER_READ_US
8219
Unit type = function block (FB)
Unit is contained in the library
ifm_CR0452_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
660
TIMER_READ_US reads the current system time in [µs].
When the supply voltage is applied, the device generates a clock pulse which is counted upwards in a
register. This register can be read by means of the FB call and can for example be used for time
measurement.
Info
The system timer runs up to the counter value 4 294 967 295 µs at the maximum and then starts
again from 0.
4 294 967 295 µs = 1h 11min 34s 967ms 295µs
>
Parameters of the outputs
8220
Parameter
Data type
Description
TIME_US
DWORD
current system time [
s]
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