QSG-RD77MS Simple Motion Module Programming Example With Module Label
QSG-RD77MS Simple Motion Module Programming Example With Module Label
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
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.
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.
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
2-6
R72-164-SLSASG-003-*
6) In [Detailed Parameters 1 setting]: set the parameter as below
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
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.
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_1Axis
Monitor data Axis#1 Direct and bit 1 is servo ready status bit.
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 ConvertRebuild All
3) Click on Ethernet Board and PLC module and Set the IP Address [192.168.3.39] and then click OK button.
3-4
R72-164-SLSASG-003-*
5) Then click Online CPU Memory Operation and then click [Initialization] Tab
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
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 ProgramScanMain ProgPouProgram
2) Then Start Monitor all Windows from Online MonitorStart 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.
1) Main 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.
4-2
R72-164-SLSASG-003-*
Chapter 5 Appendix
The names of the default module labels are defined with the following configuration:
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:
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
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]
Direct: RD77_1.bSynchronizationFlag_D :
Module Synchronization Status flag[DX101]
RD77_1.bReady_D: Module Ready status
[DX100]
2) Output
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].dCommandPositionCurrent feed value [U10\G2400]
Md.21: RD77_1.stnAxMntr_D[0].dMachineCommandPositionMachine 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
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
5-8
R72-164-SLSASG-003-*
10) Label for Servo Input axis parameters 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-*