M_SetAlarm

M_SetAlarm 1:

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

M_SetAlarm 2:

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

Syntax

METHOD M_SetAlarm : BOOL
VAR_IN_OUT
  stAdmin          : ST_PMLa;
END_VAR
VAR_INPUT
  stAlarm          : ST_PMLEvent;
END_VAR

Example call:

AlarmInserted := fbAdminAlarm.M_SetAlarm(stAdmin := PackTags.Admin, stAlarm := Alarm);

Requirements

Development Environment

Target platform

PLC library to include

From TwinCAT

  • 3.1 Build 4024.63

PC (i386)

From Tc3_PackML_ V3 1.0.3