‎02-12-2010 04:11 AM
Colleagues,
I have some questions about Probes. (the scripting is pretty new for me, sorry).
What I can do so far is creating probe programmatically:
Lets say, my Test.vi looks like this:
With following VI I can attach probes to wires:
It works - as result I have Probe:
I can also remove probe programmatically.
Now the Questions:
1. How can I change "Probe representation" to "floating" probe (similar action as "Open in New Window, but programmatically):
2. How can I get list of all created probes programmatically without analysing all wires?
I can do something like that, but I guess this is not elegant way:
3. Is it possible to get application Event something like "Application.Probe added" when user has added probe to Wire? In ideal case direct into Event Structure (without polling all wires)?
4. And the last question - is it possible to get Value/DateStamp from Probe programmatically?
(My goal is to develop my own Probe Watch Window)
Thanks in advance for any suggestion,
Andrey.
‎10-17-2011 10:49 AM
‎10-17-2011 11:22 AM
The probe watch window is a C based dialog VI, meaning it has a front panel, but its "diagram" is entirely C code, so you can't customize your own probe watch window by editing the existing one. It doesn't even use any Call Library Nodes that you could borrow.
> 1. How can I change "Probe representation" to "floating" probe (similar action as "Open in New Window, but programmatically):
No programmatic access exists to do this. You'd have to request it as a new LV feature.
> 2. How can I get list of all created probes programmatically without analysing all wires?
You cannot to the best of my knowledge. You'd have to request it as a new LV feature.
> 3. Is it possible to get application Event something like "Application.Probe added" when user has added probe to Wire? In ideal case direct into Event Structure (without polling all wires)?
It is possible... if you request it as a new LV feature.
> 4. And the last question - is it possible to get Value/DateStamp from Probe programmatically?
Not in the way that you're hoping. You can write a specific custom probe that writes the Value/DateStamp out to some shared location, like a global VI or a queue or file that you read later. There's no generic way to get information about when a given wire is updated.
‎10-17-2011 11:31 AM
Not in the way that you're hoping. You can write a specific custom probe that writes the Value/DateStamp out to some shared location, like a global VI or a queue or file that you read later. There's no generic way to get information about when a given wire is updated.
This helps me a lot. The rest of your answer helps me know that it's OK to stop trying. Thank you.
Jim
‎10-18-2011 06:46 AM
I spoke too soon; I'm having trouble. This is my probe:
And I'm trying to read the Global VI here:
The Global doesn't get updated where I'm reading it. I can open the Front Panel for it and see it update with the probe, but the one being read seems to refer to another instance. Is there something about probes that I'm missing? I tried similar approaches, first with a notifier and then with a FGV. Neither method saw the probe change.
Thank you,
Jim
‎10-18-2011 08:27 AM
I found this post where Ton said that "Probes run in a private application instance". This makes sense to me based on what I experienced using a Global in a custom probe. But, then, AQ said "Custom probes run in the same context as the VI that they are probing." So I'm confused, again.
The Global is being read in a VI I called from the Project menu. Here're the corners of the two VIs:
The Project-launched VI is running in NI.LV.Dialog, the probed VI is running in <W> Server:localhost. Is this the cause of my problem?
‎10-18-2011 12:16 PM
jcarmody wrote:
[...] The Project-launched VI is running in NI.LV.Dialog, the probed VI is running in <W> Server:localhost. Is this the cause of my problem?
Yep.