03-27-2012 02:40 PM
I have a program with multiple loop, with each loop containing a queue state machine. For loop A, it went into state X, and I tried to back trace to see where is the state info enqueued, but I can't find it. The info enqueued should be a particular enum value in a cluster, but ctrl+f didn't help. Any tips on debugging this? Thanks!
03-27-2012 03:23 PM
Is either the cluster or the enum it contains a typedef? If so, open the typedef (right click on it from diagram and select "open typedef" and then right click on the opened typedef's icon and "find all instances"

03-27-2012 04:46 PM
I tried that, but I can't find what I am looking for.
03-27-2012 10:45 PM
Are either typedefs? Also, how are the queues ID'd? Are they "wired queues" where the queue ref is wired throughout, or are they name queues, where the queues has a defined name. If the later try a ctrlo-F on the name and see where there are instances of calling the queue, where there might be "enqueues".

03-27-2012 10:52 PM
May be you can go to the top level and find all the Enqueue elements including Lossy enqueue and you can check all the instances make sense. What is that state "X" do you know that state or not able to find the name of the state. (Just a try from my side)
03-28-2012 03:35 AM
Search for all Enqueue element, it cant be that many. Or can it?
/Y
03-30-2012 05:01 PM
Both the cluster and the enum within the cluster are type-def. 5 queues were names and put in an array. The array containing the queue refs are wired throughout.
03-31-2012 08:48 AM
This is one of the problems with the QSM.
Temporarily in each loop create an array of the states enqueued. When the State X condition occurs, check all the arrays. The loop whic generated the Staet X should have it in its array. If the loops spin really fast you may be better off with circular buffesr rather than continuously growing arrays. I have also used Action Engines to capture states for debugging purposes.
Lynn
03-31-2012 09:03 AM
Do you mean that the values that are enqueued is a name. If that is the case you can do one thing you create a loop outside that runs faster than your state machine in that you dequeue the data and write it to a file and enqueue the data there itself to the same queue. But am not sure that this is desirable or not may be you may have to use semaphores also. Still thinking a better way to do it.
03-31-2012 10:13 AM
The Desktop Execution Trace Toolkit might help. You can configure a trace to include queue activity. It is included with LabVIEW 2011 professional or developer suite, I can't remember which. If you don't have that you can download a thirty day trial.