Mitsubishi Electric MR-EM340GF User Manual page 58

Simple motion board
Table of Contents

Advertisement

List of labels to be used
The following table lists the labels used for the user program examples in this section. I/O signals or buffer memory areas of
the Simple Motion board shown in the system configuration are described in the programs using the labels.
■Label
The following table lists the board labels of the Simple Motion board used for the user program examples in this section.
Classification
Name
Label
MMC_Controller::BitDevice.AllAxisServoOn
MMC_Axis::AxMntr.AxisOperationStatus
Method
MMC_DeviceDriver::Open
MMC_DeviceDriver::Close
MMC_DeviceDriver::StartInterrupt
MMC_DeviceDriver::EndInterrupt
MMC_DeviceDriver::Delete
MMC_Controller::ResetController
MMC_Controller::SetUserProgramReady
MMC_Controller::EnableInterrupt
MMC_Controller::DisableInterrupt
MMC_Controller::GetAxis
MMC_Controller::Delete
MMC_Axis::AxMntr.AxisOperationStatus.Wait
MMC_Axis::StartPositioning
MMC_Axis::WaitPositioningDoneIntEvent
MMC_Axis::SetPositioningData
MMC_Axis::ResetPositioningDoneIntEvent
Function
MmfCreatePciDevice
MmfCreateEM340GF
Program example
The program examples use the API library and labels.
For details on API library, refer to the following.
Simple Motion Board User's Manual (API Library)
■CreateObjects
C++
unsigned long CreateObjects( MMC_DeviceDriver **retDevice, MMC_Controller **retController )
{
unsigned long retCode;
MMC_DeviceDriver
*pciDev = NULL;
MMC_Controller
*controller = NULL;
/* create PCIe device object */
retCode = MmfCreatePciDevice( boardID, &pciDev );
if( retCode != MMC_OK ) { /* Error process */ }
*retDevice = pciDev;
/* create controller object */
retCode = MmfCreateEM340GF( pciDev, (MMC_EM340GF **)&controller );
if( retCode != MMC_OK ) { /* Error process */ }
*retController = controller;
return( MMC_OK );
}
7 OPERATION EXAMPLES
56
7.1 User Program Examples
Details
RW: All axis servo ON
R: [Md.26] Axis operation status
Opens device.
Closes device.
Starts interrupt driver.
Ends interrupt driver.
Deletes object.
Executes remote RESET.
Sets the user program READY signal [Y0].
Enables the interrupt output.
Disables the interrupt output.
Gets the object of the axis class.
Deletes object.
Waits until the axis operation status is on standby.
Starts positioning control.
Waits until the positioning complete interrupt event is in a signaled state.
Sets the positioning data.
Sets the positioning complete interrupt event to a nonsignaled state.
Generates PCI Express device driver class objects.
Generates MMC_EM340GF class objects.
/* PCIe device object */
/* controller object */

Advertisement

Table of Contents
loading

Table of Contents