Introduction to recipe related instructions
The recipe function mainly uses four instructions. READ_DBL and WRIT_DBL are used to read and write recipe data blocks. RecipeExport and RecipeImport are used to convert between recipe data blocks and CSV files. The following describes the use of these four instructions.
READ_DBL
The purpose of the instruction is to transfer the value of the load memory part of the data block variable to the working memory part of the data block variable, as shown in Figure 1.
Typically used in recipes to read recipe data that is stored only in load memory into the active recipe.
Figure 1 READ_DBL and WRIT_DBL principles
Table 1 Parameter list
parameter | statement | Data Types | illustrate |
---|---|---|---|
REQ | Input | Bool | REQ = 1: Read request, usually edge triggered |
SRCBLK | Input | Variant | The data block variable to be read |
RET_VAL | Return | Int | Status, error messages |
BUSY | Output | Bool | BUSY = 1: Reading |
DSTBLK | Output | Variant | The data block variable to be written has the same data type and optimization properties as SRCBLK |
Take the example program for quick introduction to recipe function as an example
Figure 2 READ_DBL application
As shown in Figure 2, the actual parameter of SRCBLK is "DB1_Cake Recipe".Static_1["DB3_Operation".Index], where "DB1_Cake Recipe".Static_1 is an array of UDT type (cake recipe), and with the following ["DB3_Operation".Index], it becomes an element in the array, that is, "DB1_Cake Recipe".Static_1["DB3_Operation".Index] is a UDT type (cake recipe).
The actual parameter of DSTBLK is "DB2_Activity Recipe". "DB2_Activity Recipe" is a DB established based on the UDT type (cake recipe), which means that "DB2_Activity Recipe" can be regarded as a UDT type.
The actual parameters of SRCBLK and DSTBLK are both of UDT type. You can use the READ_DBL instruction to read "DB1_cake recipe".Static_1["DB3_operation".Index], which is a group in the recipe, into the active recipe.
WRIT_DBL
The purpose of the instruction is to write the working memory part of the data block variable to the load memory part of the data block variable, as shown in Figure 1.
Typically used in recipes to write the active recipe to recipe data stored only in load memory.
Table 2 Parameter list
parameter | statement | Data Types | illustrate |
---|---|---|---|
REQ | Input | Bool | REQ = 1: Write request, usually edge triggered |
SRCBLK | Input | Variant | The data block variable to be read |
RET_VAL | Return | Int | Status, error messages |
BUSY | Output | Bool | BUSY = 1: Reading |
DSTBLK | Output | Variant | The data block variable to be written has the same data type and optimization properties as SRCBLK |
Take the example program for quick introduction to recipe function as an example
Figure 3 WRIT_DBL application
As shown in Figure 3, the actual parameter of SRCBLK is "DB2_Activity Recipe". "DB2_Activity Recipe" is a DB established based on the UDT type (cake recipe), which means that "DB2_Activity Recipe" can be regarded as a UDT type.
The actual parameter of DSTBLK is "DB1_Cake Recipe".Static_1["DB3_Operation".Index], where "DB1_Cake Recipe".Static_1 is an array of UDT type (cake recipe), and with the following ["DB3_Operation".Index], it becomes an element in the array, that is to say, "DB1_Cake Recipe".Static_1["DB3_Operation".Index] is a UDT type (cake recipe).
The actual parameters of SRCBLK and DSTBLK are both of UDT type. You can use the WRIT_DBL instruction to write the active recipe to "DB1_Cake Recipe".Static_1["DB3_Operation".Index], which is a group in the recipe.
RecipeExport
The purpose of the instruction is to export the recipe data (UDT array) stored only in the working memory into a .csv file for easy editing in the EXCEL or ASCII editor on the computer.
Table 3 Parameter list
parameter | statement | Data Types | illustrate |
---|---|---|---|
REQ | Input | Bool | Edge trigger: Activate request |
RECIPE_DB | InOut | Variant | The recipe data block variables to be exported, usually an array of recipe UDT |
DONE | Output | Bool | DONE= 1: Export completed, only one scan cycle is maintained |
BUSY | Output | Bool | BUSY = 1: Export in progress |
ERROR | Output | Bool | ERROR= 1: Export error, only one scan cycle is maintained, error code see STATUS |
STATUS | Output | Word | Status or error code. Error code only lasts for one scan cycle. |
Take the example program for quick introduction to recipe function as an example
Figure 4 RecipeExport application
"DB1_Cake Recipe".Static_1 is an array of UDT type (cake recipe), which generates DB1_Cake Recipe.csv file after export.
RecipeImport
The purpose of the instruction is to import the .csv file edited by EXCEL or ASCII editor on the computer into recipe data (UDT array) stored only in the working memory.
Table 4 Parameter list
parameter | statement | Data Types | illustrate |
---|---|---|---|
REQ | Input | Bool | Edge trigger: Activate request |
RECIPE_DB | InOut | Variant | Imported recipe data block variables, usually array of recipe UDT |
DONE | Output | Bool | DONE= 1: Import completed, only one scan cycle is maintained |
BUSY | Output | Bool | BUSY = 1: Importing |
ERROR | Output | Bool | ERROR= 1: Import error, only one scan cycle is maintained, error code see STATUS |
STATUS | Output | Word | Status or error code. Error code only lasts for one scan cycle. |
Take the example program for quick introduction to recipe function as an example
Figure 5 RecipeImport application
After importing the DB1_cake recipe.csv file, you need to overwrite the value of the array of UDT type (cake recipe) "DB1_cake recipe".Static_1.
Previous article:A brief analysis of the trend and data recording curves in WINCC flexible
Next article:PLC troubleshooting flow chart share power failure check operation failure check input and output failure check
Recommended ReadingLatest update time:2024-11-16 14:56
- Popular Resources
- Popular amplifiers
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- EEWORLD University Hall----Automatic Control Theory Tsinghua University
- 28XXDSP code compilation problem under CCS
- [TI millimeter wave radar evaluation]_1_AWR1243BOOST unboxing
- Latest evaluation activity: i.MX series cross-border processor EasyARM-RT1052
- Mobile station development board STM32F767 Nucleo-144 is recommended!
- Component package disappeared after updating to PCB
- FPGA configuration peripheral circuit design conflicts and solutions
- The avr-iot discount purchase event that PIC held some time ago! Is it true that China cannot connect to Google's cloud service?
- Isn't this scope a prohibited item?
- Why does the power supply protect itself?