05-20-2009 04:24 AM
Hi Everyone...
I am new to labview, the question that I am asking might be stupid, because it really sounds quite simple, but I just couldn't make it work...
I have a NI USB-6509, 96 channels Digital I/O, the project that I am doing is to use it to control several valves of a fluid system. The valves can be controlled by logic signals (e.g. HIGH = valve open, LOW = valve close...etc.)
My idea is to create a generic VI that can control the digital channels of USB-6509, this VI can be used several times in other program, and work independently...for example, if there's a system that requires 3 control valves, three valve control VI icons will be implemented in the control program, each of the VI will have different parameters, toggling pattern and work independently...
The VI can be defined into two options: pulse or a periodic signal (switch the valve ON for 2 seconds, OFF for 3 seconds, ON for 2seconds...etc), and the parameters such as frequency, starting time, selecting channel (PORT1 LINE 8...etc) will also be defined in the VI. If multiple VIs are implemented into one control program, each of them will obviously have different starting time, actions and parameters...
The problems that I have met so far are:
1) In my case, multiple VIs are implemented into the same program (there are many I/O lines that need to be toggled), but they are not running in parallel, the program executes the second VI only after the first VI is finished toggleing, so basically the starting time for each VI is messed up...
2)The other things that I have noticed is that the parameters for the VI will be affected by other VIs...(I suppose it's because they are the same VIs, the same function is basically called in the same program over and over again...) So when one VI is exeuted, all other VI icon's parameter will be affected...Is there any ways to get around it?
I have struggled so much on this projects, I am now looking at something called `X-control', which might be the solution of this task, can anyone that is experienced with Labview give me some suggestions and feeback?
My question description might not be clear enough, please feel free to ask me if there's any description that you don't find it clear, I will try my best to describe it.
Many Thanks!!
05-20-2009 04:37 AM