我有一个带E4426B的测试夹具。
在测试结束时,软件试图通过预设仪器来消毒仪器,然后将当前状态保存到可通过“* SAV x,y”写入的所有存储器位置。
循环工作到一定程度,但最终仪器会响应错误并连续显示前显示屏上的“L”图标和底部的“远程预设”信息。
此时它不会响应任何更多的远程命令,我必须循环上电或按LOCAL,然后按PRESET,此时需要大约3分钟才能完成预设。
此时“L”图标仍然存在,并且发送到仪器的下一个GPIB命令导致它在仪器错误队列中报告-113错误(未定义的标题)。我启动了NI间谍以查看发生了什么,
并发现错误发生在循环中的同一点 - 在这种情况下为“* SAV 6,2”。
来自NI Spy:“> 948.发送(0,0x0017,”* SAV 6,2“,8(0x8),NLend(0,0x01))>进程ID:0x00000520线程ID:0x00000518> ibsta:0xc168 iberr:6
ibcntl:2(0x2)“这是来自仪器驱动程序的代码:int CHP_E4426b :: Erase(){if((m_StatusCode = Ini
tialize())!= GPIB_SUCCESS)//基本上只发送”* RST“返回m_StatusCode;
m_SaveState =“* SAV%d,%d”;
for(int i = 0; i for(int j = 0; j {sprintf(m_CmdString,m_SaveState,j,i); if((m_StatusCode = Send(m_CmdString,strlen(m_CmdString)))!= GPIB_SUCCESS)return m_StatusCode;
返回GPIB_SUCCESS;}我尝试在内部循环结束时放置一个小的Sleep()延迟(10-20 ms),令我惊讶的是它导致错误显示在早期而不是更晚.10 ms导致循环到
在44和20毫秒时出错甚至更早。任何人都可以提供一些故障排除建议吗?谢谢。
以上来自于谷歌翻译
以下为原文
I have a test fixture with an E4426B. At the end of testing, the software is attempting to sanitize the instrument by presetting it and then saving the current state to all of the memory locations writable via "*SAV x,y".
The loop works to a point, but eventually the instrument responds with an error and continuously displays the "L" icon on the front display and a "Remote preset" message at the bottom. At that point it won't respond to any more remote commands and I have to either cycle power or press LOCAL, then PRESET at which point it takes about 3 minutes to finish presetting. At that point the "L" icon is still present and and the next GPIB command sent to the instrument causes it to report a -113 error (undefined header) in the instrument error queue.
I fired up NI spy to see what was happening, and found that the error was happening at the same point in the loop - "*SAV 6,2" in this case. From NI Spy:
"
> 948. Send (0, 0x0017, "*SAV 6,2", 8 (0x8), NLend (0,0x01))
> Process ID: 0x00000520 Thread ID: 0x00000518
> ibsta:0xc168 iberr: 6 ibcntl: 2(0x2)
"
Here's the code from the instrument driver:
int CHP_E4426b::Erase()
{
if ((m_StatusCode = Initialize()) != GPIB_SUCCESS) // basically just sends "*RST"
return m_StatusCode;
m_SaveState = "*SAV %d, %d";
for (int i=0; i < 10; i++)
for (int j=0; j < 100; j++)
{
sprintf(m_CmdString, m_SaveState, j, i);
if ((m_StatusCode = Send(m_CmdString, strlen(m_CmdString))) != GPIB_SUCCESS)
return m_StatusCode;
}
return GPIB_SUCCESS;
}
I tried putting a small Sleep() delay (10-20 ms) at the end of the inner loop, and to my surprise it caused the error to show up earlier rather than later. 10 ms caused the loop to error out at 44,1 and 20 ms was even sooner. Can anyone offer some troubleshooting suggestions?
Thanks.
0