ni.com checkout is currently experiencing issues.
Support teams are actively working on the resolution.
ni.com checkout is currently experiencing issues.
Support teams are actively working on the resolution.
04-20-2012 10:05 AM
I have run across a very puzzling issue. I am running an extended test (3 days) on a test station and after 24-36 hours, I keep getting a System.OutOfMemoryException. each time it is raised through the GPIB driver. Here is my setup. I am running VB.NET 2008 on a Windows 7 32-Bit OS. The GPIB driver is the NI-488.2 Version 2.7.3. I am making continuous calls to the GPIB to read from devices and multiplex between devices. I have even run a program in the background that logs system available memory as well as memory usage of all processes. I have not seen any evidence that the system memory has dropped by much. Granted, I have only been logging memory usage every 15 seconds, but I have been trying to avoid creating huge log files trying to find this issue. Could there be an issue with the .NET driver? Or maybe the way that I'm using it? This has been the most intense usage of GPIB that we have used thus far. I have not seen any other posts similar to this issue I've run into. Any help is much appreciated.
Mike
Solved! Go to Solution.
04-23-2012 09:44 AM
Hi msouza,
There is a forum post with a similar issue here: http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/While-running-a-net-3-5-application-it-always.... It looks like the problem that this user was having resulted from creating new devices multiple times throughout the program, which caused the exceptions after running for an extended period of time. It seems like he was able to fix this to only create a new device once for each GPIB device in his setup and the problem went away. I would suggested reading the suggested practices from this post and ensuring that your code is following them.
04-23-2012 09:50 AM
Thank you so much for that feedback. I was investigating this same thing and noticed that one of engineers set it up to always create a new device every time the GPIB sent a message onto the bus. I have already updated the code to create the device once and reference that object instead of creating a new one each time. Glad to hear there is a simple solution to this issue.
Mike
09-26-2012 01:20 AM
Dear Mike
even I am trying to write a GPIB control program using VB.NET. Can you please guide me on how to start. Although I have written many applications in NIDAQmx usage of GPIB and NI-VISA is new for me. Please help
09-26-2012 09:49 AM
The simplest example I can find using the NI4882 DLL would be the following example:
http://zone.ni.com/devzone/cda/epd/p/id/526
They create a device object and perform reads and writes to the device. A device would be an object on the GPIB bus, such as a power supply. Once the device is instantiated, you can read and write to the device on the bus to get what you need. You will need to read the GPIB interface user manual for your device to figure out what commands to send to the device to get you the information you are looking for. Hope this helps
Mike
09-26-2012 07:42 PM
Hi Mike
Thanks for the reply. I have one more querry.
Suppose If I do not have the GPIB interface manual of the device with me, is it possible to debug the commands to be sent using NI I/O trace. Actually my device already has a control application written by the manufacturer using LABview (Manufacturer has made it a closed source software). I have querried the manufacturer for the command instruction set for the device, but there may be a possibility the manufacturer wont divulge the information. So please let me know is there any way out of this situation
Thanks
Sarath
09-27-2012 01:17 PM
Sarath,
I don't know if the trace will give you the information you want, but give it a try. If not, you can always purchase a GPIB Analyzer card which can be used on a secondary machine and can "listen" on the bus and report back on the traffic. I started to go down this path as I had an issue and wasn't sure how to debug which command was hanging up the system. The trace did not help. I was able to determine the problem before the Analyzer came in so I didn't have to use it to check. I believe that is what those are designed for though.
Mike
09-27-2012 04:04 PM
09-28-2012 02:03 AM
Dear Mike and Stevens
Thank you very much for your prompt replies.
I have one more querry
10-01-2012 08:47 AM
Hi Sarath,
I believe I found a similar example/discussion forum to what you're attempting to do. This example is GPIB communication between two computers. Take a look and see if this helps any.