LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Seemingly Basic Loop Problem?

Hello! I've been trying to figure this out for hours and have gotten to the point where I'm just haphazardly enclosing the loops with different components. Your help would be deeply appreciated.

 

This VI is partnered with an iXon Ultra CCD camera, so it unfortunately won't run unless you have the camera. However, I believe this is a problem that can be solved just looking at how I have the loops arranged. 

 

Function of the VI

There are three displays-- one being the live recording from the camera, another being a B/W version of the original, and the last displays any cells that are fluoresced in the recording using the Particle Analysis Report example. After the user clicks on that last display to choose a particle, the pixel coordinate clicked and its converted voltage value (not really relative to the problem) are outputted underneath. The user should then be able to repeat this process multiple times as the camera continues to record. 

 

The problem is... this isn't happening! 

The program freezes immediately after I click on a pixel in the last display. In fact, none of the screens update as a sequence of images like a recording should; instead, the most recent image acquired from the camera is all that is displayed and able to be put through the Particle Analysis Report. 

 

I'm fairly new to LabVIEW, so my understanding is lacking some logic... working on it though! Please let me know if you need anymore information on the VI or if the camera blocks aren't showing up for you. In case this opens to the default loop case, here is where all the action takes place: Capture.PNG

 

 

Hardware used: iXon Ultra CCD Camera, NI BNC-2110 connector block 

Software/Modules used: LabVIEW 2017, ANDOR SDK (image acquisition), Vision Development Module 2017 

 

 

Thank you in advance! 

 

0 Kudos
Message 1 of 3
(2,448 Views)

Nobody here will be happy to look at code with deeply stacked sequence structures peppered and sequence locals. It does not help if two different buttons are labeled "stop" and you use local variables from at least one of them. How much more confusing can you make things! There are many obvious dataflow issues (loop termination conditions wired from the outside of the loop, etc.).

 

Besides that, your main problem is race conditions and event deadlocks.

 

In order for the event structure to react, the big case structure needs to be TRUE and at least two different while loops need to complete first. The event structure has all events set to "lock the front panel until the event completes", and since the event often cannot complete due to dataflow issues, nothing can happen and you can no longer interact with anything. I would say things are fully constipated.

 

Maybe you should start from scratch and use a simple state machine architecture  instead. It would greatly simplify your code.

Message 2 of 3
(2,438 Views)

@altenbach wrote:

Nobody here will be happy to look at code with deeply stacked sequence structures peppered and sequence locals. It does not help if two different buttons are labeled "stop" and you use local variables from at least one of them. How much more confusing can you make things! There are many obvious dataflow issues (loop termination conditions wired from the outside of the loop, etc.).

 

Besides that, your main problem is race conditions and event deadlocks.

 

In order for the event structure to react, the big case structure needs to be TRUE and at least two different while loops need to complete first. The event structure has all events set to "lock the front panel until the event completes", and since the event often cannot complete due to dataflow issues, nothing can happen and you can no longer interact with anything. I would say things are fully constipated.

 

Maybe you should start from scratch and use a simple state machine architecture  instead. It would greatly simplify your code.


Not to mention that I also need a wall of monitors so I can see the entire block diagram.

 

I agree, this code should be scrapped and you should start over with a basic state machine and progress from there. You would also benefit from going through the online LabVIEW tutorials.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 3 of 3
(2,403 Views)