Delta Electronics PCI-DMC-B01 Computer Hardware User Manual


 
Chapter 26 MPG and JOG Operation API | PCI-DMC-A01 / PCI-DMC-B01
Revised March, 2012 26-3
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] = {1, 1, 0, 0}; //Set ratio of one full MPG turn to pulse output (motor rotations).
U32 slope[4] = {100}; //Set slope of MPG Maximum velocity to 100
rt = _DMC_01_set_rm_mpg_axes_enable(CardNo, MasterNodeID, MasterSlotID, NodeID,
SlotID, enable, pulse_ratio, ratio, slope);
If the same conditions are used in step-motor and 04PI, the results are as follows:
One turn MPG (100 clicks) = Pulse output of 100*10=1000
Example 2: (ratio setting)
Conditions: Assume that if MPG has 100 clicks in a revolution, then it is equal to MPG ratio x
10, pulse_ratio = 4, ratio = 2, slope = 1000
Results: One full turn of MPG (100 clicks) = 2 motor rotations (128000*10*2=2560000)
If the same conditions are used in step-motor and 04PI, the results are as follows:
One full turn of the MPG (100 clicks) = Pulse output is 100*10=1000. Value of ratio does not
affect output pulse. It only affects the MPG ratio setting.
Example 3: (slope setting)
Conditions: Assume that if MPG has 100 clicks in a revolution, then it is equal to MPG ratio x
100, pulse_ratio = 4, ratio = 1, slope = 100
The correct result is then: One full turn of MPG (100 clicks) = 1 motor rotation (128000*100 *
1=12800000)
Actual result: One full turn of MPG (100 clicks) = 1 actual motor rotation
(12531200). Because the maximum slope for MPG is 100
(PPS/sec), the excess speed of the MCG is filtered out.
Example: For step motor and 04PI, the result is as follows:
Conditions: Assume that if MPG has 100 clicks in a revolution, then it is equal to MPG ratio x
100, pulse_ratio = 4, ratio = 1, slope = 100
The correct result is then: One full turn of MPG (100 clicks) = Pulse output of 100*100=10000
Actual result: One full turn of MPG (100 clicks) = Pulse output = 3560. Like the
servo, the part above the slope is filtered out.