嗨,希望通过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 + =“T
ARM 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.