NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Pass 'Array of cluster' using PostUIMessageEx method

Dear All,

 

I am using 'PostUIMessageEx' method to pass the test results from Test Sequence to Operator Interface (LabVIEW).  Now I am in need of passing the 'Array of cluster' data from test sequence to operator interface.  Does the PostUIMessageEx method support this? Also please let me know how to retrieve the data in operator interface end. I tried the below mentioned method, but failed to retrieve the data in operator interface as expected.

 

Attachments:

 

1. Array of Cluster.jpg - Data need to send from TS to LV

2. PostUIMessageEx.JPG - PostUIMessageEx in TS

3. Usermessageevent callback.jpg - UsermessageEvent callback VI in LV

 

Thanks in Advance.

 

Best Regards,

Sathish kumar D

0 Kudos
Message 1 of 5
(4,280 Views)

You can pass a TestStand variable (i.e. PropertyObject) programmatically like you are doing using the ActiveXData parameter, however you cannot directly convert such variables into LabVIEW clusters (only the LabVIEW adapter can currently do that and only for parameters). You can however access all of the data in the TestStand variable programmatically using the PropertyObject APIs.

 

By the way, you can call PostUIMessageEx directly from an expression, you don't have to use the ActiveX adapter, you can basically create an expression as follows:

 

RunState.Thread.PostUIMessageEx(10205, 0 "10205", Locals.Testdata, true)

 

Hope this helps,

-Doug

0 Kudos
Message 2 of 5
(4,250 Views)

Thanks for the info Doug.  It would be very helpful if you could share any example for retrievin the Array of cluster at opertaor interface.

 

I will replace the ActiveX adater with the expression, Thanks again.

 

Regards,

Sathish kumar D

0 Kudos
Message 3 of 5
(4,233 Views)

@dskumar08 wrote:

Thanks for the info Doug.  It would be very helpful if you could share any example for retrievin the Array of cluster at opertaor interface.

 

I will replace the ActiveX adater with the expression, Thanks again.

 

Regards,

Sathish kumar D


Basically to retrieve the data from an array of teststand data type instances (kind of the equivalent of an array of clusters), you would do something like this:

 

PropertyObject myElement = myArrayObj.GetPropertyObjectByOffset(index, 0);

 

double myElementsNumberValue = myElement.GetValNumber("Mynumbersubproperty", 0);

double myElementsStringValue = myElement.GetValString("Mystringsubproperty", 0);

etc.

 

Or really the equivalent from LabVIEW. Basically you have to programmatically access each value of each element. You could probably write a VI to use as a subroutine to convert an element in the array into a LabVIEW cluster using this API.

 

-Doug

0 Kudos
Message 4 of 5
(4,221 Views)

Thanks for the suggestions doug.

0 Kudos
Message 5 of 5
(4,071 Views)