LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best Way to Control Solenoid Valves?

Thanks for your help Raven, I think I've got the cluster palette correct.  However, I am still having an issue with the array of True/False Constants.  In Example 3.vi, it looks like there is only one index for the 13 dimensions, but I cannot get it to show only one index.  I can get the 13 dimensions, but the True/False Constants all go away but one row if I try to remove all but one of the indexes.


Also, how do you assign the cluster on the front panel to the true/false constants?  I noticed whenever I put the mouse over of the constants that it showed that each dimension was assigned to one of the valves in the context help window.   I am using the 8.2 student version at home. So, I can't open up the example 3 at home to try to figure that out.


Thanks for your help!
0 Kudos
Message 21 of 42
(2,959 Views)
Sorry for not getting back to this sooner I was out for a few days... Thanks Ravens Fan for jumping in. 
 


NT_Engineer wrote:

However, I am still having an issue with the array of True/False Constants.  In Example 3.vi, it looks like there is only one index for the 13 dimensions, but I cannot get it to show only one index.  I can get the 13 dimensions, but the True/False Constants all go away but one row if I try to remove all but one of the indexes.

The big constant is a 1D array of clusters.  Each cluster is defined by the type Def.  In this case it is a cluster of booleans that represent the 13 valves in your system.  Each element in the array represents the state of all 13 valves during a step in your process.  To create such a constant you go to place an empty "Array Constant"  on your block diagram.  Then you must put the data type in that empty array.  In this case we want to put the type def into that empty array constant.  Do this by selecting the "select a vi" option from the functions pallet, and browse to the saved type def. 
 
If you wanted to change the number of valves, then you would open the type Def and modify it.  If you wanted to change the number of steps in the process, you would add or delete elements from the 1D array of clusters.  To add or delete elements from an array constant on the block diagram, you right click on the constant and select "Data Operations" Add or delete elements
SteveA
CLD

-------------------------------------
FPGA/RT/PDA/TP/DSC
-------------------------------------
Message 22 of 42
(2,943 Views)
Steven, thanks for your help.  I was actually at a NI seminar yesterday. So, I didn't see your post until late last night at home.


I gonna to work some more on this today, and I'll put a reply up if I need some assistance.
0 Kudos
Message 23 of 42
(2,921 Views)
I was able to create the type def, and I can create the array with the T/F constants.  However, whenver I insert the TypeDef Vi into the array, my array appears in columns instead of rows as your example has.  How do you correct this issue?

Thanks for your help.


Download All
0 Kudos
Message 24 of 42
(2,899 Views)
Right click on the cluster and select autosizing -> arrange horizontally
 


Message Edited by StevenA on 07-16-2008 06:20 PM
SteveA
CLD

-------------------------------------
FPGA/RT/PDA/TP/DSC
-------------------------------------
0 Kudos
Message 25 of 42
(2,895 Views)
Right after I posted that post, I found the "arrange horizontally."  Sorry, I forgot to update that post.
 
-Thanks 
0 Kudos
Message 26 of 42
(2,891 Views)

I've figured out the flow of the program.  Now, I am in the process of editing the shell you created to send out the control signal to open and close the valves.  As I mentioned in an earlier post we are going to be using the DAQ Chassis system with the NI 9472.  Would you recommend using the DAQ Assistant VI for this, or would you use another method?  I have posted the revised vi of your vi that includes the changes I have made to unbundle the array by name and connected them to LED indicators to simulate a control signal being sent to the DAQ.

Also, what would be your recommendation for Datalogging?  I am debating using the ActiveX controls to automatically format and save the data in an Excel spreadsheet and using the Write to Measurement File Vi.  Or would you consider using another technique?  Right now I have the revised  vi to merge the signals and Write to a Measurment File.  The data gets there, but I would like to format the file just to log the information of the valve that is currently opened and measured, as shown below.

Valve     %CO2     Time (DD:HH:MM)
     1            10%       00:10:30
     2            9.5%      00:10:31
     3            9.75%    00:10:32
     ...            ........      .........

0 Kudos
Message 27 of 42
(2,869 Views)

Open for anybody to answer:

Would you recommend using the DAQ Assistant to trigger 13 solenoid valves or use a DAQmx to control each individual channel?

Also, would you recommend using the ActiveX features to log the data for the 13 valves in the following manner, or use the Write to Measurement File. Vi? If niether of these techniques, what would you recommend?

The VI I am using is in the post above.

 

Valve     %CO2     Time (DD:HH:MM)
     1            10%       00:10:30
     2            9.5%      00:10:31
     3            9.75%    00:10:32
     ...            ........      .........

 

Thanks

0 Kudos
Message 28 of 42
(2,855 Views)

Personally, I would not use the DAQ assistant.  I would use the daq mx digital output vis to set things up.  You could use the DAQ assistant to help you get started, but then convert it to regular vis. 

the active X to Excell for data logging would be fine, but it's more work than simply writing to a text file.  Also, you have to consider that the Active X will not be quite as effecient as writing to a file.  It's pretty easy to write to a spreedsheet formatted text file that you can open in excel.

SteveA
CLD

-------------------------------------
FPGA/RT/PDA/TP/DSC
-------------------------------------
0 Kudos
Message 29 of 42
(2,852 Views)

I have 5 solenoid valves to be controlled . The operation is : 

 

Step-1 V-1,V-2,V-3 will be opend and stay for 5 min. and close

Step-2  V-1,V-4,V-5 will be opend and stay for 5 min and close again.

 

 

 How can i do this with labview

 

Thank u inadvance.

0 Kudos
Message 30 of 42
(2,178 Views)