A code generation method and device
A code generation and code technology, applied in the field of vehicles, can solve problems such as low code execution efficiency, and achieve the effect of improving execution efficiency and reducing execution steps.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0055] see image 3 , which is a flow chart of the code generation method provided by the first method embodiment of the present application.
[0056] The code generation method applied to the programmable controller provided by the embodiment of the present application includes steps S31-S33:
[0057] S31: Obtain the code to be processed.
[0058] The code to be processed can be an intermediate code or a local code; moreover, the application does not limit the source of the code to be processed, for example, the code to be processed can be downloaded from the host computer, or can be read from the storage space of the PLC. fetched.
[0059] It should be noted that, in this application, the processing process of the intermediate code is the same as that of the local code. Therefore, the code generation method provided by this application can be used to generate the execution code corresponding to the intermediate code, so that the subsequent PLC can use the interpreter The ...
Embodiment approach
[0079] In addition, this application also provides another implementation manner of step S32A1, in this implementation manner, S32A1 specifically includes steps S32A11-S32A12:
[0080] S32A11: Analyzing each instruction of each task code in each operation mode, and obtaining the instruction space requirement value, input parameter space requirement value and initialization parameter space requirement value corresponding to each task code in each operation mode.
[0081] The instruction space requirement value refers to the storage space value required when the code instruction is stored.
[0082] The input parameter space requirement value refers to the storage space value required when the input parameter is stored.
[0083] The initialization parameter space requirement value refers to the storage space value required for initializing parameter storage.
[0084] As an example, when each task code includes a system operation mode, S32A11 may specifically be: analyze each ins...
Embodiment 2
[0133] It should be noted that the code generation method provided by method embodiment 2 is a specific implementation of the code generation method provided by method embodiment 1. For technical details, please refer to method embodiment 1.
[0134] see Figure 7 , which is a flow chart of the code generation method provided by the second method embodiment of the present application.
[0135] The code generation method provided by the embodiment of the present application includes steps S71-S78:
[0136] S71: Download the code to be processed from the host computer or read the code to be processed from the storage space of the PLC; wherein, the code to be processed includes at least one task code, and the code to be processed is an intermediate code or a local code.
[0137] S72: Get the current task code.
[0138] As an implementation manner, S72 may specifically be: select a task code according to a preset task selection method from all untraversed task codes in the code ...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com