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.
![]() | So that a valid timestamp can be entered, the PML_AdminTime function block should be called cyclically in the program. |
Syntax
METHOD M_SetStopReason : BOOL
VAR_IN_OUT
stAdmin : ST_PMLa;
END_VAR
VAR_INPUT
stStopReason : ST_PMLEvent;
END_VAR
Example call:
StopReasonInserted := fbAdminAlarm.M_SetStopReason (stAdmin := PackTags.Admin, stStopReason := StopReason);
Requirements
Development Environment | Target platform | PLC library to include |
---|---|---|
From TwinCAT
| PC (i386) | From Tc3_PackML_ V3 1.0.3 |