10-23-2008 12:32 PM
10-23-2008 12:40 PM
Hi Paul,
It will be easier to understand your code and help you if you could post your code.
10-23-2008 12:47 PM
10-23-2008 12:58 PM
Hi Paul,
Unfortunately I have LabVIEW 8.5 and the code is in 8.6. Can you save the VI for 8.5 and upload again?
10-23-2008 01:08 PM
10-23-2008 01:35 PM - edited 10-23-2008 01:35 PM
Whether it's your problem or not I don't know, but I notice there is no strict data dependency between where you obtain your queue's (and write to your camera # queue globals) and when you try to enqueue inside the sequence structure. This has the potential to produce a race condition where you are trying to enqueue to a queue that hasn't yet been obtained. Without specifying a timeout for your enqueue functions, they could be waiting indefinitely to write to a queue that doesn't exist.
10-23-2008 02:04 PM
10-23-2008 02:38 PM
First, you have too many local variables. This could be leading to race conditions.
I think you have a couple problems in the use of event structures. It is a bad idea to put any long running code inside an event case. It will prevent the Event Structure from handling any other events in the mean time. You have several timed loops running that in that one sequence frame.
But the bigger problem is the next sequence frame. You have a while loop that only ends once all the queues are empty. Can you guarantee that all the queues get emptied?
You have laid out the code very neatly, but you have used a lot of odd things in there. (Number to boolean array, to cluster, to unbundle the cluster to individual indicators.) Why not just go from Boolean array to and index array function. No need for the intermediate cluster conversion. Why not set up the indicators as an indicator array and just write to them directly.
The code is so much intertwined between when queues are created, filled, emptied, destroyed, events happen... And this is all multiplied by at least 4 times for each camera. And there are 4 major event structures going on. This is a very ambitious project for an inexperience LabVIEW user. You need to step back, get one thing working right, and design so that you can scale the architecture upward. Many of the structures you have essentially duplicated and belong in subVI's.
10-24-2008 09:11 AM
Thank you for the suggestions.
The real problem is that cut and pastes (which doesn't always work well) has put two extra timed loops in the frame. Doing a "clean up diagram" makes them visible otherwise I can't see them. Is there someway to make them visble without destroying my "very neat" diagram? Moving the four timed loops around doesn't show the extra ones.
10-27-2008 03:35 PM
Paul,
I'd like to focus on your copy and paste issue since it seems you have quite a bit of great advice from the previous posts on your general program. One thing to try that always works for me is to select the items that I would like to copy, hold down the Ctrl key, and drag the selection. This functionality is exactly the same as the Windows <ctrl> drag and does not always behave the same as a copy paste in LabVIEW. This is most likely due to the underlying way that LabVIEW copies items to the clipboard. Let me know if <ctrl> drag solves your problem!