LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

can i place a return to default button on my main page

i would like to have basically an emurgency return to default switch on my run page is that possible
0 Kudos
Message 1 of 10
(3,429 Views)

Use a Property Node to read the Default Value, and change the controls/indicators.

 

Robot Very Happy 

0 Kudos
Message 2 of 10
(3,420 Views)

There is a VI method to reinitialize all to defaults. Simply place it inside an event or case, triggered by your control.

 

 

Message Edited by altenbach on 12-03-2008 12:26 PM
Message 3 of 10
(3,416 Views)

Actually, long ago I even made an example. (Discussed here).

 

Note that you actually don't need to ame the VI reference. Unwired, it will apply to the current VI)

Message Edited by altenbach on 12-03-2008 12:38 PM
Message 4 of 10
(3,408 Views)
That worked too well for me I am just starting to use labview so please bear with me on this I have a large test setup that I am trying to control, and run, with labview.  I have the very basic setup running but now I am trying to get some of the actions more automated.  I need to have the default button only effect some of the controllers the VI you have in your example affects all items on my run page even my temperature and pressure measuring items is there a way I can segregate and isolate groups of items even if I have to use multiple right now I would be OK with that(actually almost prefer that).  Also I am very confused on the while loop setup I tried to place one in my setup and could not get anything to correctly work is there a good tutorial or something that can walk me through how to use it better than the books I received with the hardware. 
0 Kudos
Message 5 of 10
(3,373 Views)

If you just need to set some items, but not all, here's an example in LabVIEW 8.5.1:

 

Robot Happy 

 

 

Download All
0 Kudos
Message 6 of 10
(3,358 Views)

Why would you use the property node and a local variable instead of just using the invoke node, which perfoms the same action in one step?

 

Also, you have a greedy loop.  That's a no-no.

Message Edited by smercurio_fc on 12-04-2008 08:58 AM
Message 7 of 10
(3,340 Views)

Using the default value option in LV works great for some cases, but I find myself using configuration .ini files more and more. Using configuration files you can set a default value in development mode and in an exe. With configuration files if you find the need to set the default to a different value after you have built your application into an executeable, all you have to do is open the ini file with a text editor (ie notepad) and change the value. If you do not use ini files then you have to open up the source code and change the default value and rebuild the application.

 

You can have a look in the examples to find out how to use configuration files.

 

Just my 2 cents




Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 8 of 10
(3,336 Views)

Oh yea? Well... your icons don't line up nicely. Smiley Wink

 

You are absolutely correct. I wasn't going to use a while loop at all, but I should have put a wait in there.

 

Obviously, there is more than one way to blink a light in LabVIEW!

0 Kudos
Message 9 of 10
(3,313 Views)

cmwolf wrote:
I need to have the default button only effect some of the controllers the VI you have in your example affects all items on my run page even my temperature and pressure measuring items is there a way I can segregate and isolate groups of items even if I have to use multiple right now I would be OK with that(actually almost prefer that).

 You can make an array of references, containing references to all controls you want to reset and the simply autoindex over them in a FOR loop whenever needed to reset each to defaults. You could even match it to a boolean array in order to select which ones you want to reset at runtime.

 

Here's a rough draft (LabVIEW 8.5). Note that you can easily mix references for various controls (boolean, slides, etc). They will be coreced to the common generic class at the "built array" node. 

 

 


cmwolf wrote:
Also I am very confused on the while loop setup I tried to place one in my setup and could not get anything to correctly work is there a good tutorial or something that can walk me through how to use it better than the books I received with the hardware. 

Please tell us in what way "it does not work correctly". Most likely it's some trivial thing.

Message Edited by altenbach on 12-04-2008 09:01 AM
Message Edited by altenbach on 12-04-2008 09:07 AM
Download All
0 Kudos
Message 10 of 10
(3,294 Views)