Functions for Recipe

Type

Format

Description

Function

GetRcpDnGroup(“Model Name”)

Returns the recently downloaded recipe group name from the recipe model.

Function

GetRcpGroupName (“Model name”, Group number)

Returns the recipe group name.

Function

GetRcpItemName (“Model name”, Data item number)

Returns the name of the recipe data.

Subroutine

RcpConfig()

Displays the recipe settings window in Xpanel runtime.

Subroutine

RcpCsvRd(“Model Name”, “CSV File Name”, CSV file directory)

Reads recipe model group data (*.csv file) and saves it in the memory.

Subroutine

RcpCsvWr(“Model Name”, “CSV File Name”, CSV file directory)

Saves model group data in the memory as a CSV file format.

Subroutine

RcpDownLoad(“Model Name”, Group Number)

Downloads model group data to the PLC.

Subroutine

RcpFileRead(“Model Name”, Group Number)

Reads the group data from the recipe data file.

Subroutine

RcpFileStore(“Model Name”, Group Number)

Saves the model group data in the recipe file.

Subroutine

RcpGetSysMem(“Model Name”, System memory address)

Copies one block of system memory to Xpanel memory.

Subroutine

RcpMemDown(“Model Name”)

Downloads the model group data from Xpanel to PLC.

Subroutine

RcpMemUp(“Model Name”)

Receives the data from PLC and saves it in the model group data in Xpanel.

Subroutine

RcpNewGroupName (“Model Name”, Group number, “New group name”)

Changes the recipe group name.

Subroutine

RcpSetSysMem(“Model Name”, System memory address)

Copies data in Xpanel memory and pastes to the system memory.

Subroutine

RcpUpLoad(“Model Name”, Group Number)

Reads PLC data and saves it to the recipe file.

GetRcpDnGroup

Returns the recipe group name which was recently downloaded.

Subroutine

GetRcpDnGroup(“Model Name”)

Description

Returns the recipe group name which was recently downloaded.

Example

Enter the command to store the recent group name of the ‘ICECREAM’ model in the ‘GROUP’ tag.

GROUP = GetRcpDnGroup(“ICECREAM”);

GetRcpGroupName

Returns the recipe group name.

Subroutine

GetRcpGroupName (“Model name”, Group number)

Description

Returns the specified group name. The group number starts from 0.

Example

Gets the 1st group name of the ‘ICECREAM’ model and stores it in the ‘MODEL’ tag.

VAR MODEL;

MODEL = GetRcpGroupName (“ICECREAM”, 1);

GetRcpItemName

Returns the name of recipe data.

Subroutine

GetRcpItemName (“Model name”, Data item number)

Description

Returns the specified data item name. The item number starts from 0.

Example

Gets the 1st data name of the ‘ICECREAM’ model and stores it in the ‘ITEM’ tag.

VAR ITEM;

ITEM = GetRcpItemName (“ICECREAM”, 1);

RcpConfig

Displays the recipe settings window in Xpanel runtime.

Subroutine

RcpConfig()

Description

Brings up the recipe dialog box which contains functions for controlling the recipe operation.

Item

Description

Model

Changes the current recipe model.

Group

Changes the current group to a different group. You may select from the dropdown menu or manually type in the name of the group.

Group List

You may change the data name and setting values by double-clicking on each item.

Save

Saves modified group data in a recipe file (*.rcx). This command is the same as RcpFileStore().

Close

Quits from the recipe dialog box.

Upload

Reads data from the PLC and saves it in recipe model group data. This command is the same as RcpMemUp().

Download

Sends recipe model group data to the PLC. This command is the same as RcpMemDownload().

CSV Read

You can browse the CSV file to retrieve model group data. This command is the same as RcpCsvRd().

CSV Write

You can save the current model group data as a CSV file. This command is the same as RcpCsvWr().

Replace Groupname

If the ‘Replace Groupname’ box is checked when the ‘CSV Read’ button is pressed, then the selected group name will be replaced with the name of the CSV file to be read.  

Example

Enter the command to display the recipe dialog box.
RcpConfig();

RcpCsvRd

Reads recipe model group data (*.csv file) and saves it in the memory.

Subroutine

RcpCsvRd(“Model Name”, “CSV File Name”, CSV file directory)

Description

Replaces group data with specified CSV file data. Assign CSV file directory as shown in the table below.  

CSV file directory

Description

0

Xpanel internal memory

1

SD/MMC

2

USB

Example

Enter the command to read ‘Recipe.CSV’ file data stored in the USB and save it to the Xpanel recipe file.

RcpCsvRd("ICECREAM", "Recipe", 2);

RcpCsvWr

Saves model group data in the memory as a CSV file format.

Subroutine

RcpCsvWr(“Model Name”, “CSV File Name”, CSV file directory)

Description

Saves the current group data as a CSV file format with a specified file name. Assign CSV file directory as shown in the table below.

CSV file directory

Description

0

Xpanel internal memory

1

SD/MMC

2

USB

Example

Enter the command to save the ‘ICECREAM’ group data as a CSV file format. The file name will be designated as ‘Recipe.csv’ and will be saved in the SD/MMC memory card.

RcpCsvWr("ICECREAM", "Recipe", 1);

RcpDownLoad

Downloads model group data to the PLC.

Subroutine

RcpDownLoad(“Model Name”, Group Number)

Description

Reads the specified group data and transfers it directly to the PLC. Assign the group number from 0 to n.

Example

Enter the command to download group data of group number 0 to the PLC directly.

RcpDownLoad("ICECREAM", 0);

RcpFileRead

Reads the group data from the recipe data file.

Subroutine

RcpFileRead(“Model Name”, Group Number)

Description

Reads the specified group data from the recipe data file.

Example

Enter the command to read the first group data of the ‘ICECREAM’ model from the recipe data file.

RcpFileRead(“ICECREAM”, 1);

RcpFileStore

Saves the model group data in the recipe file.

Subroutine

RcpFileStore(“Model Name”, Group Number)

Description

Saves the specified group data in the recipe data file. This subroutine is the same as the ‘Save’ button of the recipe dialog box.

Example

Enter the command to save the first group data of the ‘ICECREAM’ model to the recipe data file.

RcpFileStore (“ICECREAM”, 1);

RcpGetSysMem

Copies one block of system memory to Xpanel memory.

Subroutine

RcpGetSysMem(“Model Name”, System memory address)

Description

Copies one block of system memory to Xpanel memory.

Example

Enter the command to retrieve ‘ICECREAM’ model data from system memory No. 100.

RcpGetSysMem(“ICECREAM”, 100);

RcpMemDown

Downloads the model group data from Xpanel to PLC.

Subroutine

RcpMemDown(“Model Name”)

Description

Transfers the model group data from Xpanel to the PLC. The group data must be stored in the Xpanel before using this subroutine.

Example

Enter the command to download group data of ‘ICECREAM’ from Xpanel to the PLC.

RcpMemDown (“ICECREAM”);

RcpMemUp

Receives the data from PLC and saves at the model group data in Xpanel.

Subroutine

RcpMemUp(“Model Name”)

Description

Uploads group data from PLC to recipe data file in the Xpanel. This subroutine is used to save data in the Xpanel before using RepMemDown() or RcpFileStore().

Example

Enter the command to apply PLC data to the group data of the ‘ICECREAM’ model.

RcpMemUp (“ICECREAM”);

RcpNewGroupName

Changes the recipe group name.

Subroutine

RcpNewGroupName (“Model Name”, Group number, “New group name”)

Description

Replaces the specified group name with a new group name. The group number starts from 0.

Example

Changes the 3rd group name of the ‘ICECREAM’ model to ‘CHOCO’.

RcpNewGroupName (“ICECREAM”, 3, “CHOCO”);

RcpSetSysMem

Copies data in Xpanel memory and pastes to the system memory.

Subroutine

RcpSetSysMem(“Model Name”, System memory address)

Description

Copies data in Xpanel memory and pastes to the system memory.

Example

Enter the command to paste “ICECREAM” recipe data to the system memory No. 100.

RcpGetSysMem(“ICECREAM”, 100);

RcpUpLoad

Reads PLC data and saves it to the recipe file.

Subroutine

RcpUpLoad(“Model Name”, Group Number)

Description

Reads the data from PLC and saves it in the recipe data file. Assign the group number from 0 to n.

Example

Enter the command to apply PLC data to the group data of number 0.

RcpUpLoad("ICECREAM", 0);

 

If using the RcpUpLoad/RcpDownload command consecutively, the latter command will override the former command. To use these commands subsequently, set enough intervals between operations of the two subroutines.

Ex)
RcpDownLoad(“ICECREAM”, 0);

Sleep(1000);

RcpDownLoad(“ICECREAM”, 1);