01-03-2012 06:58 PM
You would initialize with a 2D array with one colum for each channel and with a length corresponding the desired history size.
01-03-2012 08:31 PM
Could you further explain your example or further help me? When I applied the example, the averaged data I obtained is incorrect. The untouched or not average values are reading voltage values around 1.4 for analog channels and -9999 for thermocouple channels (error because not net yet hooked up) as expected, but for the averaged values I obtain -4000 or on the order of that.
01-04-2012 12:37 AM - edited 01-04-2012 12:38 AM
Here's an example for 3 channels.
The second FOR loop gets three points (one for each channel) at a time.
01-04-2012 10:39 AM
thank you. I was wondering where the mean pt by pt vi went in the VI? or was it left out. sorry im in the learning phases of labview
01-04-2012 10:46 AM
You can leave it there and simply wrap a small FOR loop around it. My older code showed that both produce the same result so you only need one or the other.
Once you have multiple channels, it seems more reasonable to go with the explicit version, because all data is now contained in a single 2D array. This feels more efficient, but I haven't done any benchmarking. If you use the ptbypt version, each instance maintains it's own buffer, probably creating a little bit more overhead (?).