The hottest automatic bar code data acquisition sy

2022-08-05
  • Detail

Automatic barcode data acquisition system based on LabVIEW (Part 2)

3 2 setting of working mode of barcode scanner

there are two methods for setting the working mode of barcode scanner: one is programming mode, which sends command control word through serial port to set the working side of barcode scanner to enter the rotating shaft bearing type due to the powder discharged from the crusher room; The other is to use the barcode scanner to scan the barcode with specific meaning to set its working mode. The system uses the second method to set the working mode of the barcode scanner. Use the barcode scanner to scan the barcode shown in Figure 3. We set its working mode as the default mode. The default setting is: baud rate: 9600bps; Data bit: 7 bits; Stop bit: 2 bits; Check bit: even; Trigger mode: level trigger

3. 3 serial port control of barcode scanner

the system uses LabVIEW graphic programming to control the barcode scanner and read barcode data through the serial port. The front panel of the barcode scanner controlled by LabVIEW is shown in Figure 4a, and the control flow chart is shown in Figure 4B. Each variable in the front panel and the flow chart is one-to-one corresponding. After setting each parameter, press the run button, The data of the barcode scanner can be read. In the flowchart of figure 4b, serial port read VI icon reads data from the serial port, puts it in the buffer, and sends the data to the display control for display. The running results are shown in Figure 4a. If an error occurs during operation, for example, the data reading time exceeds the default data waiting time of the serial port, the system will pop up a dialog box to tell the user the error code and let the user choose whether to stop or continue the operation, as shown in Figure 5

3. 4 database access and remote control of the system

labsql uses Microsoft ADO and SQL language to complete database access, and encapsulates complex underlying ADO and SQL operations into a series of labsql vis, which is simple and easy to use. The system uses labsql to access the local database, and realizes the two-way transmission between barcode data and central database in LabVIEW, which meets the requirements of system design

labview has powerful network communication function, which makes it easy for users of lab view to write LabVIEW application software with powerful network communication function to realize remote control. In addition, LabVIEW also has remote panel access technology. Users can directly control the VI front panel located on the remote server on the Internet. However, labsql does not develop the function of remote database access. After studying the function of remote database access of Microsoft ADO control, the remote database access is successfully realized by using labsql. This system uses the powerful network function of LabVIEW to realize the remote control and the access or control function of each connected terminal, and realizes the remote control of VI through the page browser

4 conclusion

the automatic bar code data acquisition system based on virtual instrument technology has adapted to the needs of detection automation after a long-term development. It gives full play to the advantages of modern computer technology and software and hardware resources, realizes the automation, multifunction and high flexibility of the detection system, solves the problems of high labor intensity, low efficiency and affecting product quality, and realizes the seamless connection between production data and management business, Reducing the workload of management personnel through scientific development, improving the production efficiency of the enterprise and enhancing the competitiveness of the enterprise

Author: Li Hui

(Tianjin Engineering Normal University)

source: Packaging Engineering, 2005, issue 3

Copyright © 2011 JIN SHI