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?
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.
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).
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.
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...
...then I pass this container to the AcviteX parameter of the PostUIMessage function, and process the data in the UserMessage callback of the GUI:
Unfortunately I don't have any better idea. But it works.