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

conditional case

hello

Here i need help of making vi of conditonal case.

I have 2 input. first input A and input B(digital line),may it be represented by boolean control. it has 2 possible condition that might happen. Both A and B are normally OFF.

first case -- initially A will be ON first, then B on. The output i need is that the final output (Boolean indicator), will be set to ON as soon as A set to be ON, and OFF as long as B set to ON.

second case -- Initially A will be ON, then A off, after then B set to ON. The output i need is that  the final output set to ON as soon as A set to be on, and remain on before B set to ON. Even though A set to off before B set to ON, the output remain ON.

It might be hard to be explained in text. Here i attach with the State ON-OFF state diagram. The output will follow the red-green indicator as shown in the diagram.

0 项奖励
1 条消息(共 13 条)
3,996 次查看

Both of the diagrams really show the same thing....Output true when A comes ON until B comes ON.

In that case

if ((A==true) && (B==true)) return true; else return false;

If there is more to it I am not getting it from your explanations.

________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 项奖励
2 条消息(共 13 条)
3,977 次查看
thanks for the prompt reply
After doing these vi, i find that it only follow the first case, however, the 2nd case it doesnt happen to result the real output that i wish to get.
the output B will happen only A trigger is trigger to ON state.

How can i do it?

thanks


0 项奖励
3 条消息(共 13 条)
3,965 次查看

I just dont understand what your second case is...If A and B are ON then output true? otherwise false?

You should be able to use that example of boolean logic to do what you want....

Do you need a single VI to hndle both cases???



Message Edited by TWGomez on 04-11-2008 11:57 AM
________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 项奖励
4 条消息(共 13 条)
3,963 次查看
thanks for the prompt reply

here the result output i wish to get
Another saying of the desire output is
If input A is set to ON, then it will trigger a timer(representation of input B). Only the timer finish running, the output will be OFF , regardless of whether the input A is ON or OFF.
0 项奖励
5 条消息(共 13 条)
3,944 次查看
Try this.
 
The code is a bit more convoluted than i would like, but it seems to work.  In LV 8.5


Message Edited by Ravens Fan on 04-11-2008 02:10 PM
0 项奖励
6 条消息(共 13 条)
3,928 次查看
thanks
sorry can you convert it to labview 7.1?or can you pls print screen that block diagram so that i can browse it?
thanks


0 项奖励
7 条消息(共 13 条)
3,907 次查看
I can't save back that far.  But here is the screen shot.


Message Edited by Ravens Fan on 04-11-2008 10:45 PM
0 项奖励
8 条消息(共 13 条)
3,900 次查看
Here is another possible approach?
 
Best regards....
 


Message Edited by tartan5 on 04-12-2008 08:33 AM
0 项奖励
9 条消息(共 13 条)
3,874 次查看

Note that if:

A and B off.   A Turns On.  Out turn on.  B turns ON.  Out turns Off.  B Turns Off.  Out turns ON. 

 

This is from the sentance:

---- "first case -- initially A will be ON first, then B on. The output i need is that the final output (Boolean indicator), will be set to ON as soon as A set to be ON, and OFF as long as B set to ON."

This implies that as long as b is on the output is off, but when b turns off if A is still on then the output turns on.

Is this what you are looking for, or do you want A to stay off, or is it irrelevant?

0 项奖励
10 条消息(共 13 条)
3,871 次查看