LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use delay using boolean inputs

Solved!
Go to solution

dear sir

 I have created a AND logic where when both inputs are high using boolean switches output  should become high  green led should glow after 5seconds and other than it output should be false red led will glow. basically I want to use delay function .I am attaching file

thanking you

regards

kn

Download All
0 Kudos
Message 1 of 35
(4,669 Views)

@kavharshre wrote:

dear sir

 I have created a AND logic where when both inputs are high using boolean switches output  should become high  green led should glow after 5seconds and other than it output should be false red led will glow. basically I want to use delay function .I am attaching file

thanking you

regards

kn


Hi, kavharshre:

You would be doing yourself a great favor if you checked out this tutorial, paying particular attention to the section on dataflow.  You would then understand why your code isn't working as planned.  🙂

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 35
(4,650 Views)

thank u sir I will going through the tutorials 

thank you

 

regards

kn

0 Kudos
Message 3 of 35
(4,609 Views)

@kavharshre wrote:

thank u sir I will going through the tutorials 

thank you

 

regards

kn


Don't thank me - thank yourself for willing to take the time to learn how to do it right.  🙂

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 35
(4,603 Views)

Sir I have been able to solve the boolean problem

Now I have a query about the progress bar.I am new to labview 10.I have used the progress bar for extension and to retract.

I have been successful to extend the progressbar but how to retract or decrement the same progress bar ?

 I was able to decrement using a seperate progress bar

Now on press of boolean switch progress bar should extend and after it completes its output given to and gate plus another retract boolean switch should decrement the same progress bar(using single bar)

can u help me.

 

regards

kn

 

0 Kudos
Message 5 of 35
(4,585 Views)

sir I am attaching the solution for boolean.Any improvements or suggestions.

regards

kn

0 Kudos
Message 6 of 35
(4,578 Views)

@kavharshre wrote:

sir I am attaching the solution for boolean.Any improvements or suggestions.


Try to logically figure out what would happen if you remove the "AND TRUE" in the upper left and just wire the boolean directly to the case structure. 😄

0 Kudos
Message 7 of 35
(4,565 Views)

@kavharshre wrote:

sir I am attaching the solution for boolean.Any improvements or suggestions.


  • First of all, your front panel and diagram are way too big for this VI. Resize them to a reasonable size.
  • As already mentioned, that "AND TRUE" is just silly.
  • The upper boolean output of the inner loop is the same for both cases, thus it does not belong in the inner case structure at all.
  • All you need is a single TRUE diagram constant. Configure the output tunnels to "use default if unwired".
  • Try to keep your wires straight.
  •  Avoid crossing wires unless necessary
  • Change the labels of your controls and indicators to something logical and intuitive. Self-documenting!

Here's a literal rewrite.

0 Kudos
Message 8 of 35
(4,553 Views)

sir

I have sent one more query regarding progressbar.Any suggestions how to increment and decrement a single bar using boolean.

 

regards

kn

0 Kudos
Message 9 of 35
(4,536 Views)

@kavharshre wrote:

sir

I have sent one more query regarding progressbar.Any suggestions how to increment and decrement a single bar using boolean.

 

regards

kn


A progress bar needs a percentage value, 0-100, do decide fill. How do you plan to translate a boolean to percentage?

If used as direct indicator you can use Boolean to number * 100, but that'll only give empty or full progress bar.

If the boolean is supposed to start a fill, then you have 2 options:

1. While the button is down, increase the fill value (if reduction is needed it can reduce the same if button is up)

2. When the button is switched, activate a boolean in a shift register that controls the fill value.

 

solution 1 is slightly simpler to write, solution 2 is a better program.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 10 of 35
(4,521 Views)