Skip to main content
Version: v4 (Stable)

GetAlarmState

GetAlarmState(AlarmId AS String/Integer, AlarmState AS Integer) As Integer

This function returns in <AlarmState> the current alarm state of 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 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): alarm masked by a user (1 = masked alarm)
  • bit 5 (mask &h20): current masking state of the alarm (1 = masked alarm by a user, a masking condition, another alarm or by program)
  • bit 6 (mask &h40): connection failure (red cross)
  • bit 7 (mask &h80): tag not polled (blue cross)

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