Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Burst Mode, CR1000, Table Rows


Anton May 20, 2010 05:57 PM

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


aps May 24, 2010 03:10 PM

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.


Anton May 25, 2010 03:14 AM

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


aps May 25, 2010 12:27 PM

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 *


Anton May 25, 2010 02:17 PM

Aha! The DataInterval() statement is used so frequently I forgot it was optional.

Thanks again,

Anton

Log in or register to post/reply in the forum.