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.
03-28-2017 06:46 AM
HI
I am trying to flick between 2 case statements and can not get it to work I have attached my Vi can someone please help me.
Best Regards
David
Solved! Go to Solution.
03-28-2017 07:03 AM
You've wired a constant 'Wait For Data' to the case selector, so it will always execute the same case. You want to add a shift register to the while loop, move the 'Wait For Data' constant outside the loop, and wire the unconnected output of the case structure to the right-shift register terminal.
03-28-2017 07:59 AM
Hi Paul
I have changed the code as you suggested and it now works however I have a problem because it exits the while loop and closes my (CLOSE LJM Vi) which stops it working properly how can I resolve this?
Best Regards
David
03-28-2017 08:09 AM
The only way it exits the while loop is if you hit the stop button.
One problem I do see is that you have a blue wire that runs through the missing subVI's. But where that wire exits the case structure, you have it set for "Use Default if Unwired" on that case tunnel. That means you risk losing the data in the wire when that case structure ends. You should uncheck that tunnel setting, and make sure it is wired through every case, even those that don't use it.
03-28-2017 09:02 AM
Hi
That has now cured the problem
many thanks
David
03-28-2017 09:16 AM
So nice of you to mark your own reply as the solution to your problem when others here have clearly pointed you in the right direction. In the future be sure and give credit to those that help you by giving kudos and marking their replies as solutions.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
03-28-2017 09:29 AM
Hi
I am sorry this has upset you so much please, beware this is only my second posting and I am not sure how to use this forum yet, it was never my intention to take credit for anything perhaps you should be a bit more tolerant until you know all the facts
03-28-2017 09:34 AM
You can go to the options menu of your message and pick "Unmark as Solution". Then you can go to which ever message helped you the most and mark that as the solution.
You can mark multiple messages as solutions if you find they were particularly helpful to solving your problem.
03-28-2017 09:41 AM
Hi
Thanks for your advise
I have looked at the options but I dont have (Unmark as Solution) in the option drop down?
03-28-2017 09:47 AM
The message that you marked as the solution. Go to the Options menu to the upper right of that specific message.