LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to build VI using XML commands

I would like to build vi's using XML commands. Can someone point towards tutorials, other info.
Thanks,
Kevin
0 Kudos
Message 1 of 9
(3,202 Views)
What do you mean "build VI"? Are you talking about actually programmatically placing block diagram elements? This seems impractical, at best. At the very least you would need to use scripting. Scripting requires a license for any version of LabVIEW greater than 8.0.

What are you trying to accomplish?
0 Kudos
Message 2 of 9
(3,198 Views)
Yes, build vi's using scripting. Simple example; Using some kind of utility, a user could specify n Boolean controls and the vi would generate. Not sure how wiring is handled...
 I have licenses from 7.1 to 8.5.


Message Edited by kevmi2ca on 02-01-2008 11:03 AM
0 Kudos
Message 3 of 9
(3,194 Views)
The license for scripting is separate than the license for LabVIEW. Prior to LabVIEW 8 scripting was a "hidden" feature, completely undocumented. With LabVIEW 8 NI has made it available, but at a cost.

It's been discussed here before, so if you do a search on it you can find examples. You can also learn more about it at LAVA.

Note: You can royally screw things up with scripting. You've been warned. If you decide to use it with LabVIEW 7.x don't bother asking NI for support 'cause they won't give it. I don't think we're allowed to help on scripting issues on these forums, but I'm not sure.
0 Kudos
Message 4 of 9
(3,191 Views)
Warning noted. Might go another direction with this!
0 Kudos
Message 5 of 9
(3,189 Views)
What is your end goal? Once the user has the VI with the N booleans, what will they do with it? Continue writing it? Use it as a GUI?

If it's the latter, this can be solved with various techniques. If you search for "dynamic GUI" or "interface" you should find some options, such as using the picture control or moving and hiding controls. For the boolean example, the simplest solution is using an array of booleans and changing the NumRows property.

___________________
Try to take over the world!
0 Kudos
Message 6 of 9
(3,160 Views)

I was hoping I could build a fully functional vi this way. I'm building a tester that will change configuration often; the idea was to build a utility where a user could reconfigure vi's for the current test set-up.

Sounds like there's no way to connect the wiring, though, or it's too difficult to be worth while.

0 Kudos
Message 7 of 9
(3,158 Views)

You might wish to check out object oriented programming or plugins.

In your case, OOP should let you design several types of tests and choose between them at run-time. The basic idea in this case is that each class (type) will have some configurable options (which will be coded beforehand) and the users will select the type of the class and then its options. If you want an example, think of the properties page you can get by right clicking a control. Depending on the control type you get different tab pages and options.

Full native OOP is available in 8.2 or later, but there are some implementation for earlier versions as well (you can try searching for GOOP).

Plugins allow you to define a basic interface for something and then use different versions which use this interface at run-time. Again, a search should yield some examples.


___________________
Try to take over the world!
0 Kudos
Message 8 of 9
(3,153 Views)
If you want N booleans, use an array with the number of visible elements variable.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 9 of 9
(3,148 Views)