05-01-2013 02:13 PM
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.
Solved! Go to Solution.
05-01-2013 02:32 PM - edited 05-01-2013 02:36 PM
@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.
05-01-2013 02:32 PM - edited 05-01-2013 02:35 PM
05-01-2013 02:39 PM
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?
05-01-2013 02:41 PM - edited 05-01-2013 02:54 PM
@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?
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 i ran out of passes? anyone up for a game of 'mouse trap'?
ouch!, i see it now...
05-01-2013 02:46 PM
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...
05-01-2013 03:31 PM
Thanx, but now i have the problem of turning it off, that is why i had a fourth knob.
05-01-2013 03:41 PM
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.
05-01-2013 03:45 PM
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...
05-01-2013 07:52 PM
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.