beautypg.com

Delta Electronics High-Speed PCI 12-Axis Motion Control Card PCI-DMC-A01 User Manual

Page 368

background image

Chapter 26 MPG and JOG Operation API | PCI-DMC-A01 / PCI-DMC-B01

26-4

Revised March, 2012

26.2 _DMC_01_set_rm_mpg_axes_enable2

FORMAT

I16 PASCAL _DMC_01_set_rm_mpg_axes_enable2 (U16 CardNo, U16 MasterNodeID,
U16 MasterSlotID, U16* NodeID, U16* SlotID, U16 enable,U16 pulse_ratio, U32 *ratio,
U32 *slope, U16 *denominator)

Purpose

MPG motion control (can set numerator for motor rotation ratio).

Parameters

Name

Data Type

Unit

Description

CardNo U16

Number

Unit

CardNo is between 0~15

MasterNodeID

U16

Number Unit

RM-MN64 Node ID used

MasterSlotID

U16

Number Unit

RM-MN64 Slot ID used

NodeID

U16*

Number Unit

Node ID in use (Up to 4 axes)

SlotID

U16*

Number Unit

Servo Slot ID in use (Up to 4 axes)

enable

U16

Selection

0: Disable MPG function
1: Enable MPG function

pulse_ratio U16 Selection

Ratio between each click of MPG and pulse output
1: Four clicks of MPG produces 1 pulse output.
4: One click of MPG produces 1 pulse output.

Ratio

U32*

Number Unit

Adjust ratio (denominator) of one full MPG turn to
pulse output (motor rotations).

Slope U32*

Number

Unit

Set Maximum velocity slope for MPG.
(PPS/sec, Max=1000).

Denominator U16* Number

Unit

Adjust ratio (numerator) of one full MPG turn to
pulse output (motor rotations).

Example

I16 rt = 0;
U16 CardNo = 0, MasterNodeID = 1, MasterSlotID = 0; RM-64 Node ID is 1
U16 NodeID[4] = {2, 3, 0, 0}, SlotID[4] = {0}; //Use two ASD-A2F servo motors assigned to
Node 2 and Node 3.
U16 enable = 1, pulse_ratio = 4; //Set ratio of MPG click to output pulse ratio
U32 ratio[4] = {10, 10, 0, 0}; //Set ratio of one full MPG turn to pulse output (motor rotations).
U32 slope[4] = {1000}; //Set slope of MPG Maximum velocity to 1000
U16 denominator [4] = {36,36, 36, 36}; //Set output ratio (numerator) for every turn of MPG

rt = _DMC_01_set_rm_mpg_axes_enable2(CardNo, MasterNodeID, MasterSlotID, NodeID,
SlotID, enable, pulse_ratio, ratio, slope, denominator);

This manual is related to the following products: