Overview

The library contains useful function blocks for the PLC controller ( BCxxxx controller ). In addition to the RTC blocks, the library contains a function block for decoding the DCF-77 time signal, along with a number of conversion functions. Internally, PLC Controller system functions are called.

 

Requirements

Some of the functions are only supported by PLC controllers with a newer firmware version. The required firmware versions are listed in the PlcSystemBC library documentation.

 

Content of the library

Function blocks

Name

Description

RTC

Real Time Clock

RTC_EX

Real Time Clock with an additional millisecond output

DCF77_TIME

Read the DCF77 radio time

ReadWriteTerminalReg

Access to the registers of the terminals

DRAND

Random number generator

FB_BasicPID

Simple PID controller

Functions

Name

Description

DT_TO_SYSTEMTIME

Converting DATE_AND_TIME to Windows system time structure

SYSTEMTIME_TO_DT

Converting Windows system time structure to DATE_AND_TIME

TIME_TO_OTSTRUCT

Convert TIME to a structure with milliseconds, seconds, minutes, hours, days and weeks

OTSTRUCT_TO_TIME

Convert a structure with milliseconds, seconds, minutes, hours, days and weeks to a TIME variable

SETBIT32

Sets a bit in a 32-bit variable to 1

CSETBIT32

Sets / resets a bit in a 32-bit variable

GETBIT32

Determines the value of a bit of a 32-bit variable

CLEARBIT32

Sets a bit in a 32-bit variable to zero

F_SwapReal

Converts bus controller REAL numbers into the 4Byte REAL Intel format.

IsFinite

Verifies the formatting of a floating-point number in accordance with the IEEE

 

Data structures

Name

Description

TYPE TIMESTRUCT

Windows system time structure

TYPE OTSTRUCT

Operating time structure