M_SetWarning

This method inserts a warning in the Admin-Tags. Warning[].Trigger is set to TRUE and the value from Admin.PlcDateTime is entered in Warning[].DateTime. The other values are taken from the transferred warning structure. The method returns TRUE if the warning was entered successfully. If the Warning array is already full of entries, the oldest entry is deleted as a result.

M_SetWarning 1:

So that a valid timestamp can be entered, the function block PML_AdminTime should be called cyclically in the program.

Syntax

METHOD M_SetWarning : BOOL
VAR_IN_OUT
  stAdmin          : ST_PMLa;
END_VAR
VAR_INPUT
  stWarning        : ST_Alarm;
END_VAR

Sample call:

WarningInserted := fbAdminAlarm.M_SetWarning(stAdmin := PackTags.Admin, stWarning := Warning);

Requirements

Development environment

Target system type

PLC libraries to include

TwinCAT v3.1 Build 4018 and higher

PC (i386)

Tc3_PackML_V2