Skip to main content
Version: v4 (Stable)

GetAlarmStatus

GetAlarmStatus(AlarmId As String/Integer, AlarmState As Integer, AlarmTime As Time, ResetTime As Time, AckTime As Time, UserId As String/Integer) As Integer

Gets the full alarm status of the alarm tag identified by <AlarmId>. <AlarmId> can be the numeric object id of the alarm tag or its alphanumeric identifier, according with the type of <AlarmId> (Integer or String).

The alarm state is returned in <AlarmState>. If the value of <AlarmState> is negative, the alarm is not masked and doesn't exist in the alarm table. Otherwise, the alarm state is defined by the following bit masks:

  • bit 0 (mask &h01): activation state of the alarm (1 = active alarm)
  • bit 1 (mask &h02): acknowledgment state of the alarm (1 = alarm not acknowledged)
  • bit 2 (mask &h04): masking state of the alarm (1 = masked alarm)
  • bit 6 (mask &h40): connection failure (red cross)
  • bit 7 (mask &h80): tag not polled (blue cross)

Returns the alarm time in <AlarmTime>, alarm reset time in <ResetTime> and acknowledgment time in <AckTime>, all times returned as local time.

Returns in <UserId> the id or name (according to the variable type) of the user who acknowledged the alarm.

Returns an error code (0 if no error, 6 if <AlarmId> not defined).