是德科技
直播中

李旗挺

8年用户 219经验值
私信 关注
[问答]

安捷伦3458A数字化程序错误

嗨,希望通过HP3458A数字化1 kHz(1 Vpp)正弦波,并将采样数据传输到主机pc。我已经下载了示例程序,4100点程序,在c#中。
我可以让程序运行,创建样本并返回数据。它使用DCV数字化模式。现在,我想优化设置,使其特定于1kHz正弦波。示例测试程序代码:cmds =“PRESET DIG;
“;
//预设到指定状态(数字化)cmds + =“MFORMAT DINT;”;
//设置内存存储格式(双整数)cmds + =“OFORMAT ASCII;”;
//设置输出格式(ASCII)cmds + =“MEM FIFO;”;
//清除内存并设置内存存储类型cmds + =“APER 2E-6;”;
//设置arperature时间(cmds + =“TRIG AUTO;”; //设置触发源(Auto)cmds + =“NRDGS 4100,AUTO;”; //设置读数(4100读数)cmds + =
“END ON;”; //启用EOI功能cmds + =“TARM HOLD”; //保持触发直到触发SendCmd(“TARM SGL”);我的程序,试图将1kHz正弦数字化: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”);返回TARM SGL。2048(0到2047)样本的程序错误
然而,最后两个样本都没有了。当我完成一个FFT时,基本位于bin 51.通过上述设置,我希望这是1kHz,而bin #25的基波是我的采样数据。
相信我的设置应该代表这个数字化样本集:F0 = 1000.576 HzM = 25 CyclesN = 2048 SmplsFs = 81967.21311 HzFres = 40.023 HzI刚刚关闭
1kHz使Timer和Arp值保持100 nS的倍数。对于什么是错误的任何想法。

以上来自于谷歌翻译


     以下为原文

  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.  

回帖(5)

李旗挺

2019-7-25 15:42:10
附加采样数据:

以上来自于谷歌翻译


     以下为原文

  attaching sampled data:

附件

举报

杨梅

2019-7-25 15:47:31
我玩弄了这个,发现你错过了TRIG AUTO命令,并且我得到了一个“触发太快”的错误,除非我放慢了计时器的速度。
请参阅下面的我的更改。我没有进行FFT,但我输入了一个2 Vpp 1 kHz正弦波,具有-1 V偏移,数据看起来很好。我编程,试图将1kHz正弦数字化:cmds =“PRESET DIG
;“;
cmds + =“MFORMAT DINT;”;
cmds + =“OFORMAT ASCII;”;
cmds + =“MEM FIFO;”;
cmds + =“APER 0.0000122;”;
“TRIG AUTO”“TIMER 0.00003”cmds + =“NRDGS 2048,TIMER;”;
cmds + =“END ON;”;
cmds + =“TARM HOLD”;
SendCmd(“TARM SGL”);

以上来自于谷歌翻译


     以下为原文

  I played around with this and found that you were missing the TRIG AUTO command and that I got a “trigger too fast” error unless I slowed down the timer.   See my changes below.

I didn’t do an FFT, but I input a 2 Vpp 1 kHz sine wave with a -1 V offset and the data looks good.

My Program, trying to digitize a 1kHz sine:
cmds = "PRESET DIG;";
cmds += "MFORMAT DINT;";
cmds += "OFORMAT ASCII;";
cmds += "MEM FIFO;";
cmds += "APER 0.0000122;";
                    “TRIG AUTO”
                    “TIMER 0.00003”
cmds += "NRDGS 2048,TIMER;";
cmds += "END ON;";
cmds += "TARM HOLD";
SendCmd("TARM SGL");
举报

李旗挺

2019-7-25 15:59:40
谢谢你的快速回复。哦,你的两个更新修复了我得到的错误。但我现在正在努力解决Aperture时间,样本数量和TIMER时间的关联。我的理解:孔径时间= 1 /采样率= 0.0000122
秒秒Fs = SamplingRate = 1 / TIMER = 81967.2131147539 Hz N =采样数= 2048光圈和TIMER时间只能以100 nS的增量进行更改,然后略微偏离1kHz的音调。
如果采样率高于以上且输入音调为Fo = 1000.576 Hz,(Fs / N = Fo / M),则预期M = 25个周期。
捕获的数据有比这更多的周期。
知道了,在FFT之后,我希望基波在bin#25中,因为Fres将是40.023 Hz。你可以帮助我将孔径时间,TIMER时间和样本数量等于拟合相干采样方程(Fs / N =
Fo / M)。
我知道我不会连贯,因为3458与我的源不同步,但涂抹的基础应该散布在正确的bin中。
一个窗口稍后会帮助我。欣赏你的时间!
附上新的正弦数据。

以上来自于谷歌翻译


     以下为原文

  Thanks for the quick reply.
Ok, your two updates fix's the error's I was getting.
But I am now struggling with the association of the Aperture time, Number of Samples and TIMER time.
My understanding:
  Aperture time = 1/Sample Rate = 0.0000122 Seconds
  Fs = SamplingRate = 1/TIMER = 81967.2131147539 Hz
  N = Number Of Samples = 2048
  Aperture and TIMER time can only be changed in 100 nS increments, hece the slightly off 1kHz tone.
  With a SamplingRate of Above and Input tone of Fo = 1000.576 Hz, (Fs / N = Fo / M)  i would expect M = 25 cycles.  Data captured has many more cycles than that.
  Knowing that, post FFT, i would expect the fundamental to be in bin# 25 as the Fres would be 40.023 Hz.

Can you help me equate aperture time, TIMER time and number of samples to fit the Coherent sampling equation (Fs / N = Fo / M).  I know I will not be coherent as the 3458 is not
synchronized to my source, but the smeared fundamental should be spread around the correct bin.  A window will later help me out there.
Appreciate your time!  Attached new sine data.

附件

举报

杨梅

2019-7-25 16:08:31
至少部分答案是3458A具有集成A / D而不是像示波器那样的闪存A / D.
光圈时间是A / D对输入信号进行积分的实际时间。
采样率是触发A / D时的速率,这是= 1 / TIMER。
触发和测量开始之间可能存在延迟,以便在必要时进行稳定。
请参阅3458A用户指南的第160页:指定值FYIIf如果需要超过50KHz,则必须使用MFORMAT SINT和OFORMAT SINT

以上来自于谷歌翻译


     以下为原文

  At least part of the answer is that the 3458A has an integrating A/D not a flash A/D like a scope.   Aperture time is the actual time the A/D is integrating the input signal.   The sample rate is the rate at with the A/D is triggered and this does = 1/TIMER.   There can be a delay between the trigger and the measurement start to allow settling if necessary.   See page 160 of the 3458A User’s Guide:  Specifying a value <500ns selects minimum aperture which is 500ns.

FYI

If you need to go faster than 50KHz you must use MFORMAT SINT and OFORMAT SINT
举报

更多回帖

发帖
×
20
完善资料,
赚取积分