LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Probing an Event Callback vi

Solved!
Go to solution

Hi All.

Please could someone tell me why when I probe or enable tracing on the block diagram of an event callback vi nothing is indicated even after I know the vi was called because I can the the results of it being called. I am running Labview 2009.

 

Thanks in advance

Ian

0 Kudos
Message 1 of 9
(4,414 Views)
Hi Ianr can you please post the code. Because your question is not clear. I think you are using event structure. Isn't it? So the code is waiting for your event, i think give any event and try with high light execution. <>
0 Kudos
Message 2 of 9
(4,396 Views)
Is the callback vi reentrant and you are looking at the wrong clone?
Omar
0 Kudos
Message 3 of 9
(4,391 Views)

Hi and thanks for answering. Unfortunately I cannot post any code for security reasons. However the code I am degugging (not my code) is not using the usual event structure but uses a 'Register Event Callback' function to call a particular vi when a certain event (top level front panel control) is initiated. When I initiate the event I get the correct response on the top level vi (a user prompt pops up) so I know the vi is being called correctly. However if I pre-open the sub vi and set tracing or probes then initiate the event again I do not see anything register on tracing or in the probes (shown as not executed) even though the vi obviously ran again. The reason I want to probe the called sub vi is that a similar event is not working correctly and I was trying to see what happens with a functioning bit of code to draw comparisons. Hope I'm explaining this OK.

 

Thanks again

IanR 

0 Kudos
Message 4 of 9
(4,378 Views)

Hi Omar. I have just checked the properties of the called sub vi and it is set as 're-entrant' . Being relatively new to Labview I don't understand the significance of this. Please could you explain.

 

Thanks

IanR

0 Kudos
Message 5 of 9
(4,376 Views)

Hi again Omar. I tried resetting the properties of the called sub vi as not re-entant and immediately probing (and highlight enabled) worked fine when I initiated the event. I don't know why it worked but thanks very much for pointing me to it.

 

IanR

0 Kudos
Message 6 of 9
(4,367 Views)
Solution
Accepted by topic author IanR

It is a question of clones

 

When your program is run, LabVIEW makes copies of you re-entrant VI so you can call them from multiple places and have them run dependent of each other. With your sub VI is already open you were looking at the EDIT version of the VI. While LabVIEW was running a copy (or clone) of the sub VI. 

 

Normally (non-re-entrant) VI have one and only one copy of your sub VI. If you call your sub VI from multiple palaces at the same time, The sub VI can only run one at a time and the other must wait until the VI is free. 

In this case the Edit mode and Run mode VI is one in the same.

 

Omar

 

 

Omar
0 Kudos
Message 7 of 9
(4,353 Views)

I know you can't probe a reentrent vi in LV 7, but they have fixed this in 2009, you may be able to do a trick I use for VITs, put a breakpoint on the main VI and save it.  Then run the code, once it breaks, then put in the probe. Since you are looking at the correct VI, the probe will show the data for the current VI.

0 Kudos
Message 8 of 9
(4,348 Views)

Thanks for explaining.Omar. The 'fog' has finally lifted and I understand. Some days I really feal like I should be stood on a street corner selling matches! 🙂

 

Also thanks 'Been bitten' for the tip on how to probe a re-entrant vi.

 

Regards

IanR 

0 Kudos
Message 9 of 9
(4,308 Views)