I have a little problem with controlling my Agilent E3631A power supply via Labview:
I downlaoded all the drivers and with the help of you guys I even persuaded it to run properly.
At least that's what I thought.
Turns out It does not really. At some point the VI just stops.
Using highlight execution mode I figured out where the problem was:
The VISA read in the error Query of the Configure Output stopped working.
I have no explanation for this. I happens unforseeable and I have not yet managed to influence it by changing various settings.
(And I have tried it for quite a while now..)
I have built a very simple example VI to show you where the problem lies.
I am basically feeding the output a varying voltage and at the same time measuring how long the vi has been running already..
Thank you all very much in advance,
Solved! Go to Solution.
Let me shake the magic 8-ball ~~~~~~~~
That serial COM port is actually a USB Virtual COM port and you have not changed the default power management options on the USB Hub.
(You wouldn't be the first to miss that setting)
interesting idea, and I would really be happy if that were the problem.
You are right, it IS a virtual USB Com Port, but it appears with the COM ports and not with the USB ports.
And I can't find the power management anywhere..
It will appear in both the comm port and the USB sections in the device manager. You need to change the power settings on teh USB entry.
I somehow can't find it..
None of these says something like "plugable usb-rs232 converter"
I just changed all the power settings I could find...
It will most likely appear as a generic USB host. Look at your device manager with the USB to serial converter plugged in and then look at it after you plug it in. You should see a new entry.
Hello to everyone,
I changed the settings of all the usb entries but the problem still occurs.
And I can't find any pattern in the time it takes till the error occurs..
The first time I ran it today it ran well till it stopped about half an hour later.
The Second time it stopped after about four minutes..
I would be most grateful for any further ideas what the problem could be..
Ok it looks like time to copy this FAQ entry: (posted in a not yet public location~~~ Hey Jordan? is FAQ's still on track?)
In this topic we will discuss some of the common problems that have been observed using USB devices with LabVIEW on Windows operating systems. Many of these points are also applicable to other environments but the examples will be use the Windows 7 OS.
FAQ 1 : My USB device stops working unexpectedly.
The first thing to look at is the OS power saving options. There is a global trend towards developing "Green" electronics and energy star ratings are getting fairly common. "If its not being used shut it off" is nothing new. Cavemen learned how to bank a fire to preserve energy that would otherwise be wasted. Likewise, the Windows OS has a power saving feature to shut down power to the USB hubs when no user activity is present. In Automated systems this feature can cause problems since removing USB hub power will shut down the USB device. Solution: Use the device manager to change the USB hub Power Options.
FAQ2: I set the power options and my device connection is still unreliable: Remember, those computer USB ports are often the cheapest that can be mounted on the chassis and share the PC system power supply to supply USB Power. Most uses of USB are temporary connections like a thumb drive or a camera. These connections do not require high reliability since the user is right there interacting with it. Power surges and fault tolerance at worst cause the operator to retry the data transfer. Automated systems require a bit more robustness. Solutions:
1) ALWAYS use an external self powered hub. Perform your engineering due diligence and inspect the devices specifications too- If you can't find them for that device that should clue you to seek an product from a vendor that WILL publish their specs.
2) High noise environments require the use of ferrites on the USB cable- and don't buy the cheapest cable either! The cheap ones are poorly shielded.
3) PROTECT the HUB connections- If you have a USB2.0 device and Joe User plugs in a 1.0 device in a open slot managed by the same hub- Bingo every port on the hub may back convert to USB1.0. WORSE there are a lot of damaged or marginally engineered USB devices out there. Joe User's device may cause power fluctuations when it is inserted or removed from the hub just don't let it happen!
FAQ3: I am testing USB devices and the OS can't find them anymore.
This is a Plug-n-Play feature that deserves some exposure. When you connect a P-n-P device the OS remembers its serial number in a HKEY (Hive-Key) registry entry. This is helpful when (for example) you want a specific instrument, Say an NI-USB-6008, to show up as a DAQmx Device with VISA Alias "MyDAQ1" every time it is plugged it. On the other hand, If you want to test a line of USB-Serial converters this can be problematic since the P-n-P driver will mount the first serial number as "COM3" and the next as "COM4" add infinitum until the enumerator controller in the registry and VISA recognized aliases get used up. Solution: Use the Windows registry API and the Hardware Configuration API in LabVIEW to clear unused VISA Aliases and HKEY entries. Speak with your staff IT professional about HKEY structure and possible side effects before developing a plan to edit registry entries.
unfortunately I do not have a self powered USB Hub to test whether it would work then.
However, given your enourmos expertise and happily watching the system run with the normal RS232 port, I assume that your assumption is correct.
Thanks a lot, never would I have guessed that this was indeed a hardware problem.
I really thought USB ports were more reliable... *grump