LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a boolean that when it's ON, it's on for an iteration then switches back off

Solved!
Go to solution

Hello everyone,

 

I couldn't explain it well in the title, but I'm trying to control a device that only wants a single click to switch. For manual operation, a latched switch like OK button would do, but I'm trying to automate it.

 

For an example, if we have a numeric control, and a "Equal to?" boolean connected to it with an indicator. e.g (If number is = 10 then TRUE) The indicator would stay ON until that number changes.

But when I'm trying to get is, the indicator switches on for iteration then off. Plus, when I change the number to something is, I want the indicator to also switch on then off.

 

If this is solved, it would help make the device receive a SWITCH signal to turn on once an option #1 is selected, and when I change the option it will receive another SWITCH to switch option #1 off.

 

Your help is much appreciated!

0 Kudos
Message 1 of 5
(2,658 Views)
Solution
Accepted by topic author malmureeh

Hi malmureeh,

 

you want to detect edges of a boolean signal, like rising edges.

 

There's a ready-to-use function available: BooleanCrossing!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(2,652 Views)

Hi Malmureeh,

 

My name is Jonathan & I work within the Applications Engineering Department at NI in the UK. From your post I interperate that you want an LED to flash at a specific iteration?

 

Below is some code you could try to implement yourself:

IterationLED.PNG

 

I hope this helps & let me know how you get on.

 

Cheers

 

J

0 Kudos
Message 3 of 5
(2,641 Views)

@GerdW wrote:

Hi malmureeh,

 

you want to detect edges of a boolean signal, like rising edges.

 

There's a ready-to-use function available: BooleanCrossing!


 

Hi GerdW,

 

Thanks alot for your fast response and help! This is exactly what I've been looking for! Smiley Happy

 

I wondered why this function isn't available since it would be essential in some fields, but foruntately it is available!

 

I've attached the program that I tested Boolean Crossing on.

 

Best regards,

malmureeh

 

 

0 Kudos
Message 4 of 5
(2,636 Views)

@JCH_26 wrote:

Hi Malmureeh,

 

My name is Jonathan & I work within the Applications Engineering Department at NI in the UK. From your post I interperate that you want an LED to flash at a specific iteration?

 

Below is some code you could try to implement yourself:

IterationLED.PNG

 

I hope this helps & let me know how you get on.

 

Cheers

 

J


 

Hi JCH_26,

 

Thanks for your help! But this wasn't what I was aiming for. The problem has been solved.

 

I appreciate your quick response! Smiley Happy

 

Best regards,

malmureeh

0 Kudos
Message 5 of 5
(2,633 Views)