LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use GetPropertyValue.vi for a 2D-array?

Hello,

i have a 2D array in TestStand that i want to read in labview using the SequenceContext and the GetPropertyValue.vi.

It seems as i can only read 1D arrays with this vi.

Is there a solution to also read 2D arrays?

 

Thanks for help

0 Kudos
Message 1 of 9
(3,868 Views)

The GetPropertyValue.vi provides the block diagram.

I never tried it, but you could copy the Numeric Array version to your project and modify it to have a 2d array.

 

Two things to take care/consider:

1. As said, i never tried it. It is possible that 2d-arrays will not work for this transfer.

2. DISCONNECT THE MODIFIED 2D-VERSION FROM THE OTHER (POLYMORPHIC) API FUNCTIONS. Never alter the defaul TS API! Treat this VI as a complete stand-alone one.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 9
(3,856 Views)

Solution 1. You can Create a variable with 2D array and Map this variable to Input Node of LabVIEW Vi where you need this 2D Array Value. Make sure you are passing the Values to 2D array before the sequence step calling LabVIEW Vi.

 

Solution 2: Basically the Get Property will access the Variable by its Name and using Invoke Node, a Reference datatype value will be passed to Variant to convert to expected type. So Changing the Reference datatype in get  property vi fro, 1 D to 2D Array will solve your problem (Not yet tried in Real time but hoping that it needs to work)

 

 

 

 

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 3 of 9
(3,848 Views)

Solution 2 is working. (and saved under a complete new separate filename)

Thanks

0 Kudos
Message 4 of 9
(3,841 Views)

What about the other way "SetPropertyObject.vi"?

Here it seems not so eays as in the Get vi.

0 Kudos
Message 5 of 9
(3,834 Views)

No, setting a multi-dimensional array is not so simple with TS API.

 

Before digging more into this:

The recommended way to exchange data with a module is to pass it directly by parameter rather than using the TS API in the module. Is there a specific reason why you are not using parameters?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 9
(3,823 Views)

I have about 20 parameters that i want to read and set. It is easier if there is only one sequencecontext parameter.

But then i will pass the 2D array separate in and out.

0 Kudos
Message 7 of 9
(3,818 Views)

@OnlyOne wrote:

What about the other way "SetPropertyObject.vi"?

Here it seems not so eays as in the Get vi.


Whats your Exact requirement on SetPropertyObject.vi?

As SetValVariant Function accepts variant as input it will take Multidimension array input so ypu can use the same for Set Function also.

 

Please provide your exact Requirement....

 

 

Kind Regards

 

Palanivel Thiruvenkadam

 

 

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 8 of 9
(3,806 Views)

I have a 2D array in TestStand.

Now i want to read this array from labview via SequenceContext and display it in a window.

After viewing and modifying and want ti write it back to the StationGlobals and overwrite the existing data there.

0 Kudos
Message 9 of 9
(3,797 Views)