Power PMAC Clipper User Manual
Connections and Software Setup
58
Handwheel 5th motor using the Option -12 DAC
Using one of the handwheel encoders and the Option-12 DAC a complete 5
th
motor can be created with
axis flags form the JOPT port:
// Typical pointers for encoder count direction
PTR CountDirHW1->U.IO:$90005C.11.1
// Typical pointers for encoder count error
PTR CountErrHW1->U.IO:$90001C.11.1
Sys.WpKey = $AAAAAAAA;
// Clocks – Phase and Servo
Clipper[0].PhaseFreq=10000; // 10KHz Phase
Clipper[0].PhaseClockDiv=0;
Clipper[0].ServoClockDiv=3; // 2.25KHz Servo
Clipper[0].AdcAmpStrobe=$fffffc
Clipper[0].Chan[2].PwmFreqMult=5 // 30KHz PWM
Sys.PhaseOverServoPeriod=1/( Clipper[0].ServoC1)
Sys.ServoPeriod=1000*( Clipper[0].ServoC1)/Clipper[0].PhaseFreq
Clipper[0].Chan[2].OutputMode= Clipper[0].Chan[2].OutputMode&( Clipper[0].Chan[2].OutputMode^8)
// Typical ECT setup for HW1
CountDirHW1=0 // CW decode for HW1 //--USER ADJUSTABLE
Gate3[0].Chan[0].SerialEncEna=0
EncTable[5].Type=1
EncTable[5].pEnc=Gate3[0].Chan[0].SerialEncDataA.a
EncTable[5].pEnc1=sys.pushm
EncTable[5].index1=0
EncTable[5].index2=0
EncTable[5].index3=0
EncTable[5].index4=0
EncTable[5].ScaleFactor=1/256
Motor[5].ServoCtrl=1 // Motor #5 activation
Motor[5].pDac=Gate3[0].Chan[2].Pwm[3].a // DAC pointer
Motor[5].pEnc=EncTable[5].a // ECT entry of HW1
Motor[5].pEnc2=EncTable[5].a
Use the JOPT port I/O to provide flags for motor 5. For example to use JOPTO:
MI1 is +LIM
MI2 is –LIM
MI3 is AFAULT
MO1 is AENA
Motor[5].pLimits= Clipper[0].GpioData[0].a // MI1
Motor[5].LimitBits=24 // MI1 is bit #24, MI2 is bit #25
Motor[5].pAmpFault= Clipper[0].GpioData[0].a // MI3
Motor[5].AmpFaultBit=26 // MI3 is bit #26
Motor[5].AmpFaultLevel=0 //--USER ADJUSTABLE
Motor[5].pAmpEnable= Clipper[0].GpioData[0].a // MO1
Motor[5].AmpEnablebit= 16 // MO1 is bit #16