03-31-2010 03:06 PM
I understood what you said... I will take care of it in future... :)) ppl learn from there mistake.
Yes!! I want what ever you said.... That is my requirement. Can you guide me on that.
03-31-2010 03:47 PM - edited 03-31-2010 03:49 PM
This snippit is a start:
This will toggle the any LED whose corresponding input bit is 0 when the Send button is pressed. Input bits with 1 do not toggle the corresponding output LED. Now for your problem, you show that input bits D7, D6, and D5 are always 0. You need to OR the input control in my VI with 0b11100000 to set these bits to 1 so that the outputs don't toggle, if that is what you want. Also, I think your LED control requires a 1 to turn the LED off and a 0 to turn it on. If this is the case, you need to invert the output bits. Just run it through a NOT function. You had a timed loop in your first VI. If needed, add it in. My example is tailored for just a specific part of your requirement.
I hope this finally helps.
Ooops, I almost forgot. The True case just has a wire from input terminal to output terminal, no action takes place.
04-05-2010 08:01 AM - edited 04-05-2010 08:02 AM
Hi Rag,
I think that your problem has already been solved but i thought i might post a 'Toggle' Vi i wrote for a project as its simple to add to any code and may be useful to you:
This is the Toggle subvi, and below is how you would use it in a VI (Ignore the panel reference, this was added by Labview when creating a snippet):
The subvi basically just toggles the output using the boolean input.
04-05-2010 09:00 AM
You guys know that XOR is the equivalent to a toggle switch?
If you have a boolean value XOR'd with True, it toggles the boolean to its opposite state. If the boolean value is XOR'd with False, it leaves it alone. No need for the select function.
04-05-2010 09:21 AM
Ha, Good point Ravens. Funny but thats how i write it nearly everyday in 'C' but for some reason it completely slipped my mind in Labview. Good to have a fresh set of eyes.
Have adjusted accordingly, Thanks
04-11-2016 03:40 PM
Here are two ways to implement a toggle function using feedback nodes. The first one may be used from an unlatched source such as an I/O channel or a button on a joystick. The second one requires a latched source.
04-11-2016 11:30 PM
More than the solution, the timing is amazing... i started this thread in April 2008 and here we are with one of a solution after 8 years !!
The NI Forum must be running on a HUGE server to host this kind of a callback of old threads ..
06-29-2018 12:29 PM - edited 06-29-2018 12:31 PM
Lucither,
Your subvi is the solution to a problem I've been struggling with for 2 days now, thank you!