Functions for Recipe

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);

Β 

Β 

Β 

Β 

Β 

Β 

Β 

Β 



Β 

Β