LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to control 2 input for a similar output?

Just for simple understanding,

 

I have 2 forumla, a+b=c and d/c=e, 'a', 'b' and 'd' are to be key in while 'c' can either be key in or be found using the 1st formula

 

How do i control if 'c' is keyed, just use 2nd formule else use the 1st forumula

 

 

0 Kudos
Message 1 of 6
(2,921 Views)

Do you want to make the choice between a derived C and a keyed in C available by user action, like a switch?  If so, use a case structure.  Wire the switch to the case selector.  In True case, put in formula a+b and wire output to case edge.  In False case, put in a dialog box to capture user input, and wire the output to the case edge, same terminal as True case.  C will be whatever comes out of the case edge terminal.  The switch will dictate which method you use to get C.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 6
(2,910 Views)

There are several ways to do this.

 

Right off the top of my head simply use a boolean control to select if C is user input.

 

If you want to make it automagic use a string control and if C is not a number (or empty) use the built in C

 

Message Edited by RTSLVU on 05-13-2010 12:41 PM
========================
=== Engineer Ambiguously ===
========================
Download All
0 Kudos
Message 3 of 6
(2,906 Views)

Nice thanks. Just tried and it works. But is there any way i can do without the switch because in my case, there is more then 2 formulas. I don't really want the user to see too many switch

0 Kudos
Message 4 of 6
(2,886 Views)

Hi badbadtzmaru,

you don't really need a switch, you can make this decision from other user inputs.

 

Mike

0 Kudos
Message 5 of 6
(2,880 Views)

I think i get it now.

Thank for all the help

0 Kudos
Message 6 of 6
(2,868 Views)