LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital Output Sequence (variable timing) NI 9472

Solved!
Go to solution

Hi, 

 

Wondering if anyone has any suggestions for creating a VI to do the following:

 

I have 6 valves which I want to control with a NI 9472 module (8 digital outputs). The valves have a set sequence of 6 stages, each with different times (which I would like to be able to vary)

I have 3 of the above setup (ie 3 sets of 6 valves) that I would like to control in the same way but independent from each other.

 

I have attached a diagram of the valve setup and sequencing that i would like to achieve.

 

Thanks for your ideas.

 

Setup:

NI cDAQ-9174 Chassis

3 x NI 9472 24V sourcing module.

0 Kudos
Message 1 of 35
(4,900 Views)

I should have said where im currently at:

 

I have a VI which switches each line of the module 'on' or 'off' at specific time delays. Im hoping there is a better way of achieving my goal.

0 Kudos
Message 2 of 35
(4,898 Views)

@ucbeoha wrote:

I should have said where im currently at:

 

I have a VI which switches each line of the module 'on' or 'off' at specific time delays. Im hoping there is a better way of achieving my goal.


Is this the same as this question?

 

http://forums.ni.com/t5/LabVIEW/Override-On-Off-valve-in-while-loop/m-p/1575662#M577245

 

The way I showed you was a better way we may just need to make a few more changes to get it to work with your system. Other wise you can do it the way you are.

Tim
GHSP
0 Kudos
Message 3 of 35
(4,894 Views)

I remember a similar kinda post from you earlier, saw your attached vi, instead of having induvidual loops create an architecture which follows pattern, The work you are doing looks interesting, i like it or are you still wondering how to solve your old problem in another way?

0 Kudos
Message 4 of 35
(4,892 Views)

Hi, Yes, and no, its the same application but i hope to take the development a step further.

 

So at the moment i can control each valve with a time delay.

 

I have a set sequence which the valves need to operate in and i would like to group the time delays into that set sequence.

 

ie:

 

Stage 1:

Valve 1 - off, Valve 2 - off, Valve 3 - on, Valve 4 - off, Valve 5 - off, Valve 6 - on. 

 

Start stage 1 at time = 6 seconds, stop stage one at t = 9 seconds. Start again at t = 15 seconds.

 

 

Stage 2:

Valve 1 - off, Valve 2 - off, Valve 3 - off, Valve 4 - off, Valve 5 - on, Valve 6 - off. 

 

Start stage 2 at t = 7 seconds, stop stage 2 at t = 9 seconds. Start again at t = 16 seconds.

 

And so one.

 

 

So i was wondering if i can group valve selections into a single time delay.

And secondly, have an initial time delay to postpone the start of subsequent stages.

 

 

0 Kudos
Message 5 of 35
(4,866 Views)

Well you do not have to break apart everything that we did before you can still turn on valves one at a time. You will have to develop the timing feature to integrate into your program. This will get more complicated quickly. Especilly since you want to do multipule timing loops with different times for each valve. I will see if I can take the other code and add something quick that will aloow you to see how to start. It may take a while before I have time to post the code.

Tim
GHSP
0 Kudos
Message 6 of 35
(4,864 Views)

I was hoping it wasn't going to be that difficult.

If you could start me off in the right direction that would be really helpful.

 

Thanks for your help.

0 Kudos
Message 7 of 35
(4,859 Views)

The easiest way I see to do this would be to put together a cluster with one numeric and a boolean array for the valves. You put a time in the numeric and set the condition for the valves that corrisponds to that time in space. For example:

 

1 3 10000100 So at 1 second it would trun on digital out 1 and 5 and hold for 3 seconds

5 5 00000000 and at 5 seconds it would trun them all off and hold for 5 seconds.

 

If you build and array of this cluster you should be able to add as many steps as you want. Then you would iterate through the steps until your profile is complete.

 

I will try and put something together this afternoon that will show you what I mean.

Tim
GHSP
0 Kudos
Message 8 of 35
(4,856 Views)

OK here is a quick idea about my suggestion. Let me know what you think. For now you need to set up the array for the time and valves before you start the program.

Tim
GHSP
Download All
0 Kudos
Message 9 of 35
(4,850 Views)

Hey, many thanks for that.

I have got it working and that is pretty much what i am trying to do.

I just need to set that VI up so that it runs repeatedly until it is stopped.

 

Then once i have 3 going at once my valves should be switching as they need to be.

0 Kudos
Message 10 of 35
(4,830 Views)