PLC operation control

PLC operation control 1:

Available from TC3.1 Build 4026

PLC operation control 2:

It is your responsibility to ensure that runtime system services are activated in safe application states and deactivated only in critical ones.

A plant or project can enter a sensitive state at runtime, where disruptive actions can endanger the entire machine or plant. However, in this state you can suppress certain commands and prevent dangerous actions. The global data type PlcAppSystemInfo is available for this purpose.

Examples of TwinCAT commands whose execution can be suppressed:

If a runtime system service is requested at runtime of the project, but it is currently deactivated, you will receive a message about this in TwinCAT.

Using PlcAppSystemInfo for operation control

You can activated or deactivated operations using the _AppInfo.Flags variable of DWORD type. _AppInfo is an instance of the PlcAppSystemInfo type.

Operation

Bit of _AppInfo.Flags

Sample access

Deactivate Write values

Bit 0

_AppInfo.Flags.0 := TRUE;

Deactivate Force values

Bit 1

_AppInfo.Flags.1 := TRUE;

Deactivate Set a breakpoint

Bit 2

_AppInfo.Flags.2 := TRUE;

Deactivate Download

Bit 3

_AppInfo.Flags.3 := TRUE;

Deactivate Online Change

Bit 4

_AppInfo.Flags.4 := TRUE;

See also: