CN108332833B - Film roll weight reading and transmission system - Google Patents

Film roll weight reading and transmission system Download PDF

Info

Publication number
CN108332833B
CN108332833B CN201810120252.6A CN201810120252A CN108332833B CN 108332833 B CN108332833 B CN 108332833B CN 201810120252 A CN201810120252 A CN 201810120252A CN 108332833 B CN108332833 B CN 108332833B
Authority
CN
China
Prior art keywords
data
weight
port
character
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.)
Active
Application number
CN201810120252.6A
Other languages
Chinese (zh)
Other versions
CN108332833A (en
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.)
Qian Liwen
Original Assignee
Qian Liwen
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 Qian Liwen filed Critical Qian Liwen
Priority to CN201810120252.6A priority Critical patent/CN108332833B/en
Publication of CN108332833A publication Critical patent/CN108332833A/en
Application granted granted Critical
Publication of CN108332833B publication Critical patent/CN108332833B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01GWEIGHING
    • G01G19/00Weighing apparatus or methods adapted for special purposes not provided for in the preceding groups
    • G01G19/40Weighing apparatus or methods adapted for special purposes not provided for in the preceding groups with provisions for indicating, recording, or computing price or other quantities dependent on the weight
    • G01G19/413Weighing apparatus or methods adapted for special purposes not provided for in the preceding groups with provisions for indicating, recording, or computing price or other quantities dependent on the weight using electromechanical or electronic computing means

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Cash Registers Or Receiving Machines (AREA)

Abstract

The invention relates to a film roll weight reading and transmission system, which comprises the following components: the electronic platform scale (1) is used for simulating objects with different weights on the electronic platform scale to generate corresponding electric signals, and the output end of the electronic platform scale (1) is connected with the input end of the weighing instrument (2) through a signal cable; the system comprises a weighing instrument (2), an asynchronous transmission standard interface of the weighing instrument (2) and an asynchronous transmission standard interface of an industrial personal computer (3) are in two-way communication through an RS-232 cable, and the industrial personal computer (3) obtains unresolved weighing data; DLL (4) for analyzing weighing data output by the industrial PC. The weighing data of the invention has no interference of human factors, the data is accurate, the labor force is saved, and the production cost is reduced.

Description

Film roll weight reading and transmission system
Technical Field
The invention belongs to film roll weighing in the process of the field of electrician packaging, and particularly relates to a film roll weight reading and transmitting system.
Background
Before packaging, the cut electrical film roll needs to be weighed, the weight data of the electrical film roll is read from a weighing instrument manually, then the weight data of the electrical film roll is input into a weight column of a warehouse logistics information system on a computer manually, then a factory label generated by the warehouse logistics information system is printed out, the printed factory label is attached to the corresponding packaging box, and meanwhile, the warehouse logistics information system backs up corresponding information. The manual weight reading, weight inputting and label printing have the defects of easy generation of reading errors and data input errors due to human factors and low working efficiency.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a film roll weight reading and transmitting system which has no human factor interference, accurate and quick weighing data, labor force saving and production cost reduction, and the film roll weight reading and transmitting system comprises the following hardware components:
the electronic platform scale is used for simulating objects with different weights on the electronic platform scale to generate corresponding electric signals, and the output end of the electronic platform scale is connected with the input end of the weighing instrument through a signal cable;
the asynchronous transmission standard interface of the weighing instrument is in bidirectional communication with the asynchronous transmission standard interface of the industrial PC through an RS-232 cable;
the industrial personal computer is used for printing delivery labels and is connected with the warehouse logistics information system through a local area network;
the system also comprises an application software part: dll;
DLL, used for analyzing weighing data output by the industrial PC. According to the warehouse logistics information system software, Microsoft WINDOWS is used as an operating platform of the software, COM port data cannot be directly received, the operation must be carried out through an API (application program) programming interface of the WINDOWS, in order to meet the requirement of reading the COM port data of an information system, a dynamic link library file ToFoMt.
As a further improvement of the invention, the electronic platform scale is of a Metler-Torlito BBA211-5CA300 type, the size of the platform surface is 420 x 550mm, the maximum weight is 150kg, and the verification division value is 0.05kg, and the electronic platform scale is arranged on a packaging assembly line.
Preferably, the asynchronous transmission standard interface of the weighing instrument and the asynchronous transmission standard interface of the industrial PC are 9-pin male ports, wherein 2 pins are used for reading, 3 pins are used for writing, 5 pins are grounded, two ends of the RS-232 cable are 9-hole female ports, and the industrial PC is installed in the packaging operation chamber. The weighing instrument is model number Mettler-Torilidon IDN 231.
The invention has the beneficial effects that: according to the invention, data information representing the weight of a film roll in the packaging process is continuously read in by a weighing instrument and transmitted to a COM port of an industrial Personal Computer (PC), the COM port weighing data is analyzed by self-defined dynamic link library file ToFoMt. DLL software, so that the film roll weight data in the packaging process becomes data which can be read in by a warehouse logistics information system, when an operator manually clicks 'save' warehouse logistics information on a window interface of the warehouse logistics information system of a display screen of the industrial personal computer, the industrial personal computer brings the film roll weight data into the warehouse logistics information system and prints out a label, and as the reading and inputting of the film roll weight have no human factors, the data is accurate and the data is correct to input; the reading and the input of the weight of the film roll can be finished by manually clicking the 'saving' action on the window interface, so that the working efficiency is improved.
Drawings
FIG. 1 is a schematic diagram of a film roll weight reading and transmitting system according to the present invention;
the system comprises an electronic platform scale 1, a weighing instrument 2, an industrial personal computer 3 and an application software dynamic link library file ToFoMt.
Detailed Description
As shown in fig. 1, the film roll weight reading and transmitting system of the present invention includes the following hardware components: the electronic platform scale 1 is used for simulating objects with different weights on the electronic platform scale to generate corresponding electric signals, and the output end of the electronic platform scale 1 is connected with the input end of the weighing instrument 2 through a signal cable; the electronic platform scale 1 is of a Metler-Tollido BBA211-5CA300 type, the size of the platform surface is 420 x 550mm, the maximum weight is 150kg, and the verification division value is 0.05 kg. The electronic platform scale is arranged on a packaging assembly line; the asynchronous transmission standard interface of the weighing instrument 2 is in bidirectional communication with the asynchronous transmission standard interface of the industrial PC 3 through an RS-232 cable; the asynchronous transmission standard interface of the weighing instrument 2 and the asynchronous transmission standard interface of the industrial PC machine 3 are both 9-pin male ports, wherein 2 pins are used for reading, 3 pins are used for writing, 5 pins are grounded, two ends of an RS-232 cable are 9-hole female ports, and the model of the weighing instrument 2 is Mettler-Torilidon IDN 231. The industrial Personal Computer (PC) 3 is used for printing outgoing labels and is connected with the warehouse logistics information system through a local area network, and the industrial personal computer 3 is installed in a packaging operation room; the application software 4 is also included: and the dynamic link library file ToFoMt.DLL is used for analyzing weighing data output by the industrial PC. According to the warehouse logistics information system software, Microsoft WINDOWS is used as an operating platform of the software, COM port data cannot be directly received, the operation must be carried out through an API (application program) programming interface of the WINDOWS, in order to meet the requirement of reading the COM port data of an information system, a dynamic link library file ToFoMt. The dynamic link library file ToFoMt. DLL4 can be directly installed in a directory of a WINDOWS operating system of a PC.
The present invention will be further explained with reference to the above-described film roll weight reading and transferring system in conjunction with the actual operation:
1. the electronic platform scale converts the weight of the film roll into an analog electric signal, and the analog electric signal is output to the input end of the weighing instrument in real time through a signal cable.
2. And setting the port configuration parameters of the weighing instrument into a continuous output mode. At the moment, the weighing instrument displays the weight of the film roll on the electronic platform in a KG unit, and continuously transmits the weight signal data of the film roll to a COM port of an industrial PC through the COM port of the electronic platform.
3. The weighing instrument COM port (9 pin male port) is connected with the industrial PC COM port (9 pin male port) through an RS-232 cable, and two ends of the RS-232 cable are 9-hole female ports. After the weighing instrument is connected through the RS-232 cable, the weighing instrument and the industrial PC mechanism are in bidirectional communication, namely a COM port 3 pin writing signal of the weighing instrument is electrically connected with a COM port 2 pin reading signal of the industrial PC, and a COM port 2 pin reading signal of the weighing instrument is electrically connected with a COM port 3 pin writing signal of the industrial PC, so that bidirectional communication conforming to a transmission protocol of the weighing instrument is formed, and communication data contain 17 or 18 bytes.
4. The application software installed under the catalog of the WINDOWS operating system of the PC: DLL analyzes the communication data into data which can be read in by the warehouse logistics information system. The principle process is as follows:
dll file call function GetMtWeight 4.1. tofomt. dll file calls function GetMtWeight. The GetMtWeight function contains three parameters of a port number intPort, a weight string strWeight and a return value intValid. The port number refers to a COM port of the industrial personal computer and the weighing instrument, the weight character string refers to a weight character string to be analyzed transmitted by the weighing instrument, and a return value is used for identifying a normal state or an abnormal state.
Dll file initializes the port. And the TOFOMt file calls an API function of WINDOWS to initialize a COM port (port default 1, baud rate 9600, data bit 8, stop bit 1 and check bit NONE) of the industrial PC (personal computer), and if the port is initialized to be in error, a return value-1 (port opening error) is sent to the GetMtWeight function.
And 4.3. TofoMt. DLL file circularly monitors the COM port state of the industrial PC. The COM port of the weighing instrument always sends weight signal data, the data contains ASCII text starting characters (0 x 02), and when the received characters are not 0x02, the weight signal data are discarded; when the received character is 0x02, the subsequent character is saved in the character array Buffer. When the data of the 17 th bit of the read character array Buffer is equal to 0x0D, the Tofom. When the 17 th bit data of the read character array Buffer is not equal to 0x0D, emptying the character array Buffer, and returning the TofomT.DLL file to the state of the circular monitoring port; weight data analysis cannot be entered for more than three seconds, a return value of 5 (timeout) is sent to the GetMtWeight function, and the port is closed.
Dll file weight data analysis. Searching a second character in the character array Buffer, carrying out AND operation with 0x07 to obtain decimal point precision of weighing data, and storing the decimal point precision in dbRadix with data type of DOUBLE; searching a third character in the character array Buffer, carrying out AND operation with 0x10, and shifting 4 bits to the right to obtain the unit precision (kg, g) of the weighing data, and storing the unit precision (kg, g) in the dbUnit with the data type of DOUBLE; and searching the third character in the character array Buffer, carrying out AND operation on the third character and 0x02, and shifting 1 bit to the right to obtain the symbol precision (sign) of the weighing data, and storing the symbol precision (sign) in the iSign with the data type of INT.
Conversion of file weight data for TofoMt DLL. And (3) searching the 5 th, 6 th, 7 th, 8 th, 9 th and 10 th characters in the character array Buffer, carrying out character string connection, converting the characters into numbers, multiplying dbRadix, dbUnit and iSign to obtain dbVal of a weighing data type DOUBLE, converting the dbVal into character strings, assigning the character strings to the strWeight parameter of the GetMtWeight function, and finishing data reading. And sends a return value of 0 (normal) to the GetMtWeight function, closing the port.
5. The industrial control PC warehouse logistics information system window comprises information to be input, such as product names, specifications, batch numbers and the like, and when the information is input and a 'save' key on the warehouse logistics information system window is manually clicked, the warehouse logistics information system calls the weight data of the user-defined dynamic link library file ToFoMt. And pop up a membrane roll weight value window of reading in on PC screen, this window contains: the selection keys "confirm" and "cancel" for confirming whether or not to save the film roll weight in KG units. When the 'confirm' key is clicked, the weight of the film roll displayed on the window is automatically input into the weight information column of the window of the warehouse logistics information system, and when the 'cancel' key is clicked, the weight information is not input.
6. When a 'print' key of the warehouse logistics information system window is clicked, a factory label of the content contained in the warehouse logistics information system window can be printed.
The film roll weight reading and transmitting system continuously reads data information representing the weight of a film roll in the packaging process from a weighing instrument and transmits the data information to a COM port of an industrial Personal Computer (PC), analyzes the COM port weighing data through a custom dynamic link library file ToFoMt.DLL, and enables the film roll weight data in the packaging process to become data which can be read in by a storage logistics information system; the reading and the inputting of the weight of the film roll can be finished by manually clicking the 'saving' action, so that the working efficiency is improved.

Claims (2)

1. A film roll weight reading and transmission system is characterized by comprising a dynamic link library file ToFoMt.DLL (4) and an industrial personal computer (3) warehouse logistics information system window; the dynamic link library file ToFoMt.DLL (4) is used for analyzing weighing data output by the industrial PC (3);
the dynamic link library file ToFoMt. DLL (4) parsing process is as follows:
1) the method comprises the following steps that a DLL file calls a function GetMtWeight, wherein the GetMtWeight function comprises three parameters of a port number intPort, a weight character string strWeight and a return value intValid, the port number refers to a COM port of bidirectional communication between an industrial Personal Computer (PC) and a weighing instrument, the weight character string refers to a weight character string to be analyzed transmitted by the weighing instrument, and the return value is used for providing normal or abnormal state identification;
2) initializing a port by using a Tofomt.DLL file, calling an API (application program interface) function of WINDOWS (Windows) to initialize a COM port of an industrial personal computer (port default 1, baud rate 9600, data bit 8, stop bit 1 and check bit NONE), and if the port is initialized to be wrong, sending a return value-1 (port opening error) to a GetMtWeight function;
3) tofomt. DLL file circularly monitors the state of the COM port of the industrial PC, the COM port of the weighing instrument always sends weight signal data, the data comprises ASCII text starting characters (0 x 02), when the received characters are not 0x02, the weight signal data are discarded, when the received characters are 0x02, the subsequent characters are stored in a character array Buffer, when the 17 th bit data of the read character array Buffer is equal to 0x0D, the Tofomt. DLL file enters weight data analysis, when the 17 th bit data of the read character array Buffer is not equal to 0x0D, the character array Buffer is emptied, the Tofomt. DLL file returns to the state of the circularly monitoring port, the weight data analysis cannot be entered for more than three seconds, and the return value is 5 (overtime) to the GetMtWeight function, and the port is closed;
4) analyzing Tofom. DLL file weight data, searching a second character in a character array Buffer, performing AND operation with 0x07 to obtain decimal point precision of weighing data, and storing the decimal point precision in dbRadix with a data type of DOUBLE; searching for the third character in the character array Buffer, performing AND operation with 0x10, shifting 4 bits to the right to obtain the unit precision (kg, g) of the weighing data, storing the unit precision in dbUnit with DOUBLE data type, searching for the third character in the character array Buffer, performing AND operation with 0x02, shifting 1 bit to the right to obtain the symbol precision (sign) of the weighing data, and storing the symbol precision (sign) in iSign with INT data type;
5) converting the weight data of the DLL file, searching the 5 th, 6 th, 7 th, 8 th, 9 th and 10 th characters in a character array Buffer, connecting character strings, converting the character strings into numbers, multiplying dbRadix, dbUnit and iSign to obtain dbVal of a weighing data type DOUBLE, converting the dbVal into the character strings, assigning the character strings to a strWeight parameter of a GetMtWeight function, finishing data reading, sending a return value of 0 (normal) to the GetMtWeight function, and closing a port;
industrial control PC (3) storage logistics information system window contains the information that must be input such as product name, specification, batch number, and when having input "save" key on the storage logistics information system window after these information manual clickts, and storage logistics information system calls the weight data of self-defining dynamic link library file ToFoMt.DLL this moment, and pops up a membrane book weight value window of read-in on industrial control PC (3) screen, and this window contains: the selection keys "confirm" and "cancel" for confirming whether to save the film roll weight in KG units; when a 'confirm' key is clicked, the weight of the film roll displayed on the window is automatically input into a weight information column of a window of the warehouse logistics information system, and when a 'cancel' key is clicked, the weight information is not input; when a 'print' key of the warehouse logistics information system window is clicked, a factory label of the content contained in the warehouse logistics information system window can be printed.
2. A film roll weight reading and transfer system according to claim 1, characterized in that said industrial PC (3) is installed in the packaging operation room.
CN201810120252.6A 2018-02-07 2018-02-07 Film roll weight reading and transmission system Active CN108332833B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810120252.6A CN108332833B (en) 2018-02-07 2018-02-07 Film roll weight reading and transmission system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810120252.6A CN108332833B (en) 2018-02-07 2018-02-07 Film roll weight reading and transmission system

Publications (2)

Publication Number Publication Date
CN108332833A CN108332833A (en) 2018-07-27
CN108332833B true CN108332833B (en) 2020-01-03

Family

ID=62926991

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810120252.6A Active CN108332833B (en) 2018-02-07 2018-02-07 Film roll weight reading and transmission system

Country Status (1)

Country Link
CN (1) CN108332833B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101554726A (en) * 2009-05-15 2009-10-14 北京工业大学 Flexible two-wheel self-balance robot system and motion control method thereof
CN101667034A (en) * 2009-09-21 2010-03-10 北京航空航天大学 Scalable monitoring system supporting hybrid clusters
CN101881647A (en) * 2010-06-04 2010-11-10 新余钢铁集团有限公司 Remote automatic weighing system
CN101916192A (en) * 2010-09-14 2010-12-15 深圳市华力特电气股份有限公司 Multi-language switching method and device for user interface
CN102339314A (en) * 2011-09-24 2012-02-01 国网电力科学研究院 Cross-terminal data form description and presentation method based on extensive makeup language (XML)
CN102930706A (en) * 2012-11-12 2013-02-13 武钢集团昆明钢铁股份有限公司 Remote concentration measurement multi-protocol data acquisition system and method
WO2016038267A1 (en) * 2014-09-12 2016-03-17 Bull Sas Allocation of resources
CN105954702A (en) * 2016-07-18 2016-09-21 国家电网公司 Electronic transformer calibrator phase error detection system and method
CN106182017A (en) * 2016-07-20 2016-12-07 上海交通大学 The method and system of robot are controlled based on RS485 serial bus host computer IPC

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102663164B (en) * 2012-03-16 2014-01-15 北京邮电大学 Pass control algorithm test device and method based on multiobjective test case generation
CN104792651B (en) * 2015-04-27 2017-06-23 安徽工程大学 Soil limit moisture content automatic detection device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101554726A (en) * 2009-05-15 2009-10-14 北京工业大学 Flexible two-wheel self-balance robot system and motion control method thereof
CN101667034A (en) * 2009-09-21 2010-03-10 北京航空航天大学 Scalable monitoring system supporting hybrid clusters
CN101881647A (en) * 2010-06-04 2010-11-10 新余钢铁集团有限公司 Remote automatic weighing system
CN101916192A (en) * 2010-09-14 2010-12-15 深圳市华力特电气股份有限公司 Multi-language switching method and device for user interface
CN102339314A (en) * 2011-09-24 2012-02-01 国网电力科学研究院 Cross-terminal data form description and presentation method based on extensive makeup language (XML)
CN102930706A (en) * 2012-11-12 2013-02-13 武钢集团昆明钢铁股份有限公司 Remote concentration measurement multi-protocol data acquisition system and method
WO2016038267A1 (en) * 2014-09-12 2016-03-17 Bull Sas Allocation of resources
CN105954702A (en) * 2016-07-18 2016-09-21 国家电网公司 Electronic transformer calibrator phase error detection system and method
CN106182017A (en) * 2016-07-20 2016-12-07 上海交通大学 The method and system of robot are controlled based on RS485 serial bus host computer IPC

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
多组舱段质量质心测量设备关键技术研究;张烈山;《中国优秀硕士论文全文数据库》;20120601;全文 *

Also Published As

Publication number Publication date
CN108332833A (en) 2018-07-27

Similar Documents

Publication Publication Date Title
CN110502467B (en) Universal acquisition interface software system based on serial port modbus communication protocol
US4559614A (en) Interactive code format transform for communicating data between incompatible information processing systems
US6584113B1 (en) Data transfer module and system using same
CN105487828B (en) A kind of print control system and method
EP0712229A2 (en) Portable test and communication device
CN101992609B (en) Label printing device based on large-size host machine platform
CN102098131A (en) Dynamic parameter configuration-based general framing and de-framing method for serial port data frames
HUH3896A (en) Home services system with intelligent terminal emulator
JP2001242005A (en) Remotely accessible combination weighing and combination weighing system
JPH07113906B2 (en) Telecommunication interface device and method
CN103116481A (en) Auxiliary system, device and method of note printing
CN108122014A (en) A kind of detection in real time of bar code printing and only wrong method, storage medium and printing terminal
CN108332833B (en) Film roll weight reading and transmission system
EP1531582B1 (en) Remote monitoring system, remote monitoring method for electronic apparatus, notification method of apparatus monitoring information, high order monitoring apparatus, program and recording medium
US5553269A (en) Apparatus for monitoring sensor information from diffeerent types of sources
CN112732458A (en) Multi-protocol data integration system and method adopting protocol stack
KR20060122630A (en) Method for testing sms service in the mobile terminal
CN101000574B (en) Information input method and device for computer terminal window
US7502729B2 (en) Emulating different country keyboards for controlling a remote computer over a network
CN102306134A (en) Method and device for converting serial data of electronic scale into computer universal serial bus (USB) data
EP0284111A1 (en) Method, system and test-driver computer for testing a computer and/or associated software
CN202041957U (en) High-speed online balance weight label system for cotton bales
CN110399326B (en) Data conversion equipment
KR100374119B1 (en) Weight measuring apparatus using personal computer
EP1681885A1 (en) Apparatus and method for diagnosing problems of a mobile communication terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant