LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

set idle voltage with measurement computing

I am working on a project that does valve control and when the program ends I want the valves to close, by setting the Analog output to a constant value. I am using a USB-3101FS currently. I saw a post on setting idle voltage with DAQmx channel properties, but I was not given the same options because I am using measurement computing devices. 

 

Edit: here is what I am curerntly working with. It is very early design

 

 http://imgur.com/GaSaxaY

0 Kudos
Message 1 of 4
(2,528 Views)

Are you using the red stop button to stop your program?  If so step #1 don't do that.

 

Create a closing routine to stop your program nicely when the user exits the program.  Preferably with a event structure and the Panel Close? event.  An easier solution is to make a stop button on the front panel that the user clicks to stop but that looks tacky.  When the stop is pressed, perform the cleanup steps one of which is to set the output of your device to whatever you want.  Also close any files you may have open, close references, unregister for events, and any other house keeping you want.

0 Kudos
Message 2 of 4
(2,516 Views)

I am new to labview so i dont know much about this stuff, but does panel close only work if you close out of the program or when the run is complete/ended?

 

Also I added a picture of my current program.

0 Kudos
Message 3 of 4
(2,508 Views)

We were all new once.  If you are interested in learning more here are some free tutorials.

 

3 Hour Introduction http://www.ni.com/white-paper/5243/en/

6 Hour Introduction http://www.ni.com/white-paper/5241/en/

LabVEW Basics http://www.ni.com/gettingstarted/labviewbasics/

Self Paced training for students http://www.ni.com/academic/students/learn/

Self Paced training beginner to advanced, SSP Required http://sine.ni.com/myni/self-paced-training/app/main.xhtml

LabVIEW Wiki on Training http://labviewwiki.org/LabVIEW_tutorial#External_Links

 

So a few things.  First your program runs, and it runs once and will be done after the last item finishes executing on the block diagram.  Turn on highlight execution to see it run (the little light bulb on the block diagram).  This is not how most programs go.  Generally a user wants to be able to interact with the UI and have it change values as they change them.  To do this you need your program to run in a loop until a condition is met to cause a it to close.  This is where our friend the while loop comes in.  The while loop can keep the program executing until a stop condition is seen.  The easy method is to create a button on the front panel, then wire it to the stop condition of the loop and now your program continues to run until you press stop.  After your loop is done executing is where you can have some closing steps to set your output to 0.

0 Kudos
Message 4 of 4
(2,500 Views)