Introduction

The present function blocks simplify event-driven data exchange between the TwinCAT PLC runtime system and/or other ADS devices (TwinCAT NC, Bus Terminal Controller, ...).

The FB_WriteXXXOnDelta() function block implements a write procedure when the input signal rises above or falls below a specified limit value. The frequency with which the input signal is examined can be set. Event-driven data writing minimizes the loading on the fieldbus. If an error occurs during transmission, the process is repeated until the connection is established once more. All data types supported in the TwinCAT PLC are permitted as source and destination variables. Symbol names are also supported.

Watchdog function blocks are available to monitor individual communication partners. The device that is to be monitored cyclically transmits an incrementing counter. A check is made at the receiver to see that the counter state changes within a specific time.

Write/Read Blocks

Name

Description

FB_ReadAdsSymByName

Reads a variable of any desired data type by variable name

FB_WriteAdsSymByName

Writes a variable of any desired data type by variable name

FB_WriteBoolOnDelta

Writes a variable of type BOOLEAN in response to an event.

FB_WriteByteOnDelta

Writes a variable of type BYTE in response to an event.

FB_WriteWordOnDelta

Writes a variable of type WORD in response to an event.

FB_WriteDWordOnDelta

Writes a variable of type DWORD in response to an event.

FB_WriteRealOnDelta

Writes a variable of type REAL in response to an event.

FB_WriteLRealOnDelta

Writes a variable of type LREAL in response to an event.

Monitoring Blocks

Name

Description

FB_WriteWatchdog

Writes a watchdog signal (an incrementing counter) cyclically

FB_CheckWatchdog

Monitors the received watchdog signal