Jump to content
OMRON Forums

How to use ACC-84E with PPMAC?


dzrong

Recommended Posts

  • Replies 10
  • Created
  • Last Reply

Top Posters In This Topic

[quote='dzrong' pid='687' dateline='1284020740'] Hello, Is there a document or example about how to use ACC-84E about protocol of BISS C and EnDat2.2 with PPmac? Thanks, [/quote] The standard manual is found at this link. It only describes Turbo PMAC http://www.deltatau.com/manuals/pdfs/ACC-84E.pdf?id=634158233091868750 Here is an example on how to use it with Power PMAC: [code] //-------------------------------------------------------------------------------- // Motor Setup Example for Power PMAC // Parts: // Power PMAC 460 CPU // ACC-24E2 for Direct PWM control of a brushless motor // ACC-84E for reading the Biss-C enoder // Brushless motor: MCG IB23820 // Encoder: Renishaw RESOLUTE encoder (Biss-C Unidirectional) //-------------------------------------------------------------------------------- #define NumberOfPolePairs 2 #define SingleTurnRes 26 ptr GlobalRegister->u.io:$A0007C.8.24; GlobalRegister=$18000B // Global Control register, 2 MHz Clock setting ptr Chan1Reg->u.io:$A00020.8.24; Chan1Reg = $211480 + SingleTurnRes // Ch1 Control register, 26-Bit EnDat Encoder ptr PosReg1->u.io:$A00000.8.24; ptr PosReg2->u.io:$A00004.8.24; EncTable[1].type=2; // 24+8 bit read entry EncTable[1].pEnc = Sys.piom + $A00000; // address of lower 24 bit EncTable[1].pEnc1 = Sys.piom + $A00004; // address of upper 8 bits EncTable[1].index1 = 32-SingleTurnRes; // left shift for sign adjustment 32-26=6 EncTable[1].index2 = 0; EncTable[1].index3 = 0; EncTable[1].index4 = 0; EncTable[1].ScaleFactor = 1/exp2(32-SingleTurnRes); // scale back to offset the left adjustment done by index2 EncTable[1].MaxDelta = 50000 * 256; Motor[1].ServoCtrl=1 Motor[1].pLimits=0 // Disable the over-travel limits Motor[1].PhaseCtrl=4 // Commutation Enabled, ADC data is read from two separate registers Motor[1].pEnc = EncTable[1].a; Motor[1].pEnc2 = EncTable[1].a; Motor[1].pDac = Acc24E2[4].Chan[0].Pwm[0].a; Motor[1].pAdc = Acc24E2[4].Chan[0].Adc[0].a; Motor[1].pAmpEnable = Acc24E2[4].Chan[0].Ctrl.a; Motor[1].AmpEnableBit = 22; Motor[1].pAmpFault = Acc24E2[4].Chan[0].Status.a; Motor[1].AmpFaultBit = 23; Motor[1].pCaptFlag = Acc24E2[4].Chan[0].Status.a; Motor[1].CaptFlagBit = 19; Motor[1].pEncCtrl = Acc24E2[4].Chan[0].Status.a; Motor[1].pPhaseEnc = EncTable[1].PrevEnc.a; Motor[1].PhasePosSf = 2048 * NumberOfPolePairs / (exp2(SingleTurnRes) * exp2(32-SingleTurnRes)) Motor[1].PwmSf=60/170* Acc24E2[4].PwmPeriod * -1.15; Motor[1].PhaseOffset= -683 Motor[1].IaBias = 91 Motor[1].IbBias = 99 Motor[1].IiGain = 0.2713674247 Motor[1].IpfGain = 0.0000000000 Motor[1].IpbGain = 1.0380999284 //-------------Phasing Search Method---------- Motor[1].PhaseFindingDac=1200; Motor[1].PhaseFindingTime=40; Motor[1].pAbsPhasePos=0; Motor[1].AbsPhasePosFormat=0; Motor[1].AbsPhasePosSF=0; Motor[1].AbsPhasePosOffset = 0; //------------------------------------- //-------------Phasing based upon absolute encoder / calibration required -------- //Motor[1].PhaseFindingDac=0 //Motor[1].PhaseFindingTime=0 //Motor[1].pAbsPhasePos=EncTable[1].PrevEnc.a; //Motor[1].AbsPhasePosFormat=$0 + SingleTurnRes * $100 + (32-SingleTurnRes) //$00001A06; // 00: Binary 00:TBD 1A:26bits 06:LSB location //Motor[1].AbsPhasePosSF=2048/exp2(SingleTurnRes) //Motor[1].AbsPhasePosOffset = 1634; //------------------------------------- Motor[1].pAbsPos = EncTable[1].PrevEnc.a; Motor[1].AbsPhasePosFormat=$0 + SingleTurnRes * $100 + (32-SingleTurnRes) //$00001A06; // 00: Binary 00:TBD 1A:26bits 06:LSB location Motor[1].AbsPosSF = 1; [/code]
Link to comment
Share on other sites

  • 5 months later...
[quote='bradp' pid='688' dateline='1284046430'] [quote='dzrong' pid='687' dateline='1284020740'] Hello, Is there a document or example about how to use ACC-84E about protocol of BISS C and EnDat2.2 with PPmac? Thanks, [/quote] The standard manual is found at this link. It only describes Turbo PMAC http://www.deltatau.com/manuals/pdfs/ACC-84E.pdf?id=634158233091868750 Here is an example on how to use it with Power PMAC: [code] //-------------------------------------------------------------------------------- // Motor Setup Example for Power PMAC // Parts: // Power PMAC 460 CPU // ACC-24E2 for Direct PWM control of a brushless motor // ACC-84E for reading the Biss-C enoder // Brushless motor: MCG IB23820 // Encoder: Renishaw RESOLUTE encoder (Biss-C Unidirectional) //-------------------------------------------------------------------------------- #define NumberOfPolePairs 2 #define SingleTurnRes 26 ptr GlobalRegister->u.io:$A0007C.8.24; GlobalRegister=$18000B // Global Control register, 2 MHz Clock setting ptr Chan1Reg->u.io:$A00020.8.24; Chan1Reg = $211480 + SingleTurnRes // Ch1 Control register, 26-Bit EnDat Encoder ptr PosReg1->u.io:$A00000.8.24; ptr PosReg2->u.io:$A00004.8.24; EncTable[1].type=2; // 24+8 bit read entry EncTable[1].pEnc = Sys.piom + $A00000; // address of lower 24 bit EncTable[1].pEnc1 = Sys.piom + $A00004; // address of upper 8 bits EncTable[1].index1 = 32-SingleTurnRes; // left shift for sign adjustment 32-26=6 EncTable[1].index2 = 0; EncTable[1].index3 = 0; EncTable[1].index4 = 0; EncTable[1].ScaleFactor = 1/exp2(32-SingleTurnRes); // scale back to offset the left adjustment done by index2 EncTable[1].MaxDelta = 50000 * 256; Motor[1].ServoCtrl=1 Motor[1].pLimits=0 // Disable the over-travel limits Motor[1].PhaseCtrl=4 // Commutation Enabled, ADC data is read from two separate registers Motor[1].pEnc = EncTable[1].a; Motor[1].pEnc2 = EncTable[1].a; Motor[1].pDac = Acc24E2[4].Chan[0].Pwm[0].a; Motor[1].pAdc = Acc24E2[4].Chan[0].Adc[0].a; Motor[1].pAmpEnable = Acc24E2[4].Chan[0].Ctrl.a; Motor[1].AmpEnableBit = 22; Motor[1].pAmpFault = Acc24E2[4].Chan[0].Status.a; Motor[1].AmpFaultBit = 23; Motor[1].pCaptFlag = Acc24E2[4].Chan[0].Status.a; Motor[1].CaptFlagBit = 19; Motor[1].pEncCtrl = Acc24E2[4].Chan[0].Status.a; Motor[1].pPhaseEnc = EncTable[1].PrevEnc.a; Motor[1].PhasePosSf = 2048 * NumberOfPolePairs / (exp2(SingleTurnRes) * exp2(32-SingleTurnRes)) Motor[1].PwmSf=60/170* Acc24E2[4].PwmPeriod * -1.15; Motor[1].PhaseOffset= -683 Motor[1].IaBias = 91 Motor[1].IbBias = 99 Motor[1].IiGain = 0.2713674247 Motor[1].IpfGain = 0.0000000000 Motor[1].IpbGain = 1.0380999284 //-------------Phasing Search Method---------- Motor[1].PhaseFindingDac=1200; Motor[1].PhaseFindingTime=40; Motor[1].pAbsPhasePos=0; Motor[1].AbsPhasePosFormat=0; Motor[1].AbsPhasePosSF=0; Motor[1].AbsPhasePosOffset = 0; //------------------------------------- //-------------Phasing based upon absolute encoder / calibration required -------- //Motor[1].PhaseFindingDac=0 //Motor[1].PhaseFindingTime=0 //Motor[1].pAbsPhasePos=EncTable[1].PrevEnc.a; //Motor[1].AbsPhasePosFormat=$0 + SingleTurnRes * $100 + (32-SingleTurnRes) //$00001A06; // 00: Binary 00:TBD 1A:26bits 06:LSB location //Motor[1].AbsPhasePosSF=2048/exp2(SingleTurnRes) //Motor[1].AbsPhasePosOffset = 1634; //------------------------------------- Motor[1].pAbsPos = EncTable[1].PrevEnc.a; Motor[1].AbsPhasePosFormat=$0 + SingleTurnRes * $100 + (32-SingleTurnRes) //$00001A06; // 00: Binary 00:TBD 1A:26bits 06:LSB location Motor[1].AbsPosSF = 1; [/code] [/quote] Brad, In your example above, you state that a global control register value of $18000B is used for 2MHz BiSS-C clock. The clock formula given in the BiSS-C section of the ACC-84E manual is: clock = 100 MHz / ( (M+1)*(2^N) ). If M=$18=24, and N=$0, that comes out as a clock of 4 MHz. Should we use M=$31, N=$0 for 2 MHz? I just want to make sure I don't misunderstand anything here... Cheers Andy
Link to comment
Share on other sites

  • 1 year later...
I have another of my newbie to Delta Tau questions. I am just now embarking on getting this particular combination of hardware running. I am still figuring out how the different program types work. Is this code intended as a PLC or something else ? Thanks, Dennis [quote='bradp' pid='688' dateline='1284046430'] The standard manual is found at this link. It only describes Turbo PMAC http://www.deltatau.com/manuals/pdfs/ACC-84E.pdf?id=634158233091868750 Here is an example on how to use it with Power PMAC: [/quote]
Link to comment
Share on other sites

[quote='bradp' pid='3619' dateline='1340696207'] I used it as just a configuration file (.pmh) to load and make a setup at power-on / reset [/quote] Thanks for this, should this go in the global_definitions.pmh file ?
Link to comment
Share on other sites

[quote='bradp' pid='3619' dateline='1340696207'] I used it as just a configuration file (.pmh) to load and make a setup at power-on / reset [/quote] Should I just put this code in the global_definitions.pmh file? Also is there a document that describes the use of that file or any .pmh file? I am still coming up to speed with this development environment and hardware. TIA
Link to comment
Share on other sites

Yes you can put it there or make a seperate .pmh file. Make sure the settings match what your system needs. At the moment this is covered in the Power Pmac User's Manual and in the PPmac training class. Search for IDE in the user manual and although all data is not in one spot after reading all the things you find you will have enough information.
Link to comment
Share on other sites

[quote='bradp' pid='3622' dateline='1340722071'] Yes you can put it there or make a seperate .pmh file. Make sure the settings match what your system needs. At the moment this is covered in the Power Pmac User's Manual and in the PPmac training class. Search for IDE in the user manual and although all data is not in one spot after reading all the things you find you will have enough information. [/quote] Thanks. The PPmac training class is unfortunately not in the picture for me presently so doing this the "hard way". I'll search the manual as you described.
Link to comment
Share on other sites

[quote='dennisg' pid='3623' dateline='1340722303'] [quote='bradp' pid='3622' dateline='1340722071'] Yes you can put it there or make a seperate .pmh file. Make sure the settings match what your system needs. At the moment this is covered in the Power Pmac User's Manual and in the PPmac training class. Search for IDE in the user manual and although all data is not in one spot after reading all the things you find you will have enough information. [/quote] Thanks. The PPmac training class is unfortunately not in the picture for me presently so doing this the "hard way". I'll search the manual as you described. [/quote] Another newbie question. I have a basic PLC running and have included much of your code into my global_definitions.pmh file. While debugging it I set some watchpoints to see if I can see inputs. If I set the raw inputs to the encoder table as watches (i.e. Sys.piom + $A00000, and Sys.piom + $A00004) I see activity that looks like floating inputs. My current understanding (misunderstanding?) is that Motor[1].pEnc = EncTable[1].a and Motor[1].pEnc2 = EncTable[1].a are what get the output of the encoder table. If I set those as watchpoints I just see integer values that do not change. Understanding that I am still trying to understand how the I/O works I am sure I am viewing this incorrectly. How can I set watchpoints that display the output of the table? I think this output represents a "smoothed" version of the raw inputs. I have attached the PLC I'm using, it was written before my time here but does work. Our setup seems similar to the one in your example although I could be completely wrong. We would like to use the the Renishaw and ACC-84E on our project under development. We are at the proof of concept stage right now.
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...