11-14-2007 11:09 AM
11-15-2007 10:26 AM
Hi,
the usual way when working with arays is to do it through a variant instead.
You don't say whether you're using the API in LabVIEW, LabWindows/CVI, c#, vb c++ etc etc or directly in the sequence itself, so the actual calls will depend on the source of the new values and where you're interacting with TestStand from.
Have a look in the examples folder for the passing arrays examples. Hopefully that will give you a good starting point.
Thanks
Sacha Emery
ATE Systems Engineer
National Instrument UK and Ireland
11-15-2007 02:02 PM
Hi Ed,
I don't know if this will help or not but consider the following expression:
RunState.Engine.TemporaryGlobals.NewSubProperty("MyArray", PropValType_NamedType, 0, "Array2DofNum", 0)This will insert a new sub property into your temp globals.
MyArray is the new name of the new 2D array.
PropValType_NamedType means that I want to use a specified type in my type pallette.
The 3rd parameter = 0 which means I don't want an array of my named type.
Array2DofNum is a data type I created in my type pallette that is a 2D array of numbers.
The last parameter is the default behavior.
You can read about this API call in the help under PropertyObjects. Because Engine.TemporaryGlobals is simply a Property Object.
Let me know if this helps.
11-15-2007 06:33 PM
One more thing,
To set values in this array call this expression:
RunState.Engine.TemporaryGlobals.MyArray[5][1] = 3
This sets the index at row 5 column 1 equal to 3.
🙂
It worked for me this way.