Discussion:
GPIB-ENET Converter locks up - improper setup/teardown?
(too old to reply)
ShaneLM
2008-08-14 19:40:13 UTC
Permalink
Hi - I just joined this forum and it looks really helpful - hopefully I can eventually contribute too...  I’m currently working on a VisualBasic.NET project that polls various groundstation equipment for their status using the 488.2 GPIB routines. I’m running into an error after my program has executed for some time and then I try to re-run it again. Somehow the GPIB-ENET converter locks up into an error state and the only way to remotely control it again is to manually toggle its power. The GPIB failure is either EHDL or EDVR and can be detected with the troubleshooting wizard. Given the nature of when this occurs, I think I’m either not setting up or closing the converter properly. Here’s the series of commands I’m using. Can someone look this over and tell me if I should be setting up or tearing down the connections a certain way? SendIFC() // a few times, as there are a couple converters
DevClear() // a few times, as there are multiple instruments per converter
For each device over a long period of time{
        Send()
        (sometimes I call ibdev and ibwait at this point so that I know when the response is ready)
        Receive()
}
(am I supposed to be ending the connection somehow at this point? I’ve seen example code that takes the device offline with ibonl, but I don’t want to call that if it will interfere with a separate program that is also using the devices) The error is inconsistent and hard to replicate, so any advice would be helpful. Thanks so much! Shane
Andy L
2008-08-15 22:40:25 UTC
Permalink
Hi Shane,&nbsp;The errors you are describing are documented in the <a href="http://digital.ni.com/public.nsf/websearch/2FA525A8585A92E9862566EE002A3755#EDVR" target="_blank">GPIB Error Codes and Common Solutions (Part 3). </a>The errors could be related to either an invalid input handle to the GPIB instrument or the GPIB hardware might not configured properly. &nbsp;Are any of the instruments getting powered down while the program is running?
What version of NI 488.2 and NI-VISA do you have installed?
Have you tried running an example to verify all the hardware is configured correctly, if so what were the results?
The ENET should be the only controller in charge on the GPIB bus, how are two programs accessing the instruments at the same time?&nbsp;Regards,
ShaneLM
2008-08-15 23:10:10 UTC
Permalink
Hi Andy - I appreciate your help. To answer your questions:&nbsp;No instruments are powered down. Version of 488.2 is 1.7...pretty old i'm beginning to learn. I'm not using VISA (i don't think..unless it's used by 488.2 somehow)We've used other software, and everything seems to be working. I'm pretty sure it's my software that's causing issues.I'm not sure how the other program works, but I think it's unrelated to this issue because we've seen this error when it was closed.&nbsp;I spent lots of time today looking through these forums, and I've learned a lot. I've found some related posts about the converter locking up <a href="http://forums.ni.com/ni/board/message?board.id=140&amp;message.id=24628" target="_blank">here</a> and <a href="http://forums.ni.com/ni/board/message?board.id=140&amp;message.id=24621" target="_blank">here</a>, unfortunately they both don't appear to have solved the issue. &nbsp;But I did uncover that the converter may lock up with &gt;1024 calls to ibdev without closing the handle with ibonl. This could be happening in my application so I'll do further testing from that aspect. I also saw that newer <a href="http://joule.ni.com/nidu/cds/view/p/lang/en/id/309" target="_blank">firmware</a>&nbsp;fixes another issue where the converter was locked up after some time. &nbsp;So I think i'm going to try to stop calling ibdev whenever I want to get a handle so that I can wait on a response. &nbsp;I'll also look into updating the drivers to 2.5 and the firmware to C9. And if it happens again I now know that I can pull an error code from the lights on the converter to further help diagnose the problem (this i'm very curious to see, because when the problem happened I always remember a solid red light, nothing flashing).&nbsp;Do you think I'm on the right track? I have limited time with the equipment, and it's not&nbsp;available&nbsp;right now, so I'm just trying to gather as much ammunition as I can to make my time as efficient as possible.&nbsp;In the meantime, I am also a little curious about whether I should be using ibdev and ib/ilwrite or just Send instead. Right now I'm mainly using Send by itself. Should I be calling ibdev before I call Send? Or does ibdev just create a handle for the other calls?
Loading...