You are on page 1of 12

Recipes

You can use recipes to save and reuse process data. You can write or read data to a large
number of consecutive devices with recipes. You must set both read and write devices to
execute recipes.
Two types of recipes are available: basic and file recipes here we will explain the Basic
Basic recipe
Export data to non-volatile internal memory in an XGT Panel or to external memory
devices. If the power supply to the XGT Panel is interrupted, the most recent data is saved
on the NVRAM. The saved data is used for reading or writing operation when monitoring
resumes.
To create a basic recipe:
1. In the Project pane, right-click [Basic Recipe].
2. Click [Insert].

1
a b

3. Set the following properties:

Option Description
The name of the recipe. You can register up to 255 recipes
Name (1 to 255). If you want to change the name, right-click the
recipe name in the Project pane and click [Rename].
Device Set the device address to transfer the recipe data.
View the data type of the device. When you enter the
Data type value in the data block, the data type is changed according
to the data type.
Description Enter a description for the recipe.
Set the number of devices. Recipe data will be transferred
No. of Device consecutively from as many devices as you specify.
Set the number of data blocks. The maximum number of
Block count available blocks is 255 (0–254).
View the device list. Recipes use consecutive data sets, so
a. Device you cannot set each device address.
The block number is assigned starting from 0 and you
b. Data cannot change it. If you reduce the block number, the data
set with biggest block number is deleted first.

2
To set Basic recipe properties:
1. In the Project pane, double-click [Recipe Property]. This will open a Recipe
Property tab in the editing area

3
2. Set the following properties:
• Recipe Common Settings

Option Description
Set to specify a device for writing data. Set the condition to
Trigger Device to trigger the action (rising edge or falling edge). Enter the
Write device address manually or click the keypad to the right of
the device field.
Set to specify a device for reading data. Set the condition to
Trigger Device to trigger the action (rising edge or falling edge). Enter the
Read device address manually or click the keypad to the right of
the device field.
Specify the device that will control the recipe type. If the
lowest bit of the device is 0, a basic recipe will be executed.
If the lowest bit of the device is 1, a file recipe will be
Recipe Type Device executed. If the lowest bit of the device is 2, an extended
file recipe will be executed. Enter the device address
manually or click the keypad to the right of the device field
Specify a bit device to turn on when data transfer is
Read/Write completed. Enter the device address manually or click the
Complete Device keypad to the right of the device field.
4
Set a storage location for data from a basic recipe (Flash,
CF Card, USB, or SD card). You can also configure storage
Basic recipe Storage options in Storage Settings in the Project Property
window.
Specify a bit device to turn on when a problem occurs with
Error Device the data transfer. Enter the device address manually or click
the keypad to the right of the device field.
Specify a device to return a pre-defined error number if a
Error No. Device problem occurs with the data transfer.

• Basic Recipe Settings

Option Description
Specify a device with a block number that will execute the
recipe when the condition is met. The recipe is executed by
Recipe No. Device reading the word value (unsigned 16-bit) from the device.
Enter the device address manually or click the keypad to the
right of the device field
Specify a word device that the data will be transferred to
when the condition is met. The recipe is executed by
reading the word value (unsigned 16-bit) from the device.
Block No. Device This option can be used only with basic recipes. Enter the
device address manually or click the keypad to the right of
the device field
Backup Trigger Specify a device to back up the recipe data saved in a
removable memory device, such as a USB drive or CF card.
Device
Backup Complete Specify a bit device to turn on when the backup is complete
Device
The backup location of the default recipe data is specified.
The backup files are located in the same place as the recipe
Backup Data Storage data backup files that are in [Storage Settings] in the Project
Property window.
The location to save the default recipe is specified. If
NVRAM memory is selected, data is saved in the XGT
Basic Recipe Storage Panel. If other options are selected, data is saved to a
relevant external storage device

5
User function/function block
A User Function/Function Block is a programmable software module in the XG-5000
system that enables users to create customized functions or algorithms. These functions can
perform calculations, data manipulation, or control specific aspects of a process.
Users can create a User Function Block, which is a custom function block designed for a
particular task that is not available in the standard XG-5000 function block library. To create
a User Function Block, the user must define the inputs, outputs, and logic of the function
block using either LD or ST programming language.
Also, the user should define inputs, outputs, and internal variables for the function. Inputs
are the data received from other parts of the system, outputs are the data provided to other
parts of the system, and internal variables are used for storing intermediate values or results
during the function execution.
Here are the steps to create a User Function Block in XG-5000:
1. Open the XG-5000 programming software and create a new project.
2. Create a new User Function Block by selecting "Function Block" from the "Add"
menu.
3. Define the inputs and outputs of the function block. Inputs and outputs can be defined
as variables or as I/O points.
4. Write the logic of the function block using LD or ST programming language. The
logic can include arithmetic operations, comparisons, and conditional statements.
5. Save the User Function Block and give it a name.
6. The User Function Block can now be used in other programs or projects by importing
it into the project.

6
The advantage of using User Function Blocks is that they allow the user to create custom
functions that are tailored to their specific needs. This can lead to more efficient and
effective programming, as the user does not need to create the same logic repeatedly for
different projects. Additionally, User Function Blocks can be shared with other users,
making programming more collaborative and streamlined.

7
Example:
Here we will design a special function block which will work as a Counter with delay
* I would like to bring to your attention that I am facing an issue with the LD design related
to the PT (preset time). It seems that the preset time needs to be adjusted by adding 1
second."

The Local Variables of the function block:

8
The Program of the function block:

9
Task
A task is a program that controls the behavior of a programmable logic controller
(PLC). Tasks are created using a graphical programming language called ladder logic. They
consist of a series of instructions that are executed sequentially to control the behavior of
the PLC.
Creating a Task:
To create a task, follow these steps:
1. Open the LS XG5000 software and create a new project.
2. From the project menu, “add item” select "Task" and click "New".
3. In the "New Task" dialog box, enter a name for the task and select the programming
language you want to use (ladder logic, function block, or structured text).
4. Click "OK" to create the new task. This will open the task editor window.
5. Use the instructions in the task editor window to create the program that controls the
behavior of the PLC.
6. Save the task by selecting "File" and then "Save". You can then download the task to
the PLC by selecting "Program" and then "Download".

10
11
Specifications and Characteristics:
1. Structure: Tasks in the LS XG5000 software are made up of a series of instructions
that are executed sequentially. These instructions can include I/O operations, data
manipulation, branching, and looping.
2. Flexibility: The LS XG5000 software allows for multiple tasks to run simultaneously,
which means you can create complex control programs that can handle multiple
processes at once. This provides flexibility and scalability for your control system.
3. I/O Modules: The LS XG5000 software supports a wide range of I/O modules and
communication protocols, allowing you to interface with a variety of external devices
and systems. This makes it easier to integrate the PLC with other components of your
control system.
4. Real-Time Monitoring: Tasks can be monitored and modified in real-time using the
LS XG5000 software's debugging and monitoring tools. This allows you to diagnose
and fix problems in your control program without having to stop the entire system.
5. Downloading and Uploading: Tasks can be downloaded to the PLC using the LS
XG5000 software's programming tools, allowing you to update the control program
without having to physically access the PLC. This can save time and reduce the risk
of errors.

Tasks provide a powerful and flexible means of controlling LSIS PLCs. They are created
using ladder logic and can be monitored, modified, and downloaded in real-time. The
software supports a wide range of I/O modules and communication protocols, and it is
designed to work seamlessly with other components of your control system.

12

You might also like