LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

uninvasive data extraction from a vi

Solved!
Go to solution

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!

0 Kudos
Message 1 of 15
(3,517 Views)

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 15
(3,510 Views)

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...

0 Kudos
Message 3 of 15
(3,494 Views)

here's what I have goin so far... just point the path at any vi

0 Kudos
Message 4 of 15
(3,481 Views)

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!

Tanya Visser
National Instruments
LabVIEW Group Manager
0 Kudos
Message 5 of 15
(3,453 Views)

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!

0 Kudos
Message 6 of 15
(3,433 Views)
Solution
Accepted by topic author Fibo

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.

0 Kudos
Message 7 of 15
(3,414 Views)

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

 

20391i3E0B2EACA8A604F2

0 Kudos
Message 8 of 15
(3,393 Views)

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.

0 Kudos
Message 9 of 15
(3,382 Views)

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

0 Kudos
Message 10 of 15
(3,377 Views)