1.xgk basic training - hantech automation · xgk basic • xgk basic for technical training for...

44
XGK Basic XGK Basic XGK Basic for technical training for technical training at HANTECH at HANTECH Website: www.hantech.vn Email: [email protected] Tel: 093.5858.658 Website: www.hantech.vn Email: [email protected] Tel: 093.5858.658 Website: www.hantech.vn Email: [email protected] Tel: 093.5858.658 Website: www.hantech.vn Email: [email protected] Tel: 093.5858.658 Website: www.hantech.vn Email: [email protected] Tel: 093.5858.658 Website: www.hantech.vn Email: [email protected] Tel: 093.5858.658 Website: www.hantech.vn Email: [email protected] Tel: 093.5858.658 Website: www.hantech.vn Email: [email protected] Tel: 093.5858.658 XGK Basic

Upload: phamkhanh

Post on 22-Apr-2018

237 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

XGK BasicXGK Basic

• XGK Basic

for technical training for technical training at HANTECHat HANTECH

Website: www.hantech.vn Email: [email protected] Tel: 093.5858.658Website: www.hantech.vn Email: [email protected] Tel: 093.5858.658Website: www.hantech.vn Email: [email protected] Tel: 093.5858.658Website: www.hantech.vn Email: [email protected] Tel: 093.5858.658Website: www.hantech.vn Email: [email protected] Tel: 093.5858.658Website: www.hantech.vn Email: [email protected] Tel: 093.5858.658Website: www.hantech.vn Email: [email protected] Tel: 093.5858.658Website: www.hantech.vn Email: [email protected] Tel: 093.5858.658

• XGK Basic

Page 2: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Basic Usage of XG5000

Constructing new projectBasic Usage of XG5000 Basic Usage of XG5000

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

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

Constructing new project

Email: [email protected] Tel: 093.5858.658

Page 3: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Constructing new projectBasic Usage of XG5000 Basic Usage of XG5000

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

Type the project name

select file fold in which

4) A new project is set.

Shortcut IconsRectangular Cursor

Menu bar

Email: [email protected] Tel: 093.5858.658

select file fold in whichthe 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.

Page 4: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Open from PLCBasic Usage of XG5000 Basic Usage of XG5000

1) Connect PC and PLC (RS-232C, USB, Ethernet)

PLC Side.9-pin Male.

PC Side.9-pin Female.

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

Open from PLC

Email: [email protected] Tel: 093.5858.658

Page 5: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Open from PLCBasic Usage of XG5000 Basic Usage of XG5000

3) Setup the connection parameter

Select communi-cation type.

See 3.2.1

See 3.2.2

Select communi-cation Depth.

Connection communication settings

Email: [email protected] Tel: 093.5858.658

Connection communication settings

IP addressto connect

<Local communication setting> <Remote communication setting>

Page 6: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Open from PLCBasic Usage of XG5000 Basic Usage of XG5000

Preview of connecting communication

Remote1connection

RS-232Cconnection

Remote2connection

Email: [email protected] Tel: 093.5858.658

4) Reading progress.

Page 7: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Open from KGLWIN fileBasic Usage of XG5000 Basic Usage of XG5000

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

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

Open from KGLWIN file

Email: [email protected] Tel: 093.5858.658

3) Define the project information of XGT PLC

Page 8: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Open from KGLWIN fileBasic Usage of XG5000 Basic Usage of XG5000

4) KGLWIN program and XG5000 program

KGLWIN program XG5000 program

Email: [email protected] Tel: 093.5858.658

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.

Page 9: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

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

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

Add item (PLC, Task, Program)

Email: [email protected] Tel: 093.5858.658

Page 10: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

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

3) Input PLC name, type and its description.

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

Email: [email protected] Tel: 093.5858.658

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.

Page 11: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Import item from fileBasic Usage of XG5000 Basic Usage of XG5000

The following items can be saved as separate item files and replaced by each file.

Item File Extension

PLC cfg

Variable/Comment cmt

I/O Parameter iop

Basic Parameter bsp

Program 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

Import item from file

Email: [email protected] Tel: 093.5858.658

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].

Page 12: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Export to fileBasic Usage of XG5000 Basic Usage of XG5000

The following items can be saved as separate item files.

Item File Extension

PLC .cfg

Variable/Comment .cmt

I/O Parameter .iop

Basic Parameter .bsp

Program .prg

Export to file

Email: [email protected] Tel: 093.5858.658

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.

Page 13: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Compare ProjectBasic Usage of XG5000 Basic Usage of XG5000

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: [email protected] Tel: 093.5858.658

Page 14: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Compare ProjectBasic Usage of XG5000 Basic Usage of XG5000

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

Email: [email protected] Tel: 093.5858.658

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

Page 15: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Project passwordBasic Usage of XG5000 Basic Usage of XG5000

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 passwordOn [Project window], select the project item. On the right-mouse click, select [Properties].

Project password

Email: [email protected] Tel: 093.5858.658

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

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

Page 16: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Project ItemsBasic Usage of XG5000 Basic Usage of XG5000

Basic Parameters

DoubleClick

Project Items

Email: [email protected] Tel: 093.5858.658

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 th an 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 ticke d 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 di gital input. The shorter the input filter time becomes, the fast er its response time is. But if this parameter is s etup with too small value, the system can be affected by electrical noise. This function is used to avoid t he noise and to make the input valid.

Page 17: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Project ItemsBasic Usage of XG5000 Basic Usage of XG5000

2) Device Area Setup

Email: [email protected] Tel: 093.5858.658

- Latch area: There are 2 kinds of Latch area.Latch area 1 and 2 are non-volatile memory area; th e data in Latch area are maintained when PLC goes to stop mode or its power is turned o ff.

The data in the Latch 1 area can be deleted by Over all reset in the Online menu, or resetting with res et switch Located in the CPU module (switch it to left and ho ld there more than 3 seconds then release it: overa ll 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 swi tch 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, resp ectively.The boundary of each kinds of timer can be adjusted with this parameter.

Page 18: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Project ItemsBasic Usage of XG5000 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 ParameterSetup.

4) Variable/Coment

Email: [email protected] Tel: 093.5858.658

DoubleClick

4) Variable/Coment

Variable or comment can be defined in block prior t o programming.

Page 19: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Scan program

Scan programProgrammingProgramming

Symbols for sequence program

Symbol Usage Symbol Usage

Normally Open Contact Coil

Normally Closed Contact Negated Coil

Positive Transition Contact

Set Coil

Email: [email protected] Tel: 093.5858.658

Negative Transition Contact

Reset Coil

Horizontal Line Positive Transition Coil

Vertical Line Negative Transition Coil

NOT Instruction Coil Function(Application Instruction)

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

Page 20: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Scan programProgrammingProgramming

Programming

1) Contact and Coil Edit

Double Click

Tool Bar

Program Window

Email: [email protected] Tel: 093.5858.658

Double ClickProgram name

Click Symbol in the Tool Bar

Click in the program window

Page 21: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Scan programProgrammingProgramming

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.

Email: [email protected] Tel: 093.5858.658

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

Just click Device name

Page 22: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Scan programProgrammingProgramming

NOC is registered in the program

Email: [email protected] Tel: 093.5858.658

Page 23: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Scan programProgrammingProgramming

2) Function Edit

Click Function in the Tool Bar.

Click in the program window

Email: [email protected] Tel: 093.5858.658

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

Function and Format

MOV function is registered.

END instruction must be registered at the end of program.

Page 24: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Scan programProgrammingProgramming

Add program

Click right side button of mouse

Click

Click

Email: [email protected] Tel: 093.5858.658

Program file name

Description for program.

Program Section2is added in theproject

Page 25: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Task programProgrammingProgramming

Task programA 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 sta te. 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 it s execution condition: Initialization, Cycle, and In ternal device.

Add Task

Click right sidebutton of mouse

- Initialization: executed when the mode of CPU chang es to RUN.- Cycle time: executed every setup time.- Internal device: executed when data of designated memory satisfy

the designated condition.

Email: [email protected] Tel: 093.5858.658

the designated condition.

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

Task is added in the project.

Page 26: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Task programProgrammingProgramming

1) Initialization taskFor example, when we want to make a program for Ini tialization 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: [email protected] Tel: 093.5858.658

Page 27: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Task programProgrammingProgramming

- 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 task s.

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: [email protected] Tel: 093.5858.658

Page 28: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Task programProgrammingProgramming

Initialization program to check the output module

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

Email: [email protected] Tel: 093.5858.658

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

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

Page 29: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Task programProgrammingProgramming

2) Cycle time task

This task runs with a fixed period set in task sect ion

Email: [email protected] Tel: 093.5858.658

3) Internal device taskFor task condition for Internal device task, you ar e able to use bit or word device as follows. Whenever the following internal device condition is met, pausing the scan program, running its respond ing task program then return to the next step of the scan pr ogram.

Page 30: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Download and MonitoringProgrammingProgramming

Download and Monitoring1) Click connection settings in the Online menu.

Select connection method and setup communication parameter by clicking

Email: [email protected] Tel: 093.5858.658

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 do wnload.

Page 31: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Download and MonitoringProgrammingProgramming

3) Click Write in the Online menu.

Email: [email protected] Tel: 093.5858.658

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.

Page 32: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Download and MonitoringProgrammingProgramming

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

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

Email: [email protected] Tel: 093.5858.658

Monitoring (Device based)

Page 33: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Download and MonitoringProgrammingProgramming

Monitoring (Variable based)

Email: [email protected] Tel: 093.5858.658

Monitoring (Device and Variable based)

Monitoring (Device and Comment based)

Page 34: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Start/Stop/Pause MonitoringMonitoringMonitoring

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

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

Start/Stop/Pause Monitoring

Email: [email protected] Tel: 093.5858.658

Page 35: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Start/Stop/Pause MonitoringMonitoringMonitoring

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

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

Email: [email protected] Tel: 093.5858.658

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

Page 36: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Types of MonitoringMonitoringMonitoring

System Monitoring Device Monitoring

Email: [email protected] Tel: 093.5858.658

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

Page 37: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Types of MonitoringMonitoringMonitoring

Special Monitoring

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

DoubleClick

Trend Monitoring

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

Email: [email protected] Tel: 093.5858.658

Click

Page 38: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Types of MonitoringMonitoringMonitoring

Click

Click

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

Email: [email protected] Tel: 093.5858.658

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

Page 39: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Event and Data TraceMonitoringMonitoring

Custom Events

User defined events are registered in PLC, which wi ll monitor the registered events and record the eve nt historyif generated. The event history can be used to ope rate and debug the system.

Email: [email protected] Tel: 093.5858.658

Page 40: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Event and Data TraceMonitoringMonitoring

Set the event condition and its associated device s etup.

DoubleClick

Click

Email: [email protected] Tel: 093.5858.658

Page 41: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Event and Data TraceMonitoringMonitoring

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

Email: [email protected] Tel: 093.5858.658

Page 42: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Event and Data TraceMonitoringMonitoring

Data Traces

'Data Traces' function is very useful to see how me aning data change from when a specific conditions i s met.

Select [Monitor]-[Data Traces] in XG5000.In Data Traces window, select [Trace]-[Trace Settin gs] where set Trace setup condition and Bit and Wor d device to trace with sample settings .

Email: [email protected] Tel: 093.5858.658

Page 43: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Event and Data TraceMonitoringMonitoring

PLC program for Data Traces.

In Data Trances windows, select Read Trace Data.

Email: [email protected] Tel: 093.5858.658

Page 44: 1.XGK Basic Training - Hantech Automation · XGK Basic • XGK Basic for technical training for technical training at ... XG5000 is XGT software for programming and engineering XGT

Event and Data TraceMonitoringMonitoring

Email: [email protected] Tel: 093.5858.658