MVP 2023 Joe Tauser Posted February 3, 2012 MVP 2023 Report Posted February 3, 2012 We are finishing up a VB6 program upgrade where we are adding a V130 using Modbus. The program was created to talk to an HP datalogger, and that instrument is still in place. It uses COM 1 on the computer. I bought a Modbus ActiveX to talk to the V130. The customer has a mix of Dell desktops and Inspiron laptops (with serial ports) so the second COM port for the V130 has to be run through a USB->Serial converter. We are using the official Unitronics Sunix -CS35 converter based on the Prolific PL2303 chipset. We have a routine that determines all the available COM ports and are able to select whatever port the USB converter assigns itself to. Now on to the problem.... During testing we found communications to the V130 to be unstable. The VB program first queries the V130 and then the HP. Communications to the V130 will work for a while and then lock up. We have to unplug the converter and then restart the program to get them back. We originally thought it was the ActiveX control, but then we swapped the V130 to COM1 on the motherboard and the HP to the USB converter and then the HP started hanging. All signs point to the driver for the converter. We are polling the devices every 5 seconds, so it's not like we're banging the ports too hard. I have installed the latest driver (1.5) from Prolific's website to no avail. I welcome any questions or suggestions to make our VB code more robust. I'm also curious if anyone has any experience with devices based on FTDI's chipset. Joe T.
Saragani Posted February 3, 2012 Report Posted February 3, 2012 Prolific are known for their bad drivers. (I'm not sure who is worse, them or nVidia...) The driver seem to behave differently when working with VB6 and when working with .Net I remember that in some older versions the .Net would expose a serious bug they had with the FIFO (while in VB6 it worked correctly), and on a newer version the .Net driver worked fine, but with VB6 the program would hang since the Send command will sometimes caused an infinite loop (the CPU usage would go high and the program will not proceed after the Send). You might wanna try an older version of the driver. A topic from the old forum: http://www.unitronics.com/forum/topic.asp?TOPIC_ID=3097&SearchTerms=prolific Please give it a try and tell us if it works better.
Gabriel Franco Posted February 4, 2012 Report Posted February 4, 2012 I had similarissue in the past, not only communicating with Unitronics devices but othercontrollers as well using so many different usb-to-serial converters. Finally I got a good driver which works very stable for me, using Win 7 andWin98. It is version 1.1.0, for PL2303
MVP 2023 Joe Tauser Posted February 5, 2012 Author MVP 2023 Report Posted February 5, 2012 What a pain in the butt.... I downloaded the Prolific v1.1 from the link on the forum (there's no mention of it on Prolific's website). Then I uninstalled the old driver and ran the new exe. When I plugged in the converter, it asked for ser2pl.sys. I had to dig quite a bit to find it - apparently Prolific's install program didn't put it in the C:\windows\system32\drivers directory. For those of you keeping score on versions of ser2pl.sys -the research I did on the Internet revealed that this is a common problem. When I finally did locate the file the version that comes with v1.1 of the Prolific install is 2.0.13.130. The version installed by v1.5 (the current package) is 2.1.27.183. I also contacted the vendor of the ActiveX control and they're no stranger to problems with USB->Serial converters. He recommended the following on the COM port properties configuration in Windows: 1. Disable the port's RX and TX FIFO. 2. Use settings in the control to assert the RTS line and negate the DTR line. Set the transmission delay to 0ms. Apparently there's a problem in the timing of these lines in regard to the actual data flow - they don't "line up". It seems to be working now, but I won't really know until field testing. Considering how many people use the converters, we may want to do some further research and put the results in a paper on the main website under the Technical Library page. If anybody wants it, I've put the older ser2pl.sys file here: ser2pl.zip v2.0.13.130 Joe T.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now