Power PMAC Clipper User Manual
ACC-24S3 4-Channel Axis Expansion Stack Board 76
Scaled ADC Data (in volts)
GLOBAL ADC5VoltsIn = 0; // Voltage input, ADCIN_5
GLOBAL ADC6VoltsIn = 0; // Voltage input, ADCIN_6
GLOBAL ADC7VoltsIn = 0; // Voltage input, ADCIN_7
GLOBAL ADC8VoltsIn = 0; // Voltage input, ADCIN_8
GLOBAL ADC5ZeroOffset = 0.038; // Zero Volt Offset5, [volt] --USER ADJUSTABLE
GLOBAL ADC6ZeroOffset = 0.038; // Zero Volt Offset6, [volt] --USER ADJUSTABLE
GLOBAL ADC7ZeroOffset = 0.038; // Zero Volt Offset7, [volt] --USER ADJUSTABLE
GLOBAL ADC8ZeroOffset = 0.038; // Zero Volt Offset8, [volt] --USER ADJUSTABLE
OPEN PLC PtrExamplePLC
ADC5VoltsIn = (ADCIN_5 * 10 / 2048) – ADC5ZeroOffset ;
ADC6VoltsIn = (ADCIN_6 * 10 / 2048) – ADC6ZeroOffset ;
ADC7VoltsIn = (ADCIN_7 * 10 / 2048) – ADC7ZeroOffset ;
ADC8VoltsIn = (ADCIN_8 * 10 / 2048) – ADC8ZeroOffset ;
CLOSE
OPEN PLC ShiftExamplePLC // More efficient less resources
ADC5VoltsIn = ((Clipper[1].Chan[0].AdcEnc[0] >> 20) * 10 / 2048) – ADC5ZeroOffset ;
ADC6VoltsIn = ((Clipper[1].Chan[0].AdcEnc[1] >> 20) * 10 / 2048) – ADC6ZeroOffset ;
ADC7VoltsIn = ((Clipper[1].Chan[0].AdcEnc[2] >> 20) * 10 / 2048) – ADC7ZeroOffset ;
ADC8VoltsIn = ((Clipper[1].Chan[0].AdcEnc[3] >> 20) * 10 / 2048) – ADC8ZeroOffset ;
CLOSE
Using the ADC for Servo Feedback
Use the same software setup as the base Power PMAC Clipper board with the following differences:
Gate3 index is 1 (Clipper[1])
Motors 5-8 are used (or motors other than used on the base board)
ECT entries 5-8 are used (or entries other than used on the base board)
EncTable[5].pEnc = Clipper[0].Chan[0].AdcEnc[0].a;
EncTable[5].pEnc1 = Sys.pushm;
EncTable[5].index1 = 20;
EncTable[5].index2 = 20;
EncTable[5].index3 = 0;
EncTable[5].index4 = 0;
EncTable[5].index5 = 0;
EncTable[5].ScaleFactor = 1 / EXP2(20);
Motor[5].pEnc = EncTable[5].a;
Motor[5].pEnc2 = EncTable[5].a;