Hello!
I am currently working on a school project where i'm using CitectSCADA. This is a new program for me and i'm not that familiar with it's functions and uses.
The problem i have is:
I'm trying to animate the inner of an sentrifugal seperator, and the different stages in the seperator. Trying to use the animted symbol functions does'nt work well as it loops continuesly, and when the Command that activates the animation is turned off and on again the animation continues from where it starts, i want it to start at the beginning again.
My next try was to use an array symbol and construct an function that controls the array and switches the symbols. But with my lack of experience with Cicode and text programming that was eiter no success.
I tried to make an function that looks like this:
INT
FUNCTION
KjellAnimation(INT anmCmd)
INT i = 0;
WHILE ((anmCmd = 1)AND (i>100)) DO
i = i + 1;
SleepMS(500)
END
RETURN i;
END
Tried an version with an FOR loop but no success. Maybe i'm not understanding the loops and functions correctly. For example can an function return multiple values or will a return end the function?
Kjell
I am currently working on a school project where i'm using CitectSCADA. This is a new program for me and i'm not that familiar with it's functions and uses.
The problem i have is:
I'm trying to animate the inner of an sentrifugal seperator, and the different stages in the seperator. Trying to use the animted symbol functions does'nt work well as it loops continuesly, and when the Command that activates the animation is turned off and on again the animation continues from where it starts, i want it to start at the beginning again.
My next try was to use an array symbol and construct an function that controls the array and switches the symbols. But with my lack of experience with Cicode and text programming that was eiter no success.
I tried to make an function that looks like this:
INT
FUNCTION
KjellAnimation(INT anmCmd)
INT i = 0;
WHILE ((anmCmd = 1)AND (i>100)) DO
i = i + 1;
SleepMS(500)
END
RETURN i;
END
Tried an version with an FOR loop but no success. Maybe i'm not understanding the loops and functions correctly. For example can an function return multiple values or will a return end the function?
Kjell