取消
显示结果 
搜索替代 
您的意思是: 

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 项奖励
1 条消息(共 10 条)
7,498 次查看
check this vi
0 项奖励
2 条消息(共 10 条)
7,495 次查看

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 项奖励
3 条消息(共 10 条)
7,483 次查看

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 项奖励
4 条消息(共 10 条)
7,472 次查看

 

Hi tim,

 

Can you kindly post the vi for lv 8.0?

0 项奖励
5 条消息(共 10 条)
7,433 次查看

@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 项奖励
6 条消息(共 10 条)
7,420 次查看

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 项奖励
7 条消息(共 10 条)
7,410 次查看
a little modification
0 项奖励
8 条消息(共 10 条)
7,407 次查看
another way
0 项奖励
9 条消息(共 10 条)
7,403 次查看

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 项奖励
10 条消息(共 10 条)
7,386 次查看