| Along with USB technique development, more and more measuring instruments and meter have adopted the USB interface. But the access and control software of the USB equipment were only used in application level, and the consumer can't do the second development. Many development platforms still lack the universal communication procedure module to the USB equipment similar to access serial equipments of RS-232 or the parallel GPIB equipment and the Ethernet network equipment.In order to conveniently manage and control USB devices, reduce difficulty, abate workload, shorten to develop cycle and raise universal in the development process of the USB equipment client application software, it is necessary to develop an USB universal communication procedure module that can be provided as the call of consumer procedure.In the VC++ development envioronment in the Windows operating system, the DLL of USB universal communication modules were developed, taking the USB webcam as the experimental object, according to the USB specification, using the method of the principle of Windows operating system I/O equipment drive and the dynamic link storehouse technology, calling Win32 API function. Then in the LabVIEW development platform of the virtual instrument, according to the principle which LabVIEW links with outer code and calling the DLL, the USB universal communication procedure module group were developed with the operating functions: equipment search, open and close, read and writ. And then in the same way, the universal communication procedure module group of the USB camera were developed in LabVIEW with the function of equipment search, open and close, read and writ, image display, video frame and image parameter demonstration and set up.Using the combined method of the dynamic link library technology and the principle which LabVIEW links with outer code, the task of accessing the bottom hardware can be realized which can't be easy or unable to realized now, so that the capability of the virtual instrument is expanded. Speaking from the theories, any exterior equipment with the interface of USB and other can be controlled by the method. It was an attempt of the USB technology application in LabVIEW, and has higher reference value to the development of accessing other virtual instrument of the USB measure device. |