03-15-2012 12:47 PM
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
03-16-2012 06:56 PM
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,
03-17-2012 04:02 PM
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
03-19-2012 03:57 PM
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,
03-19-2012 04:13 PM
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.
03-25-2012 01:59 AM
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!