LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in using the shift Register

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.

 

 

0 Kudos
Message 1 of 7
(3,160 Views)

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.

=====================
LabVIEW 2012


0 Kudos
Message 2 of 7
(3,151 Views)

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.

0 Kudos
Message 3 of 7
(3,146 Views)

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


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 7
(3,137 Views)

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.

0 Kudos
Message 5 of 7
(3,084 Views)

Hello

0 Kudos
Message 6 of 7
(3,082 Views)

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.

0 Kudos
Message 7 of 7
(3,078 Views)