Mitsubishi Electronics C6, C64 User Manual

CNC
C6/C64
PLC PROGRAMMING MANUAL
(Ladder Section with MELSEC Tool)
BNP-B2309D(ENG)
MELSEC and MELDAS are the registered trademarks of Mitsubishi Electric Corporation. Microsoft, Windows and Microsoft Windows NT are the registered trademarks of Microsoft Corporation in
the United States and/or other countries. Other company and product names herein may be the trademarks or registered trademarks of their
respective owners.

Introduction

These specifications are the programming manual used when creating the sequence program with the PLC development software, or Mitsubishi Electric Co.’s integrated FA software MELSOFT series (GX Developer). The PLC (Programmable Logic Controller) is largely divided into the basic commands, function commands and exclusive commands, and ample command types are available. The commands can be used according to the purpose and application such as the PLC support function used when supporting the user PLCs. In addition to the explanation of commands and functions, the environment to develop the user PLC using GX Developer, especially the usage unique to MELDAS, is described.
CAUTION
For items described as "Restrictions" or "Usable State" in this manual, the instruction
manual issued by the machine manufacturer takes precedence over this manual.
An effort has been made to describe special handling of this machine, but items that are
not described must be interpreted as "not possible".
This manual is written on the assumption that all option functions are added. Refer to the
specifications issued by the machine manufacturer before starting use. Refer to the Instruction Manual issued by each machine manufacturer for details on each
machine tool.
Some screens and functions may differ or some functions may not be usable depending
on the NC version.
Refer to the related operation manuals for details of GX Developer and GX Converter usage.
[Documents relating to MELDAS C6/C64]
MELDAS C6/C64/C64T PLC Interface Manual................................. BNP-B2261
MELDAS C6/C64 Network Manual.................................................... BNP-B2373
i

Precautions for Safety

Always read the specifications issued by the machine manufacturer, this manual, related manuals and attached documents before installation, operation, programming, maintenance or inspection to ensure correct use. Understand this numerical controller, safety items and cautions before using the unit. This manual ranks the safety precautions into "DANGER", "WARNING" and "CAUTION".
DANGER
WARNING
CAUTION
Note that even items ranked as " CAUTION", may lead to major results depending
When there is a great risk that the user could be subject to fatalities or serious injuries if handling is mistaken.
When the user could be subject to fatalities or serious injuries if handling is mistaken.
When the user could be subject to injuries or when physical damage could occur if handling is mistaken.
on the situation. In any case, important information that must always be observed is described.
DANGER
Not applicable in this manual.
WARNING
Not applicable in this manual.
CAUTION
1. Items related to product and manual
For items described as "Restrictions" or "Usable State" in this manual, the instruction
manual issued by the machine manufacturer takes precedence over this manual.
An effort has been made to describe special handling of this machine, but items that are
not described must be interpreted as "not possible".
This manual is written on the assumption that all option functions are added. Refer to
the specifications issued by the machine manufacturer before starting use.
Refer to the Instruction Manual issued by each machine manufacturer for details on
each machine tool.
Some screens and functions may differ or some functions may not be usable
depending on the NC version.
2. Items related to start up and maintenance
Read this manual carefully and confirm the safety enough before executing the
operation of the program change, forced output, RUN, STOP, etc. during operation. Operation mistakes may cause damage of the machine and accidents.
ii
3. Items related to program development
Always observe the cautions before development to develop a program.
If the data transferred does not follow the file name rule, the CNC will mistake it for another data, resulting in unexpected operation, e.g. PLC program erasure.
Do not read a sequence program on which a conversion error occurred into the GX
Developer. The file may include unexpected contents to result an illegal operation.
When an error occurred at GX Developer On-line function, the error message may not
explain exactly the state in the CNC side. Always refer to the error list.
When initializing PLC data storage area is performed, all sequence programs and
messages currently stored in the CNC will be erased. Do not use this operation other than when the error cannot be solved.
CAUTION
iii

Contents

1. PLC Development Environment Using GX Developer ..........................................................1
1.1 Function ...............................................................................................................................1
1.1.1 Development Environment Configuration...................................................................1
1.1.2 Software Configuration ...............................................................................................1
1.1.3 GX Developer Functions Supported by C64 Series...................................................3
1.1.3.1 Function Support Conditions (general section)..............................................3
1.1.3.2 Function Support Conditions (on-line section)...............................................7
1.2 Setup..................................................................................................................................10
1.2.1 Installing the Tools....................................................................................................10
1.2.2 Connecting the Serial Cable.....................................................................................10
1.3 Developing PLC Programs................................................................................................11
1.3.1 Precautions before Development .............................................................................11
1.3.2 Creating a New Program ..........................................................................................13
1.3.3 Specifying the Connection Target.............................................................................14
1.3.4 Starting/Stopping the PLC of the CNC .....................................................................16
1.3.5 Writing the PLC Program to the CNC.......................................................................17
1.3.6 Reading the PLC Program from the CNC ................................................................20
1.3.7 Verifying the PLC Programs .....................................................................................21
1.3.8 Monitoring the PLC Program ....................................................................................22
1.3.9 Diverting the PLC program that was developed using PLC4B.................................23
1.4 Creating PLC Message Data.............................................................................................27
1.4.1 Development Procedure...........................................................................................27
1.4.2 Message Data Description Method...........................................................................29
1.4.3 Converting Data into GX Developer Format.............................................................34
1.4.4 Entering/Editing Data Using GX Developer..............................................................36
1.4.5 Writing to the CNC....................................................................................................39
1.4.6 Reading and Verifying from the CNC .......................................................................39
1.5 Creating Device Comments...............................................................................................41
1.5.1 Development Procedure...........................................................................................41
1.5.2 Description Method for Indirect Entry .......................................................................42
1.5.3 Converting Comment Data into GX Developer Data................................................43
1.5.4 Writing Comment Data to the CNC...........................................................................45
1.6 PLC4B PLC Development Environment (M500) and Differences ....................................46
1.6.1 Development Tools, etc............................................................................................46
1.6.2 PLC Commands........................................................................................................47
1.7 Error Status........................................................................................................................49
1.8 Initializing for PLC Data Storage Area...............................................................................51
1.8.1 Operation procedure.................................................................................................51
2. PLC Processing Program.......................................................................................................52
2.1 PLC Processing Program Level and Operation................................................................52
2.1.1 High-speed processing program and main processing program.............................52
2.1.2 Cautions on high-speed processing programming...................................................53
2.2 Multi-Programming Function..............................................................................................54
2.2.1 Program Registration Numbers................................................................................54
2.2.2 Program Execution Order.........................................................................................54
2.2.3 Precautions ...............................................................................................................54
2.3 User Memory Area Configuration......................................................................................54
3. Input/Output Signals ...............................................................................................................55
3.1 Input/Output Signal Types and Processing.......................................................................55
3.2 Handling of Input Signals Designated for High-Speed Input.............................................56
iv
3.3 High-Speed Input/output Designation Method..................................................................57
4. Parameters ...............................................................................................................................58
4.1 PLC Constants...................................................................................................................58
4.2 Bit Selection Parameters...................................................................................................59
5. Explanation of Devices ...........................................................................................................63
5.1 Devices and Device Numbers...........................................................................................63
5.2 Device List..........................................................................................................................63
5.3 Detailed Explanation of Devices........................................................................................64
5.3.1 Input/output X, Y ........................................................................................................64
5.3.2 Internal Relays M and F, Latch Relay L....................................................................65
5.3.3 Special Relays SM....................................................................................................65
5.3.4 Link Relay B, Link Register W ..................................................................................66
5.3.5 Special Relay for Link SB, Special Register for Link SW.........................................66
5.3.6 Timer T......................................................................................................................67
5.3.7 Counter C..................................................................................................................71
5.3.8 Data Register D.........................................................................................................74
5.3.9 File Register R...........................................................................................................75
5.3.10 Special Register SD................................................................................................76
5.3.11 Index Register Z......................................................................................................76
5.3.12 Nesting N.................................................................................................................77
5.3.13 Pointer P..................................................................................................................77
5.3.14 Decimal Constant K................................................................................................78
5.3.15 Hexadecimal Constant H........................................................................................78
6. Explanation of Commands.....................................................................................................79
6.1 Command List....................................................................................................................79
6.1.1 Basic Commands......................................................................................................79
6.1.2 Function Commands.................................................................................................81
6.1.3 Exclusive Commands 1 ............................................................................................94
6.1.4 Exclusive Commands 2 ............................................................................................95
6.2 Command Formats............................................................................................................96
6.2.1 How to Read the Command Table ...........................................................................96
6.2.2 No. of Steps...............................................................................................................97
6.2.3 END Command.........................................................................................................98
6.2.4 Index Qualification.....................................................................................................98
6.2.5 Digit Designation.....................................................................................................100
7. Basic Commands (LD, LDI, AND, ANI, OR, ORI, ANB, ORB .....)......................................103
8. Function Commands (=, >, <, +, –, *, /, BCD, BIN, MOV .....)..............................................145
9. Exclusive Commands 1 ........................................................................................................303
10. Exclusive Commands 2 ......................................................................................................334
10.1 ATC Exclusive Command..............................................................................................335
10.1.1 Outline of ATC Control..........................................................................................335
10.1.2 ATC Operation......................................................................................................335
10.1.3 Explanation of Terminology ..................................................................................335
10.1.4 Relationship between Tool Registration Screen and Magazines.........................336
10.1.5 Use of ATC and ROT Commands........................................................................337
10.1.6 Basic Format of ATC Exclusive Command ..........................................................338
10.1.7 Command List.......................................................................................................339
10.1.8 Control Data Buffer Contents................................................................................339
10.1.9 File Register (R Register) Assignment and Parameters......................................340
10.1.10 Details of Each Command..................................................................................342
10.1.11 Precautions for Using ATC Exclusive Instructions.............................................351
v
10.1.12 Examples of Tool Registration Screen...............................................................351
10.1.13 Display of Spindle Tool and Standby Tool..........................................................353
10.2 S.ROT Commands ........................................................................................................354
10.2.1 Command List.......................................................................................................354
10.3 Tool Life Management Exclusive Command.................................................................360
10.3.1 Tool Life Management System.............................................................................360
10.3.2 Tool Command System ........................................................................................360
10.3.3 Spare Tool Selection System ...............................................................................361
10.3.4 Interface ................................................................................................................361
10.3.5 User PLC Processing When the Tool Life Management Function Is Selected ...362
10.3.6 Examples of Tool Life Management Screen ........................................................370
10.4 DDB (Direct Data Bus) ... Asynchronous DDB..............................................................371
10.4.1 Basic Format of Command...................................................................................371
10.4.2 Basic Format of Control Data................................................................................371
10.5 External Search .............................................................................................................374
10.5.1 Function.................................................................................................................374
10.5.2 Interface ................................................................................................................374
10.5.3 Search Start Instruction ........................................................................................376
10.5.4 Timing Charts and Error Causes..........................................................................376
10.5.5 Sequence Program Example................................................................................378
11. PLC Help Function...............................................................................................................379
11.1 Alarm Message Display.................................................................................................380
11.1.1 Interface ................................................................................................................380
11.1.2 Message Creation.................................................................................................381
11.1.3 F or R Type Selection Parameter.........................................................................382
11.2 Operator Message Display............................................................................................383
11.2.1 Interface ................................................................................................................383
11.2.2 Operator Message Preparation ............................................................................384
11.2.3 Operator Message Display Validity Parameter ....................................................384
11.3 PLC Switches.................................................................................................................385
11.3.1 Explanation of Screen...........................................................................................385
11.3.2 Explanation of Operation ......................................................................................386
11.3.3 Signal Processing .................................................................................................387
11.3.4 Switch Name Preparation.....................................................................................391
11.4 Key Operation by User PLC..........................................................................................392
11.4.1 Key Data Flow.......................................................................................................392
11.4.2 Key Operations That Can Be Performed..............................................................392
11.4.3 Key Data Processing Timing ................................................................................393
11.4.4 Layout of Keys on Communication Terminal........................................................394
11.4.5 List of Key Codes..................................................................................................395
11.5 Load Meter Display........................................................................................................396
11.5.1 Interface ................................................................................................................396
11.6 External Machine Coordinate System Compensation ..................................................398
11.7 User PLC Version Display.............................................................................................399
11.7.1 Interface ................................................................................................................399
12. PLC Axis Control.................................................................................................................401
12.1 Outline............................................................................................................................401
12.2 Specifications.................................................................................................................401
12.2.1 Basic Specifications..............................................................................................401
12.2.2 Other Restrictions .................................................................................................402
12.3 PLC Interface.................................................................................................................403
12.3.1 S.DDBS Function Command................................................................................403
12.3.2 Control Information Data.......................................................................................404
12.3.3 Control Information Data Details...........................................................................405
12.3.3.1 Commands...............................................................................................405
12.3.3.2 Status........................................................................................................406
vi
12.3.3.3 Alarm No...................................................................................................414
12.3.3.4 Control Signals (PLC axis control information data)................................415
12.3.3.5 Axis Designation.......................................................................................417
12.3.3.6 Operation Mode........................................................................................417
12.3.3.7 Feedrate...................................................................................................418
12.3.3.8 Movement Data........................................................................................418
12.3.3.9 Machine Position......................................................................................419
12.3.3.10 Remaining Distance...............................................................................419
12.3.4 Reference Point Return near Point Detection ......................................................420
12.3.5 Handle Feed Axis Selection..................................................................................421
Appendix 1. Example of Faulty Circuit....................................................................................422
Appendix 2. MELSEC QnA Series Command Lists...............................................................423
2.1 Sequence Commands.....................................................................................................423
2.2 Basic Commands.............................................................................................................424
2.3 Application Commands....................................................................................................429
2.4 Exclusive Commands......................................................................................................432
Appendix 3. PLC Development Environment using GPPQ ..................................................433
3.1 System Configuration at PLC Development....................................................................433
3.2 Development Tool Function Outline................................................................................433
3.2.1 CNVQ (data conversion software package)...........................................................433
3.2.2 LNKQ (sequence ladder generating connection function software package)........433
3.2.3 GPPQ (SW2IVD/NX-GPPQ type GPP Function Software Package)....................434
3.3 GPPQ Function Outline and Functions Supported by the C64 Series...........................435
3.3.1 Function Support Conditions (general section) ......................................................435
3.3.2 Function Support Conditions (on-line section)........................................................438
3.4 Setup Procedure..............................................................................................................444
3.4.1 Tool Setup Procedure.............................................................................................444
3.4.2 Connection Procedure............................................................................................444
3.5 PLC Program Development Procedure...........................................................................445
3.5.1 Precautions before Development ...........................................................................445
3.5.2 Ladder Transfer to the C64 Controller....................................................................446
3.5.3 Ladder Read from the C64 Controller.....................................................................448
3.5.4 Ladder Comparison with the C64 Controller ..........................................................449
3.6 PLC-Related Data Development Procedure...................................................................450
3.6.1 PLC Related Data File Names................................................................................450
3.6.2 Development Procedure.........................................................................................451
3.6.3 Message Data Description Method.........................................................................452
3.6.4 Conversion to GPPQ Data......................................................................................457
3.6.5 Operation with the GPPQ .......................................................................................459
3.6.6 Transfer to the Controller........................................................................................461
3.6.7 Reading and Comparing from the Controller..........................................................462
3.7 Differences From The M500 PLC Development Environment........................................464
3.7.1 PLC Commands......................................................................................................464
3.7.2 PLC Messages........................................................................................................466
vii

1. PLC Development Environment Using GX Developer

1.1 Function

1. PLC Development Environment Using GX Developer
In the C64 Series, the user PLC development environment is supported using MELSEC PLC development tool, which is Mitsubishi integrated FA software MELSOFT series (GX Developer). This manual explains system configurations user PLC development environment using GX Developer, mainly usage specific to MELDAS.
1.1 Function

1.1.1 Development Environment Configuration

Most of the development works can be done by connecting the IBM PC/AT compatible machine and a CNC unit by an RS-232C cable or RS-422 cable and by executing the tools on the personal computer.
IBM PC/AT-compatible machine
(CD drive is required)
GX Developer
(GPPW)
CNC controller
System configuration using GX Developer

1.1.2 Software Configuration

PLC onbo ard
QnA simulator
CNC controller
RS-232C cable, RS-422 cable or Ethernet cable
RS-232C cable, RS-422 cable or E thernet cable
PLC development tool
C
s
for MELSEC
t
E
c
GX Developer
S
u
L
d
Data conversion
o
E
r
p
M
package for MELSEC
GX Converter
List output converter
S
s
t
A
c
D
u
L
d
o
E
r
p
M
PCNV6L
Comment converter
CLST6M
Ladder list converter
CLST6L
IBM PC/AT
Compatibl e machine
(1)
(2)
(3)
(4)
(5)
- 1 -
1. PLC Development Environment Using GX Developer
1.1 Function
(1) GX Developer (PLC development software package for Windows)
GX Developer is a programming software package (model name: SW7D5C-GPPW) designed for Mitsubishi Electric's MELSEC series programmable logic cont rollers. The conventional function corresponding to MELDAS PLC development S/W (PLC4B) has been reinforced, and, furthermore, that is a strong tool added the monitoring function by way of RS-232C. Note that some functions specific to the "MELSEC series" may not be unavailable. For MELDAS series ladder development, we recommend you to use GX Developer Version 4 (SW4D5C-GPPW) or later. For function details, refer to the operating manual supplied. The DOS version "GPPQ" (SW2IVD/NX-GPPQ GPP function software package) of this package is also usable. Refer to "Appendix3. Operation Method Using GPPQ" for details.
(2) GX Converter (Data conversion software package for Windows)
The GX Converter is a tool that carries out file conversion of GX Developer data files and the following:
• Ladder list files and comment text files output by the CLIST6L
• Alarms and operator messages created by the text editor
• Data files of commercially available spreadsheet software, word processors and editors This tool is add-on tool of the GX Developer, thus, start GX Converter from the GX Developer’s menu. This tool is a software package for MELSEC. GX Converter needs to be used with the versions following GX Developer Version 3 (SW3D5C-GPPW). Refer to the enclosed Operating Manual for function details. The DOS version "CNVQ" (SW0IVD/NX-CNVQ data conversion software package) of this tool can also be used. Refer to "Appendix 3. Operation Methods Using GPPQ" for details.
(3) PCNV6L (List output converter)
This tool outputs a MELDAS specification ladder printing image with cross information into the text format from the GX Developer specification ladder list and comment data. Refer to the instruction manual for function details. This tool works on the DOS of Windows.
(4) CLST6M (Device comment converter)
This tool outputs the contact/coil comment data of a user PLC ladder developed using PLC4B into the text format of the GX Developer specifications. The comment data developed using PLC4B can be used with GX Developer by using GX Converter to further convert the conversion results of this tool. Refer to the instruction manual for function details. This tool works on the DOS of Windows.
(5) CLST6L (Ladder list converter)
This tool converts the user PLC ladder list data developed using PLC4B, and outputs the data in a ladder list format. The user PLC ladder developed using PLC4B can be used with the GX Developer by using the GX Converter to further convert the conversion results of this tool. Refer to the instruction manual for function details. This tool works on the DOS of Windows.
- 2 -
1. PLC Development Environment Using GX Developer
1.1 Function

1.1.3 GX Developer Functions Supported by C64 Series

The GX Developer functions explained here are those supported by the C64 Series in the "off-line functions" operated with the GX Developer independently and "on-line functions" carried out connected to the CNC controller. Refer to the enclosed Operating Manual for details of respective functions. Refer to "Appendix 3. Operation Methods Using GPPQ" for the GPPQ-specific functions and operations when the DOS version "GPPQ" (SW2IVD/NX-GPPQ GPP function software package) is used.
1.1.3.1 Function Support Conditions (general section)
The following shows a list of GX Developer outline functions supported by the C64 Series. A
mark indicates functions that can be used by the C64 Series. An r mark indicates that the function cannot be used because it is related to "MELSEC Series" characteristic functions. The function details during on-line are described in the next section.
List of general section functions (1)
Program type Support Remarks
Ladder List SFC MELSAP-L Function block
U U U
Function Menu Sub menu Support Remarks
Project New project Open project Close project Save Save as Delete project Verify Copy Edit Data New Copy Delete Rename Change PLC type Import file Import from GPPQ format file Import from GPPA format file Import from FXGP[WIN] format file Import from FXGP[DOS] format file Export file Export to GPPQ format files Export to GPPA format files Export to FXGP[WIN] format file Export to FXGP[DOS] format file Export to TEXT ,CSV format file
: Possible,
: Limitedly possible, U : Not possible
U U U
U U U
Fixed Q4A
- 3 -
1. PLC Development Environment Using GX Developer
1.1 Function
List of general section functions (2)
Function Menu Sub menu Support Remarks
(Project) Macro Registration macros Macro utilize Delete macros Macro reference path Printer setup Print Start new GX Developer session Exit GX Developer Edit Undo Restore after ladder conversion Cut Copy Paste Insert line Delete line Insert row Delete row Insert NOP batch Delete NOP batch Draw line Delete line Change TC setting Read mode Write mode Ladder symbol Open contact Close contact Open branch Close branch Coil Application instruction Vertical line Horizontal line Delete vertical line Delete horizontal line Rising pulse Falling pulse Rising pulse open branch Falling pulse close branch Invert operation results Convert operation results to
Convert operation results to
Documentation Comment Statement Note Statement/Note block edit
: Possible,
rising pulse
falling pulse
: Limitedly possible, U : Not possible
- 4 -
1. PLC Development Environment Using GX Developer
1.1 Function
List of general section functions (3)
Function Menu Sub menu Support Remarks
Find/Replace Find device Find instruction Find step no. Find character string Find contact or coil Replace device Replace instruction Change open/close contact Replace character string Change module start address Replace statement/note type Cross reference list List of used devices Convert Convert Convert (All programs being
Convert (Online change) View Comment
Online
Diagnostics PLC diagnostics
edited)
Statement Note Alias Macro instruction format display Comment format 4*8 characters 3*5 characters
Alias format display
Replace device name and
Toolbar Status bar Zoom 50% 75% 100% 150% Auto Project data list Specify Instruction list Elapsed time
Refer to "List of on-line section functions"
Network diagnostics Ethernet diagnostics CC-Link diagnostics System monitor
: Possible,
display Arrange with device and display
Refer to "List of on-line section functions"
: Limitedly possible, U : Not possible
U
U U U U U
- 5 -
1. PLC Development Environment Using GX Developer
1.1 Function
List of general section functions (4)
Function Menu Sub menu Support Remarks
Tools Check program
Merge data Check parameter Transfer ROM Read Write Verify Write to file Delete unused comments Clear all parameters IC memory card Read IC memory card Write IC memory card Read image data Write image data Start ladder logic test Set TEL data Connection Disconnection TEL data AT command Call book Intelligent function utility Utility list Customize keys Options
Create start-up setting file
Window Cascade
Tile vertically Tile horizontally Arrange icons
Help PLC error
Special relay/register Key operation list Product information Connect to MELFANSweb
: Possible,
: Limitedly possible, U : Not possible
U U U U
U U U U U U U U U U U
Partially impossible
U U
- 6 -
1. PLC Development Environment Using GX Developer
1.1 Function
1.1.3.2 Function Support Conditions (on-line section)
The following shows a list of GX Developer on-line functions supported by the C64 Series. A
mark indicates functions that can currently be used by the C64 Series. An r mark indicates that the function cannot be used because it is related to "MELSEC Series" characteristic functions.
List of on-line section functions (1)
Menu Sub me nu Detailed function Support Remarks
Transfer setup PC side I/F PLC side I/F Other station Network route Co-existence network
Read from PLC Target memory Title File selection Device data Program Common Local Refresh view Free space volume Create title Write to PLC Target memory Title File selection Device data Program Common Local Free space volume Create title Verify with PLC Target memory Title File selection Program Refresh view Free space volume Create title Write to PLC
[Flash ROM] Write to PLC
Delete PLC data Target memory Title File selection Refresh view Free space volume Create title Change PLC data
attributes PLC user data Read PLC user data Write PLC user data Delete PLC user data
Write the program memory to ROM
[Flash ROM]
: Possible,
route
: Limitedly possible, U : Not possible
Only for QnACPU
Only for internal memory
U U U U
U
Only for internal memory
U U U U
U
Only for internal memory
U
U U
U
Only for internal memory
U U
U U U
- 7 -
1. PLC Development Environment Using GX Developer
1.1 Function
List of on-line section functions (2)
Menu Sub menu Detailed function Support Remarks
Monitor Monitor mode ON/OFF state Scan time PLC status Monitor [Write mode] Start monitor
[All windows]
Stop monitor
[All windows] Start monitor Stop monitor Change current value
monitor [Decimal] Change current value
monitor [Hexadecimal] Device batch Device Connect Coil Setting value Current value Monitor format : Bit & word Monitor format : Bit Monitor format : word Display : 16bit integer Display : 32bit integer Display : Real number Display : ASCII character Value : DEC Value : HEX T/C set value Reference
Device test Entry data monitor Device ON/OFF/Current Setting value Connect Coil Display : 16bit integer Display : 32bit integer Display : Real number Display : ASCII character Value : DEC Value : HEX T/C setting value, Local
Device test Buffer memory batch Monitor condition setup Device Step No. Monitor stop condition setup Device Step No. Program monitor list Interrupt program monitor list Scan time measurement Entry ladder monitor Delete all entry ladder
: Possible,
program
label Reference program
: Limitedly possible, U : Not possible
U U
U U
U
U U U
- 8 -
1. PLC Development Environment Using GX Developer
1.1 Function
List of on-line section functions (3)
Menu Sub me nu Detailed function Support Remarks
Debug Device test FORCE ON FORCE OFF Toggle force Device Buffer memory U Debug Skip execution Partial execution Step execution Trace Remote operation PLC status RUN STOP PAUSE Latch clear STEP-RUN Reset Operation during RUN,
Specify execution
Keyword setup Register Delete Disable Clear PLC memory Format PLC
memory Format Arrange PLC
memory Set time Date / time Day of week Specify execution
Target memory
: Possible,
STEP-RUN
destination
destination
: Limitedly possible, U : Not possible
U U U U U
U U U U U
U
U U U U
For only internal RAM
U U
U U
- 9 -
1. PLC Development Environment Using GX Developer

1.2 Setup

1.2 Setup

1.2.1 Installing the Tools

In the C64 Series PLC development environment, it is assumed that the various tools are u se d on an IBM PC/AT compatible machine. Prepare each tool so that it is IBM PC/AT compatible machine. Refer to the enclosed Operating Manual for the setup and start procedures of each tool.

1.2.2 Connecting the Serial Cable

As for the serial port connected with the CNC, refer to the MELDAS C6/C64/C64T Connection and Maintenance Manual (BNP-B2255).
(1) RS-232C connection
Between the IBM PC/AT compatible machine that uses GX Developer and the CNC controller, use an RS-232C serial cable equivalent to the one shown below in the RS-232C connection diagram.
(Note) The cables given in the connection diagrams of the GX Developer Operating Manual
cannot be used. As for the CNC side, setting for GPPW communication is not necessary. (a) When connecting with C64 controller directly
NC side (TERMINAL)
Personal computer side
Cable connection and
(20-pin half-pitch)
(9-pin D-SUB)
signal direction
Signal name Pin No.
Pin No. Signal name
SD 6 2 RD RD 16 3 SD ER(DTR) 18 6 DR(DSR) 8 CS(CTS) GND 1 1 GND GND 11 5 GND
(b) When connecting with C64 controller using the intermediate cable dedicated to C64
NC side (TERMINAL)
Personal computer side
Cable connection and
(25-pin D-SUB)
(9-pin D-SUB)
signal direction
Signal name Pin No.
Pin No. Signal name
SD 2 2 RD RD 3 3 SD ER(DTR) 20 6 DR(DSR) 8 CS(CTS) GND 1 1 GND GND 7 5 GND
- 10 -
1. PLC Development Environment Using GX Developer
1.2 Setup
(2) RS-422 connection
MELSEC-dedicated cable can be used to connect with C64 controller. Refer to the GX Developer Operating Manual for details.
(3) Ethernet connection
For the connection using Ethernet, the Ethernet card (FCU6-EX875) must be mounted to the extension slot on the control unit. Connect the Ethernet cable to the modular jack on the Ethernet card.

1.3 Developing PLC Programs

1.3.1 Precautions before Development

Pay careful attention to the following items before developing PLC programs using the GX Developer.
(1) PC type selection
The PLC type must be set when newly creating programs, etc. Select the following CPU type when requested to select the PLC type with the GX Developer. An error will occur during transfer of the PLC program to the CNC if another PLC type is selected.
Select "Q4A" for CPU type.
(2) Device setting
Do not set the devices when developing the PLC program for the CNC. Develop the program with the device settings (No. of points, etc.) left at their default values applied when GX Developer was started. The PLC program cannot be transferred to the CNC normally when it is developed with settings other than the default values.
Do not set the devices.
(3) PLC commands
MELSEC-specific PLC commands cannot be used in the PLC program development for the CNC. Refer to “6.1 Command List Table” and confirm the useable commands. The format, etc., are changed with some commands. Refer to "1.5 PLC4B PLC Development Environment and Differences" for details.
MELSEC-specific PLC commands cannot be used.
(4) Label at the beginning of ladder program
In a MELDAS PLC program, a processing unit is differentiated by specifying a reserved label number at the beginning of processing. There are the following different processing units.
P251, P360 to 368 : PLC high-speed processing program starting label P252, P370 to 378 : PLC main processing program starting label
Even if only the PLC main processing is to be performed, do not omit but describe the above label at the beginning of a PLC program. Unless the label is described, normal RUN cannot be performed.
Specify a label at the beginning of a PLC program.
- 11 -
1. PLC Development Environment Using GX Developer
1.3 Developing PLC Programs
(5) Statements and notes
GX Developer allows a PLC program to be commented (with interlinear statements and notes). They are available in two types: integrated and peripheral.
Integrated type : Can be downloaded together with a ladder program to the CNC
controller.
Peripheral type : Cannot be downloaded.
The integrated type cannot be used with the C64 series. If it is used, a PLC program cannot be transferred to the CNC properly.
Do not use integrated type interlinear statements and notes. Create the message data as the integrated type statement.
(6) File name
Inside the C64 series, PLC-related data are controlled and stored in the following categories. Therefore, they are also developed in the same categories.
CAUTION
If the data transferred does not follow the following file name rule, the NC will
mistake it for another data, resulting in unexpected operation, e.g. PLC program erasure.
File name rule
M1
(Note) File name that is not permitted.
xxxx.
When data is transferred by GX Developer, its data type is distinguished by the file name. An extension indicates a file type, and the first two characters denote a data type and a language type. File name can be specified within eight characters including data classification and language classification freely with the exception of the extension.
The following characters at the head of file name are reserved for CNC side. Do not use the file name of these characters combination.
Data classification Language classification
WPG or WCD
Extensions .... Automatically attached with the GX Developer
(expresses file classification)
Random file name .... User free designation
Dataclassification and languag eclassification (M1:Message 1st languag e )
: "M", "C", "H" (alphabet) : "0" to "9" (number)
.... userfixed
designation
- 12 -
1. PLC Development Environment Using GX Developer
1.3 Developing PLC Programs
List of PLC-related data
Related data classification
12 PLC program (ladder)
PLC program comment
3 Message 1st language M1xxxx.WPG Message 1st language data such
4 Message 2nd language M2xxxx.WPG Same as above
(a) PLC program (ladder)
PLC program developed using GX Developer.
Only one file can be stored in the NC.
(b) PLC program comment
Program comment for GX Developer display
Only one file can be stored in the NC with the same file name as the PLC program.
A device comment (32 characters) and a device name (10 characters) can be defined for each
device.
Stored mainly when it is read to GX Developer and used as a comment.
(c) Message 1st language and (4) 2nd language
Alarm message/operator message/PLC switch/comment message data.
One 1st language file and one 2nd language file can be stored in the NC.
The messages can be handled and edited as "integrated type interlinear statements" by GX
Developer.
The maximum message length and the number of messages can be specified for each message type.

1.3.2 Creating a New Program

Create a new program using GX Developer. Refer to the GX Developer's operation manual for details of usage.
File name
(GX Developer)
zzzzzz.WPG zzzzzz.WCD
Remarks
PLC ladder code Comment data for GX Developer
as alarm messages/ operator messages/ PLC switches/ tool registration comment/ load meter comment
(2nd language data)
- 13 -
1. PLC Development Environment Using GX Developer
1.3 Developing PLC Programs

1.3.3 Specifying the Connection Target

You must specify the connection target before performing on-line operations from GX Developer to the CNC.
(1) Operation procedure
Perform the following operation from GX Developer to start the setting screen.
[Online] [Transfer setup]
Set only the following items. Leave the other items unchanged from the initial values.
(a) Setting for serial connection (RS-232C or RS-422)
• Personal computer side I/F : Serial Serial port name COM1 or COM2 Baud rate 19.2Kbps
• PLC side IF : CPU unit
(b) Setting example for Ethernet connection
• Personal computer side I/F : Ethernet Network No. 1 Station No. 1
• PLC side I/F : Ethernet unit Network No. 1 Station No. 2 IP address (Address set by NC parameter) Routing method Automatic conversion method
• CNC side IP address setting
#1926 IP address 192.182.1.2 #1927 Subnet mask 255.255.255.0 #1928 Gateway address 192.182.1.254 #1929 Port number 64758
# No. Parameter name Setting example
The local station’s IP address is set for the NC side. The IP address set here is shared with the other Ethernet communication functions (GOT connection, etc.).
(Note) The setting example above is for when the GX Developer is connected to the CNC.
To connect the GX Developer to the Ethernet or multiple hierarchical network of MELSECNET/10, setting values will differ.
- 14 -
1. PLC Development Environment Using GX Developer
1.3 Developing PLC Programs
• Setting the GX Developer Connection Destination These parameters are used to set the GX Developer connection method. These parameters are included in the GX Developer project data.
- 15 -
1. PLC Development Environment Using GX Developer
1.3 Developing PLC Programs

1.3.4 Starting/Stopping the PLC of the CNC

Before writing a ladder program, you must stop the PLC of the CNC.
(1) Operation procedure
Perform the following operation from GX Developer to start the operation screen.
[Online] → [Remote operation] or Alt + 6
On the following screen, set "STOP" or "RUN" in the [PLC] part under [Operation] and click [Execute]. The current status is displayed in [PLC status] under [Connection target information].
(Note) The operation other than "RUN" or "STOP" can not be performed.
The operation is completed when the following dialog appears. Click [OK]. The status after completion appears in [PLC status] on the remote operation screen displayed behind. If the status does not change, check whether an alarm is displayed or not on the CNC side.
- 16 -
1. PLC Development Environment Using GX Developer
1.3 Developing PLC Programs

1.3.5 Writing the PLC Program to the CNC

The following indicates how to write ladders from GX Developer to the CNC (especially the restrictions and C64 series-specific operations).
(1) Operation procedure
Perform the following operation from GX Developer to start the operation screen.
[Online] [Write to PLC]
On the following screen, choose the ladder file to be written from the [File selection] tab and click [Execute]. You can command RUN/STOP of the PLC using [Remote operation] under [Related functions].
(Note) As [Target memory], only [PLC RAM/Device memory] is valid.
Do not set the other tabs ([Device data], [Program], [Common], [Local]) than [File selection].
- 17 -
1. PLC Development Environment Using GX Developer
1.3 Developing PLC Programs
(2) Operation to be performed at write error
As soon as a ladder is written from GX Developer to the CNC, the CNC converts it into the CNC­specific ladder machine code. A conversion error occurs if any of the devices and command formats not supported by the C64 series is used. At a conversion error, the CNC side ladder machine code is converted into the [NOP code], the ladder up to the last step is transferred, and the following dialog is then displayed on the GX Developer screen.
When the file that resulted in a conversion error is displayed with the [File selection] tab of the [Read from PLC] screen, the following warning appears in the title field.
∗∗ WARNING Checksum ERROR!! ∗∗
If you execute RUN the PLC as-is, an alarm occurs on the CNC side and the PLC does not RUN.
CAUTION
Do not read a sequence program on which a conversion error occurred into
the GX Developer. The file may include unexpected contents to result an illegal operation.
- 18 -
1. PLC Development Environment Using GX Developer
1.3 Developing PLC Programs
(3) How to confirm the error step number
At a conversion error, error information is stored to the special registers as below. Device­monitoring these registers enables to find the error position.
SD30 : Error step No. where the error occurred. SD31 : Cause of the error.
The error No. which occurred while writing from GX Developer to C64
SD31 value Cause of error
1 Command format error. 2 File already exists. 3 File to be read is not found. 4 Object code error. 5 File can not be opened. 6 File name is too long. 7 File name is illegal.
9 This is not a ladder or a message file. 10 Ladder code has been already changed. 20 Device No. exceeds the specification range. 21 Search was failed. 22 Device No. is illegal. 23 There is an error in the conversion table data. 24 Conversion can not be performed.
(Already converted with M500.)
25 Attribute code is illegal.
101 Warning : Device can not be converted. 102 Some of the designated digits can not be used in the ladder
sub-routine.
103 Designated index can not be used in the ladder sub-routine.
The [Verify with PLC] function can be used to confirm the error step. Executing verification with PLC displays mismatches as in the following example. For details of the [Verify with PLC] function, refer to "1.3.7 Verifying the PLC Programs". <Memory> indicates the GX Developer side, and <PLC> the CNC side.
GX Developer side
CNC controller side
- 19 -
1. PLC Development Environment Using GX Developer
1.3 Developing PLC Programs

1.3.6 Reading the PLC Program from the CNC

The following indicates how to read a ladder from the CNC to GX Developer.
(1) Operation procedure
Perform the following operation from GX Developer to start the operation screen.
[Online] [Read from PLC]
On the following screen, choose the ladder file to be read from the [File selection] tab, and click [Execute].
(Note) As [Target memory], the fitted memory is valid.
Do not set the other tabs ([Device data], [Program], [Common], [Local]) than [File selection].
The [Read from PLC] screen can also be used as a CNC side file listing function. Move the scroll bar of the [File selection] tab to the right to display the write date and size of each file. Click [Free space volume] to display the free area of the target memory.
- 20 -
1. PLC Development Environment Using GX Developer
1.3 Developing PLC Programs

1.3.7 Verifying the PLC Programs

The following indicates how to verify ladders between the CNC and GX Developer.
(1) Operation procedure
Perform the following operation from GX Developer to start the operation screen.
[Online] [Verify with PLC]
On the following screen, choose the ladder files to be verified with the [File selection] tab, and click [Execute].
[Verify source] : GX Developer side [Verify dest] : CNC side
(Note) As [Target memory], the fitted memory is valid.
Do not set the other tab ([Program], [Device data]) than [File selection].
If verification mismatches occur, the following mismatch screen appears. Double-click the mismatch to display the corresponding part of the GX Developer side file.
GX Developer side
CNC controller side
- 21 -
Loading...
+ 448 hidden pages