From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Solenoid valves control

Solved!
Go to solution

Hey everyone 

 

I've designed pressure system(dp cell) with a manifold of 8 ports at each of which solenoid valve. What I'm trying to do is to control the valve through labview so the open 1 at the time,  stay open for 30 seconds then  close and another one is opened and so on. I've attached the data sheet of the valves. I'm using Cdaq 9178 with NI:9203 and Ni :9472.  

The valves are normally closed and the fluid passing through them is silicon oil. 

I've been trying to look at different examples but I got confused. 

I should be grateful for any advice or suggestion you give. (I started using labview only  few weeks ago).

 

Best Regards

 

Rajab

0 Kudos
Message 1 of 21
(3,935 Views)

Show us the examples you were looking at and explain what confused you. We can probably give you some guidance from there. Have you learned the basics of labview before attempting this task?

0 Kudos
Message 2 of 21
(3,906 Views)

Hi ToeCutter

 

I've attached an example that I think suits my application, However when I try to edit the type Def to change the number of valve the code went blank.  

I using Ni9472 (dig. output to energies the valves through Solid state relay.  The valves should open sequentially at equal time interval let say(4 valves, each one should stay open 25 sec.). 

The code is some thing like that:

 

1. Open V1 (25sec)(through Ni 9472) and start pressure measurement  ( through analog input using Ni 9203)

2. Close V1 and open V2. the pressure is continuously measured

and so on for the rest of the valves 

could you please suggest the best way to do that.?

 

Is it better to write one vi to control the valves and  separate one to write the measurements. AS for my overall data acquisition system.  I'm planning to measure pressure temperature, flow rate of my  flow rig with one VI ( using Ni 9203)

 

to give you the full picture of my date acquisition system: 

 

All the instrumentation should be triggered (using trigger out from one of the devices) to give simultaneous measurements,( the valves are part of my pressure measurements only).  So once the first device is on the rest of the devices will be triggered as well as the valves control vi. 

 

 

 

 

Best Regards 

 

Rajab 

0 Kudos
Message 3 of 21
(3,858 Views)

Hey Guys 

 

I've written a Vi to control 4 solenoid valves seems working fine without wiring the index array out put to the shift register(as in the previous example I posted) also I couldn't wire the type def. Cluster.

 

Is any one welling to check my VI ??

 

Regards 

 

Rajab

0 Kudos
Message 4 of 21
(3,823 Views)

Hi,

 

What happens when you wire the typedef? do you get a broken run arrow?

 

Thanks and Regards,

Thanks and Regards,
Supreeth.K

0 Kudos
Message 5 of 21
(3,804 Views)

Hi Supreeth.K

 

Yes I got broken wires, it says different data types!!!

 

I should be grateful if you can check the attached vi and help me to develop it,

how can I include the digital out put code. ???

 

Best Regards 

 

Rajab

 

0 Kudos
Message 6 of 21
(3,799 Views)

Hi rajab,

 

what is your "digital out put code"? There is no item with that name/label in your VI…

 

Right now you output values in the indicator "element"!

 

See attachment for some subtle changes…

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 7 of 21
(3,788 Views)

Thanks a lot  Gerdw

 

Have you updated  the type def. The cluster is deactivated. 

I haven't wrote the digital code yet as I'm not sure how to do so. I just want to make sure the vi at this stage is working fine and ready to be wired to the digital output. (what I'm looking for  how  and to get the digital out pu included)

 

I'm using solids relay to open and close the valves, so I'm not aware how to use either the daq assistance or daqmax to to get the digital out put wired to my vi. I've been through some digital out expamples but unfortunately couldn't understand the process. 

 

Best Regards 

 

Rajab

0 Kudos
Message 8 of 21
(3,783 Views)

Hi Rajab,

 

LabVIEW comes with several examples showing how to use digital outputs. Have you tried them?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 21
(3,779 Views)

Hi Gredw

 

Actually I couldn't wire the out put values to the shift register that's why I created an indicator, it gives me broken wire (although the data type suppose to be similar)

 

Best Regards

 

Rajab  

0 Kudos
Message 10 of 21
(3,776 Views)