Applies To:
  • CitectSCADA 1.00, 1.01, 1.10, 1.11, 1.20, 2.00, 2.01

Summary:
Question: Can I define my own hardware errors? 

Solution:
Users can define their own hardware errors by adding them to the HARDALM database. This database is not normally shown in CtEdit. You can edit the HARDALM database using a database editor, eg dBase or Excel. The hardware alarms that are already configured in Citect are stored in the HARDALM.DBF file in the SYSTEM database. However you should not add your alarms to this database because if the Citect version is upgraded your changes will be lost. Always add your new hardware errors to the HARDALM.DBF file in your database directory. The HARDALM.DBF database has the following fields:
TAG The tag of the hardware alarms. Set the tag to 'Hardware'.
NAME The name of the alarm. This is the general area of the alarm. Citect currently uses 'PLC Server' for alarms associated with the I/O Server, Cicode for alarms associated with Cicode, NetBIOS for network errors, Animator for animation and display error, SQL interface for SQL errors, Alarm for alarm server errors, File Server for file server errors and General for other types of errors. You may set the name to any of the above or create your own.
DESC The text description of the error. This is your error message.
ERROR The error code to generate the hardware error. This error code is defined in hex format. For user hardware errors you should use error codes above 0x0800 and less than 0x1000. Error codes below this are reserved for future Citect use. The high nibyte is reserved to specify the alarm severity in PLC errors.
CATEGORY The category of the hardware errors. All hardware errors must be in category 255.
HELP Leave this field blank.
DEVICE Leave this field blank.
AREA Leave this field blank.
PRIV Leave this field blank.
Comment Any comments associated with the hardware error.

Once you have defined your hardware error and compiled your project, Citect will display your new hardware error when ever it sees your defined error code. Note that as hardware errors are generated internally in Citect, Citect will never generate your particular hardware error code. The only way to generate your hardware error is by calling the function ErrSetHw() or if you have written your own protocol driver. For example, if you have configured a hardware alarm with error code 0x0800, ErrSetHw(2, 0x0800), will generate your hardware alarm in association with the Cicode device. If you are writing your own protocol driver then return your error code as the generic error. 


Keywords:
 

Attachments