CN105867940A - Method for reading wagon balance weighing displayer based on java - Google Patents

Method for reading wagon balance weighing displayer based on java Download PDF

Info

Publication number
CN105867940A
CN105867940A CN201610241992.6A CN201610241992A CN105867940A CN 105867940 A CN105867940 A CN 105867940A CN 201610241992 A CN201610241992 A CN 201610241992A CN 105867940 A CN105867940 A CN 105867940A
Authority
CN
China
Prior art keywords
reading
java
information
weight bridge
bridge weighing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610241992.6A
Other languages
Chinese (zh)
Inventor
赵在星
韩鹏
张强
付天顺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur General Software Co Ltd
Original Assignee
Inspur General Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur General Software Co Ltd filed Critical Inspur General Software Co Ltd
Priority to CN201610241992.6A priority Critical patent/CN105867940A/en
Publication of CN105867940A publication Critical patent/CN105867940A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1407General aspects irrespective of display type, e.g. determination of decimal point position, display with fixed or driving decimal point, suppression of non-significant zeros
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method for reading a wagon balance weighing displayer based on java. According to the method, a wagon balance and a wagon balance weighing displayer are included, and the wagon balance weighing displayer is connected with a computer serial port and a universal serial bus (USB) port. Based on the hardware structure, the reading method comprises the steps of obtaining, through a Java program, a read wagon balance value transmitted by the wagon balance weighing displayer through the computer serial port, and writing the read value into a webpage or an application program. Compared with the prior art, according to the method for reading the wagon balance weighing displayer based on java, the read value of the wagon balance weighing displayer can be directly read into software developed by other Java languages, the method is greatly simplified based on an original manual entering process, and the probability of errors is lowered. The weighing process monitoring is performed, weighing workers cannot tamper the read value of the wagon balance, and the method is high in practicality and easy to popularize.

Description

A kind of weight bridge weighing display reading way based on java
Technical field
The present invention relates to field of computer technology, a kind of weight bridge weighing display reading way based on java.
Background technology
Generally weighbridge weight display read routine is to use C language, C Plus Plus, VB language development, because the language such as C, C++, VB can directly access the hardware interface of computer, exploitation is convenient, so weight bridge weighing display producer uses above-mentioned development language to write weight bridge weighing display read routine mostly, it is a set of independent program and outside access interface is not provided.It means that other programs cannot read its weighbridge reading, and then it is used, it is impossible to be integrated in the project using Java language exploitation.Weight bridge weighing display reading can only be write down by user by hand, in manual typing to other system (such as purchase and sale software), process is loaded down with trivial details, and it is likely to occur mistake, for needing the operating process of strict supervision, then cannot realize automation supervision, operator may be by input system after reading amendment.
Java is currently used widest enterprise application development language, program for Java language exploitation, owing to operating in Java Virtual Machine, and there is isolation between operating system, cannot directly access computer hardware interface, causing obtaining weight bridge weighing display reading the most difficult, need reading of being weighed by weighbridge display badly and be integrated in enterprise's application of Java exploitation, the most domestic do not have producer to provide the weight bridge weighing display reading plotter using Java language exploitation.Based on this, now provide a kind of weight bridge weighing display reading way based on java, after using this invention, reading can write direct other Java languages exploitation software, reduce human intervention, it is achieved process strictly controls, and simplify operation, be substantially reduced the possibility made mistakes.
Summary of the invention
The technical assignment of the present invention is for above weak point, it is provided that a kind of weight bridge weighing display reading way based on java.
A kind of weight bridge weighing display reading way based on java, including weighbridge, connect weighbridge weight bridge weighing display, and weight bridge weighing display is connected with serial ports or the USB interface of computer, based on this hardware configuration, the process that realizes of number reading method is: obtains, by java applet, the weighbridge reading that weight bridge weighing display is transmitted by serial ports of computers, and is written in webpage or application program by this reading.
In the hardware configuration of the method, access the win32 serial ports access interface win32com.dll of Windows operating system by calling Java local interface, connect serial ports, read Serial Port Information.
When first time reading, java program is attempted each baud rate in advance and is attached, and recorded in text by the information read under these baud rates, and the information of file record here includes: baud rate, even-odd check, data bit, stopping position;
User is according to the content of file record, actual weighing data and the comparison of actual port service condition, it is thus achieved that remaining configuration parameter: valid data start bit, valid data stop bit, weighbridge readout units, coefficient of conversion, decimal place, positive and negative reading, output format;
After having configured parameter information, data are resolved by the Serial Port Information of reading, and the data read the most at last are shown in the interface of java applet.
Java program reads the process of configuration information:
First read weighbridge configuration parameter, this configuration parameter includes: port type, port numbers, baud rate, even-odd check, data bit, stopping position, weighbridge readout units, return the unit of display, output format, beginning flag, termination flag, valid data start bit, valid data stop bit, positive and negative reading, coefficient of conversion, decimal place, the length of one's sleep;
Go to connect weight bridge weighing display according to port numbers, baud rate, even-odd check, data bit, stopping position information, and obtain the information that port transmits;
According to data bit, stopping position, the return unit of display, output format, beginning flag, termination flag, positive and negative reading, the reading of weight bridge weighing display is extracted from the information that port is passed back to;
According to coefficient of conversion, the unit of display, decimal place these three information, demonstrate that user needs the unit of weight of display, unit of weight here include ton, kilogram.
Described output format includes ASCII fromat, BCD form, uncompressed BCD form.
The described length of one's sleep is the interval time every time reading the data that serial ports is passed back, and this time is self defined time.
After java program reads configuration information success, begin through Java local interface according to configuration information and call Windows serial port drive, read serial port communication data;After reading serial port communication data, according to configuration information, useful information in the information that will read, i.e. weight bridge weighing display reading extract, and are converted into, according to the requirement of configuration information, unit of weighing accordingly, return in webpage or application program.
Compared to the prior art a kind of based on java weight bridge weighing display reading way of the present invention, has the advantages that
A kind of based on java weight bridge weighing display reading way of the present invention, weight bridge weighing display reading directly can be read in the software of other Java languages exploitation, enormously simplify the flow process of original manual typing, reduce the possibility made mistakes, realizing weight testing process supervision, weighbridge reading cannot be distorted by the personnel of checking the weight simultaneously;Weight bridge weighing display reading is read in the program using Java exploitation, and can be integrated in the application of other Java exploitation, thus solve the problem that current weight bridge weighing display reading cannot be integrated in the enterprise-level application of Java exploitation, this invention can read the most all use serial ports and the weight bridge weighing display reading of USB interface at present, practical, applied widely, it is easy to promote.
Accompanying drawing explanation
What accompanying drawing 1 was the present invention realizes schematic diagram.
Detailed description of the invention
The invention will be further described with specific embodiment below in conjunction with the accompanying drawings.
As shown in Figure 1, a kind of based on java weight bridge weighing display reading way of the present invention, it solves the technical problem that in the program being to be read by weight bridge weighing display reading and use Java exploitation, and can be integrated in the application of other Java exploitation, thus solving the problem that current weight bridge weighing display reading cannot be integrated in the enterprise-level application of Java exploitation, this invention can read the most all use serial ports and the weight bridge weighing display reading of USB interface at present.
Including weighbridge, connect weighbridge weight bridge weighing display, and weight bridge weighing display is connected with serial ports or the USB interface of computer, based on this hardware configuration, the process that realizes of number reading method is: obtains, by java applet, the weighbridge reading that weight bridge weighing display is transmitted by serial ports of computers, and is written in webpage or application program by this reading.
In the hardware configuration of the method, access the win32 serial ports access interface win32com.dll of Windows operating system by calling Java local interface, connect serial ports, read Serial Port Information.
Owing to its information output parameter of different weight bridge weighing displays is different, this java program, when using for the first time, can be attempted each baud rate in advance and be attached, and the information read under this baud rate be recorded in text.
The information of this document record has: baud rate, even-odd check, data bit, stopping position.User is according to the content of file record, and actual weighing data and the comparison of actual port service condition, it is possible to obtain remaining configuration parameter: valid data start bit, valid data stop bit, weighbridge readout units, coefficient of conversion, decimal place, positive and negative reading, output format.
After having configured parameter information, data are resolved by the Serial Port Information that this program reads, the data read the most at last are shown in the interface of java applet, these data can be accessed by other java applets, obtain, directly these data can also be preserved the position specified to program interface, there is high compatibility.
As shown in Figure 1, when the realization of the present invention runs, first java program reads weighbridge configuration information, including: port type, port numbers, baud rate, even-odd check, data bit, stopping position, weighbridge readout units, returns the unit of display, output format, beginning flag, termination flag, valid data start bit, valid data stop bit, positive and negative reading, coefficient of conversion, decimal place, the length of one's sleep.Then go to connect weight bridge weighing display according to port numbers, baud rate, even-odd check, data bit, stopping position information, and obtain the information that port transmits, then propose out by the reading of weight bridge weighing display from the information that port is passed back to according to data bit, stopping position, the return unit of display, output format, beginning flag, termination flag, positive and negative reading, further according to coefficient of conversion, the unit of display, decimal place these three information, demonstrate that user needs the unit of weight (include ton, kilogram) of display.
Determine the interval time every time reading the data that serial ports is passed back the length of one's sleep, user can be arranged voluntarily, it is usually arranged as 100 milliseconds, the time determination procedure of changing reads the number of serial data amount every time, it is too short that time is set, once reads and the most entirely cause computer CPU resource occupation more, arrange excessive, cause weight bridge weighing display reading to refresh slower.
After java program reads configuration information success, begin through Java local interface according to configuration information and call Windows serial port drive, read serial port communication data.After reading serial port communication data, according to configuration information, in the information that will read, useful information (i.e. weight bridge weighing display reading) extracts, and is converted into unit of weighing accordingly (kilogram, ton) according to the requirement of configuration information, returns in the program of Java exploitation.
By detailed description of the invention above, described those skilled in the art can readily realize the present invention.It is understood that the present invention is not limited to above-mentioned detailed description of the invention.On the basis of disclosed embodiment, described those skilled in the art can be combined different technical characteristics, thus realizes different technical schemes.
In addition to the technical characteristic described in specification, it is the known technology of those skilled in the art.

Claims (7)

1. a weight bridge weighing display reading way based on java, it is characterized in that, including weighbridge, connect weighbridge weight bridge weighing display, and weight bridge weighing display is connected with serial ports or the USB interface of computer, based on this hardware configuration, the process that realizes of number reading method is: obtains, by java applet, the weighbridge reading that weight bridge weighing display is transmitted by serial ports of computers, and is written in webpage or application program by this reading.
A kind of weight bridge weighing display reading way based on java the most according to claim 1, it is characterized in that, in the hardware configuration of the method, the win32 serial ports access interface win32com.dll of Windows operating system is accessed by calling Java local interface, connect serial ports, read Serial Port Information.
A kind of weight bridge weighing display reading way based on java the most according to claim 1, it is characterized in that, when first time reading, java program is attempted each baud rate in advance and is attached, and the information read under these baud rates be recorded in text, the information of file record here includes: baud rate, even-odd check, data bit, stopping position;
User is according to the content of file record, actual weighing data and the comparison of actual port service condition, it is thus achieved that remaining configuration parameter: valid data start bit, valid data stop bit, weighbridge readout units, coefficient of conversion, decimal place, positive and negative reading, output format;
After having configured parameter information, data are resolved by the Serial Port Information of reading, and the data read the most at last are shown in the interface of java applet.
A kind of weight bridge weighing display reading way based on java the most according to claim 3, it is characterised in that java program reads the process of configuration information and is:
First read weighbridge configuration parameter, this configuration parameter includes: port type, port numbers, baud rate, even-odd check, data bit, stopping position, weighbridge readout units, return the unit of display, output format, beginning flag, termination flag, valid data start bit, valid data stop bit, positive and negative reading, coefficient of conversion, decimal place, the length of one's sleep;
Go to connect weight bridge weighing display according to port numbers, baud rate, even-odd check, data bit, stopping position information, and obtain the information that port transmits;
According to data bit, stopping position, the return unit of display, output format, beginning flag, termination flag, positive and negative reading, the reading of weight bridge weighing display is extracted from the information that port is passed back to;
According to coefficient of conversion, the unit of display, decimal place these three information, demonstrate that user needs the unit of weight of display, unit of weight here include ton, kilogram.
A kind of weight bridge weighing display reading way based on java the most according to claim 4, it is characterised in that described output format includes ASCII fromat, BCD form, uncompressed BCD form.
A kind of weight bridge weighing display reading way based on java the most according to claim 4, it is characterised in that the described length of one's sleep is the interval time every time reading the data that serial ports is passed back, and this time is self defined time.
A kind of weight bridge weighing display reading way based on java the most according to claim 5, it is characterized in that, after java program reads configuration information success, begin through Java local interface according to configuration information and call Windows serial port drive, read serial port communication data;After reading serial port communication data, according to configuration information, useful information in the information that will read, i.e. weight bridge weighing display reading extract, and are converted into, according to the requirement of configuration information, unit of weighing accordingly, return in webpage or application program.
CN201610241992.6A 2016-04-19 2016-04-19 Method for reading wagon balance weighing displayer based on java Pending CN105867940A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610241992.6A CN105867940A (en) 2016-04-19 2016-04-19 Method for reading wagon balance weighing displayer based on java

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610241992.6A CN105867940A (en) 2016-04-19 2016-04-19 Method for reading wagon balance weighing displayer based on java

Publications (1)

Publication Number Publication Date
CN105867940A true CN105867940A (en) 2016-08-17

Family

ID=56633331

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610241992.6A Pending CN105867940A (en) 2016-04-19 2016-04-19 Method for reading wagon balance weighing displayer based on java

Country Status (1)

Country Link
CN (1) CN105867940A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108469935A (en) * 2018-03-26 2018-08-31 新疆乾坤信息技术有限公司 A kind of method, apparatus and computer readable storage medium of configuration truck scale
CN111157093A (en) * 2020-01-09 2020-05-15 深圳海带宝网络科技股份有限公司 Automatic reading method and system for cross-border electronic commercial electronic scale

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2343578Y (en) * 1998-06-13 1999-10-13 黄华 Wagon balance weighing camera shooting controller
CN202083449U (en) * 2011-03-10 2011-12-21 重庆文迅科技股份有限公司 Weighbridge weighing camera system
CN102589666A (en) * 2011-12-23 2012-07-18 刘文富 Wagon balance weighing management system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2343578Y (en) * 1998-06-13 1999-10-13 黄华 Wagon balance weighing camera shooting controller
CN202083449U (en) * 2011-03-10 2011-12-21 重庆文迅科技股份有限公司 Weighbridge weighing camera system
CN102589666A (en) * 2011-12-23 2012-07-18 刘文富 Wagon balance weighing management system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
KABINI: "Java串口通信详解", 《HTTPS://BLOG.CSDN.NET/KABINI/ARTICLE/DETAILS/1601324》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108469935A (en) * 2018-03-26 2018-08-31 新疆乾坤信息技术有限公司 A kind of method, apparatus and computer readable storage medium of configuration truck scale
CN111157093A (en) * 2020-01-09 2020-05-15 深圳海带宝网络科技股份有限公司 Automatic reading method and system for cross-border electronic commercial electronic scale

Similar Documents

Publication Publication Date Title
US9734281B2 (en) Plastic packaging materials testing system based on internet of things and cloud technology
CN107632869B (en) Method and equipment for loading user interface of POS application
CN102819404A (en) Interface display method for BIOS (basic input/output system)
CN104376043A (en) Log recording and displaying method and device
US8839251B2 (en) Automating sequential cross-application data transfer operations
CN105867940A (en) Method for reading wagon balance weighing displayer based on java
CN110749367A (en) Electronic scale label printing system
US20060022972A1 (en) Method, system and article of manufacture for testing a software application having a text-based screen with a test tool for a software application having a graphical user interface which uses objects
CN110647523B (en) Data quality analysis method and device, storage medium and electronic equipment
CN108229980B (en) Question feedback method and device and storage medium
CN101192107A (en) Method and apparatus for inputting
CN110209605A (en) The register reading/writing method and calculating equipment of PCIE Cardbus NIC Cardbus
CN102819430A (en) Device and method for realizing serial communication interface under linux environment
CN112027111A (en) Real-time acquisition and display method and system for aircraft bus data
CN109086082A (en) A kind of method, system and medium using SMBIOS expanded BIOS function
CN111199464A (en) Receipt data processing system, receipt data processing method, device, and medium
CN101833887B (en) Digital exploration experiment method based on universal wireless interface technology
CN106803319A (en) A kind of process of exchange control device of the compatible difference weighing sensors of energy
CN203037333U (en) Intelligent tracing electronic scale
CN102567769B (en) USBKEY with certificate selection
CN201749455U (en) Chinese and English computer mainboard failure diagnosis card
CN111638874B (en) Matlab software-based automobile controller coding information writing and reading method
US20230035673A1 (en) Information processing system, information processing apparatus, use method of information processing apparatus, user terminal, and program therefor
CN102647419A (en) Security policy online detection system facing to terminal computers
CN109144624A (en) Method, storage medium, equipment and the system of not contour list are shown in IOS

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160817