07-28-2010 10:37 AM
I am trying to extract as much information as possible from a vi (I'll call it the target vi) without tempering with the target vi. So far I have found a couple methods to do this... one is using an "open vi" reference then an invoke node "ctrl.val:get all" and this pulls variants of all the controls in the vi... form there I can extract... value, name and data type from all the controls in the target vi... I was wondering if anyone knew of another way to pull more information out of a target vi without tampering with it.
much thanks!
Solved! Go to Solution.
07-28-2010 10:44 AM - edited 07-28-2010 10:47 AM
Use a property node off the Front panel to get refs to all of the controls/indicators on the FP.
See this link for "more than you wanted to know".
Let me guess. You are trying to use code that you don't have the password to... ?
Ben
07-28-2010 02:12 PM
thanks for the tip and link, no not for bypassing a passworded vi... but that is interesting now that you mention it... I'm actually trying to control labview vi's from remote locations via a website without touching the original vi's... so the end result would be able to control almost any vi with minimal configuratoin... the info I retrieve from the vi will be sent to the website using xml... and then i'd also be able to control the vi through the website... i can't use labviews remote panel or web services because I need more information than what I can get from remote panels... I would like to be able to download and save real-time info from any indicator... can't do that with remote panel.... ok maybe web services you can i'm not really sure... I haven't gone down that route...
07-28-2010 02:47 PM
here's what I have goin so far... just point the path at any vi
07-29-2010 05:42 PM
Hi Fibo,
I tried your code and it was able to identify the controls in another VI and get their data. What were you looking on improving in this?
Have a great day!
07-30-2010 01:25 PM
Hi Tanya,
I was just wondering if there were any other ways to do what I've done here but extract even more information... like if I have a Boolean switch control on a VI could I tell what mechanical action is associated with it (ie latch when pressed, switch wehn pressed... etc etc) or if the state of the switch is visible or not visible... or basically any other inforamtion about it.... I'm just wondering if this is even possible to do?
much thanks!
07-31-2010 12:18 PM
If you have scripting installed, there is a property node for mechanical action that you can use.
Visibility of the switch is a regular property node.
08-01-2010 01:43 AM
wow, I had never heard of this... I think this may be what I was looking for, thanks!
I'm having some trouble getting it to pull the data from the property node... I've created a dummy vi with one numeric control on it... but I can't figure out how to pull the info from it. I keep getting a "Type mismatch" error from the "To More Specific Class" vi.... it's a numeric control I'm not sure why I'm getting this
08-01-2010 09:41 AM
Your Close Reference is hanging out there in parallel to your For Loop. You may be closing the reference before you actually get to process in the loop. Wire up an error wire from the loop to the close reference. Also wire up the other error inputs and outputs as well.
If that isn't it, then please post your VI's.
08-01-2010 12:10 PM
I moved the close reference, still didn't do it... I'm probally just not understanding the type-casting I guess.... my target vi only has 1 numeric control on it... that's all.... but the error says it's a mismatch, I don't get it, my vi is attached