LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best Way to Control Solenoid Valves?

Using the Li-COR 820;  Can be polled using XML or software that comes with analyzer.  It's connected to computer by a RS232 port.  Link is shown below.

http://www.licor.com/env/Products/GasAnalyzers/li820/820.jsp


0 Kudos
Message 11 of 42
(4,852 Views)

OK, so your test sequence would go something like this:

Open Valve n

wait for 1 second

Read RS-232 data

Close Valve n

Log data to file

Wait for x time?

repeat for all valves, then start at valve 1 again

SteveA
CLD

-------------------------------------
FPGA/RT/PDA/TP/DSC
-------------------------------------
Message 12 of 42
(4,850 Views)
Correct
0 Kudos
Message 13 of 42
(4,847 Views)
Give this example code a try.  It's just a shell of how you might setup the program.


Message Edited by StevenA on 07-11-2008 06:24 PM

Message Edited by StevenA on 07-11-2008 06:24 PM
SteveA
CLD

-------------------------------------
FPGA/RT/PDA/TP/DSC
-------------------------------------
Download All
0 Kudos
Message 14 of 42
(4,832 Views)
Thanks, I will try it out as soon as I get to my work computer
0 Kudos
Message 15 of 42
(4,816 Views)
Thanks for the example.  It is working, and  I should be able to develop my program off of it.

I do have some questions though.  I have only done relatively elementary projects with LabVIEW before.

Can you give a brief description of the program flow?  I think I kinda understand how it flows, but like I mentioned I've only done elementary things with LabVIEW.

How did you build the array of (T/F) constants, and what is the purpose of the "Delete From Array" and "Index Array" in the "Open Valve" tab?

Is LabVIEW reading the array of (T/F) constants by row or by column?

How did you create the Type Def files and import them into the VI?


0 Kudos
Message 16 of 42
(4,775 Views)
I am trying to recreate "Valve Cluser type def.ctl," but I am getting the error "The front panel contains extra controls that do not belong to the custom control. You must delete these extra controls."  when I add multiple push buttons like you have.  What is the proper way to make these?  I try using the help menu, but reading the LabVIEW help files is like reading a dead language like Aramaic.   NI needs to make the help menu more user friendly for beginners.
0 Kudos
Message 17 of 42
(4,767 Views)
I think I figured out where you got the array from, but I can't make it more than one dimensional...Of course there is not any context help for arrays...
0 Kudos
Message 18 of 42
(4,761 Views)


Can you tell me how you created this 13x13 array of T/F constants and the "Type Def" controls, and how did you link these two together? The LabVIEW help menu is garbage for novices such as myself.  The help menu needs to explain exactly what each function does in Layman's terms.  Pin input/output jargon is not enough.  Sorry, I felt like I needed to vent.



I've posted the VI of what I have attempted to recreate from your example3.VI.

Thanks for your help.




0 Kudos
Message 19 of 42
(4,750 Views)


NT_Engineer wrote:


Can you tell me how you created this 13x13 array of T/F constants



Right click on the index part of your constant and select "Add Dimension".  Now you have a 2-D array.  You can drag the lower right corner down and/or right as needed to increase the number of elements shown (or up/left to decrease.)  All of the elements are essentially non-existent.  Once you make an element either True or False (let's say at the 12,12 index position, all the elements from there back to the 0,0 position now exist.  You can change them to True or False as needed.
 


NT_Engineer wrote:

and the "Type Def" controls,


To make a Type Def control, particularly useful for Enums.  Create an Enum on your front panel.  Go in and Edit it to create all the different values you want.  Right click, Advanced, Customize.  It now opens up the control in the Control Editor (you can do further customizations if you want.)  Change the drop down from Control to Type Def.  When you exit the editor, save the control as a file to your harddrive.  Your control on the front panel will be updated to be a type def.  If you use other controls or indicators, or constants of this.  They will all be typedefs.  That way if you decide you need to add another item to the list, all instances of that typedef will be updated.  What you would do is open the control's .Vi file.  Edit it to add the new item.  Save it.  All instances of that control in memory will be updated.
 


NT_Engineer wrote:


The front panel contains extra controls that do not belong to the custom control. You must delete these extra controls."  when I add multiple push buttons like you have. 


Make sure you create a cluster on the front panel.  It will be an empty container you get from the Cluster Palette.  Drag and rop all of the buttons into that.   Now instead of having a dozen individual buttons controls, you will have a singe control that is a cluster containing the 12 buttons.  Then you can customize that and save the control as a type def.

Note that the large constant in the example 3 is not a 2-D array of booleans.  It is a 1-D array of clusters.  Each element in that array is a cluster that contains 12 booleans that were created as a typedef above.
Message 20 of 42
(4,732 Views)