RCP (recipe)

The RCP instruction reads the data value of a variable from the recipe data file that resides in the recipe data file folder in the SD card and updates the value to the run-time engine. Writes the variable value with the run-time engine to the recipe data file in the SD card.
Languages supported: Function block diagram, ladder diagram, structured text.
This instruction applies to the L20E, L50E, and L70E controllers.
RCP
RCP
RCP parameters
Parameter
Parameter Type
Data Type
Description
Enable
Input
BOOL
Enable recipe read/write instruction block.
  • TRUE: Rising edge detected, execute recipe instruction if the previous operation is completed.
  • FALSE: Rising edge not detected, do not execute recipe instruction.
RWFlag
Input
BOOL
TRUE: RWFlag (Write operation). Recipe writes the variable's values with the run-time engine into a recipe data file on the SD card.
FALSE: RWFlag (Read operation). The recipe reads the variable's values from the SD card and updates the corresponding variable's value to the runtime engine.
CfgID
Input
USINT
Recipe configuration VA ID number 1-10.
FileName
Input
STRING
Recipe data file name (maximum 30 characters length).
Status
Output
USINT
Recipe instruction block current status.
RCP status codes:
  • 0: Idle.
  • 1: Doing.
  • 2: Succeed, complete without error.
  • 3: Error, complete with error.
ErrorID
Output
UDINT
The numeric RCP error code. 
The definitions are defined in RCP error codes.

RCP error codes

RCP error codes
Error Code
Error Name
0
RCP_ERR_NONE
1
RCP_ERR_NO_SDCARD
2
RCP_ERR_DATAFILE_FULL
3
RCP_ERR_DATAFILE_ACCESS
SD card is identified as:
  • Broken
  • Full
  • Read-only
4
RCP_ERR_CFG_ABSENT
5
RCP_ERR_CFG_ID
6
RCP_ERR_RESOURCE_BUSY
7
RCP_ERR_CFG_FORMAT
8
RCP_ERR_RESERVED 
Reserved for future possible expansion.
9
RCP_ERR_UNKNOWN
10
RCP_ERR_DATAFILE_NAME
11
RCP_ERR_DATAFOLDER_INVALID
12
RCP_ERR_DATAFILE_ABSENT
13
RCP_ERR_DATAFILE_FORMAT
14
RCP_ERR_DATAFILE_SIZE
Recipe data file size is too large (>4kb).

RCP examples

RCP function block diagram example
RCP function block diagram example
RCP ladder diagram example
RCP ladder diagram example
RCP structured text example
RCP structured text example
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal