Scheduled Cicode

Hi;

I want a function in Cicode to run continuously for a time period that I set. For example, the code I wrote will run every 20sec in the background . How do I make this application?

I am using Power Scada Operation to develop my project.

The function will be as follows;

/////////////////////////////////////////////////////////////
FUNCTION
Schedule()
INT nIntTagValue;
WHILE 1 DO
nIntTagValue = TagRead("VALUE");
nIntTagValue = (nIntTagValue/2) * 3;
TagWrite("VALUE_CALC", nIntTagValue);
END
END
/////////////////////////////////////////////////////////////

Thank you for your reply.

Parents
  • Hi Yusuf,
    Another option, which will require a lot less code and configuration, and more flexibiltiy, is to use the scheduler feature. Check out the example project, which contains a simple example of the schedule turning lights on and off. More info on this feature in the help too: https://gcsresource.aveva.com/Citect/WebHelp/citect2018/Content/Scheduler.htm?Highlight=schedule
Reply
  • Hi Yusuf,
    Another option, which will require a lot less code and configuration, and more flexibiltiy, is to use the scheduler feature. Check out the example project, which contains a simple example of the schedule turning lights on and off. More info on this feature in the help too: https://gcsresource.aveva.com/Citect/WebHelp/citect2018/Content/Scheduler.htm?Highlight=schedule
Children
No Data