WINGPC SOFTWARE User's MANUAL by bzh37299

VIEWS: 50 PAGES: 82

									WGPC, developed by Samsung Electronics is an operating software application for
PLCs on the Windows platform, enabling its users to take advantage of a variety of
useful features and/or functions of the Windows OS to help them easily program PLCs.
It can be used for following series of PLCs:

              SPC series                 Single A series
                  •SPC10                      •Single A200
                  •SPC24                      •Single A2000
                  •SPC100
                  •SPC120
                  •SPC300

WGPC is developed to maximize users' convenience from its insertion so as to provide
a highly user-friendly interface for its users. Therefore, it helps you program and
operate PLCs more easily than ever before.

Simple Windows Featuring Useful Menus

  Simplifying its window's screen, while providing a rich set of toolkits, its users can
  easily write and edit program codes.

Label Writing Featuring While Editing

  Useful features that help you write programs easily include the Label and the Contact
  Comment features. These features enable you to modify, add, or delete labels while
  writing programs in the WGPC environment, so that you can write programs more
  fast and easily.

Writing Multiple Programs Concurrently

  Within the WGPC environment, you can write more than one program concurrently
  while cross-referencing one with the others. You can copy a block of codes from
  one program, then paste it into another. This feature enables you to dramatically
  reduce your developing time dramatically for new program.

Fast Swapping Between OnLine and Editor Windows

  You can swap between OnLine and Editor Windows, or you can edit your program
  with embedded Editor, concurrently monitoring your system performance. When you
  are making a test run of a PLC, this feature helps you quickly find errors and correct
  them, sifnificantly reducing the time required for Installation/Test Run
This user’s manual describes how to use the WGPC as the following contents:

Chapter 1      Installation And Configuration
  This chapter describes how to install and configure your WGPC; minimum
  hardware/software requirements of your PC station; and the relevant files to get you
  started with the WGPC.

Chapter 2      Startup
  Beginning with the first window screen that appears when you break in WGPC for
  the first time after its installation, this chapter describes how to manage Projects
  which WGPC uses, and the features that you can make use of by connecting to PLCs
  On-line.

Chapter 3      Ladder Editor
  This chapter describes how to write and edit programs using the Ladder Editor. We
  learn the terms specific to the Ladder Editor, and how to write and edit program
  codes, and some additional features useful for efficient editing.

Chapter 4      Mnemonic Editor
  This chapter describes how to write and edit programs with a set of mnemonics,
  which is a letter-type programming language for PLCs.

Chapter 5 Additional Features
  This chapter describes useful tools available in the Editors feature and the functions
  used to specify I/O addresses for programming the PLCs, and some other additional
  features.

Appendix
        A. Menu Summary
      CONTENTS

Chapter 1 : Installation And Configuration
     1.1.   PC System Requirements
     1.2.   InstallationWGPC
     1.3.   Configuration And Archtecture
     1.4.   Generated FilesWGPC
     1.5.   Support Training And Services

Chapter 2 : Startup
     2.1. Project
        4 New
        4 Open
        4 Close
        4 Save
        4 Save As
        4 Manage
        4 Print
        4 Print Preview
        4 Print Setup
        4 Most Recent Files
     2.2. OnLine
        4 OnLine
        4 Configuration
        4 WGPC = > PLC
        4 PLC = > WGPC
        4 Clear Program
        4 Monitoring
        4 System Control
        4 Modify Program
        4 Change Value
        4 Force Table
Chapter 3 : Ladder Editor
     3.1. Terms And Symbols
     3.2. Programming
        4 Instrution Bar
        4Short Key
     3.3. Edit
        4 Undo
        4 Cut
        4 Copy
        4 Paste
        4 Delete
        4 Step Insert
        4 Step Delete
     3.4. Search
        4 Goto Step
        4 Find
        4 Replace
     3.5. View
        4 Tool Bar
        4 Status Bar
        4 Instruction Bar
        4 Step Number
        4 Label = > Resister
        4 Contact Comment
        4 Display Mode (DEC)
        4 Display Mode (Negative)
        4 Redraw
        4 Grid

     3.6. Illegal Programing Examples
     3.7. Error Messages
Chapter 4 : Mnemonic Editor
     4.1. Program Structure
     4.2. PLC Instructions
     4.3. Programming
     4.4. Edit
        4 Undo
        4 Cut
        4 Copy
        4 Paste
        4 Delete
        4 Step Insert
        4 Step Delete
     4.5. Search
        4 Goto Step
        4 Find
        4 Replace
     4.6. View
        4 Tool Bar
        4 Status Bar
        4 Instruction Bar
        4 Step Number
        4 Label = > Resister
        4 Contact Comment
        4 Display Mode (DEC)
        4 Display Mode (Negative)
        4 Redraw
        4 Grid
Chapter 5 : Additional Features
     5.1. Tools
        4 Used Register
        4 Label & Comment Editor
        4 Number Converter
     5.2. I/O Configuration
     5.3. Debug
        4 Enable Debug Monitor
        4 Go
        4 Step Over
        4 Clear All Break Point
        4 Set Break Point
     5.4. Window
        4 Cascade
        4 Tile Horizontal
        4 Tile Vertical
        4 Arrange Icons
        4 Close All
        4 Error Window
     5.5. Help
Appendix
      A.1.
      A.2.
      A.3.
                                                           Chapter 1 Installation And Configuration

Chapter 1 Installation And Configuration

This Chapter provides an easy way to help users understand how the WGPC is
organized by describing the requirements of computer and the steps when the users
install the WGPC, the files in the WGPC, and users’ files created while they are running
it.


1-1 PC System Requirements

To work productively with your WGPC, the minimum hardware/software requirements
of your PC station are listed below. The following list of specifications for your PC
System tells you the minimum requirements to run WGPC successfully.


  1. Compatible with IBM-PCs having CPUs of (386/486/586), or any later model.
  2. Minimum 8Mbytes of RAM is required to operate smoothly.
  3. Operating System should be Windows 3.1, or never.
  4. Drives for storage media, such as hard disk and floppy disk drives, are required.
  5. Any available monitor or video card may be used.
  6. Serial ports for PLC communication are required.
  7. A mouse pointing device is required.


1-2 Installation

Follow these procedures to install the WGPC software:
  1. Insert the WGPC software disk into floppy drive [A:].
  2. Run File Manager from Windows and move to drive [A:].
  3. Choose SETUP.EXE from the list of files in drive [A:].
  4. Run SETUP.EXE by pressing <Enter>, or double-clicking it with the left mouse
     button.
  5. When the SETUP appears on screen, select the directory in which you want to
     install the software, then press 'OK'.
If you do not explicitly specify the directory entry field, SETUP.EXE creates C:\SAMSUNG in your C:
drive, and installs WGPC under C:SAMSUNG subdirectories
                                                         Chapter 1 Installation And Configuration


1-3 Configuration of Files and Windows in WGPC

WGPC is comprised of 6 files which are listed below. When you install WGPC, these
files are automatically created. After successful installation, make sure that none are
missing.

WGPC comprises

       hWGPC.EXE : Execution file
       hSAMSUNG.MST     : Instruction library file
       hSAMSUNG.ORT     : Operand Rule Table for Instructions
       hSAMSUNG.RRT     : Register Rule Table for Instructions
       hREADME.TXT      : Overview and help for installation environment
       hWGPC.INI        : Runtime configuration file

WGPC is made up of 3 windows:desk top, edit wimdow, monitoring window.

       hDesk top is made up of Project menu managing projects and OnLine menu controlling and
       managing PLC through netxork.
       hEdit Window is made up of a menu regarding the edit and interpretation of programs, and
       OnLine menu. There are two types of Edit windows using Ladder Editor and Mnemonic Editor.
       hMonitoring window is made up of a menu regarding monitoring and OnLine menu.

WGPC can perform multiple projects in a parallel way because it supports
MDIC(Multiple Document Interface) that can open and edit several projects at once.

1-4 Files Generated from WGPC Execution

A program developed with WGPC is managed in a project unit. Each project is
comprised of a project file, ladder files, mnemonic files, program files, and label
files. If you write a program with Ladder Editor or Mnemonic Editor, other related files
are created in the current working directory. But label files are created only when
labels are used. If you manually rename a specific file individually, your project may be
damaged or corrupted because WGPC manages all files in project units.

         Project file (*.PRJ)
WGPC manages files in project units, and a project file contains information about the
files that make up the relevant project. A project file contains information, such as the
types of PLCs and the instruction library which the program in the relevant project uses.
It is created when a new project is built or copied.

         Ladder backup file (*.LDK)
This file stores the contents of a ladder program, and is created when you write a
program with the Ladder Editor or the Mnemonic Editor.




                                              2
                                                        Chapter 1 Installation And Configuration

         Mnemonic backup file (*.MNK)
This file stores the contents of a mnemonic program, and is created when you write a
program with the Ladder Editor or the Mnemonic Editor.

         Program backup file (*.PGK)
This file stores the converted contents, suitable for a PLC application, of a file written
with the Ladder Editor or the Mnemonic Editor, and is created when you write a
program with the Ladder Editor or the Mnemonic Editor.

         Label backup file (*.LBK)
This file stores the contents of labels and comments, and is created when you write a
program with the Label Editor or the Mnemonic Editor.

         Create backup file
WGPC automatically creates backup files to prevent accidental damages arising out of
involuntary mistakes while modifying/editing a project. The following is a list of
backup files that are created for each type of file.

  Project backup file                  *.PRK
  Ladder backup file                   *.LDK
  Mnemonic backup file                 *.MNK
  Program backup file                  *.PGK
  Label backup file                    *.LBK


1-5 Support Training and Services

Thank you for purchasing products of Samsung Electronics.
For more information about our products and/or our support training, contact us through
the following addresses:

TEL     : 0331-200-2993
FAX     : 0331-200-2434




                                               3
                                                                            Chapter 2 Startup


Chapter 2 Startup

When you run WGPC, the following desk top appears.



In this desk top, you can select some initial projects, such as creating a new project and
opening an existing projects, and control and manage PLC, such as connecting WGPC
to PLC through online and monitoring the status of PLC.




                                             4
                                                                          Chapter 2 Startup


2-1. Project Operation

You must open a project to write programs or to monitor ladders and/or mnemonics. If
you want to write a set of new programs, create a new project, or if you want to edit
existing programs, then open an existing project.


Click on the Project menu to pull down a list of submenus such as New, Open, Close,
etc., with which you can create a new project or open an existing one.


       New
This command is used to create a new project. If you want to work on the existing
project, then you have to open it using the Open submenu. You can create a new project
through the following procedures:


1) Select New submenu from the Project menu.
When this submenu is selected, the following dialog box appears on the screen.




2) Enter a project name.
When the dialog box (shown above) appears on the screen, specify the directory in
which you want to save the newly created project files, the type of the PLC to be
applied, and the type of Editor you are going to use. When your selection is made, then
press OK to close the dialog box.



                                            5
                                                                          Chapter 2 Startup


       (1)Project Path
       Select the directory or path in which you want to save the project files by
       double-clicking the more on the path you want. Under this path, a number of
       files related to the project will be created.
       (2)Project Name
       Specify the name of a project you want to create. The file extension must be
       "PRJ", if omitted, "PRJ" is automatically assumed.
       (3)PLC Model
       The PLC Model to which the newly created project applies.
       (4)Editor Type
       The type of editor with which you will edit program files. You have two
       choices: the Ladder Editor and the Mnemonic Editor.



       Open
You can use this submenu to open an existing project.
1) Select the Open submenu from the Project menu.




2) Select the project you want to work on.
In the dialog box shown above, select the path and the project name, and the editor you
want to use. When all your selection are made, press the OK button to close this dialog
box.




                                              6
                                                                             Chapter 2 Startup
       Most Recent Files
WGPC offers a list of files that were most recently worked on, to help make your
programming tasks easier. This is a list of files that include up to four files of the
existing projects in order with the most recently worked on files coming first.
Therefore, you can quickly open one of the most recent existing projects instead of
using the Open submenu.

       Close
You can close the current project with the following procedures.
1) Select the Close submenu from the Project menu.
2) If changes are made to the file from the last save operation, a dialog box appears
prompting you to save the changes; if not, the current project closes immediately.




       Save
Saves the current working project. When the Save submenu is selected, WGPC
interprets the current project and creates related files. If you press the ESC key during
this process, the “file save operation” and the “related files” creation become interrupted.
If an error or errors are detected during the program interpretation, the “file save
operation” and the “related file” creation is aborted.




                                              7
                                                                        Chapter 2 Startup


       Save As
Using this command, you can rename and save the current working project with a new
name. In the dialog box (shown below), enter a new name for the current project, and
press OK to close dialog box.




       Manage

You can change the type of the PLC (PLC Type) or the CPU for the current project. In
case you want to change the type of PLC or the CPU for the existing project, make the
appropriciate changes in the dialog box (shown below), and press OK to close the
dialog box.




                                           8
                                                                           Chapter 2 Startup



       Print Setup
You can configure the printer settings. Select the printer you want to use, and specify
the size and orientation of the paper you want to print on.




       Print
You can specify the number of copies and the print range, and begin printing with this
command. When this command is selected, the dialog box (shown below) appears on
the screen.




          Printer         Indicates the printer selected.
          Range           Specifies the page range to print. If you want to print the
                          whole file, select All, or if you want to print a portion of the
                          file, then specify the page or a range of pages.
          Quality         Specifies the printing quality in dots per inch.
          Copies          Specifies the number of copies to print.
          Options         This button brings up the Print Setup dialog box, in which you
                          can specify the name of the printer you want to use, the size
                          andorientation of the paper to print on.
When you are done with your selection, press OK button to begin printing.




                                            9
                                                                       Chapter 2 Startup



       Print Preview
Before you print your document, you can preview the document on-screen in advance.
Since this command enables you to preview the document using the settings you have
made for printer, you can save a significant amount of time and paper.




    Print                                  Begins printing.
    Next Page                              Views the next page. If your file uses more
                                           than one page, you can click this button to
                                           view other pages.
    Prev Page                              Views the previous page. Click this button
                                           to go back and view the previous page.
    One Page                               Views only one page on the screen.
    Two Page                               Views two pages on the screen.
    Zoom In                                Zooms in the preview to make it larger.
    Zoom Out                               Zooms out the preview to make it smaller.
    Close                                  Closes the preview window.




                                         10
                                                                        Chapter 2 Startup


2-2. Online Connection

This feature is used to transfer programs, and to monitor and/or control the PLCs
through bidirectional communication between your PC and the PLCs. For bidirectional
communication with the PLC, your PC must be property connected to the PLC with a
serial communication cable, and its serial port must be configured appropriately using
the Configuration submenu. WGPC offers the following OnLine commands.


OnLine Connection          Connects PC to PLC on-line
  WGPC => PLC                Transfers program to PLC
  PLC => WGPC                Loads program from PLC
  Clear Program              Delete program in PLC
  Monitoring                 Monitors data in PLC
  System Control             Controls PLC's status
  Modify Program             Modifies program in PLC
  Change Value               Modifies current values of the registers in PLC
  Change Instruction         Modifies instructions of the program in PLC
  Force Table                Sets force value of the registers in PLC


        OnLine (Used To Make Connections or Disconnections From the
PLCs)
This submenu is used when you connect or disconnect your WGPC from the PLCs. To
make use of the OnLine command, you have to connect your PC to the PLC using the
following procedures. It is a toggle menu such that if this command is executed when
the connection is made, it breaks the connection. When the connection is not made, it
makes the connection between your PC and the PLC.

1) Select the OnLine submenu from the OnLine menu.




                                          11
                                                                          Chapter 2 Startup


2) Enter the CPU ID number of the PLC you want to connect to and the corresponding
password.
When the dialog box (shown above) appears on-screen, type in the CPU ID number of
the PLC you want to make connection to, and password, then press OK button.
   In case only one PLC is wired into your PC, you can make the connection by filling
in the CPU ID number entry with 255, even you are not sure of the CPU ID number of
the PLC. However, when a number of PLCs are wired to your PC by 485 connection,
you must enter an appropriate CPU ID number of in the PLC you want to make the
connection to.
   If the password for the PLC you want is not yet set, you do not need to enter the
password. You can set the passwords for the PLCs from the System Control submenu.


       Configuration (Communication port settings)
This submenu is used to configure the serial ports of your PC on which WGPC is
installed. For WGPC to successfully communicate with a PLC, it must be wired, using
the serial cable, to the PC on which WGPC is installed, and its corresponding serial port
on the PC side must be properly configured. To do this, match the serial port settings of
your PC with that of the PLC being wired into.

1) Select the Configuration submenu from the OnLine menu.




2) Make changes to the contents of the COM Port and the Baud Rate appropriately.
In the dialog box (shown above), select the communication port to use, and set the baud
rate the settings of the PLC connected to the communication port you selected, then
press the OK button to accept these settings. When you press the “Use Default” button,
the default settings: (COM1, 9600) are accepted.




                                           12
                                                                       Chapter 2 Startup



       WGPC=>PLC (Transfers A Program To The PLC)
This command is used to transfer programs in the WGPC to the PLC. It is available
only when the corresponding PLC is connected on-line.
1) Select the WGPC=>PLC submenu from the OnLine.
    When you click the menu, the following dialog box is played.




2) In the dialog box shown above, if necessary, type in some comments and then press
the OK button to transfer programs.



       PLC=>WGPC (Loads A Program From The PLC)
This command is used to load programs from the PLC. It is available only when the
corresponding PLC is connected on-line.

1) Select the PLC=>WGPC submenu from the OnLine menu.




                                          13
                                                                         Chapter 2 Startup

2) Enter a project name to save the loaded programs.
   In the dialog box shown above, type in a project name and the path in which you
want to save the programs, loaded from the PLC, then press OK to accept. Then, a new
project is created, in which the loaded programs are stored.


       Clear Program (Clears A Program In The PLC)
This command is used to clear the programs currently loaded in the corresponding PLC.
It is available only when the corresponding PLC is connected on-line.
1) Select the Clear Program submenu from the OnLine menu.




2) In the dialog box shown above, if you are sure you want to erase the program in the
corresponding PLC, then press Clear, or press Cancel to abort this command. Note that
once this command is executed, the program is deleted forever. Be sure that this is what
you want to do before you execute this command.


       System Control (Views The System Status Of The PLC)
This command is used to view and control the system status of the PLC. It is available
only when the corresponding PLC is connected on-line.
1) Select the System Control from the OnLine menu.
WGPC offers a set of different dialog boxes for each type of PLC. When you click the
menu, the following dialog boxes are displayed according to the types of connected
PLC.




                                           14
                                                                           Chapter 2 Startup


 (1) Single-A2000




In the dialog box shown above, More
is to get details of the error status. When pressed, the following error message used
appears on-screen.




                                            15
                                                                         Chapter 2 Startup


(2)Models Prior to Single- A200




 This dialog box views the current operational status of the PLC, and allows you to
control the corresponding PLC with the following buttons:
  - CPU ID                   : Sets the ID number of the CPU.
  - Watchdog Time            : Sets the Watchdog time.
  - Password                 : Sets password.
  - RTC Data                         : Sets year, month, and day.
  - RTC Time                 : Sets hour, minutes, and seconds.
  - CPU Mode                 : Runs or stops the PLC
  - Input Update             : Stops or resumes data receiving from Input Module.
  - Output Update            : Stops or resumes data sending to Output Module.
  - Time Intr.                       : Enables Timer Interrupt.
  - KEEP Clear               : Initializes Keep Area.
  - System Check             : Checks system status.
  - Memory Check             : Checks memory status.
  - Syntax Check             : Checks the syntax.




                                           16
                                                                          Chapter 2 Startup


   -Error TableErrorTable : Provides detail information about the error or errors, when it
or they occure.




                                            17
                                                                          Chapter 2 Startup


- Remote ConfigRemoteConfiguration: In case of SPC300, its remote module, if
installed, must be configured appropriately.




  - Insert : Adds remote stations. In the dialog box (shown below), set information
about the remote station, then press OK to accept.




                                                     - Delete                   :
Removes remote stations.
  - Clear                     : Initialize remote stations.
  - Read CPU                  : Reads in the configuration settings preset in the CPU of
                              the PLC.
  - Write CPU                 : Stores the configuration settings for the remote module
                              in the CPU of the PLC.
  - Read RMU                  : Reads in the actual configuration settings of the remote
                              module installed on the PLC.


                                            18
                                                                            Chapter 2 Startup


       Monitoring
You can monitor current values in the PLC using a variety of methods, such as
monitoring by Ladder, by Mnemonic, by Register, and by Time Chart.
When you are monitoring values in the PLC using the Ladder or Mnemonic Monitoring
methods, the project, with contents the same as that of the program in the PLC, must be
open in the WGPC.
 (WGPC checks this, and if they are not identical, the Ladder or Mnemonic commands
appear in gray to indicate that they are currently not available.)
However, monitoring by Register or by Time Chart does not require an open project, so
that you can monitor a currently connected PLC while editing any program using the
Ladder or the Mnemonic Editors.
1) Ladder Monitoring
Select the Ladder command from the Monitoring submenu in the OnLine menu. When
the Ladder command is selected, the monitoring dialog box (shown below) appears
on-screen.




The value currently being monitored appears in red.
You can make changes to the instruction and the value of the registers by
double-clicking the ladder symbol.
  (Refer to Change InstructionChangeInstruction and Change ValueChangeValue
menus.)



                                           19
                                                                    Chapter 2 Startup



2) Mnemonic Monitoring
Select the Mnemonic command from the Monitoring submenu in the OnLine menu.
When the Mnemonic command is selected, the monitoring dialog box shown below
appears on-screen.




The value currently being monitored appears in red.


3) Register Monitoring
Select the Register command from the Monitoring submenu in the OnLine menu. When
the Register command is selected, you can monitor the contents of the registers as
shown below.




                                          20
                                                                          Chapter 2 Startup


Goto Reg buttonGotoReg: Selects other group of registers. In the dialog box shown
below, select the register group you want, then press OK to monitor the selected group
of registers.




HEX buttonHexValue : Sets the base system used to view the current values. The base
systems include the decimal (base 10), the hexadecimal (base 16), and the binary (base
2) systems. The format on the button indicates the base system subsequently being used.


Change buttonChgValue: If you want to make changes to the value of an arbitrary
register, press this button to view the dialog box (shown below), you can type in the
register name, its value, and the type of register to be changed to, then press OK to
accept.




                                           21
                                                                               Chapter 2 Startup



4) Time Chart Monitoring
 (1) Select Time Chart from the Monitoring submenu in the OnLine submenu. When this command is
 selected, the monitoring dialog box shown below appears on-screen.




 (2) Press the ReEntry button to set the monitoring conditions which includes the list
 of the registers being monitored and the trace. In the dialog box (shown below), enter
 the monitoring conditions.




                                              22
                                                                                             Chapter 2 Startup



   A) To set the trigger register       : To make use of the trigger features, set the trigger register's name,
        the trigger's location, and the time interval.
   B)   To enter the register to monitor       : To add the register to monitor, press Add List button, then
        type in the register's name you want, then press the OK button to accept.




                                                     To remove a register in the register list : to exclude a
register from being monitored, select the register you want to delete in the register list, then press the
“Delete List” button.




                                                      23
                                                                            Chapter 2 Startup



       Modify Program
You can directly make changes to a portion of the program in the PLC. You have two
choices: one is to edit the program in a rung unit, and the other is in an instruction unit.
When you are to edit in rung unit, the ladder program (whose contents are the same with
that of the program in the connected PLC) must be open in the Ladder Editor or should
being monitored using Ladder Monitoring. This feature is available only while the
corresponding PLC is running, but some PLCs do not support this feature.


1) Insert Rung : (Available in the Ladder only)
This command enables you to modify an arbitrary instruction on-line.
(1) Move to the place you want to insert into, select the Insert Rung command from the
Modify Program submenu in the OnLine menu.
(2) [Insert Rung] box appears.
(3) Specify the line number to insert the rung.
(4) Press the [OK] button.
(5) A new window into which to insert the rung is created.
(6) In the newly created window, edit the rung to insert.
(7) Select the Insert Rung submenu from the Insert.


2) Delete Rung : (Available in the Ladder only)
This command enables you to modify an arbitrary instruction on-line.
(1) You can directly move to the line you want or to the rung you want to delete by
using the Goto Line submenu from the Search menu.
(2) Select the Select Rung submenu from the Edit menu.
(3) When a rung is selected, it becomes highlighted.
(4) Select the Delete Rung command from the Modify Program submenu in the OnLine
menu.




                                            24
                                                                       Chapter 2 Startup



3) Modify Rung : (Available in the Ladder only)
This command enables you to modify an arbitrary instruction on-line.
(1) You can directly move to the line you want or to the rung you want to modify using
the Goto Line submenu from the Search menu.
(2) Select the Select Rung submenu from the Edit menu.
(3) The selected rung is highlighted.
(4) Select the Modify Rung command from the Modify Program submenu in the
OnLine menu.
(5) A window in which to modify the rung is created.
(6) In the newly created window, edit the rung to modify.
(7) Select the Insert Rung submenu from the Insert menu.




                                         25
                                                                          Chapter 2 Startup



4) Change Instruction
This command enables you to modify an arbitrary instruction on-line. Move to the
instruction to modify, then select the Change Instruction command from the Modify
Program submenu in the OnLine menu(the dialog box shown below appears on-screen).




In the dialog box shown above, type in the instruction to modify, and its operands, then
press the OK button. Mark the check box to the right to modify the values of the
operands, then press the OK button.


       Change Value (Change Current Register Values)
This command enables you to modify an arbitrary register value on-line.

1)Select the Change Value submenu from the OnLine menu.
  The following dialog box appears.




2)Type in the name of the register to modify, its value, and its type, then press the OK
button.


                                          26
                                                                            Chapter 2 Startup



       Force Table
Despite the program running in the PLC, you can force, an arbitrary register to hold a
constant value, ignoring the operation results. To use this feature, you have to add the
registers to the Force Table. As soon as the registers are added to the Force Table, they
are modified to the setting values. This Force Table is stored in the corresponding PLC.

1)Select the Force Table from the OnLine menu. When this submenu is selected, the
dialog box (shown below) with pre-recorded registers appears on-screen.




Press the Add button to add registers to the Force Table. When this button is pressed,
the dialog box shown below appears on-screen. Type in the names of the registers and
their respective values, then press OK button.




Delete : Select the register to delete from the Force Table, and press this button.
Clear : Clears all contents of the Force Table.




                                             27
                                                                         Chapter 2 Startup


   The Force Table is stored in the PLC. When this feature is selected in the WGPC, it
reads the contents of the Force Table stored in the PLC, and displays on-screen. As soon
as you add or delete the registers in the Force Table, the contents of the Force Table of
the PLC become updated. Thus, even if disconnected from the PLC while the Force
Table is functioning, the contents of the Force Table are maintained.
   To disable the Force Table feature, you must clear all the contents of the Force Table
on-line.




                                           28
                                                                                                Chapter 3 Ladder Editor


Chapter 3 Ladder Editor

In Ladder Editor, you can modify, edit, save, interpret, print the ladder program. This section describes several notes
needed to create ladder program before how to use the ladder editor, and some glossaries used in this user’s guide.


3-1. Terms and symbols used for ladders




                                                            29
                                                                                   Chapter 3 Ladder Editor

Power Rail
The vertical lines at both ends of a ladder line are power rails. In terms of electric circuits, they play
the same role as power supply cords. If the electric potential of the left power rail is higher than that
of the right, then the current flows from the left power rail to the right. The input contact and the
output coil can be eqally expressed as the switch and the bulb respectively, and these two power
rails must be properly connected to allow current flow between them.


Rung
A ladder rung is a single closed circuit made of a number of ladder symbols and vertical/horizontal
line segments interconnected between two power rails. Ladder rungs are the smallest elements of a
ladder program. A ladder rung must be completely formed to complete a ladder program. The
uppermost line of a ladder rung is called the mother line, which should be horizontally straight and
must not have any line segment connected to its upper level. Two different ladder rungs must be
separated by a blank space, and must not be short, electrically.


Line Segment
The vertical/horizontal lines that bridge electrically between two adjacent ladder symbols are called
the line segments. To make a complete rung, the ladder symbols and the line segments must form a
completely closed circuit.


Operand
The parameters requested by a ladder instruction are called operands, and the number of requested
operands depends on each ladder instruction. An instruction includes an opcode which indicates the
action to perform, and an operand, which is the data to process or the address to refer to, while
processing. In general, most instructions used this operand to access PLC registers, and in the
WGPC, you can make use of labels instead of registers for this operand to make programming
easier.


For more information, refer to the Label EditorLC_Editor.




                                                    30
                                                                              Chapter 3 Ladder Editor


Ladder Symbols
The instructions, that a PLC executes are cast into graphical forms, which are called ladder symbols.
These symbols include the contact symbol, the coil symbol, the extension symbol, the comparison
symbol, the timer symbol, the counter symbol, and the apply symbol, etc. For detailed information
about the PLC instructions allocated for ladder symbols, refer to the PLC User's Manual.




  Contact Symbols
 The contact symbols include Contact A, Contact B, Rise Edge, and Fall Edge.


  Coil Symbols
 The coil symbols include MCS(Master Control Set), MCR(Master Control Reset), OUT, SET,
RST(Reset), and OTN (Out Not).




                                                 31
                                                                            Chapter 3 Ladder Editor


 Comparison Symbols
 The comparison symbols include == (Equal), <> (Not Equal), > (Greater Than),<= (Less Than or
Equal to), >= (Greater Than or Equal to), and < (Less Than).


  Timer Symbols
 The timer symbols include TIM (On Delay Timer) and SST (Single Short Timer).


 Counter Symbols
  The counter symbols include UC (Up Counter), DC (Down Counter), and UDC (Up/Down
Counter).


  Application Symbols
  For detailed information about the application symbols of PLCs, refer to the PLC User's Manual.




                                                32
                                                                    Chapter 3 Ladder Editor


3-2 Programming

WGPC enables you to write ladder programs easily with the mouse. We will learn how
to write programs using the Instruction Bar. Before using the Instruction Bar, it must be
showing on the screen. If not showing, choose the Instruction Bar from the View menu.

       Using The Instruction Bar (Ladder Editor)
The Instruction Bar has the following shape by default, but can have a different
shapeInstBar_col depending on a specific user's environment. To write a program, you
must move your insertion point to an appropriate location where you can write your
program using Search, the Scroll bar, or the mouse.




¢Ñ The character on the top of each button is keyboard shortcut for that specific button.




                                           33
                                                                 Chapter 3 Ladder Editor


        How To Insert Contact And Coil Instructions



1. Select the desired contact or coil by clicking the appropriate symbol with the mouse
or pressing the relevant shortcut key. If you select A, then       is selected.
2. If a certain symbol is selected, then the mouse pointer         shape gets changed
into the shape similar to that symbol, to indicate that the symbol has been currently
selected. While the mouse pointer keeps this changed shape, the relevant instruction
associated with the selected symbol can be repetitively used.
3. Move the mouse pointer to the desired location, and click the left mouse button.

4. A contact or a coil symbol appears, and an input box for an operand appears as shown
below.




5. Type in an operand and press [Enter].
The input mode gets changed to accept a new instruction at a new location. If you input
an illegal operand in the operand-entry field, WGPC does not change its input mode
until you type in a legal one. By pressing [Esc], however, you can change input mode to
accept a new instruction, cancelling the current operand input operation.




                                          34
                                                                   Chapter 3 Ladder Editor


    How To Insert Application instruction Directly
1. This a symbol to input Function Instruction.
    Select it with the mouse or by pressing shortcut key X.
2. The mouse cursor shape changes into a box.
3. Move the mouse cursor to the desired location and click the left mouse button.

4. A Function box appears and prompts you for input.




5. Type in an appropriate instruction and press [Enter], then an input box appears
prompting you to input an appropriate operand relevant to the instruction.
If you do not input a legal instruction, WGPC stays in wait mode.




6. Type in an appropriate operand and press [Enter].
Then, the input mode gets changed to accept a new instruction at a new location. If you
input an illegal operand in the operand-entry field, WGPC does not change its input
mode until you type in a legal one. Pressing [Esc], however, you can change input mode
to accept a new instruction, cancelling the current operand input operation.




                                           35
                                                                   Chapter 3 Ladder Editor


     How To Application instructions By Selection
1. This is a symbol to input a Application instruction by selecting it from a table.
 Select it with the mouse or by pressing the shortcut key F.
2. The mouse cursor shape changes appropriately and the following dialog box on the
screen.




3. Select Application instruction Group with the right mouse button.
4. A list of Application instructions appears on the left side.
5. Choose this with the mouse, press [OK] to select.
6. Or you can select the desired one by double-clicking it.
7. Move the mouse cursor to the desired location and press the left mouse button.




8. A Application instruction appears, and as many input boxes necessary to hold the
number of operands relevant to the instruction appear.
9. Fill in the boxes with each operand and press [Enter].
The input mode gets changed to accept a new instruction at a new location. If you input
an illegal operand in the operand-entry field, WGPC does not change its input mode
until you type in a legal one. Pressing [Esc], however, can change the input mode to
accept a new instruction, cancelling the current operand input operation.




                                           36
                                                                       Chapter 3 Ladder Editor

¢Ñ Ifyou press            , the instructions are sorted in order with the most frequently
used comming first.

¢ÑIf you press             , the instructions are sorted in alphabetical order.

¢Ñ With              , you can register the most frequently used Application instructions
in [Instruction Set]. For more information, refer to 3-5, View.


    Line Connecting
After completing instructions’ input using ladder symbols, we have to make these
symbols form a complete ladder rung by interconnecting them with one another. When
you choose this Line symbol, the mouse cursor shape changes into a pencil enabling
you to draw lines. Draw a connecting line between two target ladder symbols, selecting
the first target symbol with the mouse pointer, then drag the mouse while holding down
the left mouse button. The screen automatically scrolls depending on the mouse current
cursor position.


    How To Use Extension
When a ladder symbol does not fit into a horizontal line, we can use an Extension
symbol. Select an Extension symbol, then click at the rightmost edge of the horizontal
line. The starting point of the Extension appears. If you click at the leftmost edge of the
horizontal line on the lower part to which you want to make your Extension anchor,
then 2 Extension symbols become logically connected with each other, and the program
can be interpreted.

        How To Use The Pointer
This is the mouse usage mode To Select a Ladder Symbol. In this mode, you can select
the target to edit, and you can do the following modification operations.
          ¨ç. How To Move To Current Line
If you click with the mouse near a line number, the current line moves to the line
nearest to the clicked one.

            ¨è. How To Change Contact A Into Contact B



                          1. Click the center of a symbol you want to change.
                          2. Contact buttons as shown to the left appear.
                          3. Select the symbol to change with the mouse.



                                             37
                                                           Chapter 3 Ladder Editor


¨é. How To Change Coil OUT Into Coil OTN




       1. Click the center of a symbol you want to change.
                2. Coil buttons as shown to the left appear.
                3. Select the symbol to change with the mouse.


¨ê . How To Change Counter Instruction DC Into UC

1. Click the name of the symbol you want to change.
2. Instructions Input Box appears on the symbol name.
3. Type in a new instruction.
4. A new Application instruction appears, and as many input boxes to hold the
number of operands relevant to the instruction appear on the screen.
5. Fill in the boxes with each operand and press [Enter].
Then the input mode gets changed to accept a new instruction at a new location.

If you input an illegal operand in the operand-entry field, WGPC does not
change its input mode until you type in a legal one. By pressing [Esc], however,
you can change input mode to accept a new instruction, cancelling the current
operand input operation.

¨ë. How To Change Operands
1. Click the operand you want to modify.
2. A small editor box appears for the operand.
3. Type in a new operand to replace the existing one.
4. Fill in the boxes with each operand and press [Enter].
Then the input mode gets changed to accept a new instruction at a new location.

If you input an illegal operand in the operand-entry field, WGPC does not
change its input mode until you type in a legal one. By pressing [Esc], however,
you can change input mode to accept a new instruction, cancelling the current
operand input operation.



¨ì. How To Change Ladder Comments
1. Click the ladder comment you want to modify.
2. An input box appears within the ladder comment.
3. Type in a new ladder comment.
4. Press [Enter] to save new ladder comment and return to the mouse mode.

                                  38
                                                            Chapter 3 Ladder Editor
5. Press [Esc] to cancel and to return to the mouse mode.

¨í. How To Change Instructions, Operands, and Monitoring Values OnLine




1. Click the instruction you want to modify.
2. The [Instruction & Value Change] box appears on the screen.
3. Select the Instruction and its Class, then change the operands.
4. When you want to change a current monitoring value, type in a new value in
the field that contains an existing one, and check its corresponding check box
to the right.
5. Press the [OK] button to close the dialog box.




                                  39
                                                                   Chapter 3 Ladder Editor


    Clipping
With this button, you can select a number of target objects by block. This button is
useful when you want to select several targets at once. When this symbol is selected, the
mouse cursor's shape becomes a cross (+) as if to represent a set of coordinates.

        ¨ç. How to select symbols
        If you drag the mouse pointer over the symbols you want to select while
        holding down the left mouse button, those symbols are selected. And If you
        drag the mouse pointer over the symbols you want to select while holding
        down the left mouse button plus the [Shift] key, those symbols are selected.

        ¨è. How to deselect symbols
        If you click anywhere outside of the selected block with the left mouse button
        or press [Esc], the selected symbols become deselected.




        ¨é. How to move symbols
        If you drag the mouse pointer while holding down the left mouse button over
        the symbol you want to move, the symbol moves. Position the symbol at an
        appropriate location and click anywhere outside of the selected block with the
        left mouse button, then the symbol moves to that location.


    Vertical Increase Extension

This extends the height of a Application instruction symbol that has more than 1 input.
This symbol extends the height downwards from the point where the mouse button is
pressed.

    Vertical Decrease Contraction
This contracts the height of a Application instruction symbol that has more than 1 input.
This symbol contracts the height upwards from the point where the mouse button is
    pressed.




                                           40
                                                                  Chapter 3 Ladder Editor


¢ÑESC key in the instruction mode

If you press the [Esc] key after selecting a certain instruction button, this aborts the
action of that instruction button and lets you      return to mode.

¢ÑWhat happens if you click the right mouse button?
If you click the right mouse button near the right powerrail, the following instruction
circulates in a clockwise manner.




If you click the right mouse button on another location other than above, the following
instruction circulates in a clockwise manner.




¢Ñ Cursor shape
The shape of the                                      mouse cursor changes as you
select each ladder                                    symbol, helping you easily
identify which ladder                                 symbol has been currently
selected, and telling                                 you whether the symbol can be
locationd at the current located as you move the mouse cursor.

¢Ñ Tool tips

If you locate the mouse cursor over an instruction button, then a yellow box appears
giving you some hints about the button.




                                          41
                                                              Chapter 3 Ladder Editor


¢Ñ   Keyboard Shortcuts for ladders

These are key combinations for input instructions by keyboard. Instead of selecting
relevant instructions by mouse, you can use these key combinations.




        Button               SHORT KEY
        A Contact            A
        B Contact            B
        Rising edge          U
        Falling edge         D
        Invert               I
        OUT                  O
        OTN                  N
        SET                  S
        RST                  N
        MCS                  M
        MCR                  E
        Function box         X
        Application          F
        instruction
        Line                 L
        Extension            C
        Pointer              P
        Clipping             C
        Vertical Increase    W
        Vertical Decrease    Z




                                         42
                                                                   Chapter 3 Ladder Editor


Menu Shortcuts
These shortcuts are used to initiate actions or functions defined in the main menu bar on
the top of the screen.

       Menu                  SHORT KEY
       New                   Ctrl + N
       Open                  Ctrl + O
       Save                  Ctrl + S
       Print                 Ctrl + P
       Undo                  Ctrl + Z
       Cut                   Ctrl + X
       Copy                  Ctrl + C
       Paste                 Ctrl + V
       Delete                Del
       Line Insert           Ctrl + I
       Line Delete           Ctrl + D
       Select Rung           Ctrl + E
       Goto Line             Ctrl + G
       Find                  Ctrl + F
       Relocation            Ctrl + R
       Go                    F5
       Step Over             F10
       Set Break Point       Ctrl + B
       Clipping              Shift + Mouse left button




                                           43
                                                                   Chapter 3 Ladder Editor


3-3. Edit
 To easily modify/edit existing ladder programs, WGPC provides useful functions such
 as Cut, Copy, Paste, and Undo, which you can reach from the Edit menu. By choosing
 an appropriate item from the Edit menu, you can perform its corresponding function.

       Undo
 This enables you to cancel your most recent command and return your program to its
 previous state. You can undo one and only the most recent command.

       Cut
 This enables you to remove or move a block of program to a different place or places.
 Mark the symbol or a block of symbols with the mouse, and select Cut from the Edit
 menu to move it into the clipboard. After this, move the insertion point (cursor) to the
 place where you want to paste it. Then select Paste from the Edit menu to copy the cut
 block, in the clipboard, to the current insertion point. After a series of these
 procedures, the marked symbol or block of symbols are deleted from its or their
 original place.

       Copy
 This enables you to copy a portion of a program into another place. The set of
 procedures to copy a portion of a program from one place to another is exactly the
 same as that for the Cut command (explained above), except that the original marked
 block of symbols is left intact after this set of procedures.

       Paste
 This enables you to copy the ladder symbols, which were copied into the clipboard as
 a result of the Cut and/or Copy command (as explained above) to the place or places
 you want. If you select this command from the Edit menu, the ladder symbols appear
 in the center of the window. Drag them with the mouse to the place you want, and
 click the left mouse button anywhere outside of the symbols. If the input mode is in
 overwrite mode, the symbols are overwritten. Whereas, if the input mode is in insert
 mode, the symbols are inserted and the line is extended.

       Delete
 Select the symbol you want to delete and execute this command to remove it.

       Line Insert
 Use this command anywhere in the program code to obtain the extra space necessary
 to create and insert a new rung. Move to the line where you want to insert a new line;
 then execute this command. The selected line moves downward and a new line is
 inserted.




                                           44
                                                                 Chapter 3 Ladder Editor


      Line Delete
Select the line you want to delete; then execute this command to remove the selected
line.

      Select Rung
Use this command to select a rung with respect to the current line. Move to the line
you want, and execute Select Rung from the Edit menu. The rung that contains the
selected line is then selected. An empty line cannot be selected.

      Line Comment
This enables you to insert comments between two rungs. Entering comments here and
there into the program helps you and your co-workers understand the program more
easily. Move to the current line where you want to place a comment. Choose the Line
Comment command from the Edit menu; then the cursor changes shape to reflect that
it is in line comment mode. If you click on the line where you want to place a
comment, the current line moves downward giving you a comment box in which you
can place your comment.




                                          45
                                                                 Chapter 3 Ladder Editor

3-4 Search
This command enables you to quickly move to the place where you want to go. With
this command you can perform several useful search operations. For example, you can
move to move to a certain line or find and move to an operand, to find and replace
certain operands with other ones. Since this command can be executed repeatedly, it is
useful in replacing certain operands in one batch operation.

      Goto Line
This command moves the selected line to the specified one. If you select this
command, the following dialog box appears which asks you to type in the line number
you want to move to, and then press OK button.




      Find
You can quickly find a certain operand in the program with this command. If the
corresponding operand is found, the cursor moves to the operand. Because this
command can be executed repetedly, using this command can quickly and easily helps
you figure out where and how certain operands are used in a program.




In the above dialog box, type in the operand you want to find. Select the name and the
type of operand. If the operand is programmed with a label (LBL), it can be found
using the register and the label (LBL) of the corresponding label. For a label find,
select the Bit or Word register in the Find Type field and type in the name of the
corresponding label, then the label find will be executed.




                                         46
                                                                  Chapter 3 Ladder Editor



      Replace
The Find command only finds the corresponding operands; whereas, the Replace
command not only finds the corresponding operands but also replaces them with a
different one. For example, you can find the operand R000.0 and replace it with the
operand R000.1 by using this command. You should remember that in the case of a
label replace operation and prior to the Replace operation, you must register the label
to be replaced in the Label Editor. If not registered, an error occurs during the
execution of this command.




If this command is selected, the dialog box (shown above) appears. Type in the
operand name to find it in the upper entry field, and the operand name to replace it
with in the lower entry field. This command can be executed repetedly. If you are
going to replace all the matching operands in the program, press the Replace All
button, or if you want to selectively replace one by one, then press the Find Next
button.




                                          47
                                           48




                                                                  Chapter 3 Ladder Editor

3-5 View

In the WGPC, you can selectively view or hide various useful tools that will help more
your programming life easier. The following tools belong to this category.


      Tool bar
The toolbar contains a number of icons displayed in series on top of the application
window immediately below the title bar to speed up your menu selection. WGPC
offers the following set of buttons in the Tool bar:




1. New (Creates a new project)
2. Open (Opens an existing project)
3. Save (Saves a file into the storage media)
4. Print (Prints out a hard copy)
5. Library names currently being used
6. Cut
7. Copy
8. Paste
9. Find
10. Instruction Bar
11. Comment
12. Grid
13. ReDraw
14. OnLine
      Status bar
WGPC has a Status bar which briefly provides some useful information such as the
contents of the current task; the type of PLC currently being applied; and the current
keyboard status, etc.




1. A short description about instructions
   A description about the type of operand that is typed in
   A description about menus
2. The type of PLC being applied
3. OverWrite status
4. Caps Lock status
5. Num Lock status




                                           48
                                          49




                                                                 Chapter 3 Ladder Editor
      Instruction Set
A PLC has a large number of instructions and it can be a tedious job to look up every
instruction while you are programming. To save you from unnecessary distress,
WGPC enables you to customize the Instruction SetInstSet_get to your preference.
This customized Instruction Set, when properly used, helps you quickly select the right
instructions, allowing you to concentrate on your programming task.
If this command is selected from the View menu, the following dialog box appears.




                                          49
                                             50




                                                                    Chapter 3 Ladder Editor

To customize the custom instruction set:

 1. Select the Instruction Set submenu from the View menu.
 2. Select Apply command from to Commands bar to bring up the Function Block
 Selection dialog box, which you can program with Apply commands.




 3. In the Function Block Selection dialog box, select the instruction you want to
 customize.
 4. Press Add to IS button to register and select the displayed instruction in the Custom
 Instruction Set.
 5. You can repetedly register up to 20 Function Instructions in the Custom Instruction
 Set.
 6. Select the Function Instructions you want to delete, then press the Delete button to
 remove them.
 7. Press the Clear button to save to currently registered contents and to hide the dialog
 box.




                                            50
                                            51




                                                                   Chapter 3 Ladder Editor

Instruction Bar

 WGPC offers a hands-on Instruction bar shown below from which you can easily
 select instructions with the mouse while programming with the Ladder Editor.
 Therefore, this Instruction Bar must be shown in the application window while you are
 programming.




 If you click on the instruction you want with the mouse, the selected instruction can be
 placed where your next click occurs until you select another instruction. In addition,
 WGPC enables you to control the Instruction Bar View Format by adjusting the
 number of display columns.




                                           51
                                           52




                                                                  Chapter 3 Ladder Editor


To Adjust Instruction Bar View Format
 Select the Column from the Instruction bar to display the following dialog box:




 It can be displayed in 4 ways depending on the number of columns.

Others (Ladder Editor)
Step Number

 WGPC enables you to watch the step number while monitoring ladders. When the
 PLC is connected online and the PLC program and WGPC program are identical, the
 step number can be displayed.
Label ==> Register
 This command enables you to show or hide labels.
Contact Comment
 This command enables you to show or hide contact comments.
Display Mode (DEC/HEX)
 While monitoring, this command enables you to toggle between the number display
 modes: the DECimal or HEXadecimal numbers. It is available only while you are
 working online.
Display Mode ( + /     - )
 This command enables you to display (+/-) signs of your monitoring values. It is
 available only while you are working online.
Redraw
 This command enables you to refresh the application windows.
Grid
 This command enables you to show or hide grids.
            :
 Zoom 50% Zoom out 50%.
              :
 Zoom 100% Zoom in 100%.




                                          52
                                           53




                                                                  Chapter 3 Ladder Editor

3-6 Illegal Ladder Programming Examples

While writing ladder programs, you must observe a number of rules listed below. If
you violate these rules in writing a ladder program, WGPC detects these violations as
errors when it is interpreting your program.
1. Any electric signal must be transmitted from left to right.




2. Any electric signal must be transmitted from up to down. No projection part is
allowed in the horizontal line.




3. Both ends of a ladder symbol must be connected to the power rails, line segments,
or to some other ladder symbols. Also, both ends of a line segment must be connected
to the ladder symbols or to some other ladder symbol.




4. Both of the upper ends of a roof must be connected to the power rails, the ladder
symbols, or to the adjacent upper lines (by line segments), and must not be electrically
short.




                                          53
                                             54




                                                              Chapter 3 Ladder Editor




5. -- / -- can not be located at the beginning of a block.




6. The following example shows the ladders that cannot be replaced with mnemonics.




7. Anything you input must meet the input criteria.




8. Extenders must come in pairs.


                                            54
                                           55




                                                                  Chapter 3 Ladder Editor




When using extenders, one and only one extender is allowable in a single line. When
the parts that form a roof must be extended, all the lines that form that particular roof
must also be extended. Thus, both of the two I/O extenders cannot come convently in a
single line.
9. All the inputs to the Counter must begin with the same branch.




                                          55
                                                 56




                                                                       Chapter 3 Ladder Editor

3-7 Error Messages

CANNOT_REACH_THIS_SYMBOL
  Ladder symbols are incompletely connected.
SYMBOL_IS_AT_A_WRONG_POSITION
  A ladder symbol is at a wrong position.
WRONG_RUNG
 A ladder rung is corrupted
EXTENTION_SYMBOL_IS_MISSING
  Extenders (>>) must be used in pairs. Only the output extender is

  present.
EXTENTION_SYMBOLS_DO_NOT_MATCH
  Extenders (>>) must be used in pairs. One is missing.
MCS_IS_DUPLICATE
 Two MCSs are used in a single line.
MCR_IS_DUPLICATE
 Two MCSs are used in a single line.
MCS_MCR_ARE_AT_WRONG_POSITION
 MCS/MCR are at wrong positions.
MCS_MCR_ARE_NOT_CONNECTED
 MCS/MCR are not connected.
EXTRA_SYMBOL
  This is an instruction not preceded by a contact.
OPEN
  The line is left open.
SHOULDER
  The line is illegally loaded. Projection part(s) in the horizontal

  line.
ILLEGAL_LOAD
  The line is illegally loaded.
WRONG_NESTED_BLOCK
 OR block or AND block is illegally nested.
SHORT_BLOCK
  Contacts are short        - circuited.




                                                56
                                              57




                                                    Chapter 3 Ladder Editor

MCS_STACK_FULL
 Too many MCSs are used.
MCS_MCR_CANNOT_BE_MADE
 MCS/MCR are used illegally.
LADDER_IS_EMPTY
  There is no program.
COMPILE_TERMINATED_BY_USER
  Program compilation is interrupted by the user.




                                             57
                                                                           Chapter 4 Mnemonic Editor


Chapter 4 Mnemonic Editor

Mnemonic Editor modifies, edits, interprets, and prints the mnemonic programs. This section describes
the requirements of creating mnemonic programs before how to use mnemonic editor.




                                                   58
                                                                 Chapter 4 Mnemonic Editor

4-1 Mnemonic Program Configuration

The instructions of a mnemonic program are composed of letters different from that of a
ladder program. In the WGPC, to help you easily understand program codes, one step of
instruction occupies a single line. A program line can include a mnemonic
instructionInstLine or a line commentCMTLine, and each configuration is as shown
below.


The line for a mnemonic instruction is comprised of:
         g 1 column for the line number (line number column),
         g 1 column for the instructions (instruction column),
         g 3 columns for the operands (operand column),
         and 1 column for the comment of the line (step comment column).
                ¢Ñ One step comment column can hold up to 30 letters.
The line for a line comment is comprised of:
         g 1 column for the line number (line number column),
         g 1 column for the instruction (instruction column),
         g 1 column for the line comment (line comment column).
                ¢Ñ One line comment column can hold up to 80 letters.




                                            59
                                                                             Chapter 4 Mnemonic Editor

4-2 PLC Instructions
In the instruction column of a mnemonic line, the instruction to be executed by a PLC comes in the
mnemonic format. These instructions can be grossly classified into the Contact Instruction, the Block
Instruction, the Coil Instruction, the Comparison Instruction, the Timer Instruction, the Counter
Instruction, and the Function Instruction.
For more information about the PLC instructions, refer to the Samsung PLC User's
Manual.

         Contact Instructions
The contact instructions include Contact A, Contact B, Rise Edge, and Fall Edge.

         Coil Instructions
The coil instructions include MCS(Master Control Set), MCR(Master Control Reset),
OUT, SET, RST, and OTN.

         Comparison Instructions
The comparison instructions include ==(Equal), <>(Not Equal), >(Greater Than),
<=(Less Than or Equal to), >=(Greater Than or Equal to), and <(Less Than) and these
can be combined with STR, AND, and OR.

         Timer Instructions
The timer instructions include TIM(Timer) and SST(Single Short Timer).

         Counter Instructions
The counter instructions include UC(Up Counter), DC(Down Counter), and
UDC(Up/Down Counter).

         Application Instruction
The application instructions are composed of the PLC application instructions. For more
information about the Application Instructions, refer to the Samsung PLC User's
Manual.




                                                    60
                                                                 Chapter 4 Mnemonic Editor

4-3 Programming

We will learn how to write programs using the Mnemonic Editor of the WGPC. In the
Mnemonic Editor, you must write program codes with mnemonic letter instructions.
You can write instructions or operands in the pre-defined columns by directly typing
into your keyboard or selecting it from the prepared Instruction Bar.
   In the Mnemonic Editor, you can type in one instruction (one step) on a single line.
Each line is made up of a few columns, and begins with an instruction in the leftmost
column.
1. Select the step or line you want.

2. Enter an instruction.In_inst
   If you click on the instruction column, a small text box appears in which you can
enter text. You can enter an instruction by directly typing into the keyboard or by
selecting one from the Instruction Bar.
   To use the Instruction Bar, select the Instruction Bar from the View menu. Type in
the instruction you want, then press Enter. In the case of the Function Instructions, you
can make use of the Instruction Set which will help you find the instructions you want
for your programming more quikly.
   Refer to the descriptions about View.

3. Enter operands.In_opr
WGPC provides you with as many small input boxes for the appropriate columns, in
which you can enter operands, as required by a certain instruction.

4. Enter the line comment.In_cmt
After entering operands, you will be prompted to enter line comment or step comment.
A comment column can hold up to 30 bytes of characters including English alphabets
and Korean (1 Korean letter amounts to 2 bytes).

5. Move to next step in the program.In_next
WGPC moves automatically to the next step enabling you to enter instructions
continuously.




                                            61
                                                               Chapter 4 Mnemonic Editor

6. Correct errors in the program.In_next
You can easily modify your program codes. Just click on the instruction or the column
you want to modify, then you can modify the instruction or the column you selected. If
you select an instruction, then you can modify the corresponding number of operands of
the instruction.

7. Whenever you want, you can cancel filling in the current column by pressing the
[ESC] key.




                                          62
                                                                 Chapter 4 Mnemonic Editor

4-4 Edit

To easily modify/edit existing mnemonic programs, WGPC provides useful functions
such as Cut, Copy, Paste, and Undo, in line unit, which you reach from the Edit menu.
By choosing an appropriate item from the Edit menu, you can perform its corresponding
function.

To make use of such edit functions, you must select a block of code on which to
perform edit functions, called the Edit Area. You have two choices in selecting the Edit
Area: one is to use the mouse and the other is to use the keyboard.
g Keyboard operation
 Press the UP, DOWN, LEFT, and RIGHT arrow keys to mark the Edit Area while
holding down shift key. The selected area is displayed in reverse video.


g Mouse operation
 Drag the mouse while holding down the left-mouse button to mark the Edit Area, then
the selected area is displayed in reverse video.


g To deselect the selected area
  When an area is selected, do any operation other than the area selection operations
explained in the above and the selected area becomes deselected.

       Undo
 This enables you to cancel your most recent command and return your program to its
previous state. You can undo one and only the most recent command.

       Cut
This enables you to remove or move a block of program into different places. Mark the
Edit Area with the mouse or the keyboard, and select Cut from the Edit menu to move it
into the clipboard. After this, move the insertion point (cursor) to the place where you
want to paste it; select Paste from the Edit menu to copy the cut block in the clipboard
to the current insertion point. After a set of these procedures, the selected Edit Area is
deleted from its original place.




                                            63
                                                                Chapter 4 Mnemonic Editor


       Copy
This enables you to copy a portion of a program into other places. The set of procedures
to copy a portion of a program from one place to another is exactly the same as that
explained for the Cut command above, except that the original marked Edit Area is left
intact after this set of procedures.

       Paste
 This enables you to copy the contents copied into the clipboard as a result of the Cut
and/or Copy command (as explained above), to the places you want. The contents to be
copied get inserted by moving the current line downward.

       Delete
 It deletes the selected line.

       Step Insert
 Use this command to obtain an empty step anywhere in the mnemonic program into
which you want to insert a new instruction. Move to the line you want to insert an
empty step, then select Step Insert from the Edit menu. The program codes below the
inserted step move one line downward.

       Step Delete
 Removes one step in the mnemonic program. Move to the step you want to delete, then
select the Step Delete submenu from the Edit menu. The program codes below the
remove step move one line upward.




                                           64
                                                                Chapter 4 Mnemonic Editor

4-5 Search

This command enables you to quickly move to the place you want to in the program.
With this command you can perform a few useful search operations. For example, you
can move to a certain line, or find and move to an operand, to find and replace certain
operands with another one. Since this command can be repetitively executed, it is very
useful when you are working over the whole content of a program.

       Goto Step
This command moves the current step to a particular mnemonic step in the currently
working mnemonic program. Select Goto Step from the Search menu to display the
following dialog box, where you type in the step number you want to move to, and
press the OK button.

                                           Find
                                           Replace




                                           65
                                                            Chapter 4 Mnemonic Editor

4-6 View

       Tool bar
       Instruction Bar
WGPC offers a hands-on Instruction bar shown below from which you can easily select
instructions with the mouse while programming with the Mnemonic Editor. Thus, this
Instruction Bar must be shown in the application window while you are programming.




Item   Code    Instruction    Description
  1            Block          Includes block instructions such as ANB and ORB.
  2            Contact        Includes contact instructions such as STR and AND.
  3            Coil           Includes coil instructions such as MCS and OUT.
  4            Comparison     Includes comparison instructions such as STR== and
                              AND==.
 5             Timer          Includes timer instructions such as UC and SST.
 6             Shift          Includes shift instructions such as RLC and SHR.
 7             Move           Include move instructions such as MOV and LET.
 8             Bit            Include bit instructions such as DIS and UNI.
 9             Control        Include control instructions such as FOR and JMP.
 10            Logic          Includes logic instructions such as WAND and
                              WNOT.
 11            Arithmetic     Includes arithmetic instructions such as NEG and
                              INC.
 12            Conversion     Include conversion instructions such as SEG and
                              BCD.
 13            BCD            Include BCD instructions such as NEGB and INCB.




                                         66
                                                               Chapter 4 Mnemonic Editor


Others
       Label=>Register
 This command enables you to show or hide labels.

       Contact Comment
 This command enables you to show or hide contact comments.

       Display Mode(Hex/DEC)
 While monitoring, this command enable you to toggle between the number display
modes; the DECimal or HEXadecimal numbers. It is available only while you are
working online.

       Display Mode(Negative)
 This command enables you to display (+/-) signs of your monitoring values. It is
available only while you are working online.

       Redraw
 This command enables you to refresh the application windows.

       Grid
 This command enables you to show or hide grids.




                                           67
                                                               Chapter 5 Additional Features


Chapter 5 Additional Features

WGPC provides the following useful tools to make programming life easier. You can
make use of these features while writing your own programs.


5-1 Useful tools available in the Editor

       Label & Comment Editor
Instead of using register names directly in your programs, this tool enables you to attach
more user-friendly nicknames, or labels, to the registers, and comments to the contacts,
helping you understand program codes more easily.
If you select Label & Comment Editor from the the Tools menu, a dialog box for Label
& Comment Editor appears on the screen. With this dialog box, you can Insert, Modify,
and Delete labels and contact comments for each register .
This editor is comprised of a window that displays its registered contents, the Insert and
the Delete buttons for task editing, the Save button with which you can save the
contents of files into the storage media, and the Close button which quits the current
work session.




First, press the Insert button to register a label or a comment. Now, in the subsequent
dialog box, type in each corresponding register name, label name, and comment, and
press the OK button, then the registration is successfully done. A label can comprises up
to 8 uppercase letters of English alphabet, and a comment can be comprised up to 24
bytes of letters including Korean (1 Korean letter is counted as 2 bytes).




                                           68
                                                           Chapter 5 Additional Features




If you want to modify an existing label or a comment, double-click its corresponding
register, then the above dialog box appears on the screen.




                                         69
                                                               Chapter 5 Additional Features



       To view used registers
The registers used in the current program are displayed as in the following dialog box.




The number on the left side indicates the number of times the corresponding register is
used in the current program.




                                           70
                                                             Chapter 5 Additional Features



       Number Converter
This converts decimal numbers into binary or hexadecimal numbers, and binary
numbers into decimal or hexadecimal numbers. While you are programming or
monitoring, this useful tool helps you easily convert numbers.




Type in the number you want to convert in the Input field, select the types you want in
the Input Type box and the Output Type box, and then click Convert button. The
converted number appears in Output field.




                                          71
                                                           Chapter 5 Additional Features

5-2 I/O Configuration
The register addresses of the PLC I/O modules are automatically allocated depending
on their respective installation location. You can reconfigure these automatically
configured register addresses of I/O modules as you want, with this feature.

1)Select the I/O Configuration submenu from the Tools menu to view the following
dialog. This feature is available only for the PLC that supports it.




2) To add additional I/O modules
Select the slot to which you want to add an I/O module with the mouse or arrow keys,
then press Insert button to display the following dialog box.




Type in the type and size of the module,
And some comments, and press OK button.

3) To remove I/O modules
Select the slot with the module you want to remove by mouse or using the arrow keys;
then press the Delete button.
4) To remove all the currently configured I/O modules
Press the Clear button.




                                         72
                                                                 Chapter 5 Additional Features


5-3 Debug
To check errors in a program, this feature controls the operation status of the PLC,
while it is connected online with the WGPC. It helps you easily find errors in your own
program. It is available only when the programs in the PLC, when connected with
WGPC, are the same.
You can use this feature to control the action of PLC in the following way. During its
operation, it indicates the operation status of the corresponding PLC using colors.
Currently set break point step    : Displayed with red line.
The step at which the PLC currently stops : Displayed with yellow line.
Enable Debug Monitor (Start and End of Debugging)
It starts or ends debugging operation.
Go (Advance)
It resumes the processing operation of the PLC from the arbitrary nearest break point at
which it stopped.
Step Over (Advance 1 step)
It resumes the processing operation of the PLC from the point at which it stopped to the
next step.
Set Break Points (Set/Reset break points)
It is used to set a break point at an arbitrary step, or reset the break point that is
currently set. If you select this menu, the break point is set or reset at the current step.
Clear All Break Point (Removes all break points)
It removes all the break points currently set in the PLC.




                                            73
                                                                   Chapter 5 Additional Features


5-4 Windows
As WGPC supports MDI functions, you can work with multiple windows at the same
time. If a number of open windows is lettered on the desktop confusing the task, you
can arrange them in the following 4 ways.
        Cascade
It arranges the current open ladder/mnemonic windows in cascade showing titles of
each file. If you arrange windows in cascade, you can view a number of files
simultaneously, identify their titles at a glance which with help you choose one quickly.
        Tile Horizontal
It arranges currently open ladder/mnemonic/project windows horizontally as wide
rectangles. If you arrange windows horizontally, you can view parts of each project file,
enabling you to edit files cross-referencing and comparing with each other. However,
many open windows may make client areas of each window too small to work with.
        Title Vertical
It arranges currently open ladder/mnemonic/project windows vertically as long
rectangles. If you arrange windows vertically, you can view parts of each project file,
enabling you to edit files cross-referencing and comparing with each other, however,
many open windows may make client areas of each window too small to work with.
        Arrange Icons
It arranges the icons of each file at the bottom of the program window. Since multiple
project files can be open, you can easily jump around, compare, and edit them at the
same time, but windows may overlap each other. If you close a file, it may take time to
load the file again. In such a case, you can shrink the file into an icon still leaving it left
open but not shown as a window. You do not have any particular menu or command to
make a window into an icon. Instead, you can use the Minimize button in the Title bar
as every Windows application program has it. If you want to arrange icons, select
Arrange Icons from the Windows menu of the main menu bar. Iconized (minimized)
project files are placed at the bottom of the main application window. Double-click the
left mouse button over the icon you want to restore.
        Close All
It closes all the currently opened project files. If changes are made to the file from the
last save operation, you will be prompted to save the changes. If it is a new file, then the
Save As dialog box appears.
        Error Window
If you write and save a program with the Ladder Editor or Mnemonic Editor, WGPC
interprets it as being saved. If this program contains errors, error messages are displayed
in the Error Window. This is useful when you want to figure out the cause of the error.




                                              74
                                                  Chapter 5 Additional Features


5-5 Help

      This menu gives you some help about WGPC.




                                    75
Address Expression
In the WGPC, the addresses of the registers are expressed differently
depending on the type of data (Bit or Word). Addresses are can be expressed in
the following manner:

Bit address
Rwww.bbb
     R        : Type of register
     www      : Word address
     .        : Delimiter
     bbb      : Bit address within the word

Word address
Rwww
     R        : Type of register
     www      : Word address

Data types
In the WGPC, you can handle the following types of data depending on the type
of the PLC used. The locations where data are stored are called registers, there
are two kinds of registers: Bit register and Word register. The data types that
can be stored in these registers are discussed below, and they are used while
working with the WGPC.
BIT
     stored in the bit register.
     expresses ON (1) or OFF (0).
WORD
     The length of this data type is 8/16/32 bits depending on the type of the
     PLC used. It is a unit register. In the WGPC, you can input or display this
     type of data as a decimal number or a HEXadecimal number for your
     convenience.
DWORD (Double word)
     The length of this data type is 16/32/64 bits depending on the type of the
     PLC used. It is used to express values represented in binary digits. No
     register is specified for this data type. You can use two consecutive
     registers for this type of data as DWORD. The address of a DWORD is that
     of the first of the two consecutive registers.
BCD        (Binary coded decimal)
     4Bit entity contains one decimal digits from ranging O to 9.
FLT        (Floating point number - real number)
     Data type for mathematical operation of real numbers. It is made up of 24
     Bits and conforms to the IEEE format. One register is specified for this type
     of data.

								
To top