RomanSolonto Posted January 29, 2017 Share Posted January 29, 2017 Good day. I have the last versions of Power Clipper firmware and IDE. The value of gate3[0].Chan[0].AdcAmp[0] (A phase, strobed on rising edge of phase clock) is real but gate3[0].Chan[0].AdcAmp[1] (B phase, strobed on rising edge of phase clock) don't change How can I get the value? Thank you. Link to comment Share on other sites More sharing options...
curtwilson Posted January 30, 2017 Share Posted January 30, 2017 I suspect that your Phase B current value is "packed" into the low 16 bits of the same 32-bit word for which your Phase A current occupies the high 16 bits. Set Gate3[0].Chan[0].PackInData to 0 and repeat the test. The Phase B current value should then appear in the high 16 bits of AdcAmp[1]. You have two possible ways of setting up the channel and motor for direct PWM control with a Gate3. One is: Gate3.Chan[j].PackInData = 1 // Two ADC values in one register Gate3.Chan[j].PackOutData = 1 // Two PWM values in one register Motor[x].PhaseCtrl = 1 // Commutation using packed inputs and outputs This method is faster due to reduce input and output accesses, but harder to debug and analyze. The second method uses: Gate3.Chan[j].PackInData = 0 // Two ADC values in separate registers Gate3.Chan[j].PackOutData = 1 // PWM values in separate registers Motor[x].PhaseCtrl = 4 // Commutation using unpacked inputs and outputs This method is a little slower, but easier to work with. We generally recommend the second method unless you are really pushing the Power PMAC for CPU time, which you almost never are for a Power Clipper. Also, on the Power Clipper drive, we use the lower 16 bits of these registers for auxiliary information from the power stage. Link to comment Share on other sites More sharing options...
Recommended Posts