Sample comma-delimited output of above code:
3.535493836e-002, Volts DC, 0.000000000e+000
-4.749810696e-002, Volts DC, 5.730966000e-002
-8.893087506e-002, Volts DC, 7.722769500e-002
4.164193198e-002, Volts DC, 1.246876800e-001
-6.900507957e-002, Volts DC, 1.815213600e-001
-8.851423860e-002, Volts DC, 2.009161500e-001
3.891038895e-002, Volts DC, 2.647790700e-001
-7.581630349e-002, Volts DC, 3.032140350e-001
-8.236359060e-002, Volts DC, 3.226125750e-001
-8.551311493e-002, Volts DC, 3.425625900e-001
The following loop uses the print command instead of the printbuffer command. This loop
shows the same information described in the previous example (reading, units, and relative
timestamps for all readings stored in the buffer). However, because the print command is used
over printbuffer, each line is tab-delimited (rather than comma-delimited) to produce a columnar
output, as shown below:
for x = 1,mybuffer.n do
print(mybuffer.readings[x], mybuffer.units[x],
mybuffer.relativetimestamps[x])
end
Sample columnar output of above code:
If data was collected by executing a three-channel scan list with a scan count of 10, the buffer has 30
readings in it. To see the comma-delimited data on the three-channel boundary, send:
x = 1
y = 3
for z = 1, 10 do
printbuffer(x, y, mybuffer, mybuffer.channels)
x = x + 3
y = y + 3
end