AlarmGenerate (statement)
About this task
Syntax |
AlarmGenerate Project$
,
AlarmId$
,
ResourceId$
,
Message$, [
,
UserId$ [
,
RefId$ [
,
Master]]] |
||||
Description | To generate an alarm on a local or remote CIMPLICITY project. | ||||
Parameter | Description | ||||
Project$ |
String. The project to generate the alarm on. An empty string "" indicates the current project. |
||||
AlarmId$ | String. The ID of the Alarm. Must be a valid alarm of type $CIMBASIC. | ||||
ResourceId$ | String. The Resource ID to generate the alarm against. Used to control routing of the alarm. | ||||
Message$ |
String. The update alarm message to display. Note: This string is substituted into the first variable field of the Alarm's message. For a user-defined alarm message, this will be the first %s field in the message. For a point alarm message, it will be the first variable field (%VAL, %ID, etc.) in the alarm message. For this reason, it is not recommended that you use the AlarmMessage$ field when updating point alarms. |
||||
UserId$ | String (optional). The User ID that generated the alarm. | ||||
RefId$ | String (optional). A Reference ID used to distinguish identical alarms. | ||||
Master | BOOLEAN (optional). By default on a computer with Server Redundancy, alarms sent by the standby computer's Event Manager are ignored. To allow an alarm to be generated from a script on a standby computer, set Master to True. | ||||
Alarm Message Length |
Important: The following use of AlarmGenerate requires extra configuration for projects created before CIMPLICITY version 6.1. An alarm is triggered from a BCE script using AlarmGenerate. The alarm is a $CIMBASIC type. The alarm message contains 80 characters. Example:
For projects created before CIMPLICITY version 6.1: Problem If BASIC generates an alarm that is greater than 72 characters to a project that does not have the following solution: The project will log an error indicating there were too many fields. The alarm will be displayed with 72 characters. Solution Allow 80 characters in a BASIC alarm message. Idtpop the alarm_field record. Edit the alarm_field.idt file. Change the field_len to 80 in the $CIMBASIC record. For projects created in CIMPLICITY version 6.1 and later 80 characters are supported automatically. |
||||
Example |
|
||||
See Also | AlarmUpdate (statement) | ||||
Notes | The Alarm ID must have an Alarm Type of $CIMBASIC otherwise the alarm message may not be displayed correctly. A unique alarm in CIMPLICITY is defined by the Alarm ID, Resource ID and Reference ID combination. Each unique alarm can be displayed as a distinct entry in the Alarm Viewer. Non-unique alarms are stacked, so that the user only sees the most recent occurrence. In general, the Resource ID is used to control the routing of alarms to users. The Reference ID is used by an application to distinguish between different instances of the same alarm. Guidelines for AlarmGenerateEx (statement) also apply to AlarmGenerate. |