AnsweredAssumed Answered

U2353A Problems with AI Data Acquisition Continuous Scanning (Voltages)

Question asked by mgiaco3 on Jun 10, 2013
Latest reply on Jun 12, 2013 by mgiaco3
Hi, I'm using a U2353A model with VEE Pro, SCPI commands, and a Direct I/O window from instrument manager. (I put my problem at the bottom)

My goal is to make a program for Analog Input continuous data acquisition for Voltage values, such that I will be able to set the voltage range, the sampling rate, and the sample number per data transfer (from FIFO). This Data from the FIFO will then be stored in the location that I desire and the scan will repeat till some arbitrary condition is met.
---------------------------------------------------------------------------------------------------------------------------------------------------
Currently my program looks somewhat like this:
WRITE TEXT *RST, *CLS EOL
WRITE TEXT "ROUT:SCAN (@101)" EOL
WRITE TEXT "ROUT:CHAN:RANG ", (variable),", (@101)" EOL
WRITE TEXT "ROUT:CHAN:POL BIP, (@101)" EOL
WRITE TEXT "ROUT:CHAN:STYPE NRS, (@101)" EOL
WRITE TEXT "WAV:POIN ", (variable) EOL
WRITE TEXT "ACQ:SRAT ", (variable) EOL
WRITE TEXT "RUN" EOL
//enters continuous loop
WRITE TEXT "WAV:STAT?" EOL
READ TEXT x

if x=="DATA" 
//DATA is an indicator that the number of specified points by WAV:POIN is met and ready to be transferred from the FIFO
then,
WRITE TEXT "STOP" EOL
WRITE TEXT "WAV:DATA?" EOL
READ BINBLOCK x INT 16 ARRAY.* NOEND
//I then convert to 16 bit array to its equivalent voltage values 
array=>folmula "(asReal64(Data)/32768)*10" ==> alphanumeric ==> break

---------------------------------------------------------------------------------------------------------------------------------------------------
The problem is that when I connect a 6.2V DC battery to the appropriate channels (as a test), I get voltage values that have a deviation of about +/- .2V and an average voltage around 7.0. (I was looking for measurements very close to 6.2V) 
//Also take note that my Sampling rate is 400k samples/sec and the data block is 4mill samples.
but I did try varying the sample rate.


Any help? Please?

-Mike  

Outcomes