Jump to content

Get 'Actual Data Type' of LVOOP Object


jgcode

Recommended Posts

[LabVIEW 2011]

Howdy

If you probe a LVOOP Object it tells you the Actual Data Type e.g. the wire maybe that of a parent, but it will display the child's name if the child ran on that wire.

Is there a way to get the Actual Data Type of an LVOOP Object at edit time from a terminal input reference / wire reference (assuming the VI has been run and the wire has been 'executed' on).

There is a datatype property for the terminal but it just returns the parent class in the above use case.

I managed to locate this control which is part of the probe (<resource>\dialog\NI.LVClass.Probe.NameStr.ctl) hoping to find the complete probe and see the code - still searching tho:

post-10325-0-28846600-1326461314.png

Cheers!

-JG

Link to comment

Use the Flatten To String primitive and take the name off the front. The details of doing this are posted somewhere on LAVA... I forget where. Try searching the OO category for "flat format".

I searched and found this prior conversation.

Thanks for your replies, but I am unsure how to use this to solve the OP:

... at edit time from a terminal input reference / wire reference

I.e. How do I tell what Class data is on the wire with an arrow...

post-10325-0-63053600-1326636910.png

...(assuming that it is run at least once and Retain Wire Values in ON) using a terminal (or wire) reference for that node?

post-10325-0-46503500-1326636828.png

Can you please provide more detail.

Cheers

-JG

Link to comment

For that you need the actual value on the wire, which I'm pretty sure is not exposed through VI server (probably since before the retain values option was introduced this was considered to be dangerous, because it meant LV could not safely reuse buffers and after the option was added no one bothered to add such a property).

Link to comment

Thanks for the VI AQ, but I am unsure how to use it correctly in the use case I presented.

If I pass in the Terminal's Data Type it always returns the Parent (even if a Child has run on the wire).

Here are the scripting properties I am browsing through which are available for terminal (left) to the wire (middle).

As Yair has mentioned - can it be done? What should I be using?

post-10325-0-48169200-1326697006.png

Cheers

-JG

Link to comment

Thanks for your replies, but I am unsure how to use this to solve the OP:

Sorry, I had mistakenly thought you were making custom probes, rather than wanting scripting access to the data retained on a wire.

I’ve never tried scripting, but just a thought: can one use scripting to connect a probe to the wire? I see from your last image that there is a probe reference that you may be able to set. If so, you could connect a custom probe and have the probe send (via a queue or whatever) the retained object on the wire back to the VI doing the scripting. Then you could use AQs code on it.

— James

Edited by drjdpowell
  • Like 2
Link to comment
If so, you could connect a custom probe and have the probe send (via a queue or whatever) the retained object on the wire back to the VI doing the scripting.

Well what do you know... :)

I had looked at probes quickly before but with no luck - so I just went back in, found some nodes, converted AQ's VI to conform to a probe, tried it out and have my code 'working'.

Need to neat up the process, but I think I definitely have the tools to do it now.

Thanks everyone!

-JG

Link to comment

JG,

Can you add a probe to a running VI, also? What about a clone VI? (I have a use case that would be valuable, and perhaps I’ll dive in to scripting.)

— James

Don't know - I am 'swimming' myself at the moment with this probe thing.

My use case is edit time - that's what I am testing at the moment.

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.