BAC_GenSys_01

Functional description

The template BAC_GenSys_01 is a system function template.
The template reads the system time from the PC and maps the time information in the PLC to variables. Various time specifications are required within the templates for plant and room automation.
In addition, a flash pulse is generated and made available to other templates via a global variable, e.g. see the block diagram in the template BAC_PltAlm_01.

Loading of the template BAC_GenSys_01 is imperative! The template BAC_GenSys_01 may only be loaded once!

Block diagram

BAC_GenSys_01 1:

Interface

BAC_GenSys_01 2:

Program description

Instance

Type

Task

GetTime

FB_BA_GetTime

This function block is used to realize an internal clock (Real Time Clock RTC) in the TwinCAT PLC. When the function block is enabled via bEn, the RTC clock is initialized with the current NT system time. One system cycle of the CPU is used to calculate the current RTC time. The function block must be called once per PLC cycle in order for the current time to be calculated. The time is output at the outputs stSysTi for the read system time and stUtcTi for the Coordinated Universal Time (UTC). This is determined internally from the system time and the time zone. If the system time and/or the time zone was entered incorrectly, the UTC time will also be wrong.

SysTi

FB_BA_ExtTiSt

The function block SysTi resolves the time structure of the read target system into the different components.

Utc

FB_BA_ExtTiSt

The function block Utc resolves the Coordinated Universal Time (Universal Time Coordinated - previously referred to as GMT, Greenwich Mean Time) into the different components.

Blink

FB_BA_Blink

The function block Blink generates a flash pulse and makes it available for other templates via a global variable g_Blink, e.g. collective failure signaling lamp

Version history

Version number

Comments

1.0.1

First release