Technical FAQs

Ask a Question

How can we write a Cicode to enable/disable an alarm in Vijeo Citect?

Here is a sample function that can be used to enable or disable and alarm:

FUNCTION
DisablePumps(STRING sTag, INT Flag)
	INT Current;
	INT Next;
	Current=AlarmFirstTagRec(sTag,"Pump","");
	WHILE Current<>-1 DO
		Next=AlarmNextTagRec(Current,sTag,"Pump","");
		IF Flag=0 THEN
			AlarmDisableRec(Current);
		ELSE
			AlarmEnableRec(Current);
		END
		Current=Next;
	END
END
Was this helpful?
What can we do to improve the information ?