Applies To:
  • CitectSCADA

Summary:
Question. The return value from the AlarmFirstCatRec function returns very large numbers, is this correct?

Yes, it is valid for very large numbers to be returned from the alarm 'rec' functions. The record number returned is not a simple record number but a combination of what type the alarm is, as well as the alarm record number. You should only check if the return value is -1 which shows the function failed.

Currently the high word of the record number contains the alarm offset in the alarm database (starting from 0). The low word of the record number contains the type of alarm, eg 0 is digital alarms, 1 is analog, 3 is advanced. However CIT may decide to change this at some time in the future, so if you rely on this information your Cicode may fail in the future. 


Solution:
Any number but -1 returned from the alarm 'rec' functions is valid, you should not assume anything from the record number, eg assume it is a magic number, only check against -1. 

Keywords:
 

Attachments