If I use burst mode to collect 1000 samples in an array, storing the array in a table produces 1000 columns. Is there an easy or recommended way to put the samples into table rows?
Anton
The simplest way is to call the table in a loop sampling one element at a time, with the index of the array being sampled incrementing each time around the loop.
The downside of this is the datalogger will store a timestamp with each value as each will be treated as a new record. This will use up an extra 8 bytes of storage space per value.
Thank you for your suggestion! I don't plan to do this on a long-term basis, so memory is not a worry. With this method, do you think it would be easier to slow down that loop to the table sampling rate, or to use a trigger of some kind to make sure all values put in to the table are also put out?
Anton
A simple program to do this is shown below. You do the measurement burst, then sample the data into the table, one value at a time after the measurements.
---------------------
Public burstdata(1000),i
'Define Data Tables
DataTable (Test,1,10000)
Sample(1,burstdata(i),FP2)
EndTable
'Main Program
BeginProg
Scan (60,Sec,10,0)
'A burst
VoltSe (burstdata(),1000,mV5000,-1,1,500,250,1.0,0)
'Sample the data to a table one value per record
For i=1 To 1000
CallTable Test
Next i
NextScan
EndProg
* Last updated by: aps on 5/26/2010 @ 8:48 AM *
Aha! The DataInterval() statement is used so frequently I forgot it was optional.
Thanks again,
Anton