LabVIEW APIs Discussions

キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

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 件の賞賛
メッセージ111/171
3,768件の閲覧回数

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 件の賞賛
メッセージ112/171
3,768件の閲覧回数

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 件の賞賛
メッセージ113/171
3,768件の閲覧回数

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 件の賞賛
メッセージ114/171
3,768件の閲覧回数

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 件の賞賛
メッセージ115/171
3,768件の閲覧回数

Maybe something like this:

fpga_script.png

0 件の賞賛
メッセージ116/171
3,768件の閲覧回数

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 件の賞賛
メッセージ117/171
3,768件の閲覧回数

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 件の賞賛
メッセージ118/171
3,768件の閲覧回数

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 件の賞賛
メッセージ119/171
3,768件の閲覧回数

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
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 件の賞賛
メッセージ120/171
3,768件の閲覧回数