This function block (FB) library is used in a system in which the CC-Link IE Field Network Basic compatible MELSEC-Q series
QnUDVCPU module and the MR-JE-C servo amplifier are connected.
The FBs included in this library operate in the environment in which the profile mode is set as the co ntrol mode of the servo
amplifier MR-JE-C.
For the profile mode setting, refer to the instruction manual of the servo amplifier in use.
1.2Applicable Hardware and Software
Applicable hardware and softwareDescription
CPU moduleMELSEC-Q series CPU module Q**UDVCPU (First five digits of the serial No. are "18112" or later)
* Q06UDVCPU or later is recommended.
Slave unitCC-Link IE Field Network Basic compatible MELSERVO-JE servo amplifier MR-JE-C
Engineering softwareMELSOFT GX Works2 of version 1.560J or later
This manual describes functions of the function blocks.
This manual does not include the information on restrictions for using CPU modules and the combination.
Please read the user's manuals of the products before using them.
Please note the followings and use the FBs described in this manual.
• When using the FBs in an actual system, confirm that the FBs do not cause system control problems.
• Consider the points where interlock conditions are required in the system and insert interlock conditio ns.
• Mitsubishi Electric Corporation will not compensate any damages caused by the FBs.
• Contents may be deleted or changed without prior notice.
4
1 OVERVIEW
1.5 Notes
MEMO
1
1 OVERVIEW
1.5 Notes
5
2FUNCTION DESCRIPTION
2.1Program
This FB library includes the sample programs which can be used in the configuration described in " P a g e 3 System
Configuration Example".
Each FB operation can be checked with the sample programs.
Program configuration
File nameDescriptionModelEngineering environment
MotionControl_JEC_FBs_Q.gxwFBD, ST programQnUDVCPUMELSOFT GX Works2
List of programs
Program nameDescriptionExecution typeDescription method
Sample/PrgAxis1Each FB execution program axis 1ScanFBD
Sample/PrgAxis2Each FB execution program axis 2ScanFBD
CCIEFBasicStartStart of cyclic communication of the
specified axis
ScanFBD
Structure
Program nameDescription
stRemoteRegBasicDevice definition of the refresh setting used in the FB library
Global label
Label nameDescription
G_stLinkBasicRefresh data information used in the FB library
Axis1Axis 1 information
Axis2Axis 2 information
Servo amplifier MR-JE-C parameter
Set the following parameters to the servo amplifier in advance.
This sample program is designed not to use the input signals of the servo amplifier. Configure the settings according to safety
measures required for system operation.
ParameterSetting detailAxis 1Axis 2
PA01: Operation modeProfile mode10091009
PD01: I/O signal automatic on
selection 1
Forced stop (automatic on)
Forward rotation stroke end
(automatic on)
Reverse rotation stroke end
(automatic on)
1C001C00
6
2 FUNCTION DESCRIPTION
2.1 Program
2.2Program Details (Sample/PrgAxis1)
1. Configure the initial setting for using the FB library.
When the CPU module is switched from STOP to RUN, the axis information (Axis1) is set.
2. Start the cyclic communication of the servo amplifier.
When the CPU module is switched from STOP to RUN, the communication with the specified axis is started.
2
3. Set the servo amplifier in the servo ON status.
When the PowerOn label is turned ON, the specified axis is set in the servo ON status.
4. Execute the home position return.
When the Homing label is turned ON, the home position return is executed.
2 FUNCTION DESCRIPTION
2.2 Program Details (Sample/PrgAxis1)
7
5. Control the velocity and torque.
When the ExecSpeed label is turned ON, the velocity is controlled.
When the ExecTorque label is turned ON, the torque is controlled.
6. Stop or forcibly stop the axis.
When the ExecHalt label is turned ON, the specified axis is stopped.
When the ExecStop label is turned ON, the specified axis is forcibly stopped.
7. Read the axis error code and reset the error.
When the ReadError label is turned ON, the alarm of the servo amplifiers is read.
When the ExecReset label is turned ON, the error is reset. Reset the error after the error cause is eliminated.
8
2 FUNCTION DESCRIPTION
2.2 Program Details (Sample/PrgAxis1)
8. Perform the position control.
When the ExecAbs label is turned ON, the absolute value positioning is performed.
When the ExecInc label is turned ON, the relative value positioning is performed.
When the ExecAdd label is turned ON, the commanded position is changed.
2
9. Monitor the current position, velocity, and torque.
When the Monitor label is turned ON, monitoring the current position, velocity, and torque is started.
2 FUNCTION DESCRIPTION
2.2 Program Details (Sample/PrgAxis1)
9
10.Monitor the axis information and status.
When the Monitor label is turned ON, monitoring the axis information and status is started.
10
2 FUNCTION DESCRIPTION
2.2 Program Details (Sample/PrgAxis1)
2.3FB Operation
FB reads the data after the global labels
related to RX and RWr are set.
Write area
QCPUMR-JE-C
Read area
Write area
Device
Link
refresh
FB
MR-JE-C
Device
Write
FB
QCPU
Read area
Read area
Write area
Link
refresh
FB writes the data after the global labels
related to RY and RWw are set.
Read
Data communication method
To control the devices connected with CC-Link IE Field Network Basic, the control information is transmitted to and received
from the connected devices though the RX/RY/RWr/RWw register. The FBs described in this manual execute reference and
updating of the device specified in the link refresh setting.
Defining the contents that the customer sets in the link refresh setting to the global label enables the FBs to access the device
specified in the link refresh setting. The data is exchanged between the QCPU and the MR-JE-C in the fixed cycle by using
the set device.
2
2 FUNCTION DESCRIPTION
2.3 FB Operation
11
CC-Link IE Field Network Basic setting
This section describes the setting method of the system in which the CC-Link IE Field Network Basic compatible CPU module
(QnUDVCPU) and the MR-JE-C servo amplifier are connected.
1. Set the IP address of the CPU module (QnUDVCPU).
Select "CC-Link IEF Basic Setting" in the "Built-in Ethernet Port Setting" tab on the "Q Parameter Setting" window.
• Select "Use the CC-Link IEF Basic" on the "CC-Link IEF Basic Setting" window.
• Configure the network setting.
Select "Network Configuration Setting" on the "CC-Link IEF Basic Setting" window.
Add the MR-JE-C.
2
• Configure the refresh setting.
In the following example, RX and RY are assigned to the device B, and RWw and RWr are assigned to the device W.
2 FUNCTION DESCRIPTION
2.3 FB Operation
13
3. Set the global label.
1)2)4)3)
Set the information specified in the refresh setting to the global label.
• Structure definition
Define the devices specified in the refresh setting in the structure. The number of array elements of each label data type is
equal to the number of "Points" of each devices set in the refresh setting.
Structure na me : stR e mo te R egB a si c
Label nameData typeRemark
bnRXBit (0..n)n is "Number of RX device points - 1". In the example of Step 2, n i s " 127".
bnRYBit (0..n)n is "Number of RY device points - 1". In the example of Step 2, n is "127".
unRWrWord [unsigned] (0..n)n is "Number of RWr device points - 1". In the example of Step 2, n is "63".
unRWwWord [unsigned] (0..n)n is "Number of RWw device point s - 1". In the example of Step 2, n is "63".
• Global label definition
Define the global label by using the structure set above.
This library operates by using the data refreshed in the global label "G_stLinkBasic".
Correctly assign the device used for data refresh. Otherwise, the FBs do not properly operate.
1) Select "VAR_GLOBAL" in "Class".
2) Set "G_stLinkBasic" in "Label Name".
3) Select the structure "stRemoteRegBasic" in "Data Type".
4) Assign the device according to the refresh setting.
14
2 FUNCTION DESCRIPTION
2.3 FB Operation
2.4How to Use FB Library
To use the FB library of the sample project in other programs, output the FB library and import it to other project. The following
shows the procedure.
Saving the user library
1. Open the project (MotionControl_JEC_FBs_Q.gxw).
Select "User Library" in "Navigation".
2
2. Select the library (MotionControl_JEC_V100A). Right-click the library and select "Open" from the menu.
2 FUNCTION DESCRIPTION
2.4 How to Use FB Library
15
3. After the library became editable, right-click the library and select "Save as" from the menu.
4. Enter the library file name and click the [Save] button.
In the following example, the library is named "MotionControl_JEC".
After the library has been saved, the following dialog box appears.
16
2 FUNCTION DESCRIPTION
2.4 How to Use FB Library
Installing the user library
1. Create a new project with the following setting.
Type: the model when the library is saved, Project Type: Structured Project, Language: Structured Ladder/FBD
2. Select "User Library" in "Navigation", and select "Install" from the library menu.
2
Select the saved library in the following dialog.
2 FUNCTION DESCRIPTION
2.4 How to Use FB Library
17
When the library has been installed normally, the following message appears and the library appears on the tree.
3. Expand the "FB/FUN" tree under "User Library", and add an FB to the program by dragging and dropping it.
Add the I/O label definition. If necessary, add the conditions such as the interlock or others.
18
2 FUNCTION DESCRIPTION
2.4 How to Use FB Library
3FB LIBRARY
3.1Function Overview of the FB Library
List of FBs
The following table lists the FBs used in the MELSEC-Q series QnUDVCPU module.
This library controls up to 16 stations of the servo amplifier MR-JE-C.
The MR-JE-C uses the default mapping of the cyclic communication in the profile mode.
For details, refer to the instruction manual of the servo amplifier in use.
MotionControl_JEC
ItemDescriptionVersion
MC_Power_JECOperation possible00A
MCv_Home_JECHome position return00A
MC_Stop_JECForced stop00A
MC_Halt_JECStop00A
MC_MoveAbsolute_JECAbsolute value positioning00A
MC_MoveRelative_JECRelative value positioning00A
MC_MoveAdditive_JECCommanded position change00A
MC_MoveVelocity_JECVelocity control00A
MC_TorqueControl_JECTorque control00A
MC_ReadActualPosition_JECCurrent position read00A
MC_ReadActualVelocity_JECCurrent velocity read00A
MC_ReadActualTorque_JECCurrent torque read00A
MC_ReadStatus_JECStatus read00A
MC_ReadAxisInfo_JECAxis information read00A
MC_ReadAxisError_JECAxis error read00A
MC_Reset_JECAxis error reset00A
3
Restrictions and precautions
ItemDescription
Restrictions and
precautions
The following describes restrictions and precautions common to all FBs.
The restrictions and precautions specific to each FB are separately described. Refer to Page 23 Details of the FB Library.
• The FB does not include error recovery processing. Program the error recovery processing separately in accordance with the
required system operation.
• The FB does not detect an alarm or a warning that has occurred in the servo amplifier . Program the pro cessing to monitor alarms
and warnings in the servo amplifiers. For the alarms and warnings that have occurred in the servo amplifiers, refer to the
instruction manual of the servo amplifiers in use.
• The FB cannot be used in an interrupt program.
• Please ensure that an execution command (Execute or Enable) can be turned OFF with a program. Do not use this FB in
programs that are only executed once, such as a subroutine program and FOR-NEXT loop because an execution command
(Execute or Enable) cannot be turned OFF in these programs.
• The number of FB steps in a program varies depending on the CPU model to be used and I/O definitions.
• A duplicated coil warning may occur during compilation. However, the warning does not generate any problems.
• Set a circuit for each input label in an FB.
• When two or more FBs are used, be careful not to repeatedly specify and simultaneously start an axis.
• When an execution command (Execute or Enable) is turned ON, the FB reads data of the input label. Thus, set the input label
before turning ON an execution command (Execute or Enable).
• Do not change the values of other input labels af ter tur ning ON an execution co mmand (Execute or Enab le). For some FBs such
as the one whose operation type is real-time execution, however, input labels can be changed even after an execution command
(Execute or Enable) is turned ON. For details, refer to Page 23 Details of th e FB Li brary.
• The FBs controls 16 slave stations. Set a station number of the servo amplifier within the setting range.
• The FBs control the servo amplifier MR-JE-C in the profile mode of the control mode. Set the parameter (PA01) of the servo
amplifier to the profile mode. Use the default mapping for the cyclic communication.
3 FB LIBRARY
3.1 Function Overview of the FB Library
19
Loading...
+ 49 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.