Technical FAQs

Ask a Question

How can I filter my alarms by name with Vijeo Citect Ver 7.3 SP1, as AlarmSetQuery function is not working.

This AlarmSetQuery function is now obsolete in VJC 7.30 and you need to use the new 7.30 alarm filter functions to select alarms for matching the user criteria.
Using the below code you can be able to filter alarms :

PUBLIC
INT
FUNCTION AlarmFilter730
(STRING fieldName,
STRING filterValue)

INT hndl=-1, resultFilter=-1;
STRING sFilter="";

sFilter = fieldName + "=" + filterValue;
hndl= AlarmFilterEditOpen(21);
IF hndl <> -1 THEN
resultFilter = AlarmFilterEditSet(hndl,sFilter)
IF resultFilter = 0 THEN
resultFilter = AlarmFilterEditCommit(hndl)
END
AlarmFilterEditClose(hndl)
END

RETURN resultFilter;

END

 
Was this helpful?
What can we do to improve the information ?