From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
01-26-2011 03:00 PM
I am working on a good way to unpack data from a test event. I unfortunately don’t have the ability to control the format that the data is common up from the RT in, so I need to come up with an efficient way to deal with a array of clusters which can change based on the type defs. My current problem is that it takes about 4 minutes to unpack 15000 samples (that’s a 15 second test event). I also need to keep them in the same order that the controls in the cluster appear because I to be able to display them in a waveform graph based on ring values which are pulled from the single same type def in much the same way as the data is pulled out.
Attached is a test vi I am working with. If anybody can find a better way to get the data out that would be helpful.
Thanks
01-26-2011 03:51 PM - edited 01-26-2011 03:53 PM
Hi tsk,
the slow part is where the same cluster is parsed over and over again: you should try to make a list of needed conversions from the typedef and the iterate over the array using this list. This would also eliminate the data copying into the value property node...
The RT developer should get clubbed for that typedef
Another idea:
Once you have a list of needed conversions you could typecast a cluster (array element) into array of U8 to pick up the single elements...
Btw. your time measurement is flawed...
01-26-2011 04:29 PM - edited 01-26-2011 04:30 PM
Of course your timing measurment is highly flawed. It will not work as expected.
When the VI starts, the "get date/time" on the right will execute immediately, concurrently with the first frame of the sequence (and thus with the left "get time/date"). The time difference you measure is small and random and has nothing to do with the execution time of the second frame that you are trying to measure.
01-26-2011 04:51 PM
I will try that conversion trick, I am not sure how else to unpack the cluster as it doesn’t want to turn into an array.
I agree, but my boss informs me that clubbing people in the workplace is frowned upon. The data was originally sent up as three arrays of doubles, integers and Booleans. Each array had an associated type def which indicated what channel the data came from, it was beautiful, but alas.
I am not all that familiar with picking single elements like that, do you know of a good article to get me started?
yes yes, I realized that after I posted it.