HELP! Senior Project

I am trying to learn Ignition for a Senior Project here at Texas State University. I don’t understand any of this lingo or even where to begin. Can someone please point me in the right direction?
Respectfully,
Brad Jenkins

Inductive University has many good videos on basic and more advanced topics.

The Ignition User Manual has more in depth documentation.

Those two resources are probably the best places to start. They should get you going in the right direction at least.

Good luck with your project!

3 Likes

I remember one of the biggest hangups for me coming out of school was the difference between a “variable” and a “tag”. None of my training really explained it, so I learned by experience. Basically, the easiest answer is that they’re the same thing… but a tag is more like a struct because it has some associated metadata.

You should check the links given by b_zacht, but feel free to ask questions here.

Thanks guys… The manual helps sort of but I’m trying to use a simulated database I think and I keep getting a fault. Does that matter?

Thanks for the help.
I’m making pretty good progress. Took me awhile to get this stuff. Now I’m having issues with python.
I want to have a tank and a 2 state toggle. When the toggle is pressed I want the tank to fill and when its off I want the tank to stop filling and hold its current value.
I was thinking
x = tank
y = bool

if y == True:
system.tag.write(x)
x = x+1
else:

Sorry for the late response… The fault in the database will matter depending on the fault… Let me know if that’s resolved, or if your database is working as expected.

So, as to your python script, typically a tank will be filled by a pump, or some valve will let the water in… so for my sake I’m going to imagine that your bool represents a valve (1=open, 0=closed)

You will probably want to have a float tag for tank level (because if you use display parameters, then they will reset when you navigate away from the display). So I’m going to say the tag path for your tank level is “myFolder/TankLevel”. You’ll probably want the same for your valve, so, “myFolder/ValveState”

Now, with that set up, you will need some way to simulate the tank level with respect to time (because it sounds like you’re manually incrementing your tank level, so you don’t actually have a level sensor in a real tank). To do that, I suggest putting a timer on the display.

Up next, you will need your 2-state toggle. Since you have a tag for your valve, in the tag browser you can just drag the ValveState tag onto the 2-state toggle and it will by default use 1 and 0 to indicate on and off, and this should just work to toggle the tag when you press it.

Now, the scripting will be done on the timer. First, bind the “Running” property of the timer to the ValveState tag. Next, right click the timer and go to scripting, and put the following script on the “actionPerformed” event in the timer (this will cause the script to run each time the timer ticks.)

x = system.tag.read("myFolder/TankLevel").value
system.tag.write("myFolder/TankLevel", x+1)

Make sure that the above code makes sense to you before you use it. If it doesn’t make sense, then go check the scripting functions portion of the manual and see if you can make sense of it.

Let me know if that helps, or if you have any questions!