FB_CheckIoMapping

FB_CheckIoMapping 1:

This class checks for an I/O element that supports I_InputBase or I_OutputBase whether the ProcessValue (or, in the case of outputs, the ProcessFeedback) is cyclically synchronized via a TwinCAT mapping (e.g. with I/O).

FB_CheckIoMapping 2:

Mapping analysis generates artificial noise

For analysis purposes, the function block describes the values to be interpreted with an artificial noise. If other parts of the program also read out the signal, this noise can lead to misinterpretations!

  • The effects of synchronized mappings can be minimized by placing the I/O check as the last access to the I/O element within the PLC cycle.

Syntax:

FUNCTION_BLOCK FB_CheckIoMapping EXTENDS FB_MessageBase

FB_CheckIoMapping 3: Properties

Name

Type

Access

Description

Busy

BOOL

Get

A check is currently being carried out.

Done

BOOL

Get

The mappings have been checked.

Error

BOOL

Get

An error has occurred while checking the mappings.

ErrorId

UDINT

Get

Error code of the last error that occurred.

IoDevice

I_IoBase

Get, Set

I/O object to be checked.

IsMapped

BOOL

Get

TRUE if an active mapping was detected during the check.

FB_CheckIoMapping 4: Methods

Name

Description

Cyclic()

Cycle method

DoCheck(bExecute)

Starts the check of the assigned I/O object.

FB_CheckIoMapping 5: Interfaces

Type

Description

I_CheckIoMapping

Standard interfaces on FB_CheckIoMapping.

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.4024.71

PC or CX (x64, x86)

Tc3_PlasticFunctions (>= v12.12.0.0)