Applies To: |
|
Summary: |
How do I use the AlarmFirstCatRec and AlarmNextCatRec on a Remote Client? |
Solution: |
When using the Alarm Record functions (i.e. AlarmFirstTagRec) on a remote client, you will need to use MsgRPC (Message Remote Procedure Call) to the alarm server, as the alarm server holds the alarm information. The alarm identifier will be sent to the remote client as the return value of the MsgRPC function. Refer to the help for MsgRPC cicode function for further information on this function. Furthermore, the AlarmFirstCatRec or AlarmNextCatRec cicode functions do not work in this method as they are using labels, and you should use _AlarmQueryFirstRec and _AlarmQueryNextRec as alternatives. The
following Cicode function describes the problem and the
solution: sAlmrec_2 = MsgRPC(hMsg,"AlarmFirstTagRec","^"Tag name^"",0); sAlmrec_3 = MsgRPC(hMsg,"AlarmGetFieldRec","^"" + sAlmrec_2 + "^",^"DESC^"",0) // AlarmFirstCatRec and AlarmNextCatRec should be replaced by _AlarmQueryFirstRec and _AlarmQueryNextRec sAlmrec_4 = MsgRPC(hMsg,"_AlarmQueryFirstRec","50,4,-1",0); sAlmrec_5 = MsgRPC(hMsg,"_AlarmQueryNextRec", "^"" + sAlmrec_4 + "^",50,4,-1",0); MsgClose("Alarm", hMsg); END |
Keywords: |
AlarmFirstCatRec, AlarmNextCatRec, MsgRPC |
Related Links
Attachments