02-10-2011 09:01 AM
I have a problem regarding shift register when i was using it in my application.
During the runing of the application i found that sometime shift register not pass the value to the case structure. at that time result is not displayed.
i have attached the application in which that problem occur and the process regarding the execution, how bug produce and how to check where the shift register stop. please find the attachment and reply on the same.
02-10-2011 09:30 AM
I started looking at your code. First of all there are no shift registers. It is early and sometimes the hardest things for me to find are those right in front of me.
02-10-2011 09:38 AM - edited 02-10-2011 09:40 AM
I'm sorry but I don't understand your program. I only see one shift register in Result Display.vi.
What I do see is a lot of odd constuctions of while loops that only run once in your Main.VI. Also, a heavy reliance on global and local variables that I suspect are leading to race conditions.
Have you tried using the debugging tools such as probes and highlight execution to see our your application is behaving?
I'd also be concerned about how you have "Lock Front Panel Until Event Completes" in the cases of your event structure. And those event call other subVI's that may take a while to run and rely on user interaction with the front panel. I also don't understand why when I hit "OK", the subVI front panel remains open. It just makes running your application that much more confusing.
02-10-2011 10:04 AM
OK I found the issue?
Look at case "(A+B)-(C+D)" in Result Display.vi when this case exits the SR contains ("") (two double quotes). so the next iteration will be the default case. when this case exits the SR contains ("") (two double quotes). so the next iteration will be the default case.... ad infinatium and your stuck with no way out until the vi is stopped
02-14-2011 05:34 AM
Hello Steve,
I think u open only the Main.vi. The shift register used only in Result Display.vi. and problem occur in that VI when we press F3 from main.vi to check the result from Result Display.vi and press F7 to close Result Display.vi and back to Main main.vi. if we do this many time, some time the Result not came and Result.vi stop at Init state that is shown by the text box above in Result Display.vi.
02-14-2011 05:43 AM
Hello Ravens Fan,
Thanks for checking the code. First of all i want to tell yo about "Lock Front Panel Until Event Completes". this will happen when we click on button and move to next vi, then Main. vi will be lock until we are not close the open vi. and another is why sub vi front panel remain open, this is because to run the application we only run the main.vi another all subvi are closed, if any subvi is open before then that problem occur.
02-14-2011 05:48 AM
Hello Jeff Bohrer,
thanks for reviewing the code. i tried what you want to say and remove that ""(double quotes) and make the SR as use default if Unwired. but still the problem occured. i attached the updated application.