LabVIEW APIs Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Scripting Main Board

This works fine here:

Variant_Array_BD.png

Without your actual code I don't know what the problem is with your example. The minimum would be seeing if you get an error and where it's coming from. If you're not getting an error then you need to clarify what you mean by "does not work". It would help if you upload the actual VI.


___________________
Try to take over the world!
0 Kudos
Message 111 of 171
(1,214 Views)

tst,

I found out why my code did not work. Notice the conversion red dot in your code; they are not in my code. The difference between your code and mine is that I created the default enum control from the VI. When I switched to the updated enum, my code works fine too. So the default enum must have been outdated. Thanks for the help.

0 Kudos
Message 112 of 171
(1,214 Views)

Hi all.

I just started toying around with LabVIEW scripting.  My ultimate goal is to use an 'Array of String' control and de-index it through a for-loop to create Indicators of type '1-D Array of Boolean' and label each one with the current element of the string array .  The best I've been able to do is create *Controls* that are of type '1D Array of (void)' and I have no idea how to set their Lable name.  I'm getting closer but I could sure use some direction.

Thanks!


0 Kudos
Message 113 of 171
(1,214 Views)

You set the label of anything using the Label.Text property.  Remember that array elements all have the same label (array elements all have the same properties, but can have different values).  To create an array of any type, create the array, then create whatever you want to put into it with the array as the owner.  Alternately, you can create the contents of the array, then use the Move method to move it into the array.

0 Kudos
Message 114 of 171
(1,214 Views)

Njg,

What is the "unofficial" method to expose those extra elements? I am trying to find a way to script the creation of FPGA code involving fixed-size arrays of fixed point numbers. Any idea if this is possible?

Trevor -- Have these methods since been officially exposed?

Thanks,
Jared

0 Kudos
Message 115 of 171
(1,214 Views)

Maybe something like this:

fpga_script.png

0 Kudos
Message 116 of 171
(1,214 Views)

In another thread I saw a reference to "plug-in released for the scripting by the R&D  which you can install so that you can see all the property nodes ...." and it gives the link to this community. This is fine, but I don't have the time to search all of the posts on 8 pages to try to find the plug-in.

Does anyone know where it is? Is there a central repository for plugins / tools that have been created for sharing? (searchable?)

Thanks,

Dan

0 Kudos
Message 117 of 171
(1,214 Views)

Follow-up to the above message:

I have a case structure with many cases in my program (for various states) and as I've been programming, some of those cases have become obsolete.  I was wondering if there is a way to pull out the names of cases that are active (ie have a case) and compare that to the ENUM control so that I can delete names of cases not being used?

Any thoughts, Ideas?

It's easy to get the names from the enum, but in my case that does not directly translate to the valid cases in the case structure itself.

Thanks for any input.

Dan

0 Kudos
Message 118 of 171
(1,214 Views)

I am unsure what you are asking in your first question.  If you want to know what property nodes are available for use, use the class browser.  It is native to LabVIEW.  Select View»Class Browser or hit Ctrl-Shift-B. If you want to find all the property nodes in a VI or set of VIs, use the Find & Replace function (Edit»Find and Replace...).  Please elucidate if I have misunderstood.

You can get the current states from a case structure by using its Frame Names property (nearly at the end of the property list).

0 Kudos
Message 119 of 171
(1,214 Views)

If you have LabVIEW 2011 you don't need to download anything. Just go in your preferences and enable the checkbox to see scripting properties and methods.

Rolf Kalbermatter
My Blog
0 Kudos
Message 120 of 171
(1,214 Views)