1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我正在构建一个微控制器控制的转盘,用于测量天线辐射模式。
阶段1将简单地将平台定位在0到360度的任何位置。 我最不想做的是使用我的Fieldfox频谱分析仪以单一频率读取信号电平。 有了这个,我可以完全自动化这个过程。 从我迄今为止能够确定的是,有可用的软件在Windows上运行,我可以从以太网端口提取这些数据。 我可以构建一个带有以太网端口的控制器并包含一个TCP堆栈,但它不会使用Windows。 编程语言是C.软件不是我的强项,但我可以混淆足够的指导。 有没有人能够将Fieldfox连接到非Windows环境? 同样,我的需求很简单。 我只想在单一频率上读取信号强度。 洛伦 以上来自于谷歌翻译 以下为原文 I'm building a microcontroller controlled turntable for measuring antenna radiation patterns. Phase 1 will simply be the ability to position the platform anywhere from 0 to 360 degrees. What I'd ultimately like to do is read the signal level at a single frequency with my Fieldfox spectrum analyzer. With this I can completely automate the process. From what I've been able to determine so far is that there is software available that runs on Windows where I could pull this data off the Ethernet port. I can build a controller with an Ethernet port and include a TCP stack, but it will not be using Windows. Programming language is C. Software is not my strong suit but I can muddle along with enough guidance. Has anyone been able to interface a Fieldfox to a non-Windows environment? Again, my needs are simple. I just want to read signal strength at a single frequency. Loren |
|
相关推荐
2个回答
|
|
如果您有TCP / IP,则无论您的客户端操作系统如何,都可以与FieldFox通信。
FieldFox支持端口5025上的LAN上的SCPI。只需在端口5025上打开一个到FieldFox的TCP套接字,并发送换行“ n”终止的命令和查询。 从套接字读取以获取对查询的换行符终止响应。 命令,查询和响应都是ASCII文本(除非在某些命令的情况下,专门为二进制传输配置)。 有关FieldFox上SA应用程序可用的SCPI命令集,请参阅编程指南。 听起来您想要设置SA来测量感兴趣的频率,然后可能以所需频率激活标记。 然后,您可以在转台上的每个位置重复发出扫描命令,然后执行标记Y值查询。 Wil这是一个示例序列的命令/查询,您可以将其发送到您的仪器进行配置(此代码未经过测试!):如果s是您的(已经)打开的SOCKET结构(Berkeley套接字API):void fSend(char * cmdOrQry ){send(s,cmdOrQry,strlen(cmdOrQry),0); 发送(s,“ n”,1,0); } int fRcv(char * buf,int bufLength){//不处理'buf'不够响应! int offset = 0; char * pX = buf ;; memset的(BUF,0,bufLength); int read = recv(s,buf + offset,bufLength-offset,0); if(read == SOCKET_ERROR){return SOCKET_ERROR; } offset = read; while(!(pX = strchr(buf,' n'))){int read = recv(s,buf + offset,bufLength-offset,0); if(read == SOCKET_ERROR){return SOCKET_ERROR; } offset + = read; } return pX-buf; } void main(){char buf [64]; // 64应该用方括号括起来 - 论坛软件将其变成链接! fSend(“INSTrument:SELect ”SA “”); //选择SA模式fSend(“INITiate:CONTinuous 0”); //关闭连续扫描fSend(“SENSe:FREQuency:CENTer 1e9”); // 1GHz中心(根据自己的喜好调整)fSend(“SENSe:FREQuency:SPAN 1e3”); // 1kHz跨度(根据您的喜好调整)fSend(“CALCulate:MARKer NORM”); //将标记1打开为'NORMal'标记fSend(“CALCulate:MARKer:X 1e9”); //将标记的x轴位置设置为1GHz。 //循环从此处开始,而(1){//将命令发送到单次扫描,等待扫描结束,然后查询标记Y值fSend(“INITiate:IMMediate; * WAI; CALCulate:MARKer:Y?”); //从套接字读取标记Y值。 不太正确,因为这应该读取直到newline ... int bytesRead = fRecv(buf,64); //打印出标记值printf(“标记Y值:%s”,buf); 编辑:wils于2014年5月5日上午11:35 以上来自于谷歌翻译 以下为原文 If you have TCP/IP, you can communicate with FieldFox regardless of your client OS. FieldFox supports SCPI over LAN on port 5025. Just open a TCP socket to FieldFox on port 5025, and send newline "n" terminated commands and queries. Read from the socket to get newline terminated responses to queries. Commands, queries, and responses are all ASCII text (unless in the case of some commands, specifically configured for binary transfers). Refer to the programming guide for the set of SCPI commands available for the SA application on FieldFox. It sounds like you want to setup your SA to measure the frequency of interest, then perhaps activate a marker at the desired frequency. Then you can repeatedly issue sweep commands followed by marker Y value queries at each position on your turn table. Wil Here's a sample sequence of commands/queries that you could send to your instrument to configure it (This code is not tested!): If s is your (already) open SOCKET structure (Berkeley sockets API): void fSend(char* cmdOrQry) { send(s, cmdOrQry, strlen(cmdOrQry), 0); send(s, "n", 1, 0); } int fRcv( char* buf, int bufLength) { // Does not handle 'buf' no long enough for response! int offset = 0; char* pX = buf;; memset(buf,0,bufLength); int read = recv(s, buf+offset, bufLength-offset,0); if( read == SOCKET_ERROR ) { return SOCKET_ERROR; } offset = read; while( ! (pX = strchr(buf,'n')) ) { int read = recv(s, buf+offset, bufLength-offset,0); if( read == SOCKET_ERROR ) { return SOCKET_ERROR; } offset+=read; } return pX-buf; } void main() { char buf[64]; // 64 should be surrounded by square brackets - forum software turns this into link! fSend("INSTrument:SELect "SA""); // select SA mode fSend("INITiate:CONTinuous 0"); // turn off continuous sweep fSend("SENSe:FREQuency:CENTer 1e9"); // 1GHz center (adjust to your liking) fSend("SENSe:FREQuency:SPAN 1e3"); // 1kHz span (adjust to your liking) fSend("CALCulate:MARKer NORM"); // Marker 1 on as 'NORMal' marker fSend("CALCulate:MARKer:X 1e9"); // Set marker's x-axis position to 1GHz. // Loop starts here while( 1 ) { // Send command to single sweep, wait for end of sweep, then query marker Y value fSend("INITiate:IMMediate;*WAI;CALCulate:MARKer:Y?"); // Read marker Y value from socket. Not quite right as this should read until newline... int bytesRead = fRecv( buf, 64 ); // print out marker value printf("Marker Y Value: %s", buf); } } Edited by: wils on May 5, 2014 11:35 AM |
|
|
|
感谢你能这么快回复。
我的兴趣是只读一个频率,可以在软件中手动设置,也可以读取标记。 最终目标是以设定的增量启动转盘旋转和读取信号强度,例如每1或5度。 按下一个按钮,在5分钟内,我可以获得制作极坐标图所需的所有数据。 现在我需要至少45分钟才能以5度的增量测量完整的旋转。 当我交换天线极化时双倍。 您的输入将帮助我启动以太网部分,您将负债累累。 罗兰。 以上来自于谷歌翻译 以下为原文 Thank you for the quick reply. My interest is reading a only a single frequency, either set manually in the software or reading a marker. The ultimate goal is to start the turntable rotating and read signal strength at set increments, like every 1 or 5 degrees. Push a button and in maybe 5 minutes I have all the data I need to make a polar plot. Right now it take me at least 45 minutes to measure a full rotation in 5 degree increments. Double that when I swap antenna polarization. Your input will help me jump start the Ethernet part and you are in my debt. Loren. |
|
|
|
只有小组成员才能发言,加入小组>>
1291 浏览 0 评论
2375 浏览 1 评论
2194 浏览 1 评论
2065 浏览 5 评论
2952 浏览 3 评论
1120浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
756浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
931浏览 0评论
1293浏览 0评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-25 22:02 , Processed in 1.667898 second(s), Total 79, Slave 63 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号