Mitsubishi Electric MR-EM340GF User Manual page 54

Simple motion board
Table of Contents

Advertisement

• Procedure for starting positioning control, and waiting for positioning completion interrupt
Set parameters
Start interrupt driver
Preparation
Turn ON user program READY signal [Y0]
Enable interrupt output
Set positioning data
Set the positioning completion interrupt
Start
event to a nonsignaled state
Start positioning control
Wait
Wait until positioning control completion
Disable interrupt output
Ending
Turn OFF user program READY signal [Y0]
End interrupt driver
The basic programs that are explained in this section are contained in the sample programs
(InterruptPositioningSample).
To use the function block class that meets the specification of PLCopen
refer to the following and the sample program (FunctionBlock).
Simple Motion Board User's Manual (API Library)
Overall configuration
The user program examples show the programs of the following operations.
• Machine home position return execution
• Execution of 1-axis linear control using axis 1
The following table shows the overall configuration of the positioning control operation examples. Note that the user programs
in the list are the ones using the axis 1 only.
No.
User function name
1
CreateObjects
2
StartSystem
3
InterruptHomePositionReturn
4
InterruptPositioning
5
StopSystem
6
DeleteObjects
7 OPERATION EXAMPLES
52
7.1 User Program Examples
START
MMC_DeviceDriver::StartInterrupt
MMC_Controller::SetUserProgramReady
MMC_Controller::EnableInterrupt
MMC_Axis::SetPositioningData
MMC_Axis::ResetPositioningDoneIntEvent
MMC_Axis::StartPositioning
MMC_Axis::WaitPositioningDoneIntEvent
MMC_Controller::DisableInterrupt
MMC_Controller::SetUserProgramReady
MMC_DeviceDriver::EndInterrupt
END
Description
Creates objects of a device driver class and a controller class.
Enables the device open and interrupt, and turns the user program READY signal[Y0] ON.
Executes the machine home position return.
Starts the positioning control.
Disables the interrupt and turns the user program READY signal[Y0] OFF.
Deletes the created objects.
motion control function block (FB),

Advertisement

Table of Contents
loading

Table of Contents