LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Analog-In code pauses when I move windows around. WIN98

I was able to fix the digital in/out code with different threads which seemed to have the same problem. The problem I still have is with Analog In. I have attached a copy of the code. If someone wouldn't mind taking a peak at it to see why it freezes when I mess with the UI thread. (ie move windows.)

Top Level VI is Ain.vi


Thanks in advance!

Roger
0 Kudos
Message 1 of 2
(2,549 Views)
Not sure about this one. I get different behavior than you�re describing, but I�m running WinXP on fairly fast PC. When I first click on the title bar, I get a slight pause in the execution, but it then resumes and runs while moving the window around. I think this means there�s nothing explicitly blocking due to running in the UI thread.

One thing you might want to do is try to cut down on your use of Local and Global variables. You�ve got some pretty large and complex data structures in the Globals. Reading a Global or Local variable causes a copy of the data of the variable to be generated. This might be causing some performance problems, but I still don�t think that it should be stopping the execution. You might consider using LabVIEW 2 style Globals, sometimes called Functional Globals. The follow steps briefly describe how to make one.

  • A while loop that executes once, an uninitialized shift register, a case structure, two controls and an indicator.

  • Inside the loop create a case structure that has two states (read, write), create a control that will determine the state of the case structure and wire it to the input.

  • On the while loop create a shift register.

  • Outside the while loop place an indicator of the data type that you need the global to be. Wire the output of the shift register to your indicator.

  • Place a control of the same data type as your indicator in the 'write' state of your case statement, wire this to the RHS shift register.

  • Change to the 'read' case and wire the LHS of the shift register through the case structure to the output tunnel.


You will now have a VI that performs a global function, set-up the connector pane and try using it as a sub-vi within you application.

One thing to consider here. In your original post, you said that you used a count down timer to show that when drug and then release the window, that time/code did not continue. Are you still sure the diagram is not executing? Could it be that the front panel is not updating but the code is still running? Just a thought.

Ed


Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 2 of 2
(2,549 Views)