Controlling hardware connected to USB port from VB5

D

Thread Starter

Denis M. Lawlor

Hi Everyone,
Has anyone accessed USB ports from VB5. I support a major realtime program which controls the existing equipment. Currently the equipment is connected to PC via serial ports.

My customer is developing new hardware and has decided to connect it via USB port.

So a few questions if I may

1) has anyone controlled non PC hardware connected by USB port from VB5 program ? Data will flow in both directions, in case this makes a difference.

2) should I move system to VB6 or even VB net ?

3)has anyone moved applications from VB5 to VB6 and can give me any feel for the complexity, or possibly the major differences

4) does it matter which USB chip is used in the equipment ?

Thanks for any help

Denis
 
Hi,

I have seen that many vendors use USB <-> RS232 converter chips inside for adding USB capability to their devices.

They distribute the converter chips device driver as their own devices driver, running the setup software adds a new com port to the system, and many USB <-> RS232 converters support 115200 baud or more.

I think that this the most convenient solution for you, because you don't need to have any modifications on your software.

The only possible problem you may encounter is the com port numberings if you are using MsComm (MsComm32.ocx) control for serial port communications.

MsComm supports to max. 'COM16', if USB <-> Rs232 converter adds itself with a greater com port number, your application may not work. For COM16 and more, you can try the Sax Comm components, which supports up to COM65536. Sax Com is the company that originally developed MsComm32.ocx for Visual Studio. However you may not need to do this because most of the USB <-> RS232 converters are added to system as COM5 or COM6

I worked with several USB<->RS232 converters as an end user, the best performance was with FTDI chips. They behave just like a real serial port, some others have speed or hardware handshake problems.

Digitus uses FTDI chips in their USB 2.0 converters:

http://www.digitus.info/en/products/accessories/?c=1216&p=3530

Upgrading from VB5.0 to VB6.0 is not difficult because there are no major differences between 5.0 and 6.0, but you don't need to do it if you use USB <-> RS232 converter chip.

However, upgrading to VB6.0 (or VB5.0) to VB.Net is difficult especially on data logging and automation software. VB.Net does not support control arrays, and many automation software developed in VB6.0 uses control arrays (e.g Label arrays).

moosty
http://indanotes.blogspot.com
 
E

Eric Ratliff

The USB transceiver chip vendors often provide drivers to create a virtual com port in Windows. This way your application can still use a com port as before. Now it may have a number like 5 instead of 1 or 2.

Eric
www.icpdas-usa.com
 
K
Normaly the USB device that is being connected to the PC will come with a driver. This is what you will interface to using VB. It's possible that the device will appear as a com port, i.e. com4. In this case, the existing software will work providing you select the new com port.

kevin
 
Top