AnsweredAssumed Answered

Agilent 3458A Digitizing

Question asked by spacecowboy on Jun 13, 2011
Latest reply on Jun 15, 2011 by spacecowboy
Hi,
Looking to digitize a 1 kHz (1 Vpp) sine wave via the HP3458A, and transfer the sampled data to the host pc.
I've downloaded the example program, 4100 point program, in c#.  I can get the program to function, create samples and return data.
It uses the DCV digitizing mode.
Now, i'd like to optimize the settings so it's specific to a 1kHz sinewave.
Example test program code:
                cmds = "PRESET DIG;";              // Preset to the designated state (Digitizing)
                cmds += "MFORMAT DINT;";       // Set the memory storage format (double integer)
                cmds += "OFORMAT ASCII;";      // Set the output format (ASCII)
                cmds += "MEM FIFO;";               // Clear memory and set memory storage type
                cmds += "APER 2E-6;";               // Set the arperature time (
                cmds += "TRIG AUTO;";              // Set the trigger source (Auto)
                cmds += "NRDGS 4100,AUTO;";  // Set the number of readings (4100 readings)
                cmds += "END ON;";                  // Enable EOI function
                cmds += "TARM HOLD";            // Hold the trigger until triggered
                SendCmd("TARM SGL");

My Program, trying to digitize a 1kHz sine:
                cmds = "PRESET DIG;";       
                cmds += "MFORMAT DINT;";    
                cmds += "OFORMAT ASCII;";   
                cmds += "MEM FIFO;";        
                cmds += "APER 0.0000122;";  
                cmds += "TIMER 0.0000122;";
                cmds += "NRDGS 2048,TIMER;";
                cmds += "END ON;";          
                cmds += "TARM HOLD";        
               SendCmd("TARM SGL");
My program errors duing the TARM SGL.  2048 (0 to 2047) samples are returned, however the last two samples are out of wack.
When I complete an FFT, the fundamental is at bin 51.
With the above setting, i expect this to be 1kHz and a fundamental at bin# 25.
Attached is my sampled data.
I believe my setting should represent this digitizing sample set:
F0 = 1000.576 Hz
M = 25 Cycles
N = 2048 Smpls
Fs = 81967.21311 Hz
Fres = 40.023 Hz
I chose just off 1kHz to keep the Timer and Arp value a multipal of 100 nS.
Any ideas as to what's wrong.  

Outcomes