Cicode Help

Britney123

Member
Join Date
Dec 2020
Location
Australia
Posts
1
Hi Everyone

I'm a CITECT noob and am currently doing a SCADA class to increase my skills. However, I'm having trouble getting my head around some of the commands in cicode. Any help would be much appreciated.

Firstly is there a simple way to call a function continuously back to back? as in run code, end, run again, repeat. I've experimented with cicode objects and it appears to continually run multiple instances of my function as the sleep times aren't right. Is this correct?


Also does cicode have a means of multiple conditions within an if statement? eg.
IF statement1 and statement2 THEN
code
end

Thanks
 
Hi Everyone

I'm a CITECT noob and am currently doing a SCADA class to increase my skills. However, I'm having trouble getting my head around some of the commands in cicode. Any help would be much appreciated.

Firstly is there a simple way to call a function continuously back to back? as in run code, end, run again, repeat. I've experimented with cicode objects and it appears to continually run multiple instances of my function as the sleep times aren't right. Is this correct?


Also does cicode have a means of multiple conditions within an if statement? eg.
IF statement1 and statement2 THEN
code
end

Thanks

As below, which is actually a link to one of my posts when I was learning, create your function then run it on an event on a time base of your choice, be careful using sleep in Cicode, its a blocking function so can cause issues if not used properly.

You can also use tasks if you want to have a bit more control, these can be useful as you can kill them if the functions stops

https://johnwiltshire.com/citect-help/Subsystems/CicodeReferenceCitectHTML/Content/TaskNew.html
 

Similar Topics

in the past i have only been doing small mods to existing cicode and coping sections to reuse and modify to suit. Now i have been tasked to write...
Replies
5
Views
2,792
Some cicode help required Please. i am by no means a cicode expert. i have a tag "D2_WESP_TRA_Op_stat" which depending on its returned integer...
Replies
6
Views
3,277
Hello, Any one no below function, i do not how to make it in Cicode. Please advise me. FUNCTION MyTagWrite(TagName, NewValue, Message) STRING...
Replies
0
Views
1,353
Hi all, I need your help in finding a way to display a Variable tag in a page ( pop up ) which is created by using CICode ---> hForm16 =...
Replies
1
Views
2,267
Hi all, my citect program write all the alarms to a xls file when i open that excel i will run a marco automatic and i can see a bargraph of all...
Replies
4
Views
3,931
Back
Top Bottom