LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

boolean switch until released counter + tick count

Solved!
Go to solution

This treats it like a hand dryer.

0 Kudos
Message 11 of 26
(2,583 Views)

I just started to learn the language so for now nothing is trivial but thanks for you r help.

0 Kudos
Message 12 of 26
(2,580 Views)

I think I didn't explained myself correctly. I attached a Vi I found, what I want it to do is like this: let's say the user put the timeout1 (detection time) on 150 and the timeout2 (time without detection) on 100..If the user press the button the timeout1 value is running until it get to 150 and stops there, becuase we get to the timeout1 the led turn's on. Releasing the button will cause the timeout2 value to run untill 100 and then the led goes off. this is what I need using the Vi that is attached, I think it is just some modifications to it but I am new to LabVIEW so I appriciate all the help I can get.

TNX

Guy

0 Kudos
Message 13 of 26
(2,575 Views)
Solution
Accepted by GuyGor

This code here meets your requirements and is a lot simpler to read (no case structures!).  What I have here is using a Feedback Node to keep track of the previous value of the button.  So when the value changes (the Not Equal), the Elapsed Time function resets.  I also added a Select so that you can have two different times, one for turning on and another for turning off.  When the target time has been reached, the Time has Elapsed output will go to TRUE.  With the select, I choose to use the current button's value for the LED output.  When the time has not elapsed yet, I use the previous value of the LED output (stored in the Shift Register).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 14 of 26
(2,567 Views)

TNX , I want to do it with the way like in the file attached but I will look at what u sent back at home. 

Appriciate your help 🙂

0 Kudos
Message 15 of 26
(2,556 Views)

@GuyGor wrote:

TNX , I want to do it with the way like in the file attached but I will look at what u sent back at home. 


Why are you attaching the same file twice? Once is sufficient!

0 Kudos
Message 16 of 26
(2,548 Views)
Solution
Accepted by GuyGor

Just because I like throwing things out beside Cross. My version of the tap, without using that fancy elapsed time express. Although the event structures probably make life a little more complicated again.

 

AutoTap.png

Message 17 of 26
(2,542 Views)

Also, just after looking back through your code, you do realise that:

 

1.png

is exactly the same as

2.png

 

Just a little semantics thing I thought I should mention.

Message 18 of 26
(2,540 Views)

Just for completeness, here's another event based extended version of my earlier post.

 

(Some extra code was needed for the case where the user releases the button before the LED goes on)

0 Kudos
Message 19 of 26
(2,535 Views)

Altenbach , please don't help me anymore . You seems to be very angry with me and for no reason at all. I am new at this forum and new to this Labview world as well, try to act appropriate.

0 Kudos
Message 20 of 26
(2,500 Views)