Control method based on embedded logic control programming language

Through the combination of embedded logic control programming language and sVM micro-core virtual machine, the automation problem of user needs to embedded device code is solved, intuitive control and cross-platform adaptation for ordinary users is realized, development costs and time are reduced, and the flexibility of embedded systems is improved.

CN120540641APending Publication Date: 2025-08-26王拓诚
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510533604.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-08-26

AI Technical Summary

Technical Problem

The existing technology is difficult to achieve full-chain automation from user demand text to embedded device code, especially in the case of hardware heterogeneity and fragmentation of the compilation environment, it is difficult for ordinary users to understand and adjust the underlying code generated by AI, resulting in high cost and poor flexibility in embedded system development.

Method used

Using an embedded logic control programming language method, a large model server works in collaboration with an embedded system, an sVM micro-core virtual machine and an instant compiler is used to automate the user's logical control requirements to code execution, and playing card symbols are used as variable system and syntax rules to support running in embedded systems with limited resources.

Benefits of technology

It realizes intuitive control of embedded devices by ordinary users, reduces development costs and time, improves system flexibility and technology popularity, and supports cross-platform adaptation and efficient code generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120540641A_ABST
    Figure CN120540641A_ABST
Patent Text Reader

Abstract

The invention discloses a control method based on an embedded logic control programming language, which can be operated in embedded equipment with limited resources to realize logic control on the embedded equipment. The method is suitable for embedded equipment with limited resources, such as household appliance control, Internet of Things terminals and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the control of an embedded system, and in particular to a control method based on an embedded logic control programming language. Background Art

[0002] With the rapid advancement of artificial intelligence technology, code generation tools have enabled the automated conversion of natural language requirements into high-level language code. However, this technological dividend has yet to fully benefit the embedded systems development field. In particular, for embedded logic control products such as home appliance control and IoT terminals, the full automation chain from user requirement text to device code injection still faces significant technical bottlenecks. This technical barrier is primarily due to the following reasons:

[0003] (1) Difficulty in adaptation caused by hardware heterogeneity:

[0004] There is significant diversity in the processor architectures used in embedded devices:

[0005] -MCS-51 series microcontrollers (such as AT89C51): The program memory is usually 4-8KB, and the on-chip RAM is only 128-256B

[0006] -ARM Cortex-M series (such as STM32F103): integrated 512KB Flash and 64KB SRAM

[0007] -RISC-V architecture (such as the Pingtouge Xuantie C910): supports dynamically scalable storage configurations;

[0008] This significant disparity in hardware resources makes cross-platform adaptation of AI-generated code difficult. For example, directly porting a memory management algorithm designed for the ARM architecture to an 8-bit microcontroller can cause system crashes due to insufficient stack space.

[0009] (2) The fragmentation dilemma of the compilation environment:

[0010] Embedded development generally relies on external compilation tool chains:

[0011] -Keil μVision: supports multiple architectures such as ARM and C51

[0012] -IAR Embedded Workbench: renowned for its low-power optimization

[0013] -ESP-IDF: a dedicated toolchain for Espressif IoT chips

[0014] These tool chains have significant differences in compilation parameter configuration (such as memory segmentation, interrupt vector table positioning), debug interface (JTAG / SWD) support, etc.

[0015] (3) The code is not very interpretable and requires professionals to understand it:

[0016] In a fully AI-programmed environment, ordinary users can request changes to control logic via voice or text. However, the underlying AI-generated code (such as C51 and ARM assembly) is difficult for non-experts to understand. This code lacks intuitive annotations and structured documentation, making it difficult for ordinary users to make direct adjustments. For example, complex temperature control algorithms are nearly unreadable after conversion to machine code, increasing project costs and time. Going forward, the interpretability and transparency of AI-generated code must be enhanced to enable ordinary users to understand and participate in system customization, thereby increasing the accessibility and flexibility of the technology.

[0017] Therefore, all types of control systems currently disclosed are specifically used for a certain type of embedded device. Summary of the Invention

[0018] Based on the above description, the present invention proposes a control method based on an embedded logic control programming language, which can be run in a resource-limited embedded system to implement logic control of embedded devices.

[0019] The technical solutions adopted in the present invention are as follows:

[0020] A control method based on an embedded logic control programming language utilizes AI compilation of the embedded logic control programming language and relies on the collaborative operation of a large model server and embedded system to achieve full-chain automation from user logic control requirements to code execution. The steps are as follows:

[0021] 1) The user inputs the logical control requirements into the programming agent, which analyzes the requirements based on AI capabilities and generates an execution script;

[0022] 2), based on the execution script generated in 1), it is transmitted to the embedded system through the Internet of Things;

[0023] 3),The embedded system in 2) is equipped with an sVM micro-kernel virtual machine, which has a built-in real-time compiler. When the real-time compiler receives the execution script, it immediately performs the compilation operation and converts the execution script into a binary program in the embedded logic control programming language;

[0024] 4) The embedded logic control programming language binary program directly enters the running sandbox, completes the code running in the sandbox environment, and drives the embedded system to implement the corresponding logic control function.

[0025] Embedded logic control programming language includes variable system, grammar rules and program structure;

[0026] Variable system, including perception input type variables, drive output type variables, system internal timer type variables, system internal counter type variables and network communication type variables;

[0027] The perceptual input type variable is defined as an S-type variable, represented by the Ace of Spades to the King of Spades in a playing card, with a total of 13 spade cards. The S-type variables are specifically represented as S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, and S13, representing 13 perceptual input type variables;

[0028] The driver output type variable is defined as a D-type variable, which is represented by the A to K of diamonds in the playing card game, with a total of 13 diamond cards. The D-type variable specifically represents D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, and D13;

[0029] The timer type variables within the system are defined as T-type variables, represented by the Ace of Hearts to the King of Hearts in a playing card, with a total of 13 hearts. The T-type variables are specifically represented as T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, and T13;

[0030] The counter type variable inside the system is defined as a C-type variable, which is represented by the A to K of clubs in a playing card. There are 13 club cards in total. The C-type variable specifically represents C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, and C13.

[0031] Network communication variables are represented by the Joker and the Jack in playing cards, specifically BJ and LJ;

[0032] The grammar rules include a front part and a back part. The front part and the back part are separated by ?, and the complete statement is enclosed in "()". The front part is a relational expression, and the back part is an arithmetic expression. That is, a typical statement is a relational expression? an arithmetic expression.

[0033] Relational expressions and arithmetic expressions have the same structure, including variables, operators, and operands;

[0034] Operators are divided into two categories, relational operators and arithmetic operators;

[0035] Relational operators are used to determine the relationship between variables and operands, including >, <, =, and #. > stands for greater than,

[0036] < means less than, = means equal to, # means not equal to;

[0037] The results of relational operators have two states: true and false.

[0038] The basis for judging the result of the operation is whether the variable and the operand meet the set relationship. If they do, the result of the operation is true, otherwise it is false;

[0039] Arithmetic operators, including assignment, addition, subtraction, and negation. Assignment is represented by ":=", addition is represented by "+=", subtraction is represented by "-=", and negation is represented by "!=". Each operator symbol corresponds to a specific operation function;

[0040] The operand is an integer ranging from 0 to 99, and the initial value is 0;

[0041] When a statement contains multiple relational expressions, each relational expression is separated by the symbol " / ". Multiple relational expressions are in a conditional relationship with each other, which means that all conditions must be met at the same time for the subsequent arithmetic expression to take effect;

[0042] When a statement contains multiple arithmetic expressions, each arithmetic expression is separated by ",";

[0043] Program structure, the entire program is enclosed in {}; the program structure includes var, state, system, and control; the var part represents the variables used in programming; the state part is the physical meaning represented by the different operations of these variables; the system part is the variables used within the system; the control part is the control program; / / is added after the statement for comments.

[0044] Furthermore, S-type variables have four relational operations: greater than >, less than <, equal to =, and not equal to #, but no arithmetic operations.

[0045] Furthermore, D-type variables can perform two arithmetic operations: assignment = and negation! =, and four relational operations: greater than >, less than <, equal to =, and not equal to #.

[0046] Furthermore, T-type variables can perform assignment: = arithmetic operations, greater than >, less than <, equal to =, not equal to # relational operations.

[0047] Furthermore, C-type variables can perform the following arithmetic operations: assignment: =, addition + =, subtraction - =, and relational operations: greater than >, less than <, equal to =, and not equal to #.

[0048] Furthermore, BJ performs assignment: = arithmetic operation, greater than >, less than <, equal to =, not equal to # relational operations.

[0049] Furthermore, LJ has relational operations of greater than >, less than <, equal to =, and not equal to #, but no arithmetic operations.

[0050] This invention uses an embedded logic control programming language based on playing card symbols, which can be run in a virtual machine (sVM) within a resource-limited embedded system to implement logical control of embedded devices. The virtual machine (sVM) is a programming language for controlling household appliances and automation equipment using an embedded logic control programming language. Its parser runs on 8-bit and 32-bit embedded systems.

[0051] Embedded logic control programming language has the following characteristics:

[0052] Syntax Minimalist: The core syntax elements are limited to 20 or fewer. For example, conditional statements only support the `IF-WHEN-THEN` structure, avoiding complex nested logic.

[0053] Semantic self-description: Automatically annotate hardware attributes of variables through metadata tags to decouple code from hardware.

[0054] sVM adopts a dual-engine architecture to achieve efficient operation: the just-in-time compiler (JIT) completes syntax analysis and target code generation while receiving the code, and supports dynamic loading to different hardware platforms; the running sandbox uses memory mapping technology to achieve code isolation to avoid interference between tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0056] The technical solution of the present invention is described in detail below. The embodiments of the present invention are only for illustrating a specific structure, and the scale of the structure is not limited by the embodiments.

[0057] Example 1: Control of an electric oven based on an embedded logic control programming language:

[0058] See Figure 1 This flowchart uses an electric oven as an example. The basic configuration of an electric oven includes three buttons: a start / stop button, a timer button, and a power selector button; six LEDs, two of which are high and low power indicators, four of which are time indicators; and a heating relay that controls the conduction of the resistor.

[0059] The oven's main control board uses the STC8H4K64TL microcontroller, which uses an MCS-51 core and has 64KB of program memory and 4KB of data memory. The sVM microkernel virtual machine, compiled within the STC8H4K64TL, occupies 4KB of program memory and 512 bytes of data memory.

[0060] The hardware driver has three buttons: a start / stop button, a time selection button, and a power selection button, corresponding to the microcontroller's P0.0, P0.1, and P0.2 pins, respectively. Six LEDs, two of which are high and low power indicators and four are time indicators, correspond to the microcontroller's P2.0, P2.1, P2.2, P2.3, P2.4, and P2.5 pins, respectively. A heating relay controls the conduction of the resistor, corresponding to the microcontroller's P2.6 pin.

[0061] Input and output variable mapping driver is

[0062] The microcontroller P0.0 port level is mapped to the S1 variable state;

[0063] The microcontroller P0.1 port level is mapped to the S2 variable state;

[0064] The microcontroller P0.2 port level is mapped to the S3 variable state;

[0065] The D1 variable state is mapped to the P2.0 port of the microcontroller;

[0066] The D2 variable state is mapped to the MCU P2.1 port;

[0067] The D3 variable status is mapped to the P2.2 port of the microcontroller;

[0068] The D4 variable status is mapped to the P2.3 port of the microcontroller;

[0069] The D5 variable status is mapped to the P2.4 port of the microcontroller;

[0070] The D6 variable status is mapped to the P2.5 port of the microcontroller;

[0071] The D7 variable status is mapped to the MCU P2.6 port;

[0072] In the system clock part, the MCU uses hardware timer interrupt, which triggers the sVM micro-kernel virtual machine to run the program once every 10ms.

[0073] The electric oven main control board uses the STC8H4K64TL microcontroller to connect to the ESP8266Wifi module through the serial port to access the network.

[0074] The embedded logic control programming language sets the variables as:

[0075] S1; / / Start / Stop button

[0076] S2; / / Heating power selection button

[0077] S3; / / Heating time selection button

[0078] D1; / / Low power indicator light

[0079] D2; / / High-level power indicator light

[0080] D3; / / 5 minute timer indicator light

[0081] D4; / / 10 minute timer indicator light

[0082] D5; / / 15 minute timer indicator light

[0083] D6; / / 30 minute timer indicator light

[0084] D7; / / heating control relay

[0085] The variable status is

[0086] S1:=1; / / Start / Stop button pressed

[0087] S1:=0; / / Start / Stop button released

[0088] S2:=1; / / Heating power selection button is pressed

[0089] S2:=0; / / Heating power selection button released

[0090] S3:=1; / / Heating time selection button is pressed

[0091] S3:=0; / / Release the heating time selection button

[0092] D1:=1; / / Low power indicator light is on

[0093] D1:=0; / / Low power indicator light off

[0094] D2:=1; / / High power indicator light is on

[0095] D2:=0; / / High power indicator light is off

[0096] D3:=1; / / 5 minutes timer indicator light is on

[0097] D3:=0; / / 5 minutes timer indicator light turns off

[0098] D4:=1; / / 10 minutes timer indicator light is on

[0099] D4:=0; / / 10 minutes timer indicator light turns off

[0100] D5:=1; / / 15 minutes timer indicator light is on

[0101] D5:=0; / / 15 minutes timer indicator light turns off

[0102] D6:=1; / / 30 minutes timer indicator light is on

[0103] D6:=0; / / 30 minutes timer indicator light turns off

[0104] D7:=1; / / heating control relay is turned on

[0105] D7:=0; / / heating control relay is disconnected

[0106] Control requirements of electric oven:

[0107] The electric oven has two working states: setting and heating.

[0108] The two working states are switched by the start / stop button. After the setting is completed, press the start button to switch to the heating state, and press it again to cancel the heating and switch to the setting state.

[0109] In the setting state, you can set the heating time and heating power.

[0110] Heating time setting: Press the time selection button to switch the heating time. The switching time is 4 gears: 5 minutes, 10 minutes, 15 minutes, and 30 minutes;

[0111] Heating power setting: Press the power selection button to switch the heating power. The switching power is 2 gears: high power and low power.

[0112] In the heating state, the remaining time display and heating power control are required.

[0113] Remaining time display: The indicator light of the gear corresponding to the remaining time flashes, 1 second on, 1 second off, and does not flash when stopped. For example, the gear LED lights flash when there are 4 minutes or 5 minutes left, and the gear LED lights flash when there are 8 minutes or 10 minutes left.

[0114] Heating power control: The heating power is controlled by controlling PWM, the control cycle is 1 minute, PWM is 50% for low power, and PWM is 100% for high power.

[0115] User needs to import the large model, and the large model output execution script is:

[0116]

[0117]

[0118]

[0119]

[0120]

[0121] The generated execution script is transmitted to the electric oven system through the Internet of Things. The electric oven system is equipped with an sVM microkernel virtual machine with a built-in just-in-time compiler. When the just-in-time compiler receives the execution script, it immediately performs a compilation operation and converts the execution script into an embedded logic control programming language binary program. The embedded logic control programming language binary program directly enters the running sandbox, completes the code execution in the sandbox environment, and drives the electric oven to implement the corresponding logic control function.

[0122] Example 2: An embedded logic control programming language is used to automatically control the suitable environmental conditions for vegetable growth in an Internet of Things-based agricultural greenhouse:

[0123] The IoT agricultural greenhouse is basically equipped with four sensors: soil moisture sensor, light intensity sensor, temperature sensor, and carbon dioxide concentration sensor; three actuators: irrigation nozzle, sunshade motor, and ventilation fan motor; and five indicator lights: low soil moisture indicator, normal soil moisture indicator, excessive light indicator, high temperature indicator, and high carbon dioxide concentration indicator.

[0124] The IoT agricultural greenhouse main control board uses the STC32G8K64 microcontroller, which uses the MCS-251 core and has 64KB of program memory and 8KB of data memory. The sVM microkernel virtual machine, compiled within the STC32G8K64 microcontroller, occupies 4KB of program memory and 512 bytes of data memory.

[0125] The hardware driver consists of four sensors: soil moisture, light intensity, temperature, and CO2 concentration. These sensors correspond to the microcontroller's P1.0, P1.1, P1.2, and P1.3 pins, respectively. Sensor values ​​are acquired through 12-bit ADC sampling. Three actuators: the irrigation nozzle, sunshade motor, and ventilation fan motor correspond to the microcontroller's P0.0, P0.1, and P0.2 pins, respectively. Five indicators: low soil moisture, normal soil moisture, excessive light, high temperature, and high CO2 concentration correspond to the microcontroller's P2.0, P2.1, P2.2, P2.3, and P2.4 pins, respectively.

[0126] Input and output variable mapping driver is

[0127] The ADC sampling value of the MCU P1.0 port voltage is mapped to the S1 variable through normalization 0-99;

[0128] The ADC sampling value of the MCU P1.1 port voltage is mapped to the S2 variable through normalization 0-99;

[0129] The ADC sampling value of the MCU P1.2 port voltage is mapped to the S3 variable by normalizing 0-99;

[0130] The ADC sampling value of the MCU P1.3 port voltage is mapped to the S4 variable by normalizing 0-99;

[0131] The D1 variable state is mapped to the P0.0 port of the microcontroller;

[0132] The D2 variable state is mapped to the P0.1 port of the microcontroller;

[0133] The D3 variable state is mapped to the P0.2 port of the microcontroller;

[0134] The D4 variable status is mapped to the P2.0 port of the microcontroller;

[0135] The D5 variable status is mapped to the microcontroller P2.1 port;

[0136] The D6 variable status is mapped to the P2.2 port of the microcontroller;

[0137] The D7 variable status is mapped to the P2.3 port of the microcontroller;

[0138] The D8 variable status is mapped to the P2.4 port of the microcontroller;

[0139] In the system clock part, the MCU uses hardware timer interrupt, which triggers the sVM micro-kernel virtual machine to run the program once every 10ms.

[0140] The STC32G8K64 MCU is connected to the China Mobile IOT module through the serial port to access the network.

[0141] The embedded logic control programming language sets the variables as:

[0142] S1; / / Soil moisture sensor (value range 0-100, indicating soil moisture percentage)

[0143] S2; / / Light intensity sensor (value range 0-1000, indicating relative value of light intensity)

[0144] S3; / / Temperature sensor (value range 0-50, indicating temperature in degrees Celsius)

[0145] S4; / / CO2 concentration sensor (value range 0-1000, indicating CO2 concentration ppm)

[0146] D1; / / irrigation sprinkler (1 is on, 0 is off)

[0147] D2; / / sunshade curtain motor (1 is to unfold the sunshade curtain, 0 is to retract the sunshade curtain)

[0148] D3; / / Ventilation fan motor (1 is on, 0 is off)

[0149] D4; / / Soil humidity low indicator light

[0150] D5; / / Soil humidity normal indicator light

[0151] D6; / / Excessive light indicator

[0152] D7; / / Over temperature indicator light

[0153] D8; / / CO2 concentration is too high indicator light

[0154] The variable status is

[0155] S1:=[0-100]; / / Soil moisture sensor value

[0156] S2:=[0-1000]; / / light intensity sensor value

[0157] S3:=[0-50]; / / temperature sensor value

[0158] S4:=[0-1000]; / / CO2 concentration sensor value

[0159] D1:=1; / / irrigation sprinkler is on

[0160] D1:=0; / / Irrigation sprinkler closed

[0161] D2:=1; / / sunshade curtain motor unfolds the sunshade curtain

[0162] D2:=0; / / sunshade curtain motor retracts the sunshade curtain

[0163] D3:=1; / / ventilation fan motor is turned on

[0164] D3:=0; / / ventilation fan motor off

[0165] D4:=1; / / low soil humidity indicator light is on

[0166] D4:=0; / / low soil humidity indicator light is off

[0167] D5:=1; / / The indicator light is on when the soil humidity is normal

[0168] D5:=0; / / Soil humidity is normal and the indicator light is off

[0169] D6:=1; / / The indicator light is on when the light is too strong

[0170] D6:=0; / / The indicator light turns off when the light is too strong

[0171] D7:=1; / / The temperature is too high and the indicator light is on

[0172] D7:=0; / / The temperature is too high and the indicator light is off

[0173] D8:=1; / / The indicator light is on when the carbon dioxide concentration is too high

[0174] D8:=0; / / The indicator light turns off when the carbon dioxide concentration is too high

[0175] Equipment control requirements: The IoT agricultural greenhouse is automatically controlled according to the suitable environmental conditions for plant growth. For soil moisture, when the humidity is lower than 30%, the irrigation nozzle is turned on, and the low soil humidity indicator light is on, and the normal soil humidity indicator light is off; when the humidity reaches 60%-80%, the irrigation nozzle is turned off, the normal soil humidity indicator light is on, and the low soil humidity indicator light is off.

[0176] As for light intensity, when the light intensity is higher than 800, the sunshade is unfolded and the excessive light indicator light is on; when the light intensity is lower than 600, the sunshade is folded and the excessive light indicator light is off.

[0177] As for temperature, when the temperature is higher than 35℃, the ventilation fan motor is turned on and the high temperature indicator light is on; when the temperature is lower than 30℃, the ventilation fan motor is turned off and the high temperature indicator light is off.

[0178] For carbon dioxide concentration, when the concentration is higher than 800ppm, turn on the ventilation fan motor (ventilation helps to reduce the carbon dioxide concentration), and the carbon dioxide concentration is too high indicator light will light up; when the concentration is lower than 600ppm, turn off the ventilation fan motor and the carbon dioxide concentration is too high indicator light will go out.

[0179] Input user requirements into the big model and output the execution script:

[0180]

[0181]

[0182]

[0183] The generated execution script is transmitted to the control system of the agricultural greenhouse based on the Internet of Things through the Internet of Things; the system is equipped with an sVM microkernel virtual machine, and the sVM microkernel virtual machine has a built-in just-in-time compiler. When the just-in-time compiler receives the execution script, it immediately performs the compilation operation and converts the execution script into an embedded logic control programming language binary program; the embedded logic control programming language binary program directly enters the running sandbox, completes the code running in the sandbox environment, and drives the control system to realize the corresponding logic control function.

Claims

1. A control method based on embedded logic control programming language, characterized in that By leveraging AI compilation of embedded logic control programming languages ​​and relying on the collaborative operation of large model servers and embedded systems, full automation is achieved, from user logic control requirements to code execution. The steps are as follows: 1) The user inputs the logical control requirements into the programming agent, which analyzes the requirements based on AI capabilities and generates an execution script; 2), based on the execution script generated in 1), it is transmitted to the embedded system through the Internet of Things; 3),The embedded system in 2) is equipped with an sVM micro-kernel virtual machine, which has a built-in real-time compiler. When the real-time compiler receives the execution script, it immediately performs the compilation operation and converts the execution script into a binary program in the embedded logic control programming language; 4) The embedded logic control programming language binary program directly enters the running sandbox, completes the code running in the sandbox environment, and drives the embedded system to implement the corresponding logic control function.

2. The control method based on embedded logic control programming language according to claim 1, characterized in that The embedded logic control programming language includes a variable system, grammatical rules and program structure; The variable system includes perception input type variables, drive output type variables, system internal timer type variables, system internal counter type variables and network communication type variables; The perceptual input type variable is defined as an S-type variable, represented by the Ace of Spades to the King of Spades in a playing card, with a total of 13 spade cards. The S-type variables are specifically represented as S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, and S13, representing 13 perceptual input type variables; The driver output type variable is defined as a D-type variable, which is represented by the A to K of diamonds in the playing card game, with a total of 13 diamond cards. The D-type variable specifically represents D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, and D13; The timer type variables within the system are defined as T-type variables, represented by the Ace of Hearts to the King of Hearts in a playing card, with a total of 13 hearts. The T-type variables are specifically represented as T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, and T13; The counter type variable inside the system is defined as a C-type variable, which is represented by the A to K of clubs in a playing card. There are 13 club cards in total. The C-type variable specifically represents C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, and C13. Network communication variables are represented by the Joker and the Jack in playing cards, specifically BJ and LJ; The grammatical rules include a front part and a back part; the front part and the back part are separated by ?, and the complete statement is enclosed in "()"; the front part is a relational expression, and the back part is an arithmetic expression; that is, a typical statement is a relational expression? arithmetic expression; Relational expressions and arithmetic expressions have the same structure, including variables, operators, and operands; Operators are divided into two categories, relational operators and arithmetic operators; Relational operators, which determine the relationship between variables and operands, include >, <, =, and #, where > represents greater than, < represents less than, = represents equal to, and # represents not equal to. The results of relational operators have two states: true and false. The basis for judging the result of the operation is whether the variable and the operand meet the set relationship. If they do, the result of the operation is true, otherwise it is false; Arithmetic operators, including assignment, addition, subtraction, and negation. Assignment is represented by ":=", addition is represented by "+=", subtraction is represented by "-=", and negation is represented by "!=". Each operator symbol corresponds to a specific operation function; The operand is an integer ranging from 0 to 99, and the initial value is 0; When a statement contains multiple relational expressions, each relational expression is separated by the symbol " / ". Multiple relational expressions are in a conditional relationship with each other, which means that all conditions must be met at the same time for the subsequent arithmetic expression to take effect; When a statement contains multiple arithmetic expressions, each arithmetic expression is separated by ","; The program structure is enclosed in {}; the program structure includes var, state, system, and control; var represents the variables used in programming; state is the physical meaning represented by different operations of the variables; system is the internal variables of the system used; control is the control program; / / is added after the statement for comments.

3. The control method based on embedded logic control programming language according to claim 2, characterized in that The S-type variable has four relational operations: greater than >, less than <, equal to =, and not equal to #, but no arithmetic operations.

4. The control method based on embedded logic control programming language according to claim 2, characterized in that The D-type variable can perform two arithmetic operations: assignment = and negation! =, and four relational operations: greater than >, less than <, equal to =, and not equal to #.

5. The control method based on embedded logic control programming language according to claim 1, characterized in that The T-type variable can perform the following operations: assignment, arithmetic operation, greater than >, less than <, equal to =, not equal to #.

6. The control method based on embedded logic control programming language according to claim 2, characterized in that The C-type variables are capable of performing the following arithmetic operations: assignment =, addition + =, subtraction - =, and relational operations: greater than >, less than <, equal to =, and not equal to #.

7. The control method based on embedded logic control programming language according to claim 2, characterized in that The BJ described above has the functions of performing assignment: = arithmetic operation, greater than >, less than <, equal to =, not equal to # relational operation.

8. The control method based on embedded logic control programming language according to claim 1, characterized in that The LJ has relational operations of greater than >, less than <, equal to =, not equal to #, but no arithmetic operations.