Virtual keyboard free of computer debugging
Touch screen debugging is simulated on the PC through virtual keyboard and virtual serial port software, which solves the problem of not being able to build a debugging platform on the spot, and simplifies the debugging process without an external keyboard, improving debugging efficiency and flexibility.
Patent Information
- Application Number
- CN202510361200.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-07-22
AI Technical Summary
During the touch screen debugging process, a debugging platform is required and the conditions are not met on the site, so the external keyboard keys and the touch screen cannot be operated one by one, resulting in difficulty in debugging.
Use a virtual keyboard to replace the external keyboard. By writing and displaying the virtual keyboard on the PC, a virtual serial port pair is established, and key data is sent to the touch screen through the virtual serial port of the PC. Use the virtual serial port software vspd to virtually release two serial ports on the existing PC to realize the communication between the virtual keyboard and the touch screen.
There is no need to build a debugging platform, and the screen switching and parameter modification of the touch screen program are directly simulated on the PC, which simplifies operations and replaces the external physical keyboard. It has a simple structure and convenient configuration, and can improve or upgrade the touch screen configuration program.
Smart Images

Figure CN120353732A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and particularly to a virtual keyboard for debugging without connecting to a computer. Background Art
[0002] Currently, when the touch screen is in a development environment (i.e., touch screen configuration program debugging), it is necessary to first build a debugging platform. The debugging platform includes a touch screen and an external keyboard. The touch screen is connected to the external keyboard through a serial port or a 485 interface cable, and then the touch screen configuration program is debugged. The debugging content is as follows:
[0003] 1) When debugging the touch screen program, the keys of the external keyboard should correspond one by one to the corresponding screens on the touch screen;
[0004] 2) The screen switching on the touch screen is operated through the external keyboard. For example, when switching from screen A to screen B, it is necessary to press the corresponding key on the external keyboard for switching;
[0005] 3) When the corresponding parameters on the touch screen need to be modified, it is necessary to press the corresponding key on the external keyboard to achieve the parameter modification operation. For example, operate the "up / down keys" to select the corresponding parameter, then press the "OK key" to modify the value of the corresponding parameter, and finally press the "OK key" to complete the parameter modification.
[0006] However, some debugging sites do not have the conditions to build a debugging platform, and there is an urgent need to simulate and build a debugging tool for the use of debugging personnel. Summary of the Invention
[0007] The purpose of the present invention is to provide a virtual keyboard for debugging without connecting to a computer, which does not require the connection between the touch screen and the external keyboard, and uses the virtual keyboard to replace the external keyboard for use by debugging personnel during the project development stage.
[0008] To achieve the above purpose, the present invention is realized through the following technical solutions:
[0009] A virtual keyboard for debugging without connecting to a computer uses the virtual keyboard as an external physical keyboard of a PC, and specifically includes:
[0010] S1. Write and display a virtual keyboard on the PC;
[0011] S2. Use virtual serial port software on the PC to establish a virtual serial port one and a virtual serial port two, and interconnect the virtual serial port one and the virtual serial port two to form a virtual serial port pair;
[0012] S3. The touch screen configuration software on the PC is connected to the virtual serial port one, and the virtual keyboard is connected to the virtual serial port two;
[0013] S4. Send the key data of the virtual keyboard to the touch screen through the virtual serial port two of the PC.
[0014] In S2, the virtual serial port software uses vspd software.
[0015] In S4, sending the key data of the virtual keyboard to the touch screen through the virtual serial port two of the PC specifically includes:
[0016] S41. Establish a channel in the touch screen configuration software and configure the parameters of the channel;
[0017] S42. Use the channel to call virtual serial port one;
[0018] S43. Use the communication associated variable to associate with virtual serial port one. The communication associated variable is used to save the communication protocol data received by the general serial port parent device.
[0019] The parameters of the channel include the serial port number, baud rate, parity bit, data bit, and stop bit.
[0020] In S4, sending the key data of the virtual keyboard to the touch screen through the virtual serial port two of the PC is completed by calling the controls of VB software. The controls of VB software include MSComm control, ComboBox control, CommandButton control, and TextBox control. The specific content is as follows:
[0021] The MSComm control is used to call virtual serial port two;
[0022] The ComboBox control is used to modify the parameters of virtual serial port two;
[0023] The CommandButton control is used to send the key command of the virtual keyboard to virtual serial port two;
[0024] The TextBox control is used to display the status information of the MSComm control.
[0025] When modifying the parameters of virtual serial port two, when the open serial port command is executed, modify the configuration parameters of virtual serial port two called by the MSComm control, including the serial port number, baud rate, parity bit, data bit, and stop bit.
[0026] The operation of sending the key command of the virtual keyboard to virtual serial port two is as follows:
[0027] Click the key of the virtual keyboard;
[0028] Load the communication protocol command of the corresponding key into the TextBox control;
[0029] Execute the issuing instruction. The instruction formula is as follows:
[0030] MSComm.InputMode = comInputModeBinary ①
[0031] In formula ①, comInputModeBinary represents the binary working mode, and MSComm.InputMode represents setting the InputMode property of the MSComm control, which is used to notify the PC to work in the binary mode using the serial port;
[0032] Send the communication protocol data of the keys loaded by the extBox control to virtual serial port 1;
[0033] Send the communication protocol data of the keys of virtual serial port 2 to virtual serial port 1 through virtual serial port software.
[0034] Each key of the virtual keyboard has a corresponding communication protocol command, and the communication protocol command follows the Modbus communication protocol.
[0035] The status information of the MSComm control includes the open status of virtual serial port 2.
[0036] Compared with the prior art, the beneficial effects of the present invention are:
[0037] 1. Use a virtual keyboard as an external analog physical keyboard for the touch screen development environment on the PC side. There is no need to build a debugging platform. For the screen switching actions of debugging the touch screen program and the screen switching and parameter modification actions that require a keyboard, they can be directly simulated on the PC. The structure is simple and convenient for debugging;
[0038] 2. Use virtual serial port software on the PC to establish virtual serial port 1 and virtual serial port 2, and interconnect virtual serial port 1 and virtual serial port 2 to form a virtual serial port pair. Send the key data of the virtual keyboard to the touch screen through virtual serial port 2 of the PC; Since the serial port of the current PC motherboard has been phased out, the conventional operation: only a USB-to-serial port module can be connected through the USB interface of the PC, and if 2 available serial ports of the PC are to be realized, 2 USB interfaces of the PC need to be occupied. Both 2 USB interfaces need to be connected to the USB-to-serial port module, and then the 2 USB-to-serial port modules are connected to each other through wires; This connection method is cumbersome. The present invention does not need to carry a USB-to-serial port module, and uses vspd software to virtualize 2 serial ports on the existing PC, with simple configuration and convenient operation;
[0039] 3. Adding a virtual keyboard to the touch screen can conveniently improve or upgrade the configuration program of the touch screen, including screen switching and parameter modification, replacing the external physical keyboard;
[0040] 4. Each key of the virtual keyboard corresponds one-to-one with a device in the touch screen interface (such as device start / stop actions). For example, the protocol for the start key is 0106000000108806. The "10" in the protocol indicates that the "start key" of the keyboard is pressed. After the touch screen obtains the value "10" through the protocol, it stores it in the communication associated variable of the touch screen to implement the corresponding device start operation. The virtual keyboard completely replaces the external physical keyboard, facilitating debugging. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 It is a connection diagram of establishing a virtual serial port in a PC.
[0042] Figure 2 It is a ComboBox control diagram.
[0043] Figure 3 It is a serial port prompt diagram of the TextBox control.
[0044] Figure 4 It is a serial port configuration flow chart.
[0045] Figure 5 It is a flow chart for configuring virtual keyboard keys.
[0046] Figure 6 It is a serial port configuration diagram of the Kunlun Tongtai touch screen with an external keyboard.
[0047] Figure 7 It is a flow chart for configuring parameters.
[0048] Figure 8 It is a flow chart for pressing the setting button on the standby interface.
[0049] Figure 9 It is a flow chart for screen switching when pressing the setting button on the standby interface.
[0050] Figure 10 It is a flow chart for pressing the reset button on the standby interface.
[0051] Figure 11 It is a flow chart for sending keys 1-3 of the virtual keyboard.
[0052] Figure 12 It is a flow chart for sending the setting / start keys of the virtual keyboard.
[0053] Figure 13 It is a data preprocessing conversion flow chart.
[0054] Figure 14 It is a serial port open / close configuration flow chart. DETAILED IMPLEMENTATION MANNER
[0055] The present invention will be described in detail below with reference to the accompanying drawings of the specification. However, it should be noted that the implementation of the present invention is not limited to the following embodiments.
[0056] The following embodiments are implemented on the premise of the technical solution of the present invention, and detailed implementation manners and specific operation processes are given. However, the protection scope of the present invention is not limited to the following embodiments. The methods used in the following embodiments are all conventional methods unless otherwise specified.
[0057] Embodiment 1
[0058] A virtual keyboard that does not require on-machine debugging uses a virtual keyboard as an external physical keyboard of a PC, and specifically includes:
[0059] S1. Write and display a virtual keyboard on the PC;
[0060] S2. Use virtual serial port software on the PC to establish virtual serial ports com1 and com11, and interconnect virtual serial ports com1 and com11 to form a pair of virtual serial ports; the virtual serial port software uses vspd software;
[0061] S3. The touch screen configuration software on the PC is connected to virtual serial port com1, and the virtual keyboard is connected to virtual serial port com11;
[0062] S4. Send the key data of the virtual keyboard to the touch screen through virtual serial port com11 of the PC, specifically including:
[0063] S41. Establish a channel (i.e., the general serial port parent device of the touch screen configuration software) in the touch screen configuration software and configure the parameters of the general serial port parent device. The parameters of the general serial port parent device include the serial port number, baud rate, parity bit, data bit, and stop bit;
[0064] S42. Use the general serial port parent device to call virtual serial port com1;
[0065] S43. Use a communication associated variable to associate with virtual serial port com1. The communication associated variable is used to save the communication protocol data received by the general serial port parent device;
[0066] Sending the key data of the virtual keyboard to the touch screen through virtual serial port com11 of the PC is completed by calling the controls of VB software. The controls of VB software include MSComm control, ComboBox control, CommandButton control, and TextBox control. The specific content is as follows:
[0067] 1) The MSComm control is used to call virtual serial port com11;
[0068] 2) The ComboBox control is used to modify the parameters of the virtual serial port com11. When the open serial port command is executed, the configuration parameters of the virtual serial port com11 called by the MSComm control are modified, including the serial port number, baud rate, parity bit, data bit, and stop bit.
[0069] 3) The CommandButton control is used to send the key commands of the virtual keyboard to the virtual serial port com11. The content is as follows:
[0070] Click the keys of the virtual keyboard; each key of the virtual keyboard has a corresponding communication protocol command, and the communication protocol command follows the Modbus communication protocol.
[0071] Load the communication protocol command of the corresponding key into the TextBox control.
[0072] Execute the issued instruction. The instruction formula is as follows:
[0073] MSComm.InputMode = comInputModeBinary ①
[0074] In formula ①, comInputModeBinary represents the binary sending mode, and MSComm.InputMode represents setting the InputMode property of the MSComm control.
[0075] Notify the PC of the working mode of the serial port to be used, and notify the PC that the serial port of the main board needs to work in binary mode; in VB, comInputModeBinary represents the binary working mode.
[0076] Send the communication protocol data of the key loaded by the extBox control to the virtual serial port com11.
[0077] Send the communication protocol data of the key of the virtual serial port com11 to the virtual serial port com1 through the virtual serial port software.
[0078] 4) The TextBox control is used to display the status information of the MSComm control. The status information of the MSComm control includes the open status of the virtual serial port com11.
[0079] Embodiment 2
[0080] In this embodiment, a virtual keyboard for debugging without going on-site is the same as that in Embodiment 1, and on this basis, the process of using the virtual keyboard with the MCGS configuration software is added.
[0081] A virtual keyboard for debugging without going on-site specifically includes:
[0082] Use a third-party software, namely the virtual serial port software vspd, to create virtual serial ports on a PC:
[0083] On the PC, use the virtual serial port software to create virtual serial port com1 and virtual serial port com11, and interconnect virtual serial port com1 and virtual serial port com11 to form a virtual serial port pair, as shown in Figure 1 , taking the Kunlun Tongtai configuration touch screen as an example, the content is as follows:
[0084] First, open the McgsPro configuration touch screen software. After creating and saving the configuration project, select the "Device Window", create a "General Serial Port Parent Device" in the "Device Window", and set the parameters of the serial port such as "Serial Port Number", "Baud Rate", "Parity Bit", "Data Bit", and "Stop Bit". Then, establish communication associated variables so that the data received by this communication serial port can be effectively saved to this variable;
[0085] The "Keyboard Simulator" is used to display the virtual keyboard. The "Keyboard Simulator" is written in VB language and consists of VB's "MSComm", "ComboBox", "CommandButton", and "TextBox" controls to form the virtual keyboard display interface on the PC side. The specific content is as follows:
[0086] 1. The MSComm control is used to call the serial port;
[0087] For example, use the virtual serial port com11 established by the virtual serial port software vspd for virtual communication between the PC and the touch screen.
[0088] 2. The ComboBox control is used for the setting and modification of the serial port, as shown in Figure 2 , modify the parameters of this control. When the "Open Serial Port" command is executed, run the "Open Serial Port" script; modify the configuration parameters of the serial port called by the MSComm control, including "Serial Port Number", "Baud Rate", "Parity Bit", "Data Bit", and "Stop Bit" parameters.
[0089] 3. When the "Open Serial Port" action is executed, call the serial port configuration parameters set by the ComboBox control, including "Serial Port Number", "Baud Rate", "Parity Bit", "Data Bit", and "Stop Bit" parameters. Then, open the virtual serial port com11 of the PC according to the configuration parameters. When the serial port is successfully opened, the TextBox control gives a serial port opening success prompt: "STATUS: COM11OPEND, 9600,N,8,1", as shown in Figure 3 ;
[0090] The commands for opening the serial port include MSComm.CommPort for setting the communication serial port number, MSComm.Settings for setting the parameters of "serial port number", "baud rate", "parity bit", "data bit", "stop bit" of the serial port, and MSComm.PortOpen for enabling the communication serial port; after the serial port is successfully opened, judge the return value of the serial port opening status of MSComm.PortOpen to control the display status of the "TextBox" control. When the serial port is successfully opened, display "STATUS: COM11 OPEND, 9600,N,8,1", and when the serial port opening fails, display "STATUS: COM Port Cloced"; when the specified serial port to be opened does not exist on the PC, display a prompt window of "Failed, please try again", see Figure 4 。
[0091] 4. After the serial port is successfully called and opened, by clicking the button of the CommandButton control, the button command is sent to the virtual serial port com11; for example, when clicking the number button 1 of the "Keyboard Simulator", execute the script:
[0092] First, judge whether the currently called virtual serial port com11 is successfully opened;
[0093] If it is successfully opened, load the fixed communication protocol command "010600000002080B" of button 1 into the TextBox control. Each button has its own fixed format of communication protocol command, and the rule followed is the "Modbus communication protocol". After the fixed communication protocol is loaded into the TextBox control, directly execute the MSComm.InputMode = comInputModeBinary to issue the action instruction, and send the data in the format of "010600000002080B" loaded in the "TextBox" to the virtual serial port com11; thus, the Modbus communication protocol data "010600000002080B" of button 1 of the "Keyboard Simulator" will be sent to the virtual serial port com11, see Figure 5 。
[0094] 5. Each button has its own fixed data format, and the "Modbus communication protocol" is followed. For example, the data format of button 1 is "010600000002080B", where the "01" in the first byte represents the fixed ID as 1, "06" represents the write command of the "Modbus communication protocol", "0000" represents the fixed communication address as 0, "0002" represents the button value of the current button, and the subsequent "080B" represents the CRC check bit of the "Modbus communication protocol". The content is as follows:
[0095] 0 Button: 010600000001480A;
[0096] 1 Button: 010600000002080B;
[0097] 2 Button: 010600000003C9 CB;
[0098] 3 Button: 0106000000048809;
[0099] 4 Button: 01060000000549C9;
[0100] 5 Button: 01060000000609C8;
[0101] 6 Button: 010600000007C808;
[0102] 7 Button: 010600000008880C;
[0103] 8 Button: 01060000000949CC;
[0104] 9 Button: 01060000000A09 CD;
[0105] Up Button: 01060000000B C80D;
[0106] Down Button: 01060000000C 89CF;
[0107] Left Button: 01060000000D 480F;
[0108] Right Button: 01060000000E 080E;
[0109] Set Button: 01060000000F C9 CE;
[0110] Reset Button: 01060000001209C7;
[0111] Start Button: 0106000000108806;
[0112] Stop Button: 01060000001149C6;
[0113] Confirm Button: 010600000013C807;
[0114] Return Button: 01060000001489C5.
[0115] 6. After executing the command in Step 4, the virtual serial port com11 already has "Modbus communication protocol" data in the format of "010600000002080B". Since the internal soft connection between the virtual serial port com1 and the virtual serial port com11 has been established on the PC through the virtual serial port software vspd, the fixed data "010600000002080B" of the key 1 pressed on the "Keyboard Simulator" will be sent to the COM11 serial port first, and then sent to the virtual serial port com1 through the system soft connection.
[0116] Embodiment 3
[0117] In this embodiment, a virtual keyboard for debugging without going on-site is the same as that in Embodiment 1, and the working process of the virtual keyboard for debugging without going on-site is added on the basis of Embodiment 1 and / or Embodiment 2.
[0118] After the fixed value "010600000002080B" of the key 1 of the "Keyboard Simulator" successfully appears on the virtual serial port com1, after establishing and saving a configuration project using the MCGSPro touch screen configuration software of Kunlun Tongtai, select the "Device Window", establish a "General Serial Port Parent Device" in the "Device Window", and configure the "Serial Port Number", "Baud Rate", "Parity Bit", "Data Bit", "Stop Bit" of the serial port. After establishing the associated variables, the value of the key 1 of the "Keyboard Simulator" obtained through the virtual serial port com1 will be saved in the associated variables, and different logic functions and other script tasks can be executed on the configured touch screen through the values in this associated variable.
[0119] Open the "Keyboard Simulator" software (the "Keyboard Simulator" software is the COM11 virtualized by the virtual serial port software vspd) for basic serial port settings. First, select the "Serial Port Number", "Baud Rate", "Parity Bit", "Data Bit", "Stop Bit" according to the keyboard call serial port set for the touch screen configuration. This case takes the Kunlun Tongtai touch screen case as an example for illustration.
[0120] The external keyboard serial port of the Kunlun Tongtai touch screen is COM1, the baud rate is 9600, no parity, 8 data bits, and 1 stop bit. See Figure 6 。
[0121] The "Keyboard Simulator" software needs to be configured accordingly according to the serial port set by the configuration software. The parameters of the "Serial Port Number", "Baud Rate", "Parity Bit", "Data Bit", "Stop Bit" need to be consistent with the serial port information set by the configured display screen. See Figure 7 。
[0122] Open the online simulation function of the configured touch screen. After pressing the virtual key of the "Keyboard Simulator", according to the switching screens on the touch screen, the screen switching can be realized and the instruction can be issued. SeeFigure 8 , the setting button was pressed on the standby interface, see Figure 9 , in Figure 8 's interface, the setting button was pressed, and the touch screen realized the screen switching, switching from the standby interface to the main menu interface.
[0123] On the standby interface, the reset button was pressed. After the touch screen received the reset button protocol, the interface display action of the issued reset command was realized, see Figure 10 .
[0124] The script program of the virtual keyboard software developed in VB language, see Figure 11 , the script program of the 1 / 2 / 3 button sending protocol of the virtual keyboard; the script program of the setting start 4 / 5 button sending protocol of the virtual keyboard, see Figure 12 .
[0125] The processing process of the data sent by the virtual keyboard software is as follows:
[0126] For example, the protocol of button 0 is "010600000001480A". The protocol value is actually hexadecimal data. 010600000001480A belongs to the character form. If the PC wants to send the data in character form to the serial port, it needs to convert the character into hexadecimal data. The character form of 01, the hexadecimal representation is 00000001 data, which is converted into 0 and 1 data that the PC can recognize, see Figure 13 's code is the process of this conversion.
[0127] Figure 14 : When writing a program in VB and needing to use the serial port of the PC, first notify the PC that it needs to use the communication serial port of the PC motherboard, see Figure 14 , and notify the PC to open or close the corresponding communication serial port on the motherboard.
[0128] The present invention adopts a virtual keyboard as an external simulated physical keyboard of a touch screen development environment on a PC side, and does not need to build a debugging platform. The screen switching action of the debugging touch screen program, the screen switching and parameter modification actions that need to be implemented by the keyboard can be directly simulated and implemented on the PC, and the structure is simple and the debugging is convenient. Virtual serial port software is adopted on the PC to establish a virtual serial port 1 and a virtual serial port 2, and the virtual serial port 1 and the virtual serial port 2 are interconnected to form a virtual serial port pair, and the key data of the virtual keyboard is sent to the touch screen through the virtual serial port 2 of the PC. Since the serial port has been eliminated on the mainboard of the PC at present, the conventional operation is to connect a USB to serial port module only through the USB interface of the PC, and if it is to be realized that the PC has two available serial ports, it is necessary to occupy two USB interfaces of the PC, and both of the two USB interfaces need to be connected to the USB to serial port. module, and then connect the two USB to serial port modules to each other through wires; this connection method is cumbersome, the present invention does not need to carry a USB to serial port module, uses vspd software to virtualize two serial ports on the existing PC, is simple to set up and easy to operate; the touch screen adds a virtual keyboard, which can conveniently improve or upgrade the configuration program of the touch screen, including screen switching and parameter modification, replacing the external physical keyboard; each key of the virtual keyboard corresponds to a device in the touch screen screen (such as device start / stop action), for example, the protocol of the start key is 0106000000108806, and 10 in the protocol indicates that the "start key" of the keyboard is pressed. After the touch screen obtains the value 10 through the protocol, it is stored in the touch screen communication associated variable for implementing the corresponding device startup operation; the virtual keyboard completely replaces the external physical keyboard, which is convenient for debugging.
Claims
1. A virtual keyboard that does not require on-machine debugging, characterized in that, Using a virtual keyboard as an external physical keyboard for a PC, specifically including: S1. Write and display a virtual keyboard on the PC; S2. Use virtual serial port software on the PC to establish virtual serial port 1 and virtual serial port 2, and interconnect virtual serial port 1 and virtual serial port 2 to form a pair of virtual serial ports; S3. The touch screen configuration software on the PC is connected to virtual serial port 1, and the virtual keyboard is connected to virtual serial port 2; S4. Send the key data of the virtual keyboard to the touch screen through virtual serial port 2 of the PC.
2. The virtual keyboard that can be debugged without going on machine according to claim 2, wherein In S2, the virtual serial port software uses vspd software.
3. The virtual keyboard that can be debugged without going on the machine according to claim 1, characterized in that, In S4, the sending of the key data of the virtual keyboard to the touch screen through virtual serial port 2 of the PC specifically includes: S41. Establish a channel and configure the parameters of the channel in the touch screen configuration software; S42. Use the channel to call virtual serial port 1; S43. Use communication associated variables to associate with virtual serial port 1. The communication associated variables are used to save the communication protocol data received by the general serial port parent device.
4. A virtual keyboard that does not require on-machine debugging according to claim 3, characterized in that, The parameters of the channel include the serial port number, baud rate, parity bit, data bit, and stop bit.
5. A virtual keyboard that does not require on-machine debugging according to claim 1, characterized in that, In S4, the sending of the key data of the virtual keyboard to the touch screen through virtual serial port 2 of the PC is completed by calling the controls of VB software. The controls of VB software include MSComm control, ComboBox control, CommandButton control, and TextBox control. The specific content is as follows: The MSComm control is used to call virtual serial port 2; The ComboBox control is used to modify the parameters of virtual serial port 2; The CommandButton control is used to send the key command of the virtual keyboard to virtual serial port 2; The TextBox control is used to display the status information of the MSComm control.
6. The virtual keyboard that can be debugged without going on the machine according to claim 5, wherein, For the modification of the parameters of virtual serial port 2, when the open serial port command is executed, the configuration parameters of virtual serial port 2 called by the MSComm control are modified, including the serial port number, baud rate, parity bit, data bit, and stop bit.
7. A virtual keyboard that does not require on-machine debugging according to claim 5, characterized in that, The operation of sending the key command of the virtual keyboard to virtual serial port 2 is as follows: Click the key of the virtual keyboard; Load the communication protocol command corresponding to the key into the TextBox control; Execute the sending instruction. The instruction formula is as follows: MSComm.InputMode = comInputModeBinary ① In formula ①, comInputModeBinary represents the binary working mode, and MSComm.InputMode represents setting the InputMode property of the MSComm control, which is used to notify the PC to use the serial port to work in the binary mode; Send the communication protocol data of the key loaded by the extBox control to virtual serial port 1; Send the communication protocol data of the key of virtual serial port 2 to virtual serial port 1 through the virtual serial port software.
8. A virtual keyboard that does not require on-machine debugging according to claim 7, characterized in that, Each key of the virtual keyboard has a corresponding communication protocol command, and the communication protocol command follows the modbus communication protocol.
9. A virtual keyboard that does not require on-machine debugging according to claim 5, characterized in that, The status information of the MSComm control includes the open status of virtual serial port 2.