NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

waveforms to GUI

Hello,

 

I plan to send an array of waveforms from TestStand Sequence to a custom GUI. I tried several ways, but until now the only thing working is to pass the array of waveforms to the GUI as a parameter of PostUIMessage, then the receiving VI builds up the waveforms again. This is quite resource-intensive.

 

My idea is still to use the PostUIMessage method, but instead of sending the array of waveforms directly, first I use the PropertyObject.Serialize method. I pass the resulting string to the GUI.

 

Is there any way to reconstructure the array of waveforms from this string in the GUI?

 

Madottatti

0 Kudos
Message 1 of 6
(3,963 Views)

Hello Madottati,

 

are you able to attach an example code to overview?

 

Best Regards,

 

 

Laura

0 Kudos
Message 2 of 6
(3,905 Views)

Hi Laura,

 

of course! This is a subVI from the UserMessage callback from my custom TS GUI.

In my sequence, I pass an array of LabVIEW Waveforms to the GUI via Thread.PostUIMessage(), whereas the array of LabVIEW waveforms (TestStand data type!) is the ActiveXData parameter. The callback VI typecasts the variant to PropertyObject, and then the subVI rocks until the waveforms created for LabVIEW.

 

cheers

Madottati

Download All
0 Kudos
Message 3 of 6
(3,901 Views)

Hi Madottati,

 

you are obviously not aware of the fact that there is a pre-defined TS data type LabVIEW >> LabVIEWAnalogWaveform.

Using that type, you don't need to convert the data types as long as source and sink is LV (which is the case in your application as far as i see).

 

Norbert

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

Hello Norbert,

 

yes I am using the TS data type LabVIEWAnalogWaveform. Passing the array of waveforms from a LabVIEW VI to TestStand works perfectly via the connector pane, using the LabVIEW adapter. This would also work in the other direction, if I pass the waveforms from TestStand to a VI via the connector pane.

 

The problem begins, when I want to pass the array of waveforms from a TS sequence via Thread.PostUIMessageEx() to my GUI.

 

Madottati

0 Kudos
Message 5 of 6
(3,858 Views)

Actually I found a quite fast solution for this. After returning the acquired waveforms to TS, I call a simple VI which flats the waveforms to string and returns this as a U8 array to TS. This array will be stored in a TS container...

WF_to_U8.PNG

 

...then I pass this container to the AcviteX parameter of the PostUIMessage function, and process the data in the UserMessage callback of the GUI:

 

U8_to_WF.PNG

 

 

Unfortunately I don't have any better idea. But it works.

 

Madottati

0 Kudos
Message 6 of 6
(3,810 Views)