From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

if statement without else

Hello,

 

my program has a case structure in a while loop to catch the trigger of certain events.

Now I need to query a databse, if a certain number is caught otherwise there shouldn't be any action.

Unfortunately the case-structure says there is an open tunnel for the "false"-case and the Select-thingy alo needs a second value.

 

Has anybody an idea, how to solve this?

 

Thanks Tim

0 Kudos
Message 1 of 10
(4,484 Views)
check this vi
0 Kudos
Message 2 of 10
(4,481 Views)

thank you for your fast reply.

Hm, I don't know if this would work the way you showed in the vi. I've changed it, just to get an idea of what my intension was.

Maybe you could take a look at it.

 

Tim

Message Edited by useratni on 06-24-2009 08:39 AM
Message Edited by useratni on 06-24-2009 08:40 AM
0 Kudos
Message 3 of 10
(4,469 Views)

Do you want something different written to the string indicator in the False case, even if it is an empty string?

 

Or do you want the string indicator to keep the same information as when the case structure was true?

 

If the first, then you will need to wire something into that tunnel in the false case.  (If an empty string, then you can wire that, or right click on the tunnel and select Use default values if unwired.)

 

If the second, then move the indicator inside the true case.

0 Kudos
Message 4 of 10
(4,458 Views)

 

Hi tim,

 

Can you kindly post the vi for lv 8.0?

0 Kudos
Message 5 of 10
(4,419 Views)

@Ravens Fan:

 

the thing is, if there is a signal every second, the SQL-Statement for the database changes at the same time, although this isn't necessary. Only if there comes in a number, that is <>254 a SQL query should be started.

 

 

@muks:

sure, check the attachment.

 

Message Edited by useratni on 06-25-2009 03:40 AM
0 Kudos
Message 6 of 10
(4,406 Views)

Hi Tim,

 

 What do you want to do when the condition returns false? Just right click the tunnel and choose "default if not wired". But I am not sure if this is what u want

0 Kudos
Message 7 of 10
(4,396 Views)
a little modification
0 Kudos
Message 8 of 10
(4,393 Views)
another way
0 Kudos
Message 9 of 10
(4,389 Views)

I assume the SQL query which you do not have shown will be in the True case of your case structure?  The string is the result from that?

 

Just move the string indicator inside the case structure like I said.  Have you tried that?

0 Kudos
Message 10 of 10
(4,372 Views)