LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make a flag?

Solved!
Go to solution

Hi


I made a program with knobs and case structures that have to turn on a led when certain limits are reached. I've done that part very well, the problem is that i want the led stay on when I set the knob to its original position. I know that I can use a flag, I tried to make it with a feed back node but it didn't work. I attached the VI. Any help would be appreciated.

0 Kudos
Message 1 of 12
(4,500 Views)

@danypag wrote:

I tried to make it with a feed back node but it didn't work. I attached the VI.


I cannot find a feedback node in your attachment.

Your innermost case structure containing the TRUE diagram constant can be replaced by a plain wire.

0 Kudos
Message 2 of 12
(4,487 Views)

use shift register with OR logic

 

Spoiler
knobs[1].png

 

0 Kudos
Message 3 of 12
(4,487 Views)

apok,

Are you trying to get featured in the Rube-Goldberg thread?  Look at "Case 3"  Why do you need two boolean constants T in the True case F in the false case?  The wire out of in-range and coerce would work just as well wouldn't it?Smiley Surprised


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 12
(4,477 Views)

@JÞB wrote:

apok,

Are you trying to get featured in the Rube-Goldberg thread?  Look at "Case 3"  Why do you need two boolean constants T in the True case F in the false case?  The wire out of in-range and coerce would work just as well wouldn't it?Smiley Surprised


i just used his code, i did not bother with cleaning/efficiencying (well i did in a sort of way by pressing 'clean up diagram) it up,please dont put me in the RG code jail Smiley Embarassed i ran out of passes? anyone up for a game of 'mouse trap'?

 

ouch!, i see it now... Smiley Sad

0 Kudos
Message 5 of 12
(4,474 Views)
Solution
Accepted by topic author danypag

That's why I said "Your innermost case structure containing the TRUE diagram constant can be replaced by a plain wire." 😄

 

controls belong on the toplevel diagrams, not inside cases.

A UI loop needs a small wait

Knob 4 seems irrelevant.

 

Here's one possibility...

0 Kudos
Message 6 of 12
(4,469 Views)

Thanx, but now i have the problem of turning it off, that is why i had a fourth knob.

0 Kudos
Message 7 of 12
(4,438 Views)

You don't need another knob.  What you need is a reset button.  Make the button a Latch When Released mechanical action (default for actual buttons).  Invert the state of the button and AND that with the flag.  That will reset your flag.


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
0 Kudos
Message 8 of 12
(4,431 Views)

can you explain to us what your reasoning for the logic and what the application is? i believe there is a better way of solving your needs than multiple knobs and case statements...

0 Kudos
Message 9 of 12
(4,429 Views)

This is a project for a class, I'm doing a lift chair for elder people, at scale of course. I have to use Lab View with arduino, I've already done the code in arduino and it worked pretty well, but I am new at lab view. There are no knobs in my project, I used them to represent distance sensors reaching their limits. I used two pressure sensors and two distance sensors, that is why I'm using four knobs. I attached the arduino code so you can understand what I want to do.

0 Kudos
Message 10 of 12
(4,402 Views)