DAQ6510 Data Acquisition / Multimeter System User's Manual
Section 6: Scanning low-level DCV
DAQ6510-900-01Rev. A / April 2018
6-5
Send the following commands for this example application:
Commands
Descriptions
Pseudocode
int scanCount = 10
Create a variable to hold the scan
count
int channelCount = 6
Create a variable to hold channel
count
int bufferSize = scanCount *
channelCount
The number of readings
int lastIndex
The last scan index in the buffer
after every two seconds
string tmpBuff
A temporary buffer that store
scanned data every two seconds
DAQ6510
*RST
Put the instrument in a known
state
:TRAC:POIN bufferSize,
"defbuffer1"
Set the buffer size (not necessary
when using the default buffer, but
added to show command use
case)
:ROUT:SCAN:BUFF "defbuffer1"
Assign all scanned data to
"defbuffer1"
FUNC 'VOLT:DC', (@101:106)
Set channels functions to DCV
VOLT:DC:RANG:AUTO ON,
(@101:106)
Set the channels ranges to auto
VOLT:DC:NPLC 5, (@101:106)
Set NPLC to 5
VOLT:DC:AZER ON, (@101:106)
Set autozero function to ON
ROUT:SCAN (@101:106)
Setup the scan list
ROUT:SCAN:COUN:SCAN 10
Setup the number of repeated
scans
INIT
Initiate the scan
Pseudocode
for i = 1; i <= bufferSize;
delay 2000
Delay two seconds to allow
readings to accumulate
DAQ6510
lastIndex = TRACe:ACTual?
Query the current buffer index
tmpBuff = "TRACe:DATA? i,
lastIndex, "defbuffer1",
READ
Query the readings available from
index i to index lastIndex
Pseudocode
printBuffer (tmpBuffer)
Print readings in temporary buffer
to console
i = las 1
end for
DAQ6510
:TRAC:SAVE "/usb1/MyData.csv",
"defbuffer1"
Save buffer data from defbuffer1
to USB