Create
![Create 1:](Images/png/5027117707__Web.png)
This method creates an alarm instance in the EventLogger.
Syntax
METHOD Create : HRESULT
eventClass : GUID;
nEventId : UDINT;
eSeverity : TcEventSeverity;
bWithConfirmation : BOOL;
ipSourceInfo : I_TcSourceInfo;
END_VAR
Inputs
Name | Type | Description |
---|---|---|
eventClass | GUID | GUID of the event class. |
nEventId | UDINT | ID of the event. |
eSeverity | Severity of the event. | |
bWithConfirmation | BOOL | Defines whether the alarm requires mandatory confirmation. |
ipSourceInfo | Interface pointer to the source information. Default source information is created if no interface pointer is transferred. |
Return value
Name | Type | Description |
---|---|---|
Create | HRESULT | Returns S_OK if a new alarm was successfully created. Returns ERROR_ALREADY_EXISTS if the alarm has already existed. Otherwise returns HRESULT as the error code |