From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
06-08-2016 09:20 AM
Hello Guys,
Good night,
I have a problem with boolean indicator(lamp)
In my project,
When the value > 7 the lamp 1 turn on
When the value < 5 the lamp 2 turn on
i want,
1. If the value > 7 lamps locked, so before the value < 5 the lamp 1 always on
2. if the value < 5 lamps locked, so before the value >7 the lamp 2 always on
Sorry 4 bad english,
Nb: vi on attach post
Thanks,
Stewkidz
Solved! Go to Solution.
06-08-2016 10:37 AM
(you might want to add a small wait into your loop)
How does the value change over time. What is the initial value? All you probably need are two shift regsiters that keep history information.
06-08-2016 01:38 PM
If I understand you correctly, all you need is a couple Shift Registers. This will turn 1 high if the value exceeds 7, and it will not go low again until the program is restarted. The same works for turning 2 low when the value goes below 5.
06-08-2016 01:42 PM
@jcarmody wrote:If I understand you correctly, all you need is a couple Shift Registers. This will turn 1 high if the value exceeds 7, and it will not go low again until the program is restarted. The same works for turning 2 low when the value goes below 5.
The way I understood it was that the >7 LED should turn off once the value goes <5. In your code is stays on permanently.
(Granted, the problem description is not entire clear and leaves out some scenarios. That's why I asked for clarification)
06-08-2016 02:11 PM - edited 06-08-2016 02:13 PM
See if this works as you expect.
(Note that certains things could be improved by using compound nodes, but this code is more clear. There are many ways to do this. I would probably use an array of two booleans in the shift register and only one each for the boolean operations)
06-08-2016 02:42 PM - edited 06-08-2016 02:42 PM
@altenbach wrote:
I would probably use an array of two booleans in the shift register and only one each for the boolean operations)
Here's one possible array solution.
06-09-2016 04:40 AM
Hello Altenbach,
Thanks you for solve my question,
But i have any question for you to explain me,
Where i can find the tools (im ask on circle mark, see attach post), because i cant find then on labview 😄
Hello jcarmody,
Thank you for help my project too
Thank,
Stew kidz
06-09-2016 05:42 AM
06-09-2016 09:32 AM - edited 06-09-2016 10:09 AM
@jcarmody wrote:Those are Shift Registers. Right-click on the output tunnel and select:
It works equally well with input tunnels. Many times there are no suitable tunnels yet, then you just right-click on the loop frame and select "add shift register".
(Creating a new shift register is actually easier for the inexperienced programmer. If we convert an existing tunnel to a shift register, it is more complicated because we need to immediately decide to either pair it with another existing tunnel of opposite direction or create a new other half).