Jump to content

How to tell if VI is executing


Recommended Posts

  • 3 weeks later...

QUOTE (Norm Kirchner @ Jul 18 2008, 05:34 PM)

Damn.... this is harder than it seems at first.

Sure is!

If you are looking for gloabl solution that finds which of all of the VI's in memory are running, (note: there maybe more than one running) it seems you would have to interact with the OS's scheduler to do that since LV utilizing the OS to schedule VIs and for that matter the multiple possible threads within each VI.

The only other thing that I feel is worth mentioning is the "skip if busy" option availabe for VI's marked as sub-routine. When a subroutine VI is dropped on a diagram, it exposes an option called "skip if busy". This option is the one and only exception to the data flow paradigm in that when that option is selected AND the VI is alredy executing, the sub-VI call will be skipped. If there any return values expected from the VI that was skipped, LV will use the "default" for the data type (Note the default as defined by the sub-VI will NOT be returned since LV would have to access that VI to know that and since its being skipped LV does not know that).

So...

If the VI in question is structed like an AE you could call it using a "check method" that returns a true boolean. If you try the "check" and it returns false, the VI was skipped because it was busy.

Those are the only thoughts I can offer.

Anyone else have thoughts on this matter?

Ben

Link to comment

QUOTE (neB @ Jul 19 2008, 06:52 AM)

If you are looking for gloabl solution that finds which of all of the VI's in memory are running, (note: there maybe more than one running) it seems you would have to interact with the OS's scheduler to do that since LV utilizing the OS to schedule VIs and for that matter the multiple possible threads within each VI.

I have no idea how to check an OS scheduler to see which VI is running. I guess I only care about Windows apps in my case.

Here is my goal... I have a state machine UI. I want to be able to run a supervisory VI that monitors the state machine and can log every VI that was actually run/called (as opposed to just being in memory) until the state machine completes. I was just about to give up on this but then I realized that the LabVIEW VI Profiler basically does what I need to do (and more). Unfortunately I am not sure how it does this... Any ideas? (Is it checking the OS scheduler? -- that would be surprising since it would mean there would be a different flavor of the VI Profiler for each LabVIEW OS version supported).

Link to comment

QUOTE (Omar Mussa @ Jul 19 2008, 11:48 AM)

I have no idea how to check an OS scheduler to see which VI is running. I guess I only care about Windows apps in my case.

Here is my goal... I have a state machine UI. I want to be able to run a supervisory VI that monitors the state machine and can log every VI that was actually run/called (as opposed to just being in memory) until the state machine completes. I was just about to give up on this but then I realized that the LabVIEW VI Profiler basically does what I need to do (and more). Unfortunately I am not sure how it does this... Any ideas? (Is it checking the OS scheduler? -- that would be surprising since it would mean there would be a different flavor of the VI Profiler for each LabVIEW OS version supported).

THanks, so you really just need to know after the fat and not durring...

[Pushing my knowledge = True]

All of the debugging and profiler stuff seems to be built into the under-lying C code. Even poking around in prvicate methods only let you turn stuff on-and off.

[Pushing my knowledge = False]

The Trace Execution Toolkit is something I have only used in the RT environments but is supposed to run under Windows now. It works by putting hocks into all of the code before you run it and will produced detailed reports of everything that called when for how long and also gives you an idea if anything goes idle waitng for memory management. That toolkit may be helpful.

Ben

Link to comment

QUOTE (neB @ Jul 20 2008, 06:26 AM)

The Trace Execution Toolkit is something I have only used in the RT environments but is supposed to run under Windows now. It works by putting hocks into all of the code before you run it and will produced detailed reports of everything that called when for how long and also gives you an idea if anything goes idle waitng for memory management. That toolkit may be helpful.

Cool, I will try to check it out.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.