Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB-USB-HS randomly disconnects

I am running Fedora 14 (Linux 2.6.35.6-45.fc14.i686) and am currently using the open source linux-gpib drivers for my GPIB-USB-HS. The NI drivers failed to associate with the converter. The linux-gpib drivers seem to be running fine. 

 

I am controlling one piece of equipment: an HP 6632A DC power supply. It's going to be installed in an electroplating application, and I have written a C++ program to control nearly every aspect of the supply remotely. The main goal is to be able to monitor the supply remotely and change the current levels automatically at regular intervals. The program compiles and runs great.

 

However, I noticed yesterday and the day before, the computer randomly lost connection with the converter. I ran gpib_config as su and it came back online. However, we absolutely can't have a flaky connection when electroplating, as we'd be wasting silicon wafers that take days to produce. 

 

The code fails to initialize the power supply, which is done right here:

void setup()
{

   unsigned short addlist[2] = {ADDRESS, NOADDR}; //set list of instruments to enable
   SendIFC(GPIB_ADAPTER); //reset GPIB-USB interface
   EnableRemote(GPIB_ADAPTER, addlist); //enable the power supply
   if (ibsta & ERR) //if error, exit
   {
      cout << "Unable to enable power supply!" << endl;
      exit(1);
   }
}

 

I made no hardware changes before the connection was lost. No USB devices were unplugged or plugged in. 

 

Any help would be greatly appreciated.

 

Thanks, and 73!

 

Kyle

0 Kudos
Message 1 of 6
(3,644 Views)

Hi Kyle,

 

Since the power to the device is through the USB connection, any loss of power through the USB would cause this.  Other than checking the obvious thigns like loose wires, etc., make sure that the power options for your computer do not cause it to sleep or anything like that.  As well, how often is this happening now?  I would be curious to know if this all of a sudden has become a constant problem.

 

Best of luck,

Ryan C.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 6
(3,610 Views)

Thanks for the reply, Ryan. I can confirm that there are no loose wires, but I haven't fully verified the power options yet. Power management of USB devices in Linux seems a little wonky to me currently. 

 

I've only had it happen twice, maybe three times, though I haven't had the supply on long enough. Once I get it in a permanent fixture, I'll be able to do some long term testing. 

 

Kyle

0 Kudos
Message 3 of 6
(3,600 Views)

Ok Kyle, sounds good.  At this point, if we had some sort of error that you can track down that causes it, that could be helpful.  Post here if you come up with any further symptoms.

 

Best,

Ryan C.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 6
(3,571 Views)

Beyond the power managment for the machine.  Since the device is hub powered make sure you use an external self powered HUB from a reliable manufacturer.  Those ports on the machine are often spec'ed on price rather than reliability.


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 6
(3,568 Views)

I've had the controller running for a couple of days now on another computer, and I've yet to have any problems. It's running with Ubuntu 11.10, just as before, so maybe this is a hardware issue with my laptop. I've been running my program for 10 hours at a time and haven't had any glitches. I guess only time will tell if the problem is solved, but it looks like it might be!

0 Kudos
Message 6 of 6
(3,533 Views)