M_SetStopReason

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

M_SetStopReason 1:

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

Syntax

METHOD M_SetStopReason : BOOL
VAR_IN_OUT
  stAdmin          : ST_PMLa;
END_VAR
VAR_INPUT
  stStopReason     : ST_Alarm;
END_VAR

Sample call:

StopReasonInserted := fbAdminAlarm.M_SetStopReason (stAdmin := PackTags.Admin, stStopReason := StopReason);

Requirements

Development environment

Target system type

PLC libraries to include

TwinCAT v3.1 Build 4018 and higher

PC (i386)

Tc3_PackML_V2