jgcode Posted January 13, 2012 Report Posted January 13, 2012 [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: Cheers! -JG Quote
Aristos Queue Posted January 15, 2012 Report Posted January 15, 2012 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". 1 Quote
drjdpowell Posted January 15, 2012 Report Posted January 15, 2012 I searched and found this prior conversation. Quote
jgcode Posted January 15, 2012 Author Report Posted January 15, 2012 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... ...(assuming that it is run at least once and Retain Wire Values in ON) using a terminal (or wire) reference for that node? Can you please provide more detail. Cheers -JG Quote
Yair Posted January 15, 2012 Report Posted January 15, 2012 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). Quote
Aristos Queue Posted January 15, 2012 Report Posted January 15, 2012 Like this: (VI is saved in LV 2011... should work back to 2009... back to 8.2 if you rewrite the subVI.) Get Name of Class of Object.vi 2 Quote
jgcode Posted January 16, 2012 Author Report Posted January 16, 2012 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? Cheers -JG Quote
Yair Posted January 16, 2012 Report Posted January 16, 2012 AQ, I think the problem is that you're misunderstanding what Jon wants - he wants to find the specific class on a wire in another VI, since this is supposed to be an edit-time scripting tool. For that, he needs the actual value in the wire. 1 Quote
drjdpowell Posted January 16, 2012 Report Posted January 16, 2012 (edited) 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 January 16, 2012 by drjdpowell 2 Quote
jgcode Posted January 16, 2012 Author Report Posted January 16, 2012 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 Quote
drjdpowell Posted January 16, 2012 Report Posted January 16, 2012 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 Quote
jgcode Posted January 16, 2012 Author Report Posted January 16, 2012 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. Quote
Francois Normandin Posted January 16, 2012 Report Posted January 16, 2012 Small modification to AQ's VI... Get the Value from the control associated with the terminal. Indeed, the datatype is always "LabVIEW Object" in this case. Get Name of Class of Object From Terminal Reference.vi (LV2011) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.