LabVIEW APIs Discussions

Showing results for 
Search instead for 
Did you mean: 
Reply

LabVIEW Scripting Main Board

Re: LabVIEW Scripting Main Board

Hey, don't apologise! I want LabVIEW to make me millions, but if it won't it ain't your fault!

Do you think that, if I create a Read/Write control with too many elements, it would be possilbe to wire them in scripting? Or is that likely to be ruled out as its an xnode?

How about the Build Array node? Can it be expanded or is it subject to the same caveat?

Also, I'm not sure what you mean by "This functionality ships with the FPGA Wizard."

Thanks for your reply.

0 Kudos
Message 101 of 170 (0 Views)
Reply
0 Kudos

Re: LabVIEW Scripting Main Board

Since a Read/Write control is a Node, you can query it for its terminals and connect to them as you normally would.  So yes, you can wire to them in scripting with no problem.

The Build Array node is a normal LabVIEW primitive and you can add and subtract terminals from it with scripting subject to the usual LabVIEW caveats (e.g. cannot collape a wired terminal).

The FPGA Wizard is a development tool for those creating FPGA/RT applications.  It scripts and configures FPGA XNodes as a necessary part of its function.  It is written in G, so VIs (with stripped block diagrams) to configure the XNodes are include in it, although said VIs probably require FPGA Wizard run-time data.  Right click on any FPGA target and you will have the option to run the wizard.

This account is no longer active. Contact ShadesOfGray for current posts and information.
0 Kudos
Message 102 of 170 (0 Views)
Reply
0 Kudos

Re: LabVIEW Scripting Main Board

Thanks again. I can query the terminals easily enough. I need to learn how to make the connections next!

Do you have an example of how to expand the Build Array, please?

0 Kudos
Message 103 of 170 (0 Views)
Reply
0 Kudos

Re: LabVIEW Scripting Main Board

Connecting wires is fairly easy if you don't care where they go.  Use the Terminal method Connect Wire.  There is a method that allows you to specify the locations of the wire control points (the bends in the wire), but it does not work if you are wiring across diagram boundaries (e.g. from something in a loop to something outside that loop).  Using the autoroute option helps with routing, but it has a timeout of 200ms, so routing sometimes fails on complex diagrams.  If you run into this problem, there are workarounds (like diagram cleanup).

Growable functions can be resized using the Add Chunk and Remove Chunk methods.  These are fairly new methods, and I have not used them (the old way was fairly complex).

This account is no longer active. Contact ShadesOfGray for current posts and information.
0 Kudos
Message 104 of 170 (0 Views)
Reply
0 Kudos

Re: LabVIEW Scripting Main Board

Thanks. Do you know if those methods exist in LabVIEW 2009?

0 Kudos
Message 105 of 170 (0 Views)
Reply
0 Kudos
Highlighted

Re: LabVIEW Scripting Main Board

Connect Wire does, but Add and Remove Chunk do not (I used LabVIEW 2010).  Resize growable nodes in 2009 by first queying for the current height (use Master Bounds Rect and subtract the Bottom from the Top).  Now get the Terminal Height and either add or subtract it from the current height, depending on whether you want to grow or collapse.  Finally use the Resize method to set the new height.  You can see why we fixed this for the official release of scripting.  There may be slight differences in the way different growable nodes react, so be prepared to experiment.

Good luck.

This account is no longer active. Contact ShadesOfGray for current posts and information.
0 Kudos
Message 106 of 170 (0 Views)
Reply
0 Kudos

Re: LabVIEW Scripting Main Board

I am stuck at how to create an array indicator. I found the way to create an array control and put a DB inside it to generate a valid array control, but what I really wanted was an array indicator. There is no 'indicator' object anywhere, or I did not find it? Help PLZ. Thanks.

0 Kudos
Message 107 of 170 (0 Views)
Reply
0 Kudos

Re: LabVIEW Scripting Main Board

Indicators and controls are the same thing under the hood.  Change a control to an indicator by setting its Indicator property to TRUE.

This account is no longer active. Contact ShadesOfGray for current posts and information.
0 Kudos
Message 108 of 170 (0 Views)
Reply
0 Kudos

Re: LabVIEW Scripting Main Board

I had posted a question about scripting on the LabVIEW discussion board earlier today...  now I found this.

Here is the link:

http://forums.ni.com/t5/LabVIEW/Scripting-replace-invoke-node/td-p/1796810

I would appreciate any assistance.

Dan

0 Kudos
Message 109 of 170 (0 Views)
Reply
0 Kudos

Re: LabVIEW Scripting Main Board

Variant Scripting.jpg

I tried to create a variant array. But why this script does not work? Thanks.

0 Kudos
Message 110 of 170 (0 Views)
Reply
0 Kudos