KGL for Windows User's Manual - Foster

64 downloads 215 Views 6MB Size Report
LG Programmable Logic Controller. KGL for Windows. [ MASTER-K Series]. LG Industrial Systems Co., Ltd. User's Manual ...
User’s Manual LG Programmable Logic Controller

KGL for Windows [ MASTER-K Series]

LG Industrial Systems Co., Ltd.

- List of Contents Chapter.1 Introduction 1.1 Features of KGL for Windows ……………………………………………1-1 1.2 Connection to PLC ………………………………………………………1-2 1.2.1 Local Connection for RS-232C Interface ……………………………1-2 1.2.2 Remote Connection for RS-232C Interface …………………………1-3 1.2.3 Dial-up Modem (or Cable Modem) Connection ………………………1-4 1.2.4 Connection using Communication module ……………………………1-4 1.2.5 Connection using Network(Ethernet) …………………………………1-5 Chapter.2 Installation 2.1 System Requirements ……………………………………………………2-1 2.2 Installing the Software ……………………………………………………2-2 Chapter.3 Start-Up KGL for Windows 3.1 Creating a Project…………………………………………………………3-1 3.2 Creating a Program ………………………………………………………3-3 3.2.1 Creating a Ladder Program …………………………………………3-3 3.2.2 Creating a Mnemonic Program ………………………………………3-7 3.3 Edit Variable/Comment ……………………………………………………3-3 3.3.1 Input Variable/Comment ……………………………………………3-3 3.3.2 Variable/Comment view ……………………………………………3-4 3.4 Connect to PLC(Online) …………………………………………………3-5 3.4.1 Connection …………………………………………………………3-9 3.4.2 Connect+Download+Run+Monitor Start ………………………………3-11 3.4.3 Online Edit …………………………………………………………3-11 3.4.4 Monitoring …………………………………………………………3-12 3.4.5 Save the Project ……………………………………………………3-14 3.5 The Screen Setup and Functions …………………………………………3-15 3.4.1 The Screen Setup …………………………………………………3-15 3.4.2 Menu ………………………………………………………………3-15 3.4.3 Tool Bars …………………………………………………………3-20

Chapter.4 Creating a Project 4.1 Create a Project …………………………………………………………4-1 4.1.1 About a Project ……………………………………………………4-1 4.1.2 Create a Project ……………………………………………………4-1 4.2 Open a Project……………………………………………………………4-2 4.3 Save a Project ……………………………………………………………4-3 4.4 Manage an Item …………………………………………………………4-4 4.4.1 Save an Item ………………………………………………………4-4 4.4.2 Load an Item ………………………………………………………4-4 4.5 Editing a Parameter ………………………………………………………4-5 4.5.1 Basic Parameter ……………………………………………………4-5 4.5.2 Interrupt Parameter …………………………………………………4-5 4.5.3 I/O Parameter ………………………………………………………4-6 4.5.4 Link Parameter ……………………………………………………4-7 4.6 Editing a Variable/Comment ………………………………………………4-8 Chapter.5 Editing a Program 5.1 Edit a Ladder program ……………………………………………………5-1 5.2 Edit a Mnemonic program …………………………………………………5-2 5.3 Edit Menu ………………………………………………………………5-3 5.4 Pop-up Menu ……………………………………………………………5-4 5.5 View Menu ………………………………………………………………5-4 5.5.1 View Device ………………………………………………………5-4 5.5.2 View Device Information ……………………………………………5-4 5.5.3 Check a Program …………………………………………………5-6 5.5.4 Change Number of Column …………………………………………5-6 5.5.5 Zoom In/Out ………………………………………………………5-6 5.6 Manage a File ……………………………………………………………5-7 5.6.1 New ………………………………………………………………5-7 5.6.2 Open ………………………………………………………………5-8 5.6.3 Save, Save As ……………………………………………………5-8

Chapter.6 Online 6.1 Connect …………………………………………………………………6-1 6.1.1 Connect+Download+Run+Monitor Start ………………………………6-1 6.1.2 Connect ……………………………………………………………6-1 6.1.3 Disconnect …………………………………………………………6-2 6.2 Monitoring & Mode Change ………………………………………………6-3 6.2.1 Monitor Start/Stop …………………………………………………6-3 6.2.2 Mode Change ………………………………………………………6-3 6.3 Read Information …………………………………………………………6-3 6.3.1 System Monitor ……………………………………………………6-3 6.3.2 PLC Information ……………………………………………………6-4 6.3.3 I/O Information………………………………………………………6-4 6.3.4 Link Information ……………………………………………………6-5 6.3.5 Mnet Information ……………………………………………………6-5 6.3.6 HS Link Parameter …………………………………………………6-6 6.4 Write Information …………………………………………………………6-7 6.4.1 Set PLC Clock………………………………………………………6-7 6.4.2 Change Password …………………………………………………6-7 6.4.3 Write Mnet Parameter ………………………………………………6-7 6.4.4 FSM Emergency Output ……………………………………………6-7 6.5 Download ………………………………………………………………6-8 6.6 Upload …………………………………………………………………6-8 6.7 Clear ……………………………………………………………………6-8 6.8 Flash Memory ……………………………………………………………6-9 6.9 EPROM …………………………………………………………………6-9 6.10 Binary File ………………………………………………………………6-9 Chapter.7 Debugging 7.1 Tool Bar for Debugging …………………………………………………7-2 7.2 Debug Menu ……………………………………………………………7-2 7.2.1 Trace ………………………………………………………………7-2 7.2.2 Go …………………………………………………………………7-2 7.2.3 Stop ………………………………………………………………7-2 7.2.4 Break Step …………………………………………………………7-3

7.2.5 Break Scan …………………………………………………………7-3 7.2.6 Break Bit……………………………………………………………7-3 7.2.7 Break Word…………………………………………………………7-4 7.3 I/O Setting ………………………………………………………………7-4 7.3.1 Change I/O Enable …………………………………………………7-4 7.3.2 Forced I/O Enable …………………………………………………7-4 7.3.3 Forced I/O Setting …………………………………………………7-4 7.4 Trigger …………………………………………………………………7-7 Chapter.8 Option 8.1 Window menu ……………………………………………………………8-1 8.2.1 New window ………………………………………………………8-1 8.2.2 Window arrange ……………………………………………………8-2 8.2.3 Window List ………………………………………………………8-3 8.2 Help Menu ………………………………………………………………8-3 8.2.1 KGLWIN Help ………………………………………………………8-4 8.2.2 Search Help (F2) ……………………………………………………8-4 8.2.3 Help in help …………………………………………………………8-5 8.2.4 About KGLWIN ……………………………………………………8-5 8.3 Option……………………………………………………………………8-5 8.3.1 Editor Option ………………………………………………………8-5 8.3.2 Page setup …………………………………………………………8-6 8.3.3 Connection Option …………………………………………………8-6

- Appendix 1.1 Hot-Keys for Ladder Program Mode ………………………………………A-1 1.2 Hot-Keys for Editing Block ………………………………………………A-2 1.3 Hot-Keys for Mnemonic Program Mode ……………………………………A-2 1.4 Hot-Keys for Online Mode…………………………………………………A-2 1.5 Hot-Keys for Cursor Move ………………………………………………A-3 1.6 Cable Standards for communication with PLC………………………………A-4

Chapter.1 Introduction 1.1 Features of KGL for Windows …………………………… 1-1 1.2 Connection to PLC ……………………………………… 1-2

Chapter. 1 Introduction

Chapter. 1 Introduction 1. 1 Features of KGL for Windows KGL for Windows is the Programming and Debugging Tool for LG Master-K Series. KGL for Windows has abundant Features as below. 1) Program Compatible between LG Master-K Series. A user can use the Program (*.PGM) created in LG Master-K Series for the Program created in other LG Master-K Series as well. The Program, Parameter or Variable/Comment created in KGL-DOS or GSIKGL can be also used in KGL for Windows. 2) PLC System Configuration by Project Structure KGL for Windows manages the User-Defined Program as one Project including Parameter and Variable/Comment. Also a user can save a Program (*.PRG), Parameter (*.PMT), Variable (*.VAR) or Comment (*.CNT) respectively and the stored each File can be used for other Project files. 3) User Friendly Interface Easy and useful interface for Creating, Editing and Monitoring. 4) Online Editing A Real Time Editing is available in Online mode. The Program edited in the Online condition can be downloaded automatically without stopping PLC Hardware. 5) Monitoring the Information from PLC A user can easily monitor PLC status such as Error Status, Network Information and System Status. 6) Debugging and Self-diagnosis (in New MASTER-K Series) Trigger and Forced I/O Enable are available for the accurate Debugging.

1-1

Chapter. 1 Introduction 1. 2 Connection to PLC

1.2.1 RS-232C Interface for Local Connection ♦ RS-232C Interface for LG Master-K Series ♦ PLC can be connected with the serial port (COM1 ~ COM4) of Computer by RS-232C Cable.

GM4-PA2A

G K 4-CPUA

K4I-D22A

K4I-D22A

K4I-D24A

K4 Q - R Y 2 A

K4Q-RY2A

K4F-HSCA

G4F-AD2A

G4F-DA2A

KGLWIN LG

RS -232C Cable

♦ Click『Options』Menu in『Project』Menu and Select『Connection option』tap. Then the following screen will be shown.

1-2

Chapter. 1 Introduction ♦ Select『RS-232C』and proper COM port in Connection Option. ♦ Select『Local』as the 『Depth of Connection』and click OK button. ♦ Select『Connect+Download+Run+Monitor Start』in Online Menu. 1. 2. 2 RS-232C Interface for Remote Connection (available to K80S, K200S, K300S, K1000S only) ♦ Remote Connection means that PLC’s are connected through the communication modules but not to the computer directly as Local Connection. Remote Connection also can do download, upload, mode change or monitoring like Local Connection. Remote Connection 1

Local Connection

GM4-PA2A

GK4-

C P UA

G4L- M U E A

K 4 I - S S A2

K 4 I -D24A

K 4 Q -RY2A

K4 Q - RY2A

K 4 F - HSCA

G4F-

AD2A

G4F- DA2A

Remote Connection 2

GM4-PA2A

GK4- C P UA

G4I-G4L- M U E A D22A

K 4 I - S S A2

K 4 I - D24A

K 4 Q -RY2A

K 4 Q -RY2A

K 4 F -HSCA

G4F- AD2A

G4F-

DA2A

GM4-PA2A

GK4-

C P UA

G4L- M U E A

K 4 I - S S A2

K 4 I - D24A

K 4 Q -RY2A

K 4 Q -RY2A

K4 F - HSCA

KGL- WIN Mnet(Mini-MAP)

LG

RS-232C

G4L-

Fnet(Fieldbus)

MUEA

Mnet(G□ L-MUEA

G4L- FUEA

Fnet G□ L-FUEA

♦ Select Remote 1 or Remote 2, and then setup the Network Type, Slot Number and Station Number.

♦ Select『Connect+Download+Run+Monitor Start』in Online Menu. ♦ For more information, please refer to user’s manuals for MASTER-K Fnet(Fieldbus module), Mnet(Mini-MAP module).

1-3

Chapter. 1 Introduction 1. 2. 3 Dial-up Modem(or Cable Modem) Connection (available with MASTER-K Series only) ♦ The long distance connection using a modem is only available for Remote Connection Mode or for PLC with the computer module (G L-CUEA). ♦ After selecting Project - Options - Connection Option - Dial-up Modem or Cable Modem, setup the Communication Port, Baud Rate and Phone number (in Dial-up Modem select).

♦ Select『Connect+Download+Run+Monitor Start』in Online Menu. ♦ For more information, please refer to user’s manual for New MASTER-K Cnet(Computer Link module). 1. 2. 4 Connection using Communication module ♦ This connection is only available for Remote Connection using Fieldbus or Mini-MAP. So, in order to use this Connection, a user should prepare the communication modules (Fnet, Mnet) to be mounted on PLC and the communication boards (GOL-FUEA, GOL-MUEA) to be mounted on the Computer. ♦ Setup Communication Port, Card address and Station number in『Connection Option』Menu. ♦ Select『Connect+Download+Run+Monitor Start』in Online Menu. ♦ For more information, please refer to user’s manuals for New MASTER-K Fnet(Fieldbus module), Mnet(Mini-MAP module).

1-4

Chapter. 1 Introduction

1. 2. 5 Connection using Network(Ethernet) ♦ This connection is only available for Remote Connection. To use this Connection, Network module(Ethernet module) should be installed in PLC. ♦ Select Ethernet in『Connection Option』Menu. ♦ Setup IP address and Slot number. ♦ Select『Connect+Download+Run+Monitor Start』in Online Menu. ♦ Ethernet module is under developing.

1-5

Chapter. 2 Installation 2.1 System Requirements …………………………………2-1 2.2 Installing the Software …………………………………2-2

Chapter. 2 Installation

Chapter. 2 Installation 2.1 System Requirements - Recommended System Requirements for KGL for Windows 1) IBM Computer compatible and Memory (RAM) 80486DX or greater, 8Mb RAM or more 2) Serial Port One or two Serial Ports 3) Hard Disk 20Mb or more 4) Floppy Disk Drive One or more(3.5 Inch or 5.25 Inch) 5) Mouse and Printer For Windows 95 6) Operating System Microsoft WindowsTM 95 or more

2 -1

Chapter. 2 Installation 2.2 Installing the Software To install KGL for Windows from the compressed diskettes, be sure to use the original installation diskettes. If you copy the files in the diskettes to a folder in your hard disk manually, the software won’t be installed. ♦ Installation the setup program à Double-click ‘Setup.EXE’ file in the installation Disk1. ♦ The Setup Wizard will guide you to install the Software automatically. ♦ Press Next button to start the installation. You can press Cancel button if you don’t want to install KGL for Windows at this time.

♦ Select Destination Folder which KGL for Windows files are to be installed. You can change the folder using Browse button or click Cancel button to cancel the installation.

2-2

Chapter. 2 Installation ♦ If you press Browse button, you can choose the folder to install the Software as shown in the dialog box.

♦ After selecting the folder or typing the Path to install the program in the dialog box, click OK button. . If the folder does not exist, the following dialog box will be shown. If you want to create a new folder, press OK button.

♦ The installation process will be displayed as below.

♦ After the installation, the folder is created. The execution file and Readme icon will be also created in the Start Menu of Windows95. To start KGL for Windows, double-click the execution icon(

2 -3

).

Chapter. 3 Start-Up KGLWIN 3.1 Creating a Project ……………………………………… 3.2 Creating a Program……………………………………… 3.3 Connect to PLC (Online) ………………………………… 3.4 The Screen Setup and Functions …………………………

3-1 3-3 3-9 3-15

Chapter. 3 Start-Up KGLWIN

Chapter.3 Start-Up KGLWIN 3. 1 Creating a Project ♦ Double-click KGL_WE.exe file to run KGLWIN. ♦ The Start-up Screen will be shown as below.

♦ To create a new project, select Project- New Project… (

)in the Start-up Screen.

♦ Select Blank Project in the dialog box and click OK button.

♦ In the following dialog box, Type in PLC Type, Programming Language, Title, Company, Author and Description.

3-1

Chapter. 3 Start-Up KGLWIN

♦ Click OK button. Then, Project, Message and Program Windows are displayed automatically.

Program windows Parameter windows

Message windows

♦ You can also create a new Project using already created files from KGL-DOS or GSIKGL as well as KGLWIN. For more information, please refer to Chapter. 4.2 Creating a Project.

3 -2

Chapter. 3 Start-Up KGLWIN

3. 2 Creating a Program 3. 2. 1 Creating a Ladder Program ♦ This chapter describes creating a program in Ladder Window using the Tool Bar.

♦ After selecting the Normally Open Contact(

) icon in the Ladder Tool Bar, Move the cursor to the place to insert the

contact. ♦ Click the left button of the mouse or press Enter key, then the contact input dialog box appears.

♦ Type in the contact name(M0000) you want to insert and click OK button or press Enter key.

3-3

Chapter. 3 Start-Up KGLWIN

♦ Select the Output Coil (

) icon in the Ladder Tool Bar and move the cursor to the next column of M000.

Click the mouse button or press Enter key.

♦ Type in the Output Coil (P000) and click OK button or press Enter key.

3 -4

Chapter. 3 Start-Up KGLWIN ♦ Select the Vertical line (

) icon in the Ladder Tool Box and click the mouse button on the cursor position.

♦ To delete Vertical line, select Vertical line and press del key or press back space key in above picture. ♦ Select the Normally Closed Contact (

) icon in the Ladder Tool Bar and Move the cursor to the place to insert the

contact. Click the mouse or press Enter key to open the input dialog box for the contact input.

♦ Type in an input contact that you want and click OK button or press Enter key. ♦ After selecting the Applied Instruction icon(

) in Ladder Tool Box, click the mouse or press Enter key.

♦ Type『INCP D0000』in the Ladder Editor Box.

3-5

Chapter. 3 Start-Up KGLWIN

♦ Select the Normally Open Contact(

) icon in the Ladder Tool Bar and move the cursor to the next start line à

Click the mouse or press Enter key. à Type F0093 (System pulse clock for 1 second)

♦ Select the Applied Instruction icon(

) in the Ladder Tool Bar and type『CTU C000 20』.

♦ For the Reset input of the Counter, type M0001 in the reset position after selecting the Normally Open Contact.

3 -6

Chapter. 3 Start-Up KGLWIN

♦ To complete the Ladder line, select the Horizontal Line (

) icon in the Ladder Tool Box. And click the mouse to fill the

spaces between two icons with the line.

♦ To finish the program editing, insert『END』Instruction in the next line. Select the Applied Instruction icon ( enter『END』instruction and press Enter key or click the mouse button.

3-7

) to

Chapter. 3 Start-Up KGLWIN

3. 2. 2 Creating a Mnemonic Program ♦ In order to view the Mnemonic Program in the Ladder Program Mode, Click the Mnemonic icon(

) in the Ladder

Tool Box.

♦ In order to edit a Mnemonic Program, move the selection bar to the Step you want to insert.

♦ To replace the Instruction『INCP』into『DECP』, Type in『DECP D0000』on the Step No. 3 using the Input Bar.

3 -8

Chapter. 3 Start-Up KGLWIN ♦ If you want to insert the Instruction『DECP』in front of the Instruction『INCP』, press Insert key in the keyboard. à The edit mode will be changed from OVR to INS . à Type the Instruction on the Input Box and press Enter key.

♦ To return to the Ladder Program Mode, press the Ladder icon( ♦ To insert a new line, press CTRL+M. ♦ To delete a existing line, press CTRL+U.

3-9

) in the Mnemonic Tool Bar.

Chapter. 3 Start-Up KGLWIN

3. 3 Edit Variable/Comment 3. 3. 1 Input Variable/Comment ♦ In order to input Variable/Comment, select Variable/Comment in Project window.

♦ If you double-click Variable/Comment, Variable/Comment window is appeared.

♦ If you press enter key or double-click, Variable/Comment edit box is appeared.

Select bit device or word device

♦ In Variable/Comment edit window, input device name, variable, comment and click OK button. ♦ In the same way, edit Variable/Comment for used device.

3 -10

Chapter. 3 Start-Up KGLWIN

3. 3. 2 Variable/Comment view ♦ If you click (

), you can see variable name instead of device name.

♦ If you place cursor at a device, you can see variable/comment in Instruction list bar.

Instruction list bar

3-11

Variable view bar

Chapter. 3 Start-Up KGLWIN

3. 4 Connect to PLC (Online) 3. 4. 1 Connection ♦ In order to communicate with PLC, connect the RS-232C port of CPU module with the computer serial port by RS-232C Cable. à Select Online-Connect(

) in the Pull-down menu.

à Type the Password

♦ If you don’t have any password, the password window will not appear. ♦ See 6.4.2. of this manual for more detail about password. ♦ If the connection is completed, the message appears on the Status Bar as below..

♦ If the connection is not completed normally, the Message Window will appear as below

♦ If connection fails, confirm the RS-232C Cable and examine Connection Option in Project- Options… of the Pull-down menu so as to choose『Local』as the Depth of Connection.. ♦ If the connection is completed normally, select Online-Download ( opened.

3 -12

) menu. Then the following dialog box will be

Chapter. 3 Start-Up KGLWIN

♦ Click OK button to continue the process. Then, the program and parameters are downloaded to PLC.

♦ Download is only available on Stop (

)Mode. Confirm the status in the Change Mode.

à Click OK button. ♦ Select Run (

) Mode in Online - Change Mode menu.

♦ To examine the program and parameters stored in PLC are the same one of KGLWIN, select Online-Verify menu. Then, the following message box will appear. Click OK button to verify.

♦ Click OK button to start verifying. If you want to stop verifying, click Cancel button.

♦ To monitor the Used Device or PLC System, select Monitoring(

) Mode in Online – Monitor Start menu.

Then, the following message box appears to verify the program and parameters with ones in PLC.

3-13

Chapter. 3 Start-Up KGLWIN

3. 4. 2 Connect+Download+Run+Monitor Start(

)

♦ Connect, Download, Run and Monitor Start Functions described in Chapter.3.3.1 are executed at one time by clicking the Connect+Download+Run+Monitor Start button in the Pull-down menu. 3. 4. 3 Online Edit ♦ This Function is performed only when the verification is completed and in the Monitoring mode. In this mode, you may not execute the Download Function after editing. It’ll be done automatically. ♦ The program is changed automatically without the mode changing into Stop mode. So, you must be careful when you do edit the program in the Online mode. ♦ In order to edit the program in Chapter. 3.2.1, move the cursor on the Instruction that you want to change and double click or press Enter key.

♦Type the new Instruction or Device to change in the Editor Tool Box.

à Click OK button. ♦ The Message Box to confirm the change will appear below.

3 -14

Chapter. 3 Start-Up KGLWIN

♦ Click OK button to complete the Online Edit. ♦ To complete Online edit, click OK button in Message box for confirm

3. 4. 4 Monitoring ♦ To monitor the PLC Devices or System Information, select Monitor in the Project window.

♦ After selecting the type of Device to monitor, enter Device Name and Number. Enter the Device Name

Select the No. of the device

3-15

Chapter. 3 Start-Up KGLWIN

♦ If you want to monitor Flags, you can choose Flags in the following combo box after selecting F Device.

Select Flag Devic

Choose Flags

♦ You can monitor other detail information such as PLC information, I/O Information, Link Information and more. For more information about the Read/Write, please refer to Chapter 6.2. Monitoring & Mode Change.

You can change Current I/O directly in KGLWIN

3 -16

Chapter. 3 Start-Up KGLWIN

3. 4. 5 Save the Project ♦ To save the Project created in the above, select Project - Save Project in the Pull-down menu.

♦ Enter the Project Name (Test.prj) to save the active. If you don’t enter the name, the Project will be saved as New.prj. ♦ When the Project is saved, all the Items(Program, Parameter, Variable/Comment) are stored in the Project including the status of the window arrangement.

3-17

Chapter. 3 Start-Up KGLWIN

3. 5 The Screen Setup and Functions 3. 5. 1 The Screen Setup ♦ The main Screen of KGLWIN Pull-down Menu

The Speed Bar

Program windows

Parameter windows

Message windows

The Status Bar

Shows Capital mode

Shows PLC error Shows Overwrite mode

♦ The Status Bar → Description Mode : Describes the Function of the Command or Menu. → PLC Mode : Shows the Connection Status, PLC Type, Depth of Connection, PLC Operating Mode, View Mode, Monitoring Mode and more. 3. 5. 2 Menu ♦ To perform an item (command) in Menu, you can select the Command in Pull-down menu or the icon in the Speed Bar. ♦ The Menu Bar provides two ways for you to access the Pull-down menus. Once the Pull-down menu appears, You can access the menu items in the same way by either using the mouse or pressing the underlined letter (Project…) In order to execute a command by the underlined character in the menu list, press the key first, and then press the letter.

3 -18

Chapter. 3 Start-Up KGLWIN

1) Project Commands

Descriptions

New Project…

Create a new Project

Open Project…

Open an existing Project

Save Project

Save the active Project

Save Project As…

Save the active Project as a new Project.

Close Project

Close the current Project

Save Item

4

Save Program, Parameter and Variable/Comment as Files

Load Item

4

Load Program, Parameter and Variable/Comment files in a Project

Options…

Set KGLWIN Options

Print…

Ctrl+P Print the active document

Print Preview

Preview documents to print

Project Print

Print all the contents of the Project

Print Setup…

Setup the Printer Options.

Recent Project

Open the recent Project

Exit

Quit the application

2) File Commands

Descriptions

New…

Ctrl+N Create a new File

Open…

Ctrl+O Open an existing File

Save

Ctrl+S

Save the active File

Save As…

Save the active File as a new File

Recent File

Open the recent Files

3) Edit Commands

Descriptions

Cut

Ctrl+X

Remove the selected block and send it to the Windows clipboard

Copy

Ctrl+C

Copy the selected block to the Windows clipboard without affecting it

Paste

Ctrl+V

Retrieve it from the Windows clipboard

Delete

Ctrl+Delt

Delete the selected block

Insert Line

Ctrl+M

Insert a line at a caret position

Delete Line

Ctrl+U

Delete a line at a caret position

Edit Rung Comment

Edit a Comment at a specified rung

Block Selection…

Select a block using Step range

Optimize Program

Optimize the program

Find…

Ctrl+F

Find the specified string

Replace

Ctrl+H

Find the specified string and replace it a new device

Forward Again

Ctrl+F3

Search again forward

Backward Again

Ctrl+B

Search again backward.

Go to Step

Ctrl+G

Move the cursor to the step

3-19

Chapter. 3 Start-Up KGLWIN 4) Tool (Only available for Ladder Program) Commands

Descriptions

Arrow

Go to Arrow mode

Range

Set the range for block

Normally Open Contact

F3

Select a Normally Open Contact

Normally Closed Contact

F4

Select a Normally Closed Contact

Horizontal Line

F5

Select a Horizontal Line

Vertical Line

F6

Select a Vertical Line

Output Coil

F9

Select a Output Coil

Applied Instruction

F10

Select an Applied Instruction

NOT Instruction

Select a NOT Instruction

5) View Commands Mnemonic/Ladder

Ctrl+Space

Descriptions Change the program to Ladder or Mnemonic Mode

Device Name

Display the Device Name

Variable Name

Display the Variable Name.

Device+Variable Name

Display the Device and Variable Name

Device+Comment

Displays the Device and Variable Name

Used Device

Display the Used Device

Device Reference

Show the Device Reference

Check Program…

Check the errors in the Project

Change No of Column

Change the number of the input contact in one line

Zoom In/Out

Zooming

6) Online Commands Connect+Download+Run +Monitor Start

Descriptions Execute Transfer, Run and Monitor Functions simultaneously Ctrl+R

Connect

Connect to PLC

Disconnect

Disconnect from PLC

Monitor Start

Start Monitoring

Mode Change Run

Change PLC Mode to Run

Stop

Change PLC Mode to Stop

Pause

Change PLC Mode to Pause

Debug

Change PLC Mode to Debug

Read

System Monitor

Monitor ON/OFF status of I/O modules

Information

PLC Information…

Mnet Information…

Show PLC Type, PLC Version, Memory Pack and Scan Time Show type of modules and O/S version number of special modules Show the slot number of Network modules show the slot number of Mnet module

HSLink Parameter

Monitor High Speed Link Parameter

Write

Set PLC Clock…

Set PLC Clock

Information

Change Password…

Change the Password in PLC

Write Mnet Parameter…

Change the Parameter of Mnet

FSM Emergency Output

Setup the device for an emergency output

I/O Information… Link Information…

3 -20

Chapter. 3 Start-Up KGLWIN Download…

Download Program/Parameter to PLC

Upload…

Read Program/Parameter from PLC

Verify …

Verify Program/Parameter with PLC

Clear

Verify

Clear Devices in PLC Clear the program/parameter in PLC read the program/parameter from Flash Memory write PLC program/parameter to Flash Memory verify the program/parameter with Flash Memory

Type Selection…

Select EPROM Type

Write Verify

write PLC program/parameter to EPROM read the program/parameter from EPROM verify the program/parameter with EPROM

Check Blank

Check if EPROM is empty

Load Binary File…

transfer the program/parameter in KGLWIN to EPROM receive the Binary File from EPROM

Data… Program/Parameter

Flash

Read

Memory

Write

EPROM

Read

Binary File

Make Binary File…

7) Debug Commands Trace

Descriptions Ctrl+T

Run only one Step

Go

Run until current Break point

Stop

Stop Debugging

Break Step…

Run to the specified Break Step

Break Scan…

Run to the specified Break Scan

Break Bit…

Run until the specified Bit is set

Break Word

Run until the specified Word data

Change Current I/O…

Ctrl+I

Change Current I/O

Forced I/O Enable

Enable Forced I/O setting

Set Forced I/O…

Set Forced I/O

Sampling Trace

Execute sampling Trace

Trigger

Execute Trigger

9) Window Commands

Descriptions

New Window

Open a new window for the active program

Cascade

Cascade windows on the screen

Tile Horizontally

Arrange window as non-overlapping tiles

Tile Vertically

Arrange window as non-overlapping tiles

Arrange Icons

Arrange icons at the bottom of the window

10) Help

Commands

Descriptions

KGLWIN Help

Display help topics of KGLWIN

Help in Help

Display detailed instructions about how to use

About KGLWIN…

Display general information of KGLWIN

3-21

Chapter. 3 Start-Up KGLWIN

3. 5. 3 Tool Bars ♦ These Tools are supported in KGLWIN.

♦ The Tools in the Speed Bar

Tools

Commands

Tools

Commands

New Project

Connect

Open Project

Disconnect

Save Project

Download

New File

Monitoring Mode

Open File

Run

Save File

Stop

Print

Pause

Cut

Debug

Copy

Go

Paste

Debug Stop

Find

Trace

Replace

Break Scan

Forward

Break Step

Backward

Break Bit

Conncet+Dowload+Run+Monitor Start

Break Word

3 -22

Chapter. 4 Creating a Project 4.1 Create a Project ………………………………………… 4.2 Open a Project ………………………………………… 4.3 Save a Project ………………………………………… 4.4 Manage an Item ………………………………………… 4.5 Editing a Parameter …………………………………… 4.6 Editing a Variable/Comment ……………………………

4-1 4-2 4-3 4-4 4-5 4-8

Chapter. 4 Creating a Project

Chapter. 4 Creating a Project 4. 1 Create a Project 4. 1. 1 About a Project ♦ A Project is the highest level to communicate with PLC and KGL for Windows. A Project consists of Program, Parameter and Variable/Comment of Device.

Items

♦ KGL for Windows deals with User Defined Programs and includes all elements necessary for describing a Project. ♦ A Project consists of 3 Items (Program, Parameter and Variable/Comment) and Monitoring is activated when the Monitoring Window is opened. Each Item can be saved respectively for another Project. ♦ Saved Items (Program, Parameter and Variable/Comment) can be used for creating other Projects or to reuse for other Projects. ♦ A Project includes not only Program, Parameter and Variable/Comment, but also PLC type, Used status of KGL and various information registered for monitoring. Thus, When you reopen the Project after saving a Project, the Window keeps the previous working condition. ♦ Only Program and Parameters can be downloaded to PLC. ♦ A Project is saved as *.PRJ File. 4. 1. 2 Create a Project ♦ To create a New Project file, Select File--New Project… ( The New Project dialog box will appear as below.

4-1

) from the Project pull-down Menu.

Chapter. 4 Creating a Project

♦ Open a Blank Project → It creates a new Project. (Refer to Chapter. 3.1) ♦ Create from Old Files → To create a New Project using the already existed Item (Program or Parameters or Variable/Comment), Select Item or items to be used by clicking the Find button in the dialog box.

→ Click OK button after registering Items. → Up to 3 items can be selected and non-selected items are set to default(Initial data). ♦ After selecting PLC Type and Programming Language, press the OK button. Then Project, Message and Program Windows will be opened. ♦ Create from DOS KGL file → To create a New Project using Items (Program, Parameter and Variable/Comment) created in KGL for DOS, Select PLC Type and Programming Language after selecting already created Items in KGL for DOS. Then, a New Project will be opened. ♦ Create from GSIKGL file → To create a New Project from GSIKGL file, Select already created files (*.PGM, *.CMT) from GSIKGL in the dialog box and select PLC Type and Programming Language.

4. 2 Open a Project ♦ To open an existing Project, Select Project—Open Project… (

4-2

)from the Project pull-down Menu.

Chapter. 4 Creating a Project

♦ Press Open button after selecting the Project that you want.

4. 3 Save a Project ♦ To save a Project, Select Project—Save Project… (

) from the Project pull-down Menu. All Items (Program,

Parameter and Variable/Comment) contained in the Project will be stored at the same time. ♦ If you overwrite an already existing project onto itself, there will be no message on screen. ♦ If you save a New Project that is not existed in the specified folder or select Project—Save as… from the Project pull-down Menu, the software will reconfirm it as below.

♦ Select Project—Close Project or Project—Exit from the Project pull-down menu. Then, the Window asking if you save the Project will appear. Click ‘Yes’ button to save the edited Project or ‘No’ button not to save.

4-3

Chapter. 4 Creating a Project

4 . 4 Manage an Item 4 . 4. 1 Save an Item ♦ In order to save each Item included in a Project, select Project—Save Item… from the Project pull-down Menu.

♦ Press Save button after entering the name of the Item. ♦ This can be used for creating a New Project or changing Items of a project. 4. 4. 2 Load an Item ♦ In order to load some items to the on-editing project from the saved item file, select Project—Load Item… from the Project pull-down Menu. ♦ Click Open button after selecting item in Open dialog box as below.

♦ After the completion, the program among Items of the Project will be changed into Test.prg file.

4-4

Chapter. 4 Creating a Project 4. 5 Editing a Parameter ♦ In one Project, There are 4 types of Parameters, ‘Basic Parameter’ ‘Interrupt Parameter’ ‘I/O Parameter’ and ‘Link Parameter’ To perform parameters, you should download them to PLC. ♦ Select Parameter in Project Window.

♦ For setting up Parameters, please refer to the manuals. 4. 5. 1 Basic Parameter ♦ To setup Latch Area of Devices, Timer Boundary, Watchdog Time, PLC Operation Mode or Baud Rate, select Basic Parameter in Parameter window.

4. 5. 2 Interrupt Parameter ♦ Select Interrupt Parameter in Parameter window. ♦ Double-click the number that you want to setup.

4-5

Chapter. 4 Creating a Project

♦ Select Interrupt Type and Interrupt number and Interval.

♦ TDI Time is interval times, which is available to set within the range of 10 ~ 6000msec ♦ To finish interrupt parameter settings, click the OK button. 4. 5. 3 I/O Parameter ♦ To reserve the slot number and I/O Type in PLC, select the I/O Parameter in Parameter window. ♦ Select I/O Type and enter the comment.

4-6

Chapter. 4 Creating a Project

4. 5. 4 Link Parameter ♦ Select Link number to setup in Parameter window.

♦ Setup Link Enable, Slot number, Self-station and Type of network in Link Parameter and double-click the relevant number. Then the following dialog box for setting the parameter.

♦ Click OK buttons after setting the data. ♦ For more information about Link Parameter, please refer to manuals for the communication modules.

4-7

Chapter. 4 Creating a Project

4. 6 Editing a Variable/Comment ♦ Variable/Comment is for the detail description of devices used in PLC. This also makes you understand the process of a Project more easilly. ♦ Select Variable/Comment in Project window.

♦ Double-click the Variable/Comment in Project window.

♦ Enter Variables in the dialog box and setup the types of Variables (Word/Bit). ♦ Enter Variable Name or Comment Name in the dialog box.

♦ To exit the dialog box, click OK button.

4-8

Chapter. 5 Editing a Program 5.1 Edit a Ladder program ………………………………… 5-1 5.2 Edit a Mnemonic program ……………………………… 5-2 5.3 Edit Menu ……………………………………………… 5-3 5.4 Pop-up Menu ………………………………………… 5-4 5.5 View Menu …………………………………………… 5-4 5.6 Manage a File ………………………………………… 5-7

Chapter. 5 Editing a Program

Chapter. 5 Editing a Program ♦ A Program is used for editing and developing Commands to control a machine or process by PLC System. This chapter shows creating, saving and editing a Program.

5. 1 Edit a Ladder program ♦ A program is included in a Project as an Item of it and is created automatically in a Project. ♦ Open the Test .prj created in Chapter. 3.1.

♦ Tool Bars ♦ Ladder Tool Bar → This Tool Bar is only visible when you are in a Ladder Program editing mode. In the case of Ladder editing tool bar, you can also use this function in Tools Menu in the Main pull down menu

Selector

Ladder Editing Tool Bar

Change number of column

Zoom In/Out

Detail bar

View Mnemonic Program

Device Reference Used Device

5 -1

Chapter. 5 Editing a Program ♦ Detail Bar → This Bar shows the used Command and Variable/Comment of the used Device where the cursor is placed. Shows Variable Shows Comment ♦ Instruction List Bar → To select the Instruction List Bar, move the mouse pointer into an area of the illustrations below, then click the right mouse button in the Tool Bar. Click

→ You can install the instructions that are used frequently into these Instruction List Bars. To use the Instruction registered in the Instruction List Bar, Just click the specified Instruction List Bar. Then, the instruction will be entered in the position.

5. 2 Edit a Mnemonic program ♦ A Mnemonic Program uses the Input Bar for Instruction Input. ♦ Mnemonic Tool Bar

Used Device

Device Reference

View Ladder Program ♦ Input Bar → The Input Bar shows Instructions where the cursor is placed on and you can also edit or insert a Program using Insert/Overlap Mode.

5 -2

Chapter. 5 Editing a Program

History Button

♦ Instruction List Bar → This executes the same function as the one in the Ladder program.

5. 3 Edit Menu

Block Menu

Line Edit Menu

Find & Replace Menu

♦ Block Menu → Cut(Ctrl+X), Copy(Ctrl+C) and Paste(Ctrl+V) are only available after selecting a Block. ♦ Line Edit Menu → Inserts or deletes a line where the cursor is placed. ♦ Edit Rung Comment → Edits the Rung Comment in the specified line. ♦ Block Selection… → Selects a Block by a step number. ♦ Optimize a Program → Optimizes a Program by deleting NOP or unnecessary lines. ♦ Find… & Replace… Menu → Used to find or replace a specific Operand.

5 -3

Chapter. 5 Editing a Program 5. 4 Pop-up Menu ♦ Click a right mouse button to see a Pop-up Menu. ♦ Pop-up Menu varies according to the position of the mouse. ♦ The Functions are almost same as the Main Menu. But, Functions for forced I/O Enable operates differently.

5. 5 View Menu ♦ Select Menu - View in the Pull-down menu.

Option Select

5. 5. 1 View Device You can select only one view among 4 types. ♦ Shows the Device and Variable/Comment that used in the Program. → Device Name : Displays the Device Name on the screen. ( For example, P0010, D0100 ) → Variable Name : Displays the Variable Name registered in Variable/Comment Item. → Device + Variable Name : Displays the Device Name and Variable Name. → Device + Comment : Displays the Device Name and Comment. 5. 5. 2 View Device Information ♦ Select Menu - View – Used Device (

) in the pull-down menu.

5 -4

Chapter. 5 Editing a Program

♦ A Region Bar is used for selecting the Device Region to be monitored or to be updated. ♦ For the detail information of the used Devices, move the mouse pointer to the position you want to monitor and click the right mouse button. Then, the Device Reference Dialog box for the specified Device appears.

♦ The Device Reference Dialog box shows the step number, command and used status of the used Devices. ♦ You can also select the function from Menu - View – Device Reference( This shows all the used Devices for each Device.

5 -5

) in the pull-down menu.

Chapter. 5 Editing a Program 5. 5. 3 Check a Program… ♦ Program Check Function shows logic errors, operand errors, dual coil errors and more. ♦ Select Menu - View – Check Program… in the pull-down menu.

♦ You can select the items to be checked in the dialog box. Press OK button to execute. ♦ After checking, the result message appears. If there is an error, the message window will show you the detail information. 5. 5. 4 Change Number of Column ♦ To change the number of input that can be inserted in one line of Ladder program, Select the number of input contact in Menu - View – Change Number of Column (

,

) in the pull-down menu.

(red ones)

5. 5. 5 Zoom In/Out ♦ You can enlarge or reduce the screen by clicking on

or

buttons.(blue ones)

♦ You can change the zoom level by selecting Menu - View – Zoom In/Out in the Pull-down menu.

5. 6 Manage a File

5 -6

Chapter. 5 Editing a Program ♦ With creating a Project, 3 Items (Program, Parameter and Variable/Comment) are created automatically at the same time. ♦ These Items are stored in one project. If you want to save the each files separately, select Project – Save Item in the pulldown menu. ♦ An Item means a Program or Parameters or Variable/Comment in one Project. To use Items in other projects, The items should be saved as each file. ♦ A File means a Program, Parameters or Variable/Comment that does not included in a Project as an item. If you use a file in a Project, the file will be changed into an Item. 5. 6. 1 New… ♦ To create a new file, select Menu - File – New…(

) in the pull-down menu.

♦ Select an Item (Program) to create and press OK button.

♦ Setup PLC Type and Programming Language and press OK button.

5. 6. 2 Open…

5 -7

Chapter. 5 Editing a Program ♦ To open a file, select Menu - File – Open (

) in the pull-down menu.

♦ Select a File Name and Type and press Open button. 5. 6. 3 Save, Save As… ♦ To save a file, select Menu - File – Save (

) in the pull-down menu.

♦ To save a file as a different name, select Menu - File – Save As… in the pull-down menu.

♦ Type the File Name to be saved and press Save button.

5 -8

Chapter. 6 Online 6.1 Connect ……………………………………………… 6.2 Monitoring & Mode Change …………………………… 6.3 Read Information………………………………………… 6.4 Write Information………………………………………… 6.5 Download ……………………………………………… 6.6 Upload ………………………………………………… 6.7 Clear …………………………………………………… 6.8 Flash Memory ………………………………………… 6.9 EPROM ………………………………………………… 6.10 Binary File ……………………………………………

6-1 6-3 6-3 6-7 6-8 6-8 6-8 6-9 6-9 6-9

Chapter. 6 Online

Chapter. 6 Online ♦ Online Function is used for the communication between PLC and KGLWIN. Select Online in the Pull down menu

♦ In this Function, you can setup the communication conditions such as Reading from PLC, Writing to PLC, Monitoring, Debugging, PLC Mode Change, Link Parameter Setup, PLC I/O Information, Setup Enforced I/O, and Password Setup.

6.1 Connection 6.1.1 Connect + Download + Run + Monitor Start ♦ To execute the communication with PLC automatically, select this menu. ♦ This Function downloads, make PLC run and monitors the Project created in KGLWIN at one time. Prior to perform this menu confirm that the switch in CPU module of the PLC is at PAU/REM (Remote Stop) mode. If the key is at STOP mode, only Connect + Download commands will be performed 6.1.2 Connect ♦ Click Connect menu to connect to CPU module. Then, the following window will appear.

6 -1

Chapter. 6 Online

♦ Enter a password and click OK button ♦ See 6.4.2. of this manual for more detail about password. ♦ The Status Bar at the left bottom of the screen shows what is open in the Screen. Connection status, CPU Type and Key switch mode are displayed in order.

Status Bar

Shows PLC error Shows Capital mode

Shows Overwrite mode

♦ Connection Status : Local, CPU Type : K200SA , Key switch mode : Remote RUN 6.1.3 Disconnect ♦ To disconnect the communication between PLC and KGLWIN, select Disconnect menu in Online Pull- down menu. Then “ Disconnected “ Message will be displayed.

6-2

Chapter. 6 Online 6.2 Monitoring & Mode Change 6.2.1 Monitor Start/Stop ♦ To monitor the Program in RUN mode, select Monitor Start menu in Online Pull- down menu. ♦ If you want to stop the Monitoring Function, select the Monitor Stop in Online Pull- down menu. (Monitoring Start/Stop is toggled) ♦ This function monitors only the used device in the program. If you want to monitor other devices not shown in the program, select Monitor in the Project Window. 6.2.2 Mode Change ♦ Select Change mode in Online Pull-down menu. ♦ Run Mode : Changes PLC Mode to run. ♦ Stop Mode : Changes PLC Mode to stop. ♦ Pause Mode : Changes PLC Mode to pause. ♦ Debug Mode : Changes PLC Mode to debug.

6.3 Read Information ♦ This Function gives you various information of PLC. 6.3.1 System Monitor ♦ This Function shows ON/OFF status of I/O modules. ♦ You can change the value of the Output module into『ON』or『OFF』by clicking the contact as below.

6 -3

Chapter. 6 Online

♦ The Expansion System can not be monitored. 6.3.2 PLC Information ♦ This Function shows PLC Type, PLC Version, Memory Pack and Scan Time.

♦ Max Scan time :Indicate maximum scan time ♦ Ave Scan time : Indicate average scan time ♦ Min Scan time : Indicate current scan time

6-4

Chapter. 6 Online

6.3.3 I/O Information ♦ This function shows the type of modules and O/S version number of special modules mounted on the PLC Board.

♦ Click the special module that you want to see and then select Module information button to see the version number of the special module.

6.3.4 Link Information ♦ This Function shows the slot number of Network modules (Fnet, Mnet…), the type of Network modules and the station number. In this Function, you can also see the error status and connection status.

6 -5

Chapter. 6 Online

♦ Click the Link module that you want to see and then select Network information button to see status of the link module.

♦ Mode : Indicates operating status of Link module. ♦ Error : Indicates error status of Link module. ♦ Connection : Indicates connection status of Link module. 6.3.5 Mnet Information ♦ This Function shows the slot number of Mnet module, the type of Mnet and the station number.

6-6

Chapter. 6 Online

6.3.6 HS Link Parameter ♦ This Function shows Parameters (Type, Period, RTX/STX Area, Length, Mode and Error). ♦ High Speed Link Module can be mounted up to 4 modules in New MASTER-K3 and 2 modules in GLOFA-K4 on one base board.

♦ Type means l L00.S01 : Local Send, station number 00, block number 01 l L20.R11 : Local Receive, station number 20, block number 11 l L01.S12 : Local Send, station number 01, block number 12 l L01.R13 : Local Receive, station number 01, block number 13 ♦ O of Mode item means communication run status and • means no connection. ♦ O of Trx item means normal status and O of error item means error status. ♦ For more information of HS Link module, please refer to User’s manual of the product.

6 -7

Chapter. 6 Online

6.4 Write Information 6.4.1 Set PLC Clock… ♦ This Function shows the Clock of PLC and PC. You can adjust the Clock. To change PLC Clock, click OK button after setting the Clock.

6.4.2 Change Password… ♦ In order to change a Password, type in the current password and new password. To confirm the new password, retype the password.

♦ If you want to erase the password, change your password into 0(zero). ♦ Once the password has erased, the password window will not appear anymore. ♦ In order to set password again, type in a new password at Online-Write Information-Change Password of Pull-down menu. 6.4.3 Write Mnet Parameter… ♦ This Function is to setup Mnet Parameter 6.4.4 FSM Emergency Output… ♦ This Function is to setup the device for an emergency output when the communication between Remote I/O stations is stopped accidentally. ♦ For more information of FSM Emergency Output, please refer to User’s manual of New MASTER-K Fnet/Mnet.

6-8

Chapter. 6 Online

6.5 Download… ♦ This Function is to transfer the program and parameters from PC to PLC. ♦ To download the program and parameters created in KGLWIN to PLC, select Online-Download… in the pull-down menu.

Specify step number to download a portion of program.

6.6 Upload… ♦ This Function is to transfer the program and parameters from PLC to PC. ♦ To upload the program and parameters from PLC, select Online-Upload… in the pull-down menu.

Specify step number to upload a portion of program.

6.7 Clear ♦ This Function is only available in Stop Mode in PLC. To clear devices or the program/parameter in PLC, click Data in Clear menu. ♦ Confirm device areas to clear and click OK button. All device areas are cleared as default.

♦ To clear Program/Parameter in PLC, click Program/Parameter in Clear menu.

6 -9

Chapter. 6 Online

♦ Confirm items to clear and click OK button. Program/Parameters are all cleared as default.

6.8 Flash Memory Flash Memory Menu is only available for New MASTER-K Series. ♦ To read from or write to or verify the flash memory, select the relevant menu in Flash Memory menu. ♦ In case of K300S/1000S Series have external flash memory module, K200S Series have internal flash memory. K80S Series have external and internal flash memory. ♦ Flash read : This function read flash memory data to PLC. Success message box is below.

♦ Flash write : This function write PLC data to flash memory . Success message box is below.

♦ Flash verify : This function verify PLC data with flash memory data. Success message box is below.

♦ Write to External memory : This function write PLC data to flash memory. Only available for K80S Series.

6-10

Chapter. 6 Online

6.9 EPROM ♦ EPROM Menu is only available for MASTER-K Series. ♦To read from or write to or verify the EPROM, select the relevant menu in EPROM menu. ♦ If you choose Type…in EPROM menu, you can select EPROM Type.

6.10 Binary File ♦ EPROM Menu is only available for MASTER-K Series. ♦ To transfer the program/parameter in KGLWIN to EPROM or to receive the Binary File from EPROM, select Binary File menu. à Click Load Binary File… in Binary File menu to upload the program/parameter from Binary File. à Click Make Binary File… in Binary File menu to download the program/parameter to Binary File.

6 -11

Chapter. 7 Debugging 7.1 Tool Bar for Debugging ………………………………… 7.2 Debug Menu …………………………………………… 7.3 I/O Setting ……………………………………………… 7.4 Sampling Trace ………………………………………… 7.5 Trigger …………………………………………………

7-2 7-2 7-4 7-5 7-7

Chapter. 7 Debugging

Chapter. 7 Debugging ♦ Debugging Function is to detect errors in a program and clear the errors for the normal operation. ♦ In order to enter a debug mode, the following modes must be satisfied. 1)

Set the switch in CPU module to PAU/REM(Remote Stop) mode

2)

Stop the PLC operation from Change mode in Online menu.

3)

The program in PLC and the one in KGL for Windows must be verified.

4)

Select Monitor Start in Online menu.

♦ To enable the output during Debugging, choose the check box for Output during Debugging.

♦ Editing a program is not available in Debug Mode. ♦ Click Online-Mode Change- Debug Mode. ♦ Red Mark indicates the break point that the Debugging operation stops to.

7-1

Chapter. 7 Debugging 7. 1 Tool Bar for Debugging ♦ This Tool Bar is shown only in the Debug Mode. Break word Go

Trace

Break bit Break scan

Stop

Break step

7. 2 Debug Menu

Debug operating Menu

Menu for I/O Setup

7. 2 .1 Trace ♦ Trace means to run commands one by one. ♦ Click Debug-Trace(

) to move the break point by one step.

7. 2 .2 Go ♦ To debug the program by the debug option that are set in the last time, select Debug-Go(. 7. 2. 3 Stop ♦ To stop the debugging, select Debug-Stop(

).

7-2

).

Chapter. 7 Debugging 7. 2. 4 Break Step

Enter the Step number Select the Debug Start Point

♦ In order to execute debugging for some assigned step, , select Debug-Break Step (

).

7. 2. 5 Break Scan ♦ In order to execute Debugging for some assigned scan, select Debug-Break Scan (

).

Enter the number of Scan Count

Select the Debug Start Point

7. 2. 6 Break Bit ♦ In order to execute Debugging until the specific contact condition is satisfied, select Debug-Break Bit (

Select ON or OFF of the specified Contact

Select the Debug Start Step

7-3

).

Chapter. 7 Debugging

7. 2. 7 Break Word ♦ In order to execute Debugging until the specific device data is satisfied, select Debug-Break Word (

7. 3 I/O Setting ♦ This Function is to change the current value of Device or I/O value by force. ♦ This Function is available for all Modes. 7. 3. 1 Change I/O Enable ♦ To change the current value of Device, select Debug-Change Current I/O. 7. 3. 2 Forced I/O Enable ♦ This Function is to enable the Forced I/O Value (Bit data). ♦ If this function is enabled, the Forced I/O values assigned in Chapter. 7.3.3 will take effect.

Off : Disable On : Enable

♦ Click OK button after selecting On/Off. 7. 3. 3 Forced I/O Setting ♦ This Function is to set the Forced I/O value.

7-4

).

Chapter. 7 Debugging

♦ Select Debug-Set Forced I/O. ♦ Select I/O’s that you want to set by force and click Edit button.

Enable the set data Set the Forced I/O data

Clear the set data..

Clear the Forced I/O data

♦ Set the Forced I/O data. If you set the Forced I/O data without setting the Enable data, the Forced I/O Function will not activated. ♦ Click OK button after setting. The set status will be shown in the Forced I/O setting box.

7-5

Chapter. 7 Debugging 7. 4 Trigger ♦ Trigger Function is to monitor the data of the devices when the setting condition is satisfied. ♦ This Function is available only when the monitor window is activated. ♦ During the Trigger process, other windows are paused After the completion of the Trigger Function, monitoring is paused. In order to monitor them again press OK button. ♦ After activate monitor window and monitoring on , select Debug-Trigger.

♦ Enter the data to be triggered in the input box and the execution condition. • Rising : Trigger is executed when data is changed low into high. • Falling : Trigger is executed when data is changed high into low. • Rising : Trigger is executed when data is changed high into low. Or when changed low into high. ♦ Example of F0093, trigger is executed at rising edge of F0093. ♦ When trigger is completed, success massage box is appeared and monitor window is paused

7-6

Chapter. 8 Option 8.1 Window Menu…………………………………………… 8-1 8.2 Help Menu ……………………………………………… 8-3 8.3 Option ………………………………………………… 8-5

Chapter. 8 Option

Chapter. 8 Option 8. 1 Window Menu

Window arrange menu

Window lists

8. 1 .1 New window ♦ Open new window that has same contents. Currently activated window(program, parameter, variable/comment) is opened. ♦ Select menu window – New window. After activate window to make new window.

♦ New window menu edits different window with same contents. ♦ When user edits one window, at the same time contents of different window ♦ This function usefully edits program window at ladder mode viewing mnemonic program. ♦ Names of new window is program2, parameter2, variable/comment2.

8-1

Chapter. 8 Option

8. 1 .2 Window Arrange ♦ This function arrange many window in line 1) Cascade - Windows are arranged in cascade form.

8-2

Chapter. 8 Option

2) Tile horizontally - Windows are arranged in Tile horizontally

3) Tile vertically -. Windows are arranged in Tile vertically. 4) Arrange icon -. This function arranges icon. 8. 1 .3 Window List ♦ This function lists used windows. And display activated window. ♦ Activated window is marked v, and select window for activate.

8. 2 Help Menu ♦ KGLWIN has various, convenient Help function. ♦ KGLIWN Help menus are below.

8-3

Chapter. 8 Option 8. 2 .1 KGLWIN Help ♦ KGLWIN Help shows index of PLC devices and commands. ♦ KGLWIN Help function enable users search each instruction quickly. 8. 2 .2 Search Help (F2) ♦ In case of editing program, this function enable you reference help for instruction

♦ If you want to see reference of instruction, click Command Help button.

8. 2. 3 Help in Help 8-4

Chapter. 8 Option

♦ Help in Help show you how to use help menu in window program. 8. 2. 4 About KGLWIN ♦ About KGLWIN show you version number of KGLWIN.

8. 3 Option ♦ Option settings up option for environment of KGLWIN. 8. 3. 1 Editor option ♦ Editor option settings up monitor display, source directory, auto save time.

8-5

Chapter. 8 Option ♦ Source directory means directory that project open or save ♦ Auto save is setting up time save project automatically. Setting “0” mean no auto save time. 8. 3. 2 Page setup ♦ Page setup is setting up print page.

♦ Margin setup is fixing margin of print page. ♦ Cover setup is determining of print items in cover page. ♦ Footer setup is determining of print items in footer item. Footer is edited in page setup. 8. 3. 3 Connection option ♦ This option setup connection option for PC with PLC. Details refer to Chapter1.2.

8-6

Appendix 1.1 Hot-Keys for Ladder Program Mode …………………… 1.2 Hot-Keys for Editing Block ……………………………… 1.3 Hot-Keys for Mnemonic Program Mode ………………… 1.4 Hot-Keys for Online Mode ……………………………… 1.5 Hot-Keys for Cursor Move ……………………………… 1.6 Cable Standards for communication with PLC ……………

A-1 A-2 A-2 A-2 A-3 A-4

Appendix

Appendix : Hot-Keys 1.1 Hot-Keys for Ladder Program Mode Hot-Keys

Description

F3

Open Ladder Editor Box for Normally Open Contact

F4

. Open Ladder Editor Box for Normally Closed Contact

F9

Open Ladder Editor Box for Output Coil Open Ladder Editor Box for Applied Instructions

F10 N

Insert NOT Instruction

F6

Draw a Vertical Line

F5

Draw a Horizontal Line

Ctrl + F5

Draw a Horizontal Line by the end of line

+

Toggle the program(Ladder ⇔ Mnemonic)

+

Open Find dialog box

+

Open Replace dialog box

+

Search again Forward

+

Search again Backward

+

Open Go to Step dialog box

+

Insert one line

+

Delete one line

+

Select the block upward

+

Select the block downward

+

Cut the selected block (

+

)

+

Copy the selected block.(

+

)

+

Paste the selected block(

+

)

+

Delete the selected block Open Help window

+

Open Help about the Item that the cursor is placed on. Open Help about the instruction that the cursor is placed on

+

Change the line when entering Rung Comment or Output Comment

A-1

Appendix

1. 2 Hot-Keys for Editing Block Hot-Keys

Descriptions

+

Select the block upward

+

Select the block downward

+

Cut the selected block (

+

)

+

Copy the selected block.(

+

)

+

Paste the selected block(

+

)

+

Delete the selected block

1. 3 Hot-Keys for Mnemonic Program Mode Hot-Keys

Descriptions

+

Toggle the program(Mnemonic ⇔ Ladder)

+

Open Find dialog box

+

Open Replace dialog box

+

Search again Forward

+

Search again Backward

+

Open Go to Step dialog box

+

Insert one line

+

Delete one line

+

Select the block upward

+

Select the block downward

+

Cut the selected block (

+

)

+

Copy the selected block.(

+

)

+

Paste the selected block(

+

)

+

Delete the selected block Open Help window

+

Open Help about the Item that the cursor is placed on. Open Help about the instruction that the cursor is placed on

1. 4 Hot-Keys for Online Mode Hot-Keys

Descriptions

+

Perform ‘Connect+Download+Run+Monitor Start’

+

Perform Step Over Function in Debug Mode

+

Open Change Current I/O dialog box A-2

Appendix

A-3

Appendix

1. 5 Hot-Keys for Cursor Move Hot-Keys

Description Move Pointer up in window Move Pointer down in window Move Pointer left in window Move Pointer right in window Move one page up in window Move one page down in window Move to the left end of the current line Move to the right end of the current line

+

Move to 0 Step

+

Move to End Step

+

Move the first step excluding NOP Instruction

+

Move the end step excluding NOP Instruction

A-4

Appendix

1.6

Cable standards for communication with PLC KGLWIN shall be connected as follows for communication with PLC. • PLC communication : PLC Mode change, monitoring, program read/write function. • PLC series :LG MASTER-K series.

PLC Part

Computer Part

(9Pin Connector)

Serial Port (9Pin Connector) K1C-50A or KLC-15A+ KLA-009



5 3







6

● ●

2

3

3

5

5

1 6 2 7 3 8 4 9 5

4



1

2

2

PLC Part

Computer Part

(9Pin Connector)

Serial Port (25Pin Connector)

K5C-50A ■

5 3 1

● ●

● ●

2

2

3

3

5

7

6





4 2

1 14 2 . 3 . . . 25

A-5

. 7 . . 13

Appendix

PLC Part

Computer Part

(6Pin Connector)

Serial Port (9Pin Connector)

KLC-010 + KLA-009 ■

6 4 2

5 3



6





1

● ●

6 4 2



2

3

3

5

5

1 6 2 7 3 8 4 9 5

Computer Part

(6Pin Connector)

Serial Port (25Pin Connector)



1

2

PLC Part

5 3

5 4 3 2 1

● ● ●

5 ● 43 ● 2 1



2

2

3

3

5

7

6

1 14 2 . 3 . . . 25

NOTE 1) CPU Module Port (6P) 2) CPU Module Port (9P)

: LG Master-K 10S, K10S1 : All MASTER-K series except K10S and K10S1

A-6

. 7 . . 13