M_SetAlarm
This method inserts an alarm in the Admin-Tags. Alarm[].Trigger is set to TRUE and the value from Admin.PlcDateTime is entered in Alarm[].DateTime. The other values are taken from the transferred alarm structure. The method returns TRUE if the alarm was entered successfully
So that a valid timestamp can be entered, the function block PML_AdminTime should be called cyclically in the program. |
Syntax
METHOD M_SetAlarm : BOOL
VAR_IN_OUT
stAdmin : ST_PMLa;
END_VAR
VAR_INPUT
stAlarm : ST_Alarm;
END_VAR
Sample call:
AlarmInserted := fbAdminAlarm.M_SetAlarm(stAdmin := PackTags.Admin, stAlarm := Alarm);
Requirements
Development environment | Target system type | PLC libraries to include |
---|---|---|
TwinCAT v3.1 Build 4018 and higher | PC (i386) | Tc3_PackML_V2 |