06-25-2013 09:00 PM
I have developed a code in LabVIEW 2011 to communicate with XY linear stage. It's actually two stages mounted perpendicularly. The setup of the system is that a joystick (made by the same manufacturer as the stage) is connected to the USB port of the computer though a USB to Serial converter. One stage is daisy chanied to the joystick and the other stage is daisy chained to the first stage.
For the purpose of our application, it's required to continuously check the status and position of the X and Y stages. Because the joystick also returns responses when a request sent to all devices, I need to send the requests individually; i.e.. one request per command per device making it total of 4 commands. This takes care of the error received from the joystick. The issue, though, is that after a while either the program freezes or the computer crashes and restarts. It happens about 13 minutes (in average) after the program starts. It also happens even when no move commands are sent to the devices. I have put to 50 ms delays before sending each two commands (position and status) per device. Basically, the app waits for 50 ms before sending two commands to X stage and receiving the response and when all is done with X stage, it waits for another 50 ms to do the same for Y stage. This procedure should goes on until the app is stopped. But as I said, a problem occurs. Now, I am assuming the problem is that the serial port buffer overflows. It's not preferred to increase the delay time, but if it helps resolve the issue, then I have no other option!
I would appreciate any thoughts and comments!
Solved! Go to Solution.
06-26-2013 02:51 AM
AFAIK a buffer overflow should only generate an error at the device level (e.g. OVERRUN). When the computer crashes usually the culprit is the device driver, not the application. I suggest to try with another USB-serial adapter.
Most adapters feature either a FTDI chip or a Prolific chip. Personally I had more problems with Prolific than FTDI. However the performance could also depend not only on the chip but on the specific driver implementation.
06-26-2013 08:14 AM
Thanks for the reply! Just to give you some more info, I am using Windows 8 Home Edition OS and a Prolific USB-to-Serial converter. The driver for the converter updated and I have a feeling it's when the issue started. I'm not sure if rolling back the driver might help.
06-26-2013 10:01 AM
Are you using more than one Prolific USB to serial converter?
I have found recently that multiple Prolific USB to serial converters on the same buss or hub will eventually fail. Even if your computer has four USB ports they could all be on one USN hub internally.
This problem has cropped up with in the last year or so. I read Prolific changed their drivers to detect some counterfit Prolific chips and that might have introduced this bug.
What I have had to do is plug one adaptor in to the front USB ports and one into the rear USB ports. But of course there is nothing that says that will always work, it just happend that the fron and rear ports are on different USB busses in teh computers we use.
06-26-2013 10:12 AM
The USB to Serial adapter I have has two serial port ends, so I get two serial ports from one USB port. However, I only need one and the other serial port is always free. The one I am using is manufactured by Manhattan.
06-26-2013 10:34 AM
http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=155&pcid=41
It is confirmed that counterfeit (fake) PL-2303 USB to Serial Controller ICs using Prolific's trademark logo and device drivers were being sold in the China market. Counterfeit IC products show exactly the same outside chip markings but generally are of poor quality and causes driver compatibility issues. We issue this warning to all our customers and consumers to avoid confusion and false purchase. Only buy from Prolific authorized distributors.
06-26-2013 10:42 AM
I bought this adapter from Unicorn Electronics in New York state. Unfortunately, I don't have the package anymore to confirm if it's made in China. Any thoughts if switching to a FTDI chip adapter would resolve the issue?
06-26-2013 10:57 AM
Several years back I had a problem with a prolific converter and windows vista. 10-20minutes would cause a BSOD and the crash log traced it wown to the driver dll. I replaced the converter and all went away.
No problems with labview or VISA. you should try a diferent converter some are more flakey than others
08-17-2013 07:47 PM
After long time experimenting, I am convinced that the issue was with Profilic adapter.
08-18-2013 01:16 PM
I had a similar porblem with prolific serial adapters, while running on Window7 machine with LV2011. When the same application is run on Windows XP, no problems occured.
I started using FDTI chipsets based serial adapters from then. I never saw issue with serial port on Win7 / win 8 or XP.