Sunteți pe pagina 1din 35

`

eth1000_large.jpg
RD77MS Simple Motion Module Programming example with module label.

Version 1.0

R72-164-SLSASG-003-*.
Contents

Contents ................................................................................................................................................................... i
Disclaimer .................................................................................................................................................................ii
FURTHER READING REFERENCE LIST .............................................................................................................. iii
Chapter 1 Introduction .................................................................................................................................... 1-1
1.1 Hardware and software: ................................................................................................................ 1-1
Chapter 2 GX Works3 project creation and configuration .............................................................................. 2-1
2.1 Create the GX Works3 project and add a RD77MS module ......................................................... 2-1
2.2 Simple motion module configuration ............................................................................................. 2-5
Chapter 3 Programming examples................................................................................................................. 3-1
3.1 Create a sample program for Servo ON........................................................................................ 3-1
3.2 Write the PLC program and simple motion module parameters ................................................... 3-4
3.3 Executing Jog Function ................................................................................................................. 3-7
Chapter 4 Sample Programming GOT project ............................................................................................... 4-1
4.1 GOT project ................................................................................................................................... 4-1
Chapter 5 Appendix ........................................................................................................................................ 5-1
5.1 Module Label ................................................................................................................................. 5-1
Revisions ................................................................................................................................................................. 1

R72-164-SLSASG-003-*
Disclaimer
This book applies to the Mitsubishi Electric Corporation product components and to all subsequent releases and
modifications until otherwise indicated in new editions. Make sure you are using the correct edition for the level of the
product.

MITSUBISHI ELECTRIC CORPORATION PROVIDES THIS BOOK "AS IS," WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS
FOR A PARTICULAR PURPOSE.

This book could contain technical inaccuracies or typographical errors. Changes are made periodically to the
information herein. Mitsubishi Electric Corporation may make improvements and changes at any time to the
product(s) and/or program(s) described in this book.

ii

R72-164-SLSASG-003-*
FURTHER READING REFERENCE LIST
Simple Motion User’s manual
MELSEC iQ-R Simple Motion Module User's Manual (Application) IB-0300247
MELSEC iQ-R Simple Motion Module User's Manual (Startup) IB-0300245
MELSEC iQ-R Simple Motion Module User's Manual (Advanced Synchronous Control) IB-0300249
PLC user’s manual:

Operating Manual:
GX Works3 Operating Manual SH-081215ENG
MELSEC iQ-R Programming Manual (Program Design) [SH-081265ENG]
MELSEC iQ-R Programming Manual (Instructions, Standard Functions/Function Blocks)[SH-081266ENG]
Servo Amplifier User’s Manual:
MELSERVO-J4-B Servo Amplifier Instruction Manual SH(NA)030106
MELSERVO-J4 Servo Amplifier Instruction Manual (Troubleshooting) SH(NA)030109
MELSERVO Servo Motor Instruction Manual (Vol.3) SH(NA)030113
MELSERVO Linear Encoder Instruction Manual SH(NA)030111
MELSERVO-JE-B Servo Amplifier Instruction Manual SH(NA)030152
MELSERVO-JE Servo Amplifier Instruction Manual (Troubleshooting) SH(NA)030166

iii

R72-164-SLSASG-003-*
Chapter 1 Introduction
In this document has been described step by step procedure for performing simple motion like jog, homing and executing
point table with RD77MS simple motion module using the module label which is generated automatically under M+Global
folder during add the RD77MS module in the GX Works3 project. The module label is a structure data type which is tied to
the buffer memory address of RD77MS simple motion module. User can use this label variable drag and drop into the
program without knowing the buffer memory address.
The system configuration for the project is shown in the picture below:

GX Works3
Programming software

1.1 Hardware and software:


The following hardware and software are used to create this document.
Servo Amplifier:
 MR-J4-B-RJ
 MR-JE-B
RD77MS16 simple motion Module:
 OS version 1002 or later
Software:
 GX Works3 version 1.020W

1-1

R72-164-SLSASG-003-*
Chapter 2 GX Works3 project creation and configuration
In this chapter shows the details necessary setting in the GX Works3 project to perform simple motion.

2.1 Create the GX Works3 project and add a RD77MS module


1) Open/create a GX Works3 project with RCPU PLC CPU. The following screen shot shows creating a new
Project

You can choose any


programming language

Click OK after choose PLC type and then click [OK] to next pop up window.

2-1
R72-164-SLSASG-003-*
2) From navigation window right click On  Parameter Module Information and choose [Add New Module]

3) Then choose Module Type [Simple motion], Module Name [RD77MS16] and choose the mounting slot
number to 0 and select [Set] on Stat I/O No. Specification to change the Start I/O number. Enter the Start I/O
no. in this example is set 0100H. Then click [OK] button.

2-2
R72-164-SLSASG-003-*
4) The module label is used in the sample program, so click [Setting Change] button to add the module label in
the project.

5) Choose [Yes] into [Use Module Label] under operation setting and click [OK]

The module label [RD77_1] is automatically generated to view go to under Label Global Label M+Glebal

2-3
R72-164-SLSASG-003-*
Module label name is [RD77_1] which is structured type label included all the buffer memory address and I/O of
simple motion module.
The example below shows an example of the digital I/O :
RD77_1.bPLC_Ready  Y100
RD77_1.bReady X100

Similarly the RD77_1.stnAxMntr[0].dCommandPosition is feed current value of axis 1 [ Buffer memory 2400] for
monitoring the current position of servo axis 1

2-4
R72-164-SLSASG-003-*
2.2 Simple motion module configuration
1) Open the simple motion module setting tools by double clicking from Navigation window  Parameter
Module Information 0100:RD77MS16 Simple Motion Module Setting.

User can change


or add the
Amplifier type by
double clicking

2) Add the servo amps by duoble clicking on [Axis #1 D01] under System setting. In the example is used MR-J4-
10B-RJ and MR-JE-B servo amplifiers.

2-5
R72-164-SLSASG-003-*
3) One MR-J4-10B and MR-JE-B real servo amplifiers are added in the configuration.

4) In Parameter setting window set the Common parameter [Pr.82 Forced stop setting] invalid

5) In Basic parameters 1 & 2:

In this example, Set one


In this example, set the speed revolution of motor movement
limit value to 6000 inch/min that’s amount is equal to 1 inch linear
equivalent to 6000 rpm. distance movement and Axis1 is
MR-J4 and Axis is MR-JE

2-6
R72-164-SLSASG-003-*
6) In [Detailed Parameters 1 setting]: set the parameter as below

Set the positive logic if


don’t have FLS and RLS
signal wired to drive/
motion module

Only buffer memory


address can be used in
the MR-JE

7) Set Jog speed limit 200 inch/min in the parameter Pr.31 under detailed parameters 2
8) Homing return parameters:

9) Servo Parameter setting: double click on Servo parameters Tab and disable the EM2 signal for both axes

Set disable the forced


Stop signal (EM2)

2-7
R72-164-SLSASG-003-*
10) Set the position data for axis 1 and 2.
Axis1:

Axsi2:

2-8
R72-164-SLSASG-003-*
Chapter 3 Programming examples
In this section shows the step by step procedure to create a sample program by using the module label.

3.1 Create a sample program for Servo ON


1) Open program editor from Program Scan  Main ProgPou and go to module by double clicking Module
POU(Shortcut) from Parameter Module Information  Module POU(Shortcut) and then drag and drop
[RD77_1.bSynchronizationFlag] X101 from the module label list

and then similarly bring the RD77_1.bPLC_Ready , RD77_1.bReady_D and RD77_1.bAllAxisServoOn_D to ladder logic.

3-1
R72-164-SLSASG-003-*
2) Servo on program is given below: gbAllServoOnReq ON make the all servo ON.

Explanation of label:
SM403: This system relay is off during 1st scan after RUN mode starts and then Always ON
RD77_1.bSynchronizationFlag[X101] Synchronization flag
RD77_1.bPLC_Ready [Y100]  PLC READY ( Ready command of simple motion module)
RD77_1.bReady_D[DX100] READY (Ready Status of simple motion module)
RD77_1.bAllAxisServoOn_D[DY101] All axis servo ON command
gbAllServoOnReq  User label to servo ON
3) Sample program for Servo on Status
Drag the servo ready status RD77_1.stnAxMntr_D[0].uServoStatus1_D from the module label list RD77_1Axis
Monitor data Axis#1  Direct and bit 1 is servo ready status bit.

4) Sample example program for error Reset

3-2
R72-164-SLSASG-003-*
5) An example program for Jog axis1

6) The example shows below for executing the position data table of axis 1

3-3
R72-164-SLSASG-003-*
3.2 Write the PLC program and simple motion module parameters
1) Open the sample project and Rebuild the project from ConvertRebuild All

2) Double click the [Connection Destination] from Navigation window

3) Click on Ethernet Board and PLC module and Set the IP Address [192.168.3.39] and then click OK button.

4) Put the PLC [ RUN/STOP/RESET] switch to the STOP position[ at middle]

3-4
R72-164-SLSASG-003-*
5) Then click Online CPU Memory Operation and then click [Initialization] Tab

and click [Yes] on the pop up window

Note: This step is required to write the project file to PLC at only first time.
6) Click Online  Write to PLC

3-5
R72-164-SLSASG-003-*
7) Then Click [Select All] tab and make sure simple motion Module setting check box is checked in the parameter.
Then click [Execute] button

[Select All] tab doesn’t


select the simple motion
parameters. Make sure
the box checked.

After completing the download the project, turn off the system power include servo amps and turn ON it again.
8) Bring the PLC [RUN/STOP/RESET] switch to the RUN position.

3-6
R72-164-SLSASG-003-*
3.3 Executing Jog Function
1) Open the program Editor from ProgramScanMain ProgPouProgram
2) Then Start Monitor all Windows from Online MonitorStart Monitor( All Windows)

3) Now Hold [Shift] key and then double click on [gbAllServoOnReq] at the step#48 for enabling the all servo.

4) Then turn on the label bit [gbJogFW1] at step # 207 for starting the axis 1 jog operation.

3-7
R72-164-SLSASG-003-*
Chapter 4 Sample Programming GOT project
A GOT project is included with this QSG. Let’s download the project file to the GT27. Assumed the iQ-R CPU and servo and
GT27 are wired up properly through the Ethernet cable.

4.1 GOT project


A GOT project is included along this QSG for GT2710-STBA series. User may utilize the project to start up their application.
Please find couple of the screen below:

1) Main Screen

2) Simple Motion Operation Screen:

For
Jog

For executing
the position
data table

4-1
R72-164-SLSASG-003-*
3) Tuning Screen: User can access all the tuning parameter via the GOT screen.

User can monitor the


description of error

4) Error and Warning history window

4-2
R72-164-SLSASG-003-*
Chapter 5 Appendix

5.1 Module Label


A module label that represents the memory areas (I/O signals and buffer memory areas) specific to each module in a
given name. GX Works3 automatically generates this label, which can be used in programming environment as a global
label variables.

An example of module label for RD77MS shows below:

The names of the default module labels are defined with the following configuration:

Module label of I/O signals:


Module name"_"[x]"."Label name"_"[ax]" example: RD77_1.bnBusy[0]

"Module name": Indicates the character string of a module model name.


"[x]": A number starting from 1 for identifying modules with the same module name

"Label name": Unique label name of a module


"[ax]": Indicates the axis No. corresponding to the module label. A numerical value from 0 to 15 is used for [ax]
according to the axes from 1 to 16.

An example: RD77_1.bnBusy[0] [X110]


Module label of buffer memory areas
"Module name"_"[x]"."Data type"_"_D[ax]"."Label name"_"D"

"Module name": Indicates the character string of a module model name.


"[x]": A number starting from 1 for identifying modules with the same module name

"Data type": Indicates the classification of a buffer memory area.


"[ax]": Indicates the axis No. corresponding to the module label. A numerical value from 0 to 15 is used for [ax]
according to the axes from 1 to 16.
"Label name": Unique label name of a module
"D": Indicates whether the module label is for auto refresh or direct access. For direct access, "_D" is added after
the label name and to "[ax]".

Note: Example use the simple motion module start I/O No. setting equal to 100.

5-1
R72-164-SLSASG-003-*
The following shows the differences between auto refresh and direct access:

Type Description Access timing

Auto Reading/writing data from/to the module label is reflected to the Simple At auto refresh
Refresh Motion module at auto refresh. The execution time of a program can be
shortened. To use auto refresh, "Refresh Destination" must be set to
"Module Label" in "Refresh settings" of "Module Parameter".

Direct Reading/writing data from/to the module label is reflected to the Simple At reading/writing data
access Motion module immediately. The execution time is longer than the one from/to the module label
at auto refresh, but the responsiveness is high.

Example:
Auto Refresh : RD77_1.stnAxMntr[0].dCommandPosition  Current Feed Value for axis 1

Direct access: RD77_1.stnAxMntr_D[0].dCommandPosition_D Current Feed Value for axis 1

The following screenshot shows the lists of module labels of the Simple Motion module:

5-2
R72-164-SLSASG-003-*
1) Input /Output signal  Input

RD77_1.bSynchronizationFlag: Module
Synchronization Status flag[X101]
RD77_1.bReady: Module Ready status
[X100]

RD77_1.bnBusy[0]: Busy status of Axis1[X110]


RD77_1.bnBusy_D[0]: Busy status of Axis1 [DX110]

Direct: RD77_1.bSynchronizationFlag_D :
Module Synchronization Status flag[DX101]
RD77_1.bReady_D: Module Ready status
[DX100]

2) Output

RD77_1.bPLC_Ready: Module PLC


ready command [Y100]
RD77_1.bAllAxisServoON: Module all
servo On command [Y101]

RD77_1.bnPositioningStart[0]: Position start command of


Axis1 [Y110]
RD77_1.bnPositioningStart_D[0 Position start command
of Axis1 [DY110]

RD77_1.bPLC_Ready_D: Module PLC


ready command [DY100]
RD77_1.bAllAxisServoON_D: Module all
servo On command [DY101]

Note: Example use the simple motion module start I/O No. setting equal to 100.

5-3
R72-164-SLSASG-003-*
3) Label for the Parameter setting area
Axis1:
Pr.1:RD77_1.stnAxPrm_D[0].uUnit_D Unit setting
[U10\G0]
Pr.4:
RD77_1.stnAxPrm_D[0].uUnitMagnification_D
Unit magnification [U10\G1]
………………

Note: Example use the simple motion module start I/O No. setting equal to 100.

5-4
R72-164-SLSASG-003-*
4) Label for axis monitor

Axis1:
Md.20: RD77_1.stnAxMntr0].dCommandPositionCurrent feed value [U10\G2400]
Md.21: RD77_1.stnAxMntr_D[0].dMachineCommandPositionMachine feed value
[U10\G2402]
………………
……………….
Md.101: RD77_1.stnAxMntr_D[0].dActualPosition Real current value [U10\G2450]

Note: Example use the simple motion module start I/O No. setting equal to 100.

5-5
R72-164-SLSASG-003-*
5) Label for axis monitor data 2 area

6) Label variable for System Control data area

5-6
R72-164-SLSASG-003-*
7) Label variable for Control data 1 area

5-7
R72-164-SLSASG-003-*
8) Label data for system control data area

9) Label for Control data 2 area

5-8
R72-164-SLSASG-003-*
10) Label for Servo Input axis parameters area

11) Label for Servo Input axis monitoring area

5-9
R72-164-SLSASG-003-*
12) Label for synchronous encoder axis area

5-10
R72-164-SLSASG-003-*
13) Label for synchronous control area

5-11
R72-164-SLSASG-003-*
14) Label for Mark detection Data area

5-12
R72-164-SLSASG-003-*
Revisions
1) Version 1.0 Issued Date: 04/21/2016

Rev-1

R72-164-SLSASG-003-*

S-ar putea să vă placă și