05-12-2011 12:23 AM
05-27-2011 07:57 AM
You can't do this in the way as in your example. Your DWEvent and DWChannel structures both contain fixed sized string elements. This means they are inlined in the structure. The only way in LabVIEW to create a compatible structure is to create an embedded cluster with the according number of byte elements. So your DWEvent cluster should be really a LabVIEW cluster which contains an int32 event_type, a 64bit float, and then another cluster containing 200 unsigned 8bit integers. The same rule will accordingly apply to DWChannels.
On return you can then use ClusterToArray and then ByteArrayToString to convert these bytes into a string. You should clip the array to the first 0 byte before converting to a string, otherwise you will always get strings that contain 200 characters, with random characters after the first 0 byte character in the returned data.