Sign in to follow this  
Followers 0
Newbie System Designer

Unity Pro XL 7.0

10 posts in this topic

Hi. I have a very confusing problem.. Since I dont have any training on this software (so far). I was requested to do a simple presentation (using Cicode) but the problem is all i know (from the guide i got from Unity) is how to do a button and a slider.. . Can u help me on programming this. I was thinking of a simple water tank (start-stop w/ drain) level control (this is my problem). Level increases when start button is push kinda logic.. As my name says " I'm a newbie" and I tried to read and understand example files but I think its to complicated for me (for now). Hope u can help me. Thanks a lot. inlayoATyahoo.com

Share this post


Link to post
Share on other sites
It also sounds like you are very confused Cicode is used in Citect SCADA which is at version 7.0 at the moment Unity Pro XL is a PLC programming package for Schneider PLC's and is at version 4.0, they are not the same thing. So what are you talking about ? I presume as you mentioned a slider you are talking about Citect ?

Share this post


Link to post
Share on other sites
You were right. I was not able to mention that I am using Vijeo Citect for the process visualization. Sorry about the wrong TOPIC (my fault). So here's my situation again. I need to do the graphics representation using Vijeo Citect. A water tank level control (with start/stop and drain function. I can't understand yet how to show the increase of water when start is pushed, maintain the reached water level when stopped and decrease when drain is pushed. I used to do Wonderware Intouch Software during college. Example: IF Start = 1 then; Level = Level + 1; ENDIF and so on... Is there a programming style like this on Vijeo Citect? Can you show me how? maybe explain it on a MSword file.. my email inlayoATyahoo.com

Share this post


Link to post
Share on other sites
Its called Cicode and is similar to VBA and most other languages, read the help files on Citect they are very good and should give you a start.

Share this post


Link to post
Share on other sites
Hello, I tried reading some help files this afternoon. But more questions just came up... I also observed some Cicode files of example files and tried to do it on my project but nothing happens. Would you help me even just on the initialization of my values? I would probably get it... This is what I did so far on Cicode... INT iInitialLevel = 50; // Initialization Value - Local Variable INT iInitialLevelup = 20; // Initialization Value - Local Variable FUNCTION WaterTank(); //I just wrote WaterTank Level = iInitialLevel; //Level is a Variable Tag Levelup = iInitialLevelup; //Levelup is also a Variable Tag END As I observed on example files... InitialLevel and InitialLevelup were just declared in the Cicode (Is that right)? I tried to run it but on the graphic builder, Level and Levelup values is still 0. On the Function name, I don't know yet if I could just assign a Function Name(WaterTank). Hope that u can help me.. even just on the Initialization of values Edited by Newbie System Designer

Share this post


Link to post
Share on other sites
Its hard to say as i dont know exactly waht you are trying to achieve but I think your initial values should be inside the function: FUNCTION WaterTank(); //I just wrote WaterTank INT iInitialLevel = 50; // Initialization Value - Local Variable INT iInitialLevelup = 20; // Initialization Value - Local Variable Level = iInitialLevel; //Level is a Variable Tag Levelup = iInitialLevelup; //Levelup is also a Variable Tag END Run the function by putting a button on the page and assigning watertank() to the button press, your variables should get updated you dont really need the INT declaration for the initial values your function can just be: FUNCTION WaterTank(); //I just wrote WaterTank Level = 50; //Level is a Variable Tag Levelup = 20; //Levelup is also a Variable Tag END But if you want to pass some values into the function from a button or event you could do: FUNCTION WaterTank(INT iInitialLevel, INT iInitialLevelup); //I just wrote WaterTank Level = iInitialLevel; //Level is a Variable Tag Levelup = iIntialLevelup; //Levelup is also a Variable Tag END Your function on the page would then look like WaterTank(50,20) Hope this helps

Share this post


Link to post
Share on other sites
Sorry again if I mislead you.. I was trying to show on the run mode that Level,Levelup and their respective tank fill graphic (which i represent as a rectangle) is equal to whatever value I enter into cicode. If possible can you show it to me even without pushing any button? What i mean is when in RUN MODE Level and Levelup automatically changes after i edit their values into the cicode. Thank you for helping me. It really helped me understand more. Edited by Newbie System Designer

Share this post


Link to post
Share on other sites
I dont really understand what and why you are trying to do what you are doing, if you want to represent a level you just need to use a tag and use it on the level expression of the object, you dont need to use any cicode. To run a cicode function all the time while on a page put a cicode object on the page and use it to call your function. I cant really design your system for you as i am not in front of it. I would however suggest that if you are going to use Citect for a real world application you go on a Citect training course before you go any further as you are in real danger of making some major problems for yourself. If you are just playing with it then just do that, play with it until you get it to work, thats what i do when i come up against a problem. Cheers

Share this post


Link to post
Share on other sites
Yeah, your right about the Citect course but for now I'm still waiting for my seniors to send me to but for sure I'll be able to attend one. I was wrong about the first part, I suddenly realized it now. All I just want to know is the proper format of the cicode because I find the Help confusing. Since you showed me three examples, I understood more about it. So far, from your help, I was able to increase and decrease water level so far. I'll take your advice. Thank you again.

Share this post


Link to post
Share on other sites
Ok, no worries, jsut ask again if you come accross anything you cant figure out without trying a little while first !!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0