CN111726395A - Automatic communication mechanism of numerical control system - Google Patents

Automatic communication mechanism of numerical control system Download PDF

Info

Publication number
CN111726395A
CN111726395A CN202010472809.XA CN202010472809A CN111726395A CN 111726395 A CN111726395 A CN 111726395A CN 202010472809 A CN202010472809 A CN 202010472809A CN 111726395 A CN111726395 A CN 111726395A
Authority
CN
China
Prior art keywords
session
communication
control
library
control system
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.)
Granted
Application number
CN202010472809.XA
Other languages
Chinese (zh)
Other versions
CN111726395B (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.)
Guangzhou Coresing Robot Technology Co ltd
Original Assignee
Guangzhou Coresing Robot Technology 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 Guangzhou Coresing Robot Technology Co ltd filed Critical Guangzhou Coresing Robot Technology Co ltd
Priority to CN202010472809.XA priority Critical patent/CN111726395B/en
Publication of CN111726395A publication Critical patent/CN111726395A/en
Application granted granted Critical
Publication of CN111726395B publication Critical patent/CN111726395B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1829Arrangements specially adapted for the receiver end
    • H04L1/1848Time-out mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention relates to an automatic communication mechanism of a numerical control system, which comprises an upper computer and the numerical control system communicated with the upper computer, wherein the upper computer is provided with a control library, the control library is internally provided with a plurality of types of registrable controls and a communication library for maintaining communication between the registrable controls and the numerical control system, the registrable controls complete initialization of the registrable controls and establishment and registration of sessions by registering in the communication library, and a session ID is generated during session registration and is stored in the session; the registered control realizes full-automatic communication between the control and the numerical control system and self-updating of the control through a communication library and the numerical control system by a session interaction mechanism. The invention can eliminate the communication process of human intervention, establish a set of full-automatic communication mechanism, not only reduce the complexity of constructing the upper computer software, but also improve the reliability of the system.

Description

Automatic communication mechanism of numerical control system
Technical Field
The invention relates to the technical field of numerical control system communication, in particular to an automatic communication mechanism of a numerical control system.
Background
The prior art requires developers to manually add a large amount of program code to intervene in the communication process, such as encapsulating sessions, sending sessions, receiving responses, parsing sessions, updating controls, and the like. If hundreds or thousands of data items are provided, since the meaning of each data item may be different, the same number of control codes will need to be written, which is an extremely tedious process and is easy to generate data errors and behavior anomalies.
Disclosure of Invention
The present invention provides an automatic communication mechanism for a numerical control system, so as to solve the problems in the background art.
In order to achieve the purpose, the invention provides the following technical scheme: an automatic communication mechanism of a numerical control system comprises an upper computer and the numerical control system which is communicated with the upper computer, wherein the upper computer is provided with a control library, a plurality of registrable controls and a communication library for maintaining communication between the registrable controls and the numerical control system are arranged in the control library, the registrable controls complete initialization, creation and registration session of the registrable controls by registering in the communication library, and a session ID is generated during session registration and stored in the session; the registered control realizes full-automatic communication between the control and the numerical control system and self-updating of the control through a communication library and the numerical control system by a session interaction mechanism.
Preferably, the communication library is provided with a control and a session registry, and the control and the session registry records the mapping relationship between the control and the session and the mapping relationship between the session ID and the session.
Preferably, the session interaction mechanism is implemented as follows:
s11, the control generates an interactive request (acquiring data or submitting data) when operated by the user;
s12, the control finds the own session, finds the session corresponding to the interaction and sends the session to the communication library;
s13, the communication library receives the conversation of the control, packages the data of the conversation into a TCP data packet and forwards the TCP data packet to the numerical control system;
s14, waiting for the response of the numerical control system;
s15, the communication library transfers the received response to the distribution mechanism of the communication library for processing;
s16, the distribution mechanism of the communication library searches the 'control and the session registry' according to the session ID, finds one or a group of equivalent controls and returns response to the equivalent controls in turn;
and S17, the control analyzes the response data, updates the display of the control and finishes the process.
The equivalent control is a group of controls of the session containing the same ID as the response session when the response session is returned. "equivalent" belongs to the instant state, for example, control a contains a session with IDs a and B, control B contains a session with IDs a and c, and when the ID of the response session is a, control a and control B are equivalent controls; when the response session ID is b or c, they do not belong to the equivalent control.
Preferably, the communication library further comprises a timeout management mechanism. The timeout management mechanism is as follows: when the communication library sends the TCP data packet to the numerical control system end, the response of the numerical control system end is not received within the set overtime time, namely the overtime is achieved. At this moment, the communication library timeout management mechanism can select whether to retransmit according to the retransmission mark of the session; if not, then the control is handed over to the timeout mechanism for processing.
Compared with the prior art, the invention has the beneficial effects that:
1) automated communication: the whole communication process is managed and maintained by the cooperation of the control, the session and the communication library, and a user does not need to write any control codes in communication, so that the communication can be called as automatic communication.
2) Better communication quality: all the sessions are managed by the communication library, and centralized optimization can be carried out on the communication of the sessions, such as merging repeated sessions, an efficient distribution mechanism and a timeout management mechanism.
3) Simple and easy to use: the control library can be used as a plug-in of a visual interface design tool, namely, the interface can be created and laid out through simple dragging, then some attributes of the controls are specified, and non-programming professionals can also realize the construction of upper computer software and the layout of the controls.
4) The reliability of the system is improved: the invention can eliminate the communication process of human intervention, establish a set of full-automatic communication mechanism, not only reduce the complexity of constructing the upper computer software, but also improve the reliability of the system.
Drawings
FIG. 1 is a communication system framework diagram;
FIG. 2 is a flow diagram of registrable control registration and de-registration;
fig. 3 is an automatic communication flow chart.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art without creative efforts based on the technical solutions of the present invention belong to the protection scope of the present invention.
Referring to fig. 1 to 3, the present invention provides a technical solution: an automatic communication mechanism of a numerical control system comprises an upper computer and the numerical control system which is communicated with the upper computer, wherein the upper computer is provided with a control library, a plurality of registrable controls and a communication library for maintaining communication between the registrable controls and the numerical control system are arranged in the control library, and the registrable controls complete initialization, creation and registration session of the registrable controls by registering in the communication library; the registered control realizes full-automatic communication between the control and the numerical control system and self-updating of the control through a communication library and the numerical control system by a session interaction mechanism.
The data comparison table of the upper computer and the nc system in fig. 1 is used for classifying, encoding (i.e., address code) and specifying data types of the nc system end data used by the upper computer end (or may be used in the future), and is summarized into a table. When a user creates a control, the user can search the table to obtain the address code of the data of the end of the required numerical control system, and then the obtained address code is filled into the address code attribute of the control, and at the moment, the control starts an automatic communication mechanism.
The control library predefines several types of registrable controls, such as edit boxes, status buttons, drop-down boxes, tabs, and various compound controls. Each kind of control realizes an interaction mechanism, a response mechanism and a timeout mechanism, and realizes an updating mechanism of the control according to the specificity of the control. Each control object has one or more sessions, the specific number of which is determined by the control type.
The communication library is used for maintaining communication between the registrable control and the numerical control system, managing sessions of all registrable controls of the upper computer, receiving a response of the numerical control system end and distributing the response session to the registrable control.
Before the registrable control is communicated with the numerical control system, the registrable control needs to be registered with the communication library, and when the registrable control is destroyed, the registrable control is unregistered with the communication library. The registration and counterregistration process is as follows:
s1 control initializes and creates session: the control initializes the display style of the control and creates a plurality of sessions (the specific number is determined by the control type) according to the attributes of the address code, the data type and the like;
s2 registration session: the control registers the session owned by the control to the communication library and records the session in a control and session registry; at the same time, a session ID is generated and stored in the session itself;
s3, user interaction: mainly refers to the interaction on data, namely, a user acquires data or submits data, and each user interaction is accompanied with an automatic communication process;
s4, control destruction: when the display interface is closed or the operation such as the software of the upper computer is quitted, the control is destroyed; the destroying process is accompanied by a counterregistration session, the control informs the communication library to counterregister the session owned by the control, and the communication library searches the control and the session registry according to the ID of the session and removes the corresponding record.
The session is a basic unit for communication between the registrable control and the communication library, and comprises the following information:
the session type is as follows: data is acquired, data is submitted, bit data is acquired, and bit data is submitted.
Address code: and indicating which data the session acquires/submits can be obtained by searching the data comparison table of the upper computer and the numerical control system.
Internal offset: the address of the internal offset on the basis of the data indicated by the address code, address code + internal offset, ultimately determines the specific data to be operated on by the session.
Data type: shaping, floating point type and the like can be obtained by searching a data comparison table of an upper computer and a numerical control system.
Data length: byte length of data fetched/committed.
An operation position: the fetch/commit bit data is used to indicate which data bit is to be fetched/committed.
Caching: the (bit) data is acquired for saving the acquired data, and the (bit) data is submitted for saving the submitted data.
Retransmission flag: and a flag indicating whether to perform retransmission when the communication is timed out.
The control comprises the following components: indicating to which control the session belongs.
Session ID: the registration is automatically calculated by the system, and a 64-bit integer value is calculated according to the information of the session type, the address code, the internal offset, the data length and the operation bit. If the IDs of the two sessions are the same, it means that they are the same, otherwise they are different. The calculation formula is as follows, where "<" is a left shift operator:
ID ═ session class < <60) + (operation bit < < 48) + (data length data < <32) + (internal offset < <16) + (address code)
The "control and session registry" includes two sub-tables, which respectively record the mapping relationship between the control and the session and the mapping relationship between the session ID and the session, that is:
control and session mapping table: one control corresponds to a group of sessions,
session ID and session mapping table: one session ID corresponds to a group of sessions.
After the registrable control is successfully registered in the communication library, the registrable control can continuously and automatically communicate with the numerical control system by a session interaction mechanism, and each automatic communication process comprises the following steps:
the S21 control generates an interactive request (acquiring data or submitting data) when operated by a user;
the S22 control searches own session, finds the session corresponding to the interaction and sends the session to the communication library;
s23, the communication library receives the conversation of the control, encapsulates the data of the conversation into a TCP data packet and forwards the TCP data packet to the numerical control system;
s24, waiting for the response of the numerical control system;
s25 the communication library transfers the received response to the distribution mechanism of the communication library for processing;
the distribution mechanism of the S26 communication library searches the controls and the session registry according to the session ID, finds one or a group of equivalent controls and returns responses to the controls in turn. Wherein, the process of searching the control and the session registry is as follows: firstly, finding a group of equivalent sessions in a session ID and session mapping table according to a session ID, and then obtaining a group of equivalent controls according to the respective 'belonged controls' of the equivalent sessions;
and the S27 control analyzes the response data, updates the display of the control and finishes the communication process.
In addition, the communication library also comprises a timeout management mechanism. When the communication library sends the TCP data packet to the numerical control system end, the response of the numerical control system end is not received within the set overtime time, namely the overtime is achieved. At this moment, the communication library timeout management mechanism can select whether to retransmit according to the retransmission mark of the session; if not, then the control is handed over to the timeout mechanism for processing. The timeout mechanism of the control presets different processing modes, such as an edit box, according to different control types, and because new data cannot be successfully submitted, the current display of the control is updated by using old data to update.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (4)

1. The utility model provides a numerical control system automatic communication mechanism, automatic communication mechanism include the host computer and with the numerical control system that the host computer carries out the communication which characterized in that: the upper computer is provided with a control library, the control library is provided with a plurality of types of registrable controls and a communication library for maintaining communication between the registrable controls and the numerical control system, the registrable controls complete initialization of the registrable controls and establishment and registration of sessions by registering in the communication library, and a session ID is generated during session registration and is stored in the session; the registered control realizes full-automatic communication between the control and the numerical control system and self-updating of the control through a communication library and the numerical control system by a session interaction mechanism.
2. The automatic communication mechanism of claim 1, wherein: the communication library is provided with a control and a session registry, and the control and the session registry records the mapping relation between the control and the session and the mapping relation between the session ID and the session.
3. The automatic communication mechanism of claim 1, wherein: the session interaction mechanism is realized by the following steps:
s11, the control generates an interactive request when operated by the user;
s12, the control finds the own session, finds the session corresponding to the interaction and sends the session to the communication library;
s13, the communication library receives the conversation of the control, packages the data of the conversation into a TCP data packet and forwards the TCP data packet to the numerical control system;
s14, waiting for the response of the numerical control system;
s15, the communication library transfers the received response to the distribution mechanism of the communication library for processing;
s16, the distribution mechanism of the communication library searches the 'control and the session registry' according to the session ID, finds one or a group of equivalent controls and returns response to the equivalent controls in turn;
and S17, the control analyzes the response data, updates the display of the control and finishes the process.
4. The automatic communication mechanism of claim 3, wherein: the communication library also comprises a timeout management mechanism; the timeout management mechanism is as follows: when the communication library sends the TCP data packet to the numerical control system end, the response of the numerical control system is not received within the set overtime time, namely the overtime time is up; at this moment, the communication library timeout management mechanism can select whether to retransmit according to the retransmission mark of the session; if not, then the control is handed over to the timeout mechanism for processing.
CN202010472809.XA 2020-05-29 2020-05-29 Automatic communication mechanism of numerical control system Active CN111726395B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010472809.XA CN111726395B (en) 2020-05-29 2020-05-29 Automatic communication mechanism of numerical control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010472809.XA CN111726395B (en) 2020-05-29 2020-05-29 Automatic communication mechanism of numerical control system

Publications (2)

Publication Number Publication Date
CN111726395A true CN111726395A (en) 2020-09-29
CN111726395B CN111726395B (en) 2023-01-31

Family

ID=72565235

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010472809.XA Active CN111726395B (en) 2020-05-29 2020-05-29 Automatic communication mechanism of numerical control system

Country Status (1)

Country Link
CN (1) CN111726395B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6490624B1 (en) * 1998-07-10 2002-12-03 Entrust, Inc. Session management in a stateless network system
US20070233869A1 (en) * 2006-03-31 2007-10-04 Microsoft Corporation Restricting device access per session
CN102214090A (en) * 2010-04-09 2011-10-12 腾讯科技(深圳)有限公司 Method and device for creating session window
US20140280535A1 (en) * 2013-03-14 2014-09-18 Thoughtwire Holdings Corp. Method and system for enabling data sharing between software systems

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6490624B1 (en) * 1998-07-10 2002-12-03 Entrust, Inc. Session management in a stateless network system
US20070233869A1 (en) * 2006-03-31 2007-10-04 Microsoft Corporation Restricting device access per session
CN102214090A (en) * 2010-04-09 2011-10-12 腾讯科技(深圳)有限公司 Method and device for creating session window
US20140280535A1 (en) * 2013-03-14 2014-09-18 Thoughtwire Holdings Corp. Method and system for enabling data sharing between software systems

Also Published As

Publication number Publication date
CN111726395B (en) 2023-01-31

Similar Documents

Publication Publication Date Title
CN108431804B (en) Ability to group multiple container databases into a single container database cluster
JP6850907B2 (en) Generate and execute query plans in a relational database management system with a temporal-relational database
KR100795929B1 (en) Method and system for transmitting defined-query to database
CN102236705B (en) The fine granularity that data base resets synchronizes
JP4774372B2 (en) Complex computing across heterogeneous computer systems
US8745076B2 (en) Structured query language syntax rewriting
US7730097B2 (en) Smart database
CN101957832B (en) Unified window support for event stream data management
CN109144994A (en) Index updating method, system and relevant apparatus
US20060007944A1 (en) Managing network device configuration using versioning and partitioning
US20170116321A1 (en) Ability to group multiple container databases as a single container database cluster
US20090037395A1 (en) Persistent query system for automatic on-demand data subscriptions from mobile devices
KR100671506B1 (en) A mobile middleware and a method for processing business logic using it
CN1959676B (en) Apparatus and method for materialized query table journaling in a computer database system
US11151098B2 (en) Enabling multi-tenant access to respective isolated data sets organized using different application schemas
CN106294814B (en) The device and method of HBase the secondary index building and inquiry of database based on memory
US11210277B2 (en) Distributing and processing streams over one or more networks for on-the-fly schema evolution
CN117112618B (en) EDA software data query method, electronic device and medium
US7958154B2 (en) Apparatus, system, and method for command manager support for pluggable data formats
CN111726395B (en) Automatic communication mechanism of numerical control system
CN114185991A (en) Method and related device for realizing data synchronization based on distributed database
CN100440803C (en) Gridding information model system and method for modeling processing gridding information
US10915541B2 (en) Generic API
CN111797119A (en) Caching device, caching system and caching method
CN110737506A (en) virtual machine image version management method

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