完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
嗨!几年前我为53132A计数器制作了一个DLL。
有了这个DLL,53132A计数器,NI GPIB和40mSec的门控时间,我们可以在~60mSec内进行单频测量。我们使用水晶音叉生产中的机器上的计数器,速度可靠性是绝对必须的! 星期一我得到了第一个53210A计数器,我无法让它工作:-(似乎无法构建完整的编程字符串并将此字符串发送到计数器。所以我尝试了以下编程序列:MC_METHOD_IMP THP53210A ::复位(){BOOL解析度= FALSE;尝试{解析度= mGpib-> DeviceClear(mDevice);如果(RES)解析度= mGpib->发送(mDevice,“* RST; * CLS; * SRE 0; * ESE 0;:STAT:PRES“); if(!res)gError-> DoSetError(ErrorStr()。c_str(),”Counter :: Reset“); res = mGpib-> Local(mDevice); CloseGpib();} catch(...){return false;} return res;} OpenGpib(); mGpib-> Send(mDevice,“CALC:STATE OFF”); mGpib-> Send(mDevice,“CONF:FREQ 3.276800e + 004, DEF“); //取决于用户参数mGpib->发送(mDevice,”INP:PROB 1; IMP 50; COUP AC; FILT:LPASS:STATE OFF“); // depe nds on user settingmGpib-> Send(mDevice,“SENSE:FREQ:GATE:POL POS; TIME 4.000e-002”); //取决于用户settingmGpib-> Send(mDevice,“SENS:ROSC:SOUR INT”); //取决于用户settingmGpib-> Send(mDevice,“FORM:DATA ASCii”); mGpib-> Send(mDevice,“DISP:WIND:STAT ON”); //取决于用户设置mGpib->发送(mDevice,“TRIG:SOUR BUS”); // automatic:BUS,manual:IMMmGpib-> Send(mDevice,“* SRE 16; * ESE 0; * OPC”); //自动:“* SRE 16; * ESE 0; * OPC”,手册:“* SRE 0; * ESE 0; * OPC”此代码后计数器报告没有错误。有时重置功能无法重置 计数器。 我必须关闭和打开计数器(这是不可接受的)。似乎命令必须严格按顺序排列.ex。 如果我在“CALC:STATE OFF”之后发送“TRIG:SOUR BUS”命令然后问题“TRIG:SOUR?” 在上面的代码返回“IMM”之后。我首先尝试使用GPIB GET命令(ibtrg)触发测量 - >“触发忽略”。然后我做了“INIT; * TRG; FETC?” 然后我可以做一个测量。 但它太慢而且无法使用。因为我无法相信安捷伦生产的计数器无法使用,我必须做一些完全错误的事情。可以请某人或其他人帮助我让这件事情起作用吗?最好的问候沃尔特 以上来自于谷歌翻译 以下为原文 Hi! Some years ago I made a DLL for the 53132A Counter. With this DLL, the 53132A Counter, the NI GPIB and a gate time of 40mSec we can make a single frequency measurement within ~60mSec. We use the counters on the machines in our crystal tuning fork production, speed an reliability are a absolute must! On Monday I got the first 53210A Counter and I'm not able to get it to work :-( It seems not possible to build up the complete programming string and send this string to the counter. So I tried the following programming sequence:
The counter reports no error after this code. Sometimes the Reset Function is not able to reset the counter. I have to switch off and on the counter (that is NOT acceptable). It seems that the commands must be in a strict order. ex. If I send the "TRIG:SOUR BUS" command after "CALC:STATE OFF" then the question "TRIG:SOUR?" after the above code returns "IMM". My first try to trigger a measurement was with the GPIB GET command (ibtrg) -> "trigger ignored". Then I did "INIT;*TRG;FETC?" then I could make a measurement. But it's so slow that it's unusable. Since I can not believe that Agilent produces a Counter which is unusable, I must do something completly wrong. Can please somebody or other help me to get this thing to work? Best regards Walter |
|
相关推荐
1个回答
|
|
|
嗨lhornburg,我得到它的工作,但我必须为每个测量做这个:mGpib->发送(mDevice,“INIT”);
mGpib-> Trigger(mDevice); if(WaitForSingleObject(mSRQEvent,mTimeout)== WAIT_OBJECT_0){char poll = mGpib-> SerialPoll(mDevice); if(poll == 128){mGpib-> Send(mDevice,“FETC?”); std :: string data = mGpib-> Enter(mDevice); 在将编程字符串发送到计数器时,在发送显示命令字符串“DISP:WIND:STAT ON”或“DISP:WIND:STAT OFF”之前,我必须进行睡眠(500)! 没有这个睡眠(),计数器已经死了! 只有关闭和打开它才能恢复生机。最好的问候 以上来自于谷歌翻译 以下为原文 Hi lhornburg, I got it to work, but I have to do this for each measurement:
When sending the programming strings to the counter, before sending the display command strings "DISP:WIND:STAT ON" or "DISP:WIND:STAT OFF" I have to do a Sleep (500)! Without this Sleep() the counter is dead! Only switching off and on brings it back to life. Best regards Walter |
|
|
|
|
只有小组成员才能发言,加入小组>>
1845 浏览 0 评论
2739 浏览 1 评论
2640 浏览 1 评论
2450 浏览 5 评论
3460 浏览 3 评论
1845浏览 0评论
417浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 18:05 , Processed in 0.607374 second(s), Total 43, Slave 36 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
4737