Discusiones sobre Productos NI

cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

How to declare and initialize a STRING ARRAY (assign strings to array elements)

How to declare and initialize a STRING ARRAY (assign desired strings to elements of an array, for example "abc", "def", "ghi", "jkl", etc.) in LabVIEW? I saw a "string array" block in help, but could not find it in the function palette. Does a spreadsheet string have to be in a file (or can it be in a string constant block)? Thank you.
0 kudos
Mensaje 1 de 2
6.585 Vistas
Hi,
you can do it in several ways:
1. Direct way: Create string array control on front panel and type strings in its elements
2. Programmatically 1: Create string array indicator (or local variable of control), right click on it in block diagram, select "Create constant" from drop down menu. The array constant will appear. Now type values in this constant's strings
3. Programmatically 1: Use "Build array", "Replace array subset", "Insert into array" or "Initialize array" functions from "Functions->Array" palette.

And of course you can combine all of these methods.

Good luck.

Oleg Chutko.
0 kudos
Mensaje 2 de 2
6.585 Vistas