You are on page 1of 44

XGK Basic

for technical training at HANTECH


XGK Basic

Website: www.hantech.vn

Email: dinhhai@hantech.vn

Tel: 093.5858.658

Basic Usage of XG5000

Constructing new project

Basic Usage of XG5000


XG5000 is XGT software for programming and engineering XGT series PLC which provide you user-friendly engineering environment through Programless Setup driven by command structures and parameters inherited from MASTER-K Series.

Constructing new project


1) Run XG5000 2) Click New Project in the Project menu

Email: dinhai@hantech.vn

Tel: 093.5858.658

Basic Usage of XG5000

Constructing new project


4) A new project is set.

3) Type a new project name and select file fold in which the project will be stored. The default fold can be adjusted in the Options in the Tools menu

Menu bar

Shortcut Icons Type the project name Rectangular Cursor

select file fold in which the project will be stored.


Select CPU type. Project Window Program Window

Message Window

Note: If a new project is created, a folder whose name is identical to the project file name will be created,where the project file will be made inside. Email: dinhai@hantech.vn Tel: 093.5858.658

Basic Usage of XG5000 Open from PLC


1) Connect PC and PLC (RS-232C, USB, Ethernet)
PLC Side. 9-pin Male. PC Side. 9-pin Female.

Open from PLC

2) Run XG5000 and click Open from PLC in the project menu

Email: dinhai@hantech.vn

Tel: 093.5858.658

Basic Usage of XG5000


3) Setup the connection parameter

Open from PLC

See 3.2.1 Select communication type. See 3.2.2 Select communication Depth.

Connection communication settings

IP address to connect

<Local communication setting>

<Remote communication setting>

Email: dinhai@hantech.vn

Tel: 093.5858.658

Basic Usage of XG5000


Preview of connecting communication

Open from PLC

Remote1 connection

RS-232C connection

Remote2 connection

4) Reading progress.

Email: dinhai@hantech.vn

Tel: 093.5858.658

Basic Usage of XG5000 Open from KGLWIN file


1) Run XG5000 and click Open KGLWIN File in the project menu.

Open from KGLWIN file


2) Select KGLWIN file(*.kpr, *.prj) to open

3) Define the project information of XGT PLC

Email: dinhai@hantech.vn

Tel: 093.5858.658

Basic Usage of XG5000


4) KGLWIN program and XG5000 program

Open from KGLWIN file

KGLWIN program

XG5000 program

After the Project conversion, confirm the following. - If application instruction is displayed as ERR in XG5000. - If any error occurs in KGLWIN LD program. - If a flag is used (some flag number is different). - The basic parameter (during conversion, it may not be applied). If any error occurs in KGLWIN project file or the file is incomplete, correct the program and download it to PLC for its application.

Email: dinhai@hantech.vn

Tel: 093.5858.658

Basic Usage of XG5000 Add item (PLC, Task, Program)

Add item (PLC, Task, Program)

PLC, task and program can be inserted into the project additionally. Add PLC 1) On the project window, select the Project Item. 2) Select [Project]-[Add Item]-[PLC] on the menu

Email: dinhai@hantech.vn

Tel: 093.5858.658

Basic Usage of XG5000


3) Input PLC name, type and its description.

Add item (PLC, Task, Program)

Several PLCs can be included in one project. In this way, with several PLCs included in one project, its management will be convenient; monitoring several PLCs will be also available through simultaneous connection to them PLCs running XG5000

Add Task/Program How to add task/program is the same as how to add PLC. For Task, we are going to deal with this later.

Email: dinhai@hantech.vn

Tel: 093.5858.658

Basic Usage of XG5000 Import item from file

Import item from file

The following items can be saved as separate item files and replaced by each file.
Item PLC Variable/Comment I/O Parameter Basic Parameter Program File Extension cfg cmt iop bsp prg

Import function is inserting project items such as PLC, program and parameters from saved item files. When import function is executed, the item of currently opened project will be replaced by imported item file. Note: Since Variable/Comment, Basic Parameters and I/O Parameters are overwritten on the existing items, the content of the existing item will be erased.

1) On the project window, select the Project item

2) Select [Project]-[Import Item from File]-[PLC] on the menu. 3) Slect the file, and click [OK]. Email: dinhai@hantech.vn Tel: 093.5858.658

Basic Usage of XG5000 Export to file


The following items can be saved as separate item files.
Item PLC Variable/Comment I/O Parameter Basic Parameter Program File Extension .cfg .cmt .iop .bsp .prg

Export to file

1)

On the project window, select the PLC item.

2) Select [Project]-[Export to File]-[PLC] in the menu. 3) Input the file name, and click [OK]. Note: Items can be easily copied or moved between projects with 'drag and drop' function. Especially, drag and drop function is available between projects, when two XG5000 are executed.

Email: dinhai@hantech.vn

Tel: 093.5858.658

Basic Usage of XG5000 Compare Project


Two projects can be compared with each other based on its item. Comparison result is displayed on Result section of [Message window]. 1) Select [Project]-[Compare Projects] on the menu. 2) On the [Compare Projects], Click [Open Project]. 3) Select the project file to compare with.

Compare Project

Email: dinhai@hantech.vn

Tel: 093.5858.658

Basic Usage of XG5000

Compare Project

4) Select the items to compare with. The items on both projects must be identical in the structure.

5) Click [Compare] and its result is displayed on [Message Window].

Email: dinhai@hantech.vn

Tel: 093.5858.658

Basic Usage of XG5000 Project password

Project password

Password for project file can be setup. This function prevents other users from opening the project file. This project file password has nothing to do with the password of PLC to connect. This function is only to open a project file from PC. 1) Input password On [Project window], select the project item. On the right-mouse click, select [Properties].

On the Project dialog box, click [Password] tab where you are able to set/change/delete password.

On the Project dialog box, click [Password] tab where you are able to set/change/delete password.

Email: dinhai@hantech.vn

Tel: 093.5858.658

Basic Usage of XG5000 Project Items


Basic Parameters

Project Items

Double Click

1) Basic Operation Setup - Fixed period operation: Defines whether fixed scan time function is used or not. When this option is ticked off, PLC runs with this period; the scan time must be equal to or larger than max. scan time which can be seen PLC Information in the Online menu. - Assign fixed points to I/O slot (64): Defines I/O address mapping method. If this option is selected, 1 slot charges 4 words (64 points) in P area. And this option is not ticked off, each slot is assigned by real I/O points installed (special/comm. modules occupy 16 points/slot). - Standard Input Filter: Defines response time of digital input. The shorter the input filter time becomes, the faster its response time is. But if this parameter is setup with too small value, the system can be affected by electrical noise. This function is used to avoid the noise and to make the input valid.

Email: dinhai@hantech.vn

Tel: 093.5858.658

Basic Usage of XG5000


2) Device Area Setup

Project Items

- Latch area: There are 2 kinds of Latch area. Latch area 1 and 2 are non-volatile memory area; the data in Latch area are maintained when PLC goes to stop mode or its power is turned off. The data in the Latch 1 area can be deleted by Overall reset in the Online menu, or resetting with reset switch Located in the CPU module (switch it to left and hold there more than 3 seconds then release it: overall reset; switch it to left and release it: reset, which has nothing to do with data clear in latch 1 area). The data in the Latch area 2 does not deleted when Overall reset is performed with XG5000 or Reset switch in the CPU is turned on. The only way to delete the data in the Latch area 2 is moving the data 0 to Latch area 2. -Timer Boundary: There are 4 kinds of timer of which setting units are 100ms, 10ms, 1ms and 0.1ms, respectively. The boundary of each kinds of timer can be adjusted with this parameter.

Email: dinhai@hantech.vn

Tel: 093.5858.658

Basic Usage of XG5000


3) Modbus Setup Modbus slave port in CPU: 7 (Tx), 8 (Rx), 5 (SG) RS-232C communication port in the CPU can be used as slave communication module of Modbus. The Modbus communication parameter can be setup with Modbus setup in the Basic Parameter Setup.

Project Items

4) Variable/Coment

Double Click

Variable or comment can be defined in block prior to programming.

Email: dinhai@hantech.vn

Tel: 093.5858.658

Programming Scan program


Symbols for sequence program
Symbol Usage Normally Open Contact Symbol Coil Usage

Scan program

Normally Closed Contact

Negated Coil

Positive Transition Contact Negative Transition Contact Horizontal Line

Set Coil

Reset Coil

Positive Transition Coil

Vertical Line

Negative Transition Coil

NOT Instruction Coil

Function (Application Instruction)

* The shortcut key of symbols can be changed shortcut settings in Tool menu.

Email: dinhai@hantech.vn

Tel: 093.5858.658

Programming
Programming 1) Contact and Coil Edit

Scan program

Tool Bar Program Window Double Click Program name

Click in the program window Click Symbol in the Tool Bar

Email: dinhai@hantech.vn

Tel: 093.5858.658

Programming

Scan program

Type device address and press Enter key or click OK button below. Type variable and comment for memory address. This work can be omitted. Press Enter key or click OK button.

When Variable/Comments are registered prior to programming, the Variable/Comments list will be displayed.

Just click Device name

Email: dinhai@hantech.vn

Tel: 093.5858.658

Programming

Scan program

NOC is registered in the program

Email: dinhai@hantech.vn

Tel: 093.5858.658

Programming
2) Function Edit

Scan program

Click Function in the Tool Bar.

Click in the program window

Type instruction and device or data with dedicated format of instructions.

Instruction List

MOV function is registered.

Function and Format

END instruction must be registered at the end of program.

Email: dinhai@hantech.vn

Tel: 093.5858.658

Programming
Add program

Scan program

Click

Click right side button of mouse

Click

Program file name Description for program. Program Section2 is added in the project

Email: dinhai@hantech.vn

Tel: 093.5858.658

Programming Task program

Task program

A XGT PLC project can handle max. 256 programs. There are 2 kinds of programs. One is scan program, which is executed as long as the CPU is in RUN state. And the other is Task program executed when CPU is run state and specified condition is satisfied. Task program can be grouped with 3 categories by its execution condition: Initialization, Cycle, and Internal device.

Add Task
- Initialization: executed when the mode of CPU changes to RUN. - Cycle time: executed every setup time. - Internal device: executed when data of designated memory satisfy the designated condition.

Click right side button of mouse

After adding a task item, a program for that task must be added to give actions when the condition for that is turned on.

Task is added in the project.

Email: dinhai@hantech.vn

Tel: 093.5858.658

Programming
1) Initialization task

Task program

For example, when we want to make a program for Initialization program to check an output module which is connected to several lamps, after making a project then insert a task as follows. Here the address of output module occupies P4 and P5 in word.

Email: dinhai@hantech.vn

Tel: 093.5858.658

Programming

Task program

- Task name: used to input a desired task name. - English and figures can be used except for special characters. - Priority: used to specify the priority of the tasks. The less the figure is, the higher the priority is. - Task number: used to manage the tasks in PLC. According to the execution condition, the number specified in the right shall be used. - Execution condition: used to specify the execution condition under which the task will be executed.

Email: dinhai@hantech.vn

Tel: 093.5858.658

Programming
Initialization program to check the output module

Task program

Click [Online]-[Write] and change mode to run.

After initialization task is over, the pop-up message disappers and a scan program runs.

Email: dinhai@hantech.vn

Tel: 093.5858.658

Programming
2) Cycle time task

Task program

This task runs with a fixed period set in task section

3) Internal device task


For task condition for Internal device task, you are able to use bit or word device as follows. Whenever the following internal device condition is met, pausing the scan program, running its responding task program then return to the next step of the scan program.

Email: dinhai@hantech.vn

Tel: 093.5858.658

Programming Download and Monitoring


1) Click connection settings in the Online menu.

Download and Monitoring

Select connection method and setup communication parameter by clicking Setting button.

2) Stop PLC by clicking Stop in the Change Mode from Online menu.

On Stop mode, you are not able to write the program/parameter. Instead only comment is available to download.

Email: dinhai@hantech.vn

Tel: 093.5858.658

Programming
3) Click Write in the Online menu.

Download and Monitoring

On Stop mode, you are not able to write the program/parameter. Instead only comment is available to download.

4) When writing is finished run the PLC by clicking RUN the Change Mode from Online menu.

Email: dinhai@hantech.vn

Tel: 093.5858.658

Programming
5) Click Start/Stop Monitoring in the Monitor menu.

Download and Monitoring

6) Monitoring Option can be changed in the View menu.

Monitoring (Device based)

Email: dinhai@hantech.vn

Tel: 093.5858.658

Programming

Download and Monitoring

Monitoring (Variable based)

Monitoring (Device and Variable based)

Monitoring (Device and Comment based)

Email: dinhai@hantech.vn

Tel: 093.5858.658

Monitoring Start/Stop/Pause Monitoring

Start/Stop/Pause Monitoring

When you want start/stop/pause monitoring, then select the proper menu.

Pausing Conditions During monitoring, if you want to pause monitoring operation while PLC is running, then select 'Pausing Conditions...' and set the conditions as follows.

Email: dinhai@hantech.vn

Tel: 093.5858.658

Monitoring

Start/Stop/Pause Monitoring

When C0 is equal to 30, then, you are able to see the message and its pausing screen.

To resume the monitoring function, select 'Resume' as below.

If P0 bit is on, then you are able to see the screen at the moment when the condition is met.

Email: dinhai@hantech.vn

Tel: 093.5858.658

Monitoring

Types of Monitoring
Device Monitoring

System Monitoring

It shows the system and each I/O information as follows.

Email: dinhai@hantech.vn

Tel: 093.5858.658

Monitoring

Types of Monitoring
Trend Monitoring
In Trend Monitoring, right-mouse click and select Trend Setting.

Special Monitoring
Special Monitoring is for special modules such as analog input/output, positioning, high-speed counter, etc.

Double Click

Email: dinhai@hantech.vn

Tel: 093.5858.658

Monitoring

Types of Monitoring

Click

Click

You are able to see Trend Graph with time stamp as below.

You are able to set each device for trend monitoring. Here click Bit Graph and set P0 as bit data; Trend Graph and set C0 as word data and apply them to PLC.

Email: dinhai@hantech.vn

Tel: 093.5858.658

Monitoring

Event and Data Trace

Custom Events
User defined events are registered in PLC, which will monitor the registered events and record the event history if generated. The event history can be used to operate and debug the system.

Email: dinhai@hantech.vn

Tel: 093.5858.658

Monitoring
Set the event condition and its associated device setup.

Event and Data Trace

Double Click

Click

Email: dinhai@hantech.vn

Tel: 093.5858.658

Monitoring

Event and Data Trace

Whenever P0 bit is on, this records the event with associated device information with right-mouse click as follows.

Email: dinhai@hantech.vn

Tel: 093.5858.658

Monitoring
Data Traces

Event and Data Trace

'Data Traces' function is very useful to see how meaning data change from when a specific conditions is met. Select [Monitor]-[Data Traces] in XG5000. In Data Traces window, select [Trace]-[Trace Settings] where set Trace setup condition and Bit and Word device to trace with sample settings.

Email: dinhai@hantech.vn

Tel: 093.5858.658

Monitoring
PLC program for Data Traces.

Event and Data Trace

In Data Trances windows, select Read Trace Data.

Email: dinhai@hantech.vn

Tel: 093.5858.658

Monitoring

Event and Data Trace

Email: dinhai@hantech.vn

Tel: 093.5858.658

You might also like