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

Summary:
How can I initialise Alarm or Trend Cicode functions that can only be called on the server, from a display node? 

Solution:
The functions below give an example of how to execute the AlarmAckRec() and AlarmFirstTagRec() functions from any node. They use the message functions, first to send a message from a display node to the primary server and then from the primary server to the standby server.

/*The AlmAck() function is initialised by the Display node (Don't forget that servers are also Display nodes.) The Alarm tag is passed into the function as a string and a message is sent to the alarm server to initialise the AlmAckMsg() function.*/
FUNCTION
AlmAck(STRING AlmTag)
   INT hAlarm1;
   hAlarm1 = MsgOpen("Alarm", 0, 0);
   MsgRPC(hAlarm1, "AlmAckMsg", AlmTag, 1);
   MsgClose("Alarm", hAlarm1);
END

/* The AlmAckMsg() function is executed on the Alarm server that the display node is connected to. This could be either the primary or standby alarm server. The function first preforms the alarm acknowledge and then sends a message to the other alarm server for it to also preform the alarm acknowledge.*/
FUNCTION
AlmAckMsg(STRING AlmTag)
   INT hAlarm2;
   OurAlarmAckRec(AlmTag);
   hAlarm2 = MsgOpen("Alarm", 3, 0);
   MsgRPC(hAlarm2,"OurAlarmAckRec",AlmTag,1);
   MsgClose("Alarm", hAlarm2);
END

/*OurAlarmAckRec() simply searches for the first occurrence of an alarm tag and acknowledges it by its record number.*/
FUNCTION
   OurAlarmAckRec(STRING AlmTag)
   ALarmAckRec(AlarmFirstTagRec(AlmTag,"",""));
END

 

Keywords:
 

Attachments