LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

debugging tip

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!

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 1 of 13
(3,890 Views)

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"

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



Message 2 of 13
(3,879 Views)

I tried that, but I can't find what I am looking for. 

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 3 of 13
(3,862 Views)

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".

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



Message 4 of 13
(3,843 Views)

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)

-----

The best solution is the one you find it by yourself
Message 5 of 13
(3,841 Views)

Search for all Enqueue element, it cant be that many. Or can it?

 

/Y 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 6 of 13
(3,832 Views)

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. 

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 7 of 13
(3,808 Views)

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

Message 8 of 13
(3,795 Views)

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.

-----

The best solution is the one you find it by yourself
Message 9 of 13
(3,792 Views)

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.

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


Message 10 of 13
(3,787 Views)