Interface extension method, extended interface use method, system and storage medium

By creating and compiling the resource class, configuration class and communication class files in the virtual simulation system, the virtual simulation system's support for TCP and UDP protocols is realized, which solves the problem that the existing system does not support open communication protocols and reduces hardware costs. and delay, improving device access efficiency.

CN115473943BActive Publication Date: 2024-10-01SIEMENS (CHINA) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210973482.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-15
Publication Date
2024-10-01
Estimated Expiration
2042-08-15

AI Technical Summary

Technical Problem

The existing virtual simulation system does not support open communication protocols such as TCP and UDP, which requires the addition of hardware gateways, increases costs, causes communication delays, and makes it difficult to access equipment such as Omron PLCs.

Method used

By pre-creating resource files, configuration files and communication files, the user interface interface and data transmission function of the target open communication protocol are defined, and the executable file is compiled to realize the connection between the virtual simulation system and the target open communication protocol device. For data transmission, the extended interface supports TCP and UDP protocols.

Benefits of technology

No hardware gateway is needed, TCP and UDP protocols are directly supported in the virtual simulation system, reducing costs and communication delays, and achieving efficient access and data transmission to target devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115473943B_ABST
    Figure CN115473943B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses an interface expansion method, an extended interface use method, a system and a storage medium. The interface expansion method includes: pre-creating three types of files, including: resource class files, which are used to define the user interface of the target open communication protocol; configuration class files, which are used to configure various information defined in the user interface; and communication class files, which are used to transmit target open communication protocol data; compiling the three types of files and generating executable files, so that when the executable files are executed, the target open communication protocol data can be transmitted between the virtual simulation system and a target open communication protocol device, thereby realizing the interface expansion of the target open communication protocol of the virtual simulation system. The technical solution in the embodiment of the present invention can realize the interface expansion of the virtual simulation system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of industrial technology, and in particular to an interface expansion method of a virtual simulation system, an expansion interface using method, a system and a computer-readable storage medium. Background Art

[0002] There are some virtual simulation systems currently used for virtual commissioning or virtual training, etc. Some virtual simulation systems, such as Siemens' SIMIT software system, can support software and hardware connection methods such as PLCSIM Advanced, PLCSIM, SIMIT Unit, NX MCD, and support standard communication methods such as OPC DA and OPC UA, but do not support open communication protocols such as Transmission Control Protocol (TCP) and User Datagram Protocol (UDP), which makes it inconvenient for some products such as Omron programmable logic controllers (PLCs) to be connected to the virtual simulation system.

[0003] At present, for virtual simulation systems that do not support open communication protocols such as TCP and UDP, if you want to access devices that need to be accessed through open communication protocols such as TCP and UDP, you need to set up a gateway device first. For example, for Siemens' SIMIT software system, a Siemens PLC can be used as a gateway. After that, devices that need to be accessed through open communication protocols such as TCP and UDP can exchange data with the gateway, and then the gateway can exchange data with the virtual simulation system. It can be seen that the current method needs to increase the hardware cost of the gateway, and because the gateway needs to consume communication time, it will cause communication delays.

[0004] Therefore, those skilled in the art are still working on finding other interface expansion implementation solutions for virtual simulation systems. Summary of the invention

[0005] In view of this, the embodiments of the present invention propose, on the one hand, an interface expansion method and an extended interface usage method of a virtual simulation system, and on the other hand, propose an interface expansion system, an extended interface usage system, a computer system and a computer-readable storage medium of a virtual simulation system, so as to add the communication function of the target open communication protocol to the virtual simulation system, thereby realizing the interface expansion of the virtual simulation system.

[0006] An interface expansion method for a virtual simulation system proposed in an embodiment of the present invention includes: pre-creating three types of files, including: resource class files, used to define the user interface interface of the target open communication protocol; configuration class files, used to configure various information defined in the user interface interface; and communication class files, used to transmit target open communication protocol data; compiling the three types of files and generating executable files, so that when the executable files are executed, the target open communication protocol data can be transmitted between the virtual simulation system and a target open communication protocol device, thereby realizing the interface expansion of the target open communication protocol of the virtual simulation system.

[0007] The method for using the extended interface of a virtual simulation system proposed in an embodiment of the present invention includes: providing a user with a target open communication protocol connection option, and after receiving an operation in which the user clicks on the target open communication protocol connection option, generating a target open communication protocol connection interface, and receiving the user's configuration of the target open communication protocol connection based on the target open communication protocol connection interface; based on the configuration of the target open communication protocol connection, transmitting target open communication protocol data between the virtual simulation system and a target open communication protocol device.

[0008] The interface expansion system of the virtual simulation system proposed in the embodiment of the present invention includes: a storage module, which is used to store three types of files created in advance, including: resource class files, which are used to define the user interface of the target open communication protocol; configuration class files, which are used to configure various information defined in the user interface; and communication class files, which are used to transmit target open communication protocol data; and a compilation module, which is used to compile the three types of files and generate executable files, so that when the executable files are executed, the target open communication protocol data can be transmitted between the virtual simulation system and a target open communication protocol device to realize the interface expansion of the target open communication protocol of the virtual simulation system.

[0009] The extended interface usage system of the virtual simulation system proposed in the embodiment of the present invention includes: a user interface module, which is used to provide a user with a target open communication protocol connection option, and after receiving an operation in which the user clicks on the target open communication protocol connection option, generates a target open communication protocol connection interface, and receives the user's configuration of the target open communication protocol connection based on the target open communication protocol connection interface; a data transmission module, which is used to transmit target open communication protocol data between the virtual simulation system and a target open communication protocol device based on the configuration of the target open communication protocol connection.

[0010] Another interface expansion system of a virtual simulation system proposed in an embodiment of the present invention includes: at least one memory and at least one processor, wherein: the at least one memory is used to store a computer program; the at least one processor is used to call the computer program stored in the at least one memory, execute the interface expansion method of the virtual simulation system as described in any of the above items and / or execute the extended interface using method of the virtual simulation system as described in any of the above items.

[0011] The computer-readable storage medium proposed in an embodiment of the present invention stores a computer program thereon; the computer program can be executed by a processor and implement the interface expansion method of the virtual simulation system as described in any of the above items and / or execute the extended interface use method of the virtual simulation system as described in any of the above items.

[0012] It can be seen from the above scheme that in an embodiment of the present invention, by setting a resource class file for defining a user interface of a target open communication protocol, a configuration class file for configuring various information defined in the user interface, and a communication class file for transmitting data using the target open communication protocol, and compiling the three types of files to generate an executable file, the interface extension of the target open communication protocol of the virtual simulation system is achieved by executing the executable file. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings so that the above and other features and advantages of the present invention will be more apparent to those skilled in the art. In the accompanying drawings:

[0014] Figure 1 The figure is an exemplary flow chart of the interface expansion method of the virtual simulation system in an embodiment of the present invention.

[0015] Figure 2 The figure is an exemplary flow chart of a method for using an extended interface of a virtual simulation system in an embodiment of the present invention.

[0016] Figure 3 It is a schematic diagram of a part of the UDP connection interface in an example of the present invention.

[0017] Figure 4 A schematic diagram of input variables and output variables created in an example of the present invention.

[0018] Figure 5 It is an exemplary structural diagram of the interface expansion system of the virtual simulation system in an embodiment of the present invention.

[0019] Figure 6 It is an exemplary structural diagram of the system using the extended interface of the virtual simulation system in an embodiment of the present invention.

[0020] Figure 7 The figure is an exemplary structural diagram of a computer system in an embodiment of the present invention.

[0021] The reference numerals are as follows:

[0022] Label meaning 101、102、201、202 step 501 Storage Module 502 Compiling modules 601 User Interface Module 602 Data transmission module 71 Memory 72 processor 73 bus DETAILED DESCRIPTION

[0023] In the embodiment of the present invention, it is considered to create a console module for generating executable files of open communication protocols such as TCP and UDP, such as a Visual Studio console module.

[0024] In order to make the purpose, technical scheme and effect of the present invention more clearly understood, the specific implementation mode of the present invention is now described with reference to the accompanying drawings. In the drawings, the same reference numerals represent components with the same structure or similar structures but the same functions.

[0025] In this document, “exemplary” and “illustrative” mean “serving as an example, instance or illustration”, and any illustration or implementation described in this document as “exemplary” or “illustrative” should not be construed as a more preferred or more advantageous technical solution.

[0026] In order to simplify the drawings, each figure only schematically shows the parts related to the present invention, which do not represent the actual structure of the product.

[0027] In this article, "a" or "an" not only means "only one", but also means "more than one". In this article, "first", "second", etc. are only used to distinguish each other, rather than to indicate their importance and order.

[0028] Figure 1 FIG. 1 is an exemplary flow chart of the interface expansion method of the virtual simulation system in an embodiment of the present invention. Figure 1 As shown, the method may include the following steps:

[0029] Step 101, pre-create three types of files, namely: resource class files for defining the user interface of the target open communication protocol, configuration class files for configuring various information defined in the user interface, and communication class files for transmitting data of the target open communication protocol. In this embodiment, the target open communication protocol can be an open communication protocol such as TCP or UDP.

[0030] In this embodiment, when implemented specifically, the user interface of the target open communication protocol may include: connection properties of the target open communication protocol, actions for creating input and output variables, and input and output signal properties. Accordingly, the resource class file may include: a first resource class file for defining the connection properties; a second resource class file for defining the actions for creating input and output variables; and a third resource class file for defining the input and output signal properties.

[0031] In one embodiment, the connection properties of the target open communication protocol include: remote IP address, remote communication port, local communication port, input data type, input data length, output data type, output data length, data exchange, debugging, author, and version, part or all of them.

[0032] The action of creating input and output variables may include: creating variables, adding variables, importing variables, exporting variables, and deleting some or all of the variables.

[0033] The signal attributes may include: input and output addresses and signal data types.

[0034] For example, in one example, for a SIMIT software system, a resource class file may include:

[0035] 1) Node property resource (NodeProperties.resx), namely the first resource class file, is used to define the connection properties of the target open communication protocol, such as remote IP address, communication port, etc.

[0036] In one example, in order to arrange the attributes in a certain order, the names of the attributes can be arranged in a set order, such as "Configuration_PA_", "Configuration_PB_", "Configuration_PC_". For example, in one example, taking a UDP connection as an example, the names of its connection attributes and their corresponding values ​​may include:

[0037] "Configuration_Caption", its corresponding value can be "UDP Communication";

[0038] "Configuration_PA_RemoteIP", the corresponding value can be "Remote IP Address";

[0039] "Configuration_PB_RemotePort", the corresponding value can be "Remote Port (remote communication port)";

[0040] "Configuration_PC_LocalPort", the corresponding value can be "Local Port (local communication port)";

[0041] "Configuration_PD_InputDataType", the corresponding value can be "Input Data Type";

[0042] "Configuration_PE_InputDataLength", the corresponding value can be "Input Data Length";

[0043] "Configuration_PF_OutputDataType", the corresponding value can be "Output Data Type";

[0044] "Configuration_PG_OutputDataLength", the corresponding value can be "Output DataLength (output data length)";

[0045] "Configuration_PH_DataSwap", the corresponding value can be "Data Swap";

[0046] "Configuration_PI_Debug", the corresponding value can be "Debug";

[0047] "Configuration_PJ_Author", the corresponding value can be "Author";

[0048] “Configuration_PK_Version”, its corresponding value may be “Version”.

[0049] 2) Action resources (Actions.resx) are the second resource class files, which are used to define the actions of input and output variables, such as creating an input or output variable, adding a byte input variable, deleting a Word type output variable, importing variables, exporting variables, deleting the last variable, etc. For example, in one example, taking UDP connection as an example, the names of its input and output variables and their corresponding values ​​may include:

[0050] "Configuration_AddDefault", its corresponding value can be "Generate I / O"; this variable will correspond to a "Generate I / O" button generated on the user interface. When the button is clicked, in this embodiment, the corresponding SIMIT input or output variable will be created based on the properties such as "Input datalength" and "Output data length" defined in the UDP connection property interface.

[0051] "Configuration_AddInput1", its corresponding value can be "+Input Byte (add byte input variable)"; this variable will correspond to an "Add byte input variable" button generated on the user interface. When the button is clicked, a SIMIT input variable of Byte type will be added in this embodiment.

[0052] "Configuration_AddInput2", its corresponding value can be "+Input Word (add font input variable)"; this variable will correspond to an "Add font input variable" button generated on the user interface. When the button is clicked, a SIMIT input variable of the Word (font) type will be added in this embodiment.

[0053] "Configuration_AddInput3", its corresponding value can be "+Input DWord (add double-word input variable)"; this variable will correspond to an "Add double-word input variable" button generated on the user interface. When the button is clicked, a SIMIT input variable of the DWord (double-word) type will be added in this embodiment.

[0054] "Configuration_AddOutput1", its corresponding value can be "+Output Byte (add byte output variable)"; this variable will correspond to an "Add byte output variable" button generated on the user interface. When the button is clicked, a SIMIT output variable of Byte type will be added in this embodiment.

[0055] "Configuration_AddOutput2", its corresponding value can be "+Output Word (add font output variable)"; this variable will correspond to an "Add font output variable" button generated on the user interface. When the button is clicked, a SIMIT output variable of the Word (font) type will be added in this embodiment.

[0056] "Configuration_AddOutput3", its corresponding value can be "+Output DWord (add double-word output variable)"; this variable will correspond to an "Add double-word output variable" button generated on the user interface. When the button is clicked, a SIMIT output variable of the DWord (double-word) type will be added in this embodiment.

[0057] "Configuration_ExportSignals", its corresponding value can be "Export Signals (export variables)"; this variable will correspond to an "Export Variables" button generated on the user interface. When the button is clicked, the defined SIMIT input and output variables will be exported into a CSV file in this embodiment.

[0058] "Configuration_ImportSignals", its corresponding value can be "Import Signals (import variables)"; this variable will correspond to an "Import Variables" button generated on the user interface. When the button is clicked, the corresponding SIMIT input or output variables will be generated according to the imported CSV file in this embodiment.

[0059] "Configuration_ImportSignalsFromPartner", its corresponding value can be "ImportSignals From Partner (negate generated variables)"; this variable will correspond to a "negate generated variables" button generated on the user interface. When the button is clicked, in this embodiment, the local side SIMIT input and output variables will be generated by "negating" the types of the SIMIT input and output variables on the communication partner side. For example, if the SIMIT input and output variables on the partner side are input variables, a corresponding output variable will be created on the local side.

[0060] "Configuration_RemoveLastSignal", its corresponding value may be "Remove Last Signal (delete the last variable)". This variable will correspond to a "delete last variable" button generated on the user interface. When the button is clicked, the last variable will be deleted in this embodiment.

[0061] 3) Signal property resource (SignalProperties.resx), i.e., the third resource class file, is used to define SIMIT signal properties, such as address, type, etc.

[0062] In one example, for a SIMIT software system, a configuration class file (such as Configuration.cs) can be used to configure various properties defined in a UI interface, including initializing connection parameters of a target open communication protocol such as UDP, and defining the types and lengths of SIMIT input and output variables for data exchange between the target open communication protocol such as UDP and external devices.

[0063] For example, for the previously defined connection parameter "PG_OutputDataLength", when initializing it, the specific process may include: setting the integer data "output data length" to a default value, such as 100. For the current output data length, returning the default value of the set "output data length", such as 100, and checking the effective length of the output variable according to the data type of the variable; for example, when the variable type is byte (Byte), the maximum length of the output variable is 1460, and when the variable type is word (Word), the maximum length of the output variable is 780, etc.

[0064] For another example, for the "Configuration_AddDefault" defined in the action resource (Actions.resx), the corresponding action event for creating SIMIT input and output variables is "AddDefault", and the button name assigned to this action event in the UI interface is "Generate I / O (create input and output variables)". The specific execution process of this action is as follows: Delete all SIMIT input and output variables that have been created. Then create new SIMIT input variables according to the different input variable types. When the input variable type is byte (Byte), continuously create inputDataLength (input data length) SIMIT byte input variables; when the input variable type is word (Word), continuously create inputDataLength (input data length) SIMIT word input variables; when the input variable type is double word (DWord), continuously create inputDataLength (input data length) SIMIT double word input variables. At the same time, new SIMIT output variables are created according to the different output variable types. When the output variable type is byte type, outputDataLength (output data length) SIMIT byte type output variables are created continuously; when the output variable type is word type, outputDataLength (output data length) SIMIT word type output variables are created continuously; when the output variable type is double word (DWord) type, outputDataLength (output data length) SIMIT double word type output variables are created continuously.

[0065] In one example, for a SIMIT software system, a communication class file (such as Communication.cs) can implement the transmission of a target open communication protocol such as UDP communication data by calling multiple system events provided by the SIMIT API interface.

[0066] For example, the input and output variables are traversed by calling the "Open" event (open event) provided by the SIMIT API interface, and byte addresses and bit addresses are generated for the input and output variables, and the target open communication protocol client function such as the UDP Client function is called to create the communication of the target open communication protocol when the virtual simulation system is running. In the specific implementation, rich diagnostic information can be further added to facilitate the user to find problems when the UDP communication fails.

[0067] The communication class file converts the received target open communication protocol, such as UDP data, into SIMIT output data by calling the first cycle interrupt event, such as the "Calculate1" event, provided by the SIMIT API interface.

[0068] In one example, the specific implementation process may include: determining the length of the UDP communication received data, and if the length is greater than 0, converting the UDP received data into a Boolean (Bool) type array; traversing all SIMIT output variables of the integer (Int) data type, obtaining the starting bit address of each SIMIT output variable, and assigning the SIMIT output variable according to the SIMIT output variable type; for example, when the SIMIT output variable type is a byte (Byte) type, reading a byte of data from the Bool array after the UDP received data is converted from the starting bit (the starting bit of the SIMIT output variable), and assigning the data to the SIMIT output variable; traversing all SIMIT output variables of the Bool (Bool) data type, obtaining the starting bit address of the SIMIT output variable, reading a bit of data from the Bool array after the UDP received data is converted from the starting bit (the starting bit of the SIMIT output variable), and assigning the bit of data to the SIMIT output variable.

[0069] The communication class file traverses the input data of SIMIT by calling the second cycle interrupt event such as "Calculate2" event provided by the SIMIT API interface, and converts the input data of SIMIT into target open communication protocol such as UDP data for transmission.

[0070] In an example, the specific implementation process may include: traversing all SIMIT input variables whose data type is integer (Int), obtaining the starting bit address of the SIMIT input variable, converting the value of the SIMIT input variable into a byte array of different lengths according to different data types of the input variable, converting the byte (Byte) converted from the SIMIT input variable into a bit (Bit) array, and uniformly storing the value of the bit (Bit) array after each SIMIT input variable is converted in a bit send (sendBits) array; traversing all SIMIT input variables whose data type is Bool (Bool), uniformly storing the value of each SIMIT input variable in a bit send (sendBits) array, converting the bit send (sendBits) array of the bit (Bit) type into a byte send (sendBytes) array of the data type is byte (Byte), executing a UDP sending task, and sending the SIMIT input variable data to a communication partner through UDP.

[0071] Step 102, compile the three types of files and generate executable files, so that when the executable files are executed, target open communication protocol data can be transmitted between the virtual simulation system and a target open communication protocol device, thereby realizing the interface expansion of the target open communication protocol of the virtual simulation system.

[0072] For example, in one example, for the three types of files in the above example, a SIMIT_UDP_Client.exe executable file can be generated, and a "couplings" folder can be created under the SIMIT installation path, and a "UDP" folder can be created under the folder, and the compiled executable file can be copied to the "UDP" folder.

[0073] Based on the above virtual simulation system interface expansion method, the virtual simulation system interface expansion can be realized. After the interface expansion is completed, data communication of the target open communication protocol can be performed based on the expanded interface. The following briefly describes the method for using the expanded interface of the virtual simulation system.

[0074] Figure 2 FIG. 1 is an exemplary flow chart of a method for using an extended interface of a virtual simulation system according to an embodiment of the present invention. Figure 2 As shown, the method may include the following operations:

[0075] Step 201, providing the user with a target open communication protocol connection option such as a UDP connection option, and after receiving an operation in which the user clicks on the target open communication protocol connection option, generating a target open communication protocol connection interface, and receiving the user's configuration of the target open communication protocol connection based on the target open communication protocol connection interface.

[0076] In this embodiment, the target open communication protocol connection interface may include a configuration interface for connection attributes set by the target open communication protocol connection and a configuration interface for actions, types, and lengths of input and output variables. Accordingly, receiving the configuration of the target open communication protocol connection by the user based on the target open communication protocol connection interface includes: receiving the connection attributes set by the user for the target open communication protocol connection through the configuration interface for the connection attributes and the configuration of the actions, types, and lengths of the input and output variables based on the configuration interface for the types and lengths of the input and output variables.

[0077] Figure 3 A schematic diagram of a portion of a UDP connection interface in an example is shown in FIG. Figure 3 As shown, there is a UPD connection logo on the left side, and buttons corresponding to the input and output variable actions are set on the upper right side, namely, "Create input / output variable", "Add byte input variable", "Add font input variable", "Add double word input variable", "Add byte output variable", "Add byte output variable" and other buttons. Figure 3 The input variable interface and output variable interface corresponding to the above buttons are set in the upper middle part of the right side. For example, when you click the "Create input / output variables" button on the top side, SIMIT input / output variables of the corresponding number and data type will be created according to the definition of the second type of resource file in step 101. Figure 4 A schematic diagram of the input and output variables created in an example is shown in Figure 1. You can also use other buttons to increase or decrease SIMIT IO variables.

[0078] Figure 3 The lower right part of the page contains the configuration interface for the connection properties of the UDP connection and the configuration interface for the type and length of the input and output variables.

[0079] Step 202: Transmit target open communication protocol data between the virtual simulation system and a target open communication protocol device based on the configuration of the target open communication protocol connection.

[0080] For example, in one example, a SIMIT simulation may be started, and the simulation platform will automatically call the SIMIT_UDP_Client.exe executable file, which will automatically create a UDP function, perform UDP communication with a communication partner at a cyclic time interval, and implement a cyclic interaction between SIMIT input and output signals and UDP data.

[0081] The interface expansion method of the virtual simulation system and the method for using the extended interface of the virtual simulation system in the embodiment of the present invention are described in detail above. The interface expansion system of the virtual simulation system and the system for using the extended interface of the virtual simulation system in the embodiment of the present invention are described in detail below. The system in the embodiment of the present invention can be used to implement the corresponding method in the embodiment of the present invention. For details not disclosed in detail in the embodiment of the system of the present invention, please refer to the corresponding description in the embodiment of the method of the present invention.

[0082] Figure 5 FIG. 1 is an exemplary structural diagram of an interface expansion system of a virtual simulation system in an embodiment of the present invention. Figure 5 As shown, the system may include: a storage module 501 and a compilation module 502 .

[0083] Among them, the storage module 501 is used to store three types of pre-created files, including: resource class files, which are used to define the user interface of the target open communication protocol; configuration class files, which are used to configure various information defined in the user interface; and communication class files, which are used to transmit target open communication protocol data.

[0084] The compilation module 502 is used to compile the three types of files and generate executable files, so that when the executable files are executed, the target open communication protocol data can be transmitted between the virtual simulation system and a target open communication protocol device to achieve the interface expansion of the target open communication protocol of the virtual simulation system.

[0085] Figure 6 FIG. 1 is an exemplary structural diagram of the extended interface using system of the virtual simulation system in an embodiment of the present invention. Figure 6 As shown, the system may include: a user interface module 601 and a data transmission module 602 .

[0086] The user interface module 601 is used to provide the user with a target open communication protocol connection option, and after receiving the user's operation of clicking the target open communication protocol connection option, generate a target open communication protocol connection interface, and receive the user's configuration of the target open communication protocol connection based on the target open communication protocol connection interface.

[0087] The data transmission module 602 is used to transmit target open communication protocol data between the virtual simulation system and a target open communication protocol device based on the configuration of the target open communication protocol connection.

[0088] Figure 7 FIG. 1 is an exemplary structural diagram of a computer system in an embodiment of the present invention. Figure 7 As shown, the system may include: at least one memory 71 and at least one processor 72. In addition, some other components may be included, such as communication ports, etc. These components communicate via a bus 73.

[0089] Among them, at least one memory 71 is used to store a computer program. In one embodiment, the computer program can be understood to include Figure 5 The interface expansion system of the virtual simulation system shown and / or Figure 6 The extended interface of the virtual simulation system shown uses each module in the system. In addition, at least one memory 71 can also store an operating system, etc. The operating system includes but is not limited to: Android operating system, Symbian operating system, Windows operating system, Linux operating system, etc.

[0090] At least one processor 72 is used to call the computer program stored in at least one memory 71 to execute the interface expansion method of the virtual simulation system and / or the method for using the extended interface of the virtual simulation system described in the embodiment of the present invention. The processor 72 can be a CPU, a processing unit / module, an ASIC, a logic module or a programmable gate array, etc. It can receive and send data through the communication port.

[0091] It should be noted that not all steps and modules in the above processes and structure diagrams are necessary, and some steps or modules can be ignored according to actual needs. The execution order of each step is not fixed and can be adjusted as needed. The division of each module is only for the convenience of describing the functional division adopted. In actual implementation, a module can be implemented by multiple modules, and the functions of multiple modules can also be implemented by the same module. These modules can be located in the same device or in different devices.

[0092] It is understood that the hardware modules in the above-mentioned embodiments can be implemented mechanically or electronically. For example, a hardware module may include a specially designed permanent circuit or logic device (such as a dedicated processor, such as an FPGA or ASIC) for completing a specific operation. The hardware module may also include a programmable logic device or circuit (such as a general-purpose processor or other programmable processor) temporarily configured by software for performing a specific operation. As for whether to implement the hardware module in a mechanical manner, or using a dedicated permanent circuit, or using a temporarily configured circuit (such as configured by software), it can be determined based on cost and time considerations.

[0093] In addition, a computer-readable storage medium is also provided in the embodiment of the present invention, on which a computer program is stored, and the computer program can be executed by a processor and realize the interface expansion method of the virtual simulation system described in the embodiment of the present invention and / or the method for using the extended interface of the virtual simulation system. Specifically, a system or device equipped with a storage medium can be provided, on which a software program code for realizing the function of any of the embodiments in the above-mentioned embodiments is stored, and the computer (or CPU or MPU) of the system or device reads out and executes the program code stored in the storage medium. In addition, the operating system etc. operated on the computer can also be made to complete part or all of the actual operations by instructions based on the program code. The program code read out from the storage medium can also be written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion unit connected to the computer, and then the CPU etc. installed on the expansion board or expansion unit can be made to perform part and all of the actual operations based on the instructions of the program code, thereby realizing the function of any of the embodiments in the above-mentioned embodiments. The storage medium implementation scheme for providing the program code includes a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer via a communication network.

[0094] It can be seen from the above scheme that in an embodiment of the present invention, by setting a resource class file for defining a user interface of a target open communication protocol, a configuration class file for configuring various information defined in the user interface, and a communication class file for transmitting data using the target open communication protocol, and compiling the three types of files to generate an executable file, the interface extension of the target open communication protocol of the virtual simulation system is achieved by executing the executable file.

[0095] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. An interface expansion method for a virtual simulation system, characterized in that: include: Pre-creating three types of files, including: resource files for defining the user interface of the target open communication protocol; configuration files for configuring various information defined in the user interface; and communication files for performing target open communication protocol data transmission (101); Compiling the three types of files and generating an executable file, so that when the executable file is executed, target open communication protocol data can be transmitted between the virtual simulation system and a target open communication protocol device, thereby realizing interface expansion of the target open communication protocol of the virtual simulation system (102); The user interface of the target open communication protocol includes: connection properties of the target open communication protocol, actions for creating input and output variables, and input and output signal properties; The resource class file includes: a first resource class file for defining the connection attributes; a second resource class file for defining the action of creating input and output variables; and a third resource class file for defining the input and output signal attributes.

2. The interface expansion method of the virtual simulation system according to claim 1, characterized in that: The connection attributes of the target open communication protocol include: remote IP address, remote communication port, local communication port, input data type, input data length, output data type, output data length, data exchange, debugging, author, version, part or all of; The actions of creating input and output variables include: creating variables, adding variables, importing variables, exporting variables, and deleting some or all of the variables; The signal attributes include: input and output addresses and signal data types.

3. The interface expansion method of the virtual simulation system according to claim 2, characterized in that: The configuring of various information defined in the user interface includes: initializing the connection attributes, defining the types and lengths of the input and output variables, and creating the input and output variables.

4. The interface expansion method of the virtual simulation system according to claim 1, characterized in that: The communication class file traverses the input and output variables by calling the open event of the virtual simulation system, generates byte addresses and bit addresses for the input and output variables, and calls the target open communication protocol client function to create communication of the target open communication protocol when the virtual simulation system is running; The communication class file converts the received target open communication protocol data into the output data of the virtual simulation system by calling the first loop interrupt event of the virtual simulation system, traverses the input data of the virtual simulation system by calling the second loop interrupt event of the virtual simulation system, and converts the input data of the virtual simulation system into the sending data of the target open communication protocol.

5. The interface expansion method of a virtual simulation system according to any one of claims 1 to 4, characterized in that: The target open communication protocol is the Transmission Control Protocol TCP or the User Datagram Protocol UDP.

6. A method for using an extended interface of a virtual simulation system, characterized in that: include: Providing a user with a target open communication protocol connection option, and after receiving an operation in which the user selects the target open communication protocol connection option, generating a target open communication protocol connection interface, and receiving the user's configuration of the target open communication protocol connection based on the target open communication protocol connection interface (201); Transmitting target open communication protocol data between the virtual simulation system and a target open communication protocol device based on the configuration of the target open communication protocol connection (202); The target open communication protocol connection interface includes a configuration interface for connection properties of the target open communication protocol connection setting and a configuration interface for actions, types and lengths of input and output variables; The receiving of the user's configuration of the target open communication protocol connection based on the target open communication protocol connection interface includes: receiving the connection attributes set by the user for the target open communication protocol connection through the configuration interface of the connection attributes and configuring the action, type and length of the input and output variables based on the configuration interface of the type and length of the input and output variables.

7. The method for using the extended interface of the virtual simulation system according to claim 6, characterized in that: The target open communication protocol is the Transmission Control Protocol TCP or the User Datagram Protocol UDP.

8. An interface expansion system for a virtual simulation system, characterized in that: include: A storage module (501) is used to store three types of files created in advance, including: resource files for defining a user interface of a target open communication protocol; configuration files for configuring various information defined in the user interface; and communication files for transmitting data of the target open communication protocol; and A compiling module (502), used for compiling the three types of files and generating an executable file, so that when the executable file is executed, target open communication protocol data can be transmitted between the virtual simulation system and a target open communication protocol device to achieve interface expansion of the target open communication protocol of the virtual simulation system; The user interface of the target open communication protocol includes: connection properties of the target open communication protocol, actions for creating input and output variables, and input and output signal properties; The resource class file includes: a first resource class file for defining the connection attributes; a second resource class file for defining the action of creating input and output variables; and a third resource class file for defining the input and output signal attributes.

9. An extended interface using system for a virtual simulation system, characterized in that: include: A user interface module (601) is used to provide a user with a target open communication protocol connection option, and after receiving an operation of the user selecting the target open communication protocol connection option, generate a target open communication protocol connection interface, and receive the user's configuration of the target open communication protocol connection based on the target open communication protocol connection interface; A data transmission module (602), configured to transmit target open communication protocol data between the virtual simulation system and a target open communication protocol device based on the configuration of the target open communication protocol connection; The target open communication protocol connection interface includes a configuration interface for connection properties of the target open communication protocol connection setting and a configuration interface for actions, types and lengths of input and output variables; The receiving of the user's configuration of the target open communication protocol connection based on the target open communication protocol connection interface includes: receiving the connection attributes set by the user for the target open communication protocol connection through the configuration interface of the connection attributes and configuring the action, type and length of the input and output variables based on the configuration interface of the type and length of the input and output variables.

10. A computer system, characterized in that: include: At least one memory (71) and at least one processor (72), wherein: The at least one memory (71) is used to store a computer program; The at least one processor (72) is used to call the computer program stored in the at least one memory (71) to execute the interface expansion method of the virtual simulation system as described in any one of claims 1 to 5, and / or to execute the extended interface use method of the virtual simulation system as described in any one of claims 6 to 7.

11. A computer-readable storage medium having a computer program stored thereon; characterized in that: The computer program can be executed by a processor and implement the interface expansion method of the virtual simulation system as described in any one of claims 1 to 5, and / or execute the extended interface use method of the virtual simulation system as described in any one of claims 6 to 7.