169
ifm
Programming Manual BasicDisplay CR0452 v03.02
05 / 2018
ifm function elements
ifm function elements for the device CR0452
OHC
14777
= Operating Hours Counter
Unit type = function block (FB)
Unit is contained in the library
ifm_CR0452_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
14778
OHC provides 4 operating hours counters for universal use.
However, for hardware version < AD: only 2 operating hours counters possible.
Valid counting range: 0:00...4 294 967 295:59 hours (= 490 293 years, 25 days, 15 hours)
If hardware version of device < AD:
reset the memory area for OHC once:
In the FB
MEM_ERROR
(
), set input RESET_OHC = TRUE!
> Only now can the operating hours counters be used.
>
Parameters of the inputs
14779
Parameter
Data type
Description
ENABLE
BOOL
TRUE:
execute this function element
FALSE:
unit is not executed
> initiated processes continue in the background
> FB outputs are not updated
OHC_NUM
BYTE
Operating Hours Counter
Number of the counter (0...3)
MODE
BYTE
Operating mode of the counter
permissible values =
0 = stop counter
1 = continue counting at the last stored value
2 = reset counter
3 = preset counter with the following values
PRESET_HOURS
DWORD
Preset hours
(0...4 294 967 295 = 0x0000 0000...0xFFFF FFFF)
PRESET_MINUTES
BYTE
Preset minutes (0...59 = 0x00...0x3B)