I am moving this discussion from another forum to the CNCZone. It is much easier to read and add attachments etc.
Recap:
I am trying to control AMC BD30A8 "Direct PWM" servo amps using the KFlop PWMs and a DIR output.
I have a single motor hooked up for testing.
I have started off with the KAnalogInitalPID.mot config, changed the Axis Mode / Output to No Output and have Thread 1 running the code to convert ch0->Output to PWM duty cycle (inverted) and a DIR output. I have the P set to 0.2 with no I or D.
The motor oscillates badly holding position.
----
Tom, you suggested trying a D of 50. This did help quiet the oscillation, but I am afraid there is something else wrong.
I set a Dead Band of 5 with a Gain of 0.05 and that quieted the oscillations some.
Here is the Step Response for a 0 move with D=0.
To me, this looks like the motor is moving in concert with the Output value.
IOW, it appears that the Output is telling the motor to oscillate.
This 0.2 P setting with a very low Max Output is not going to provide any speed or torque for moves.
I can set the D to 50,100,1000 or 10000 and then I can increase the Max Output. However, if I increase the P to above 0.2, the motor tries to jump off of the table.
It seems to me I need to know how to get the Output value to stop oscillating in the first place.
Could this problem have something to do with the position changing opposite the Output value?
If I change the Gain to -1, the motor runs away until I flip the DIR values in the code. So, this is the correct Encoder and Motor connections.
If I use the Step response screen to command a Move of 10000, the motor slowly makes one revolution and then returns. The plot shows the position tracks fine without oscillation while moving. Of course, the movement is way too slow.
What can I do?
Thanks.
Recap:
I am trying to control AMC BD30A8 "Direct PWM" servo amps using the KFlop PWMs and a DIR output.
I have a single motor hooked up for testing.
I have started off with the KAnalogInitalPID.mot config, changed the Axis Mode / Output to No Output and have Thread 1 running the code to convert ch0->Output to PWM duty cycle (inverted) and a DIR output. I have the P set to 0.2 with no I or D.
The motor oscillates badly holding position.
----
Tom, you suggested trying a D of 50. This did help quiet the oscillation, but I am afraid there is something else wrong.
I set a Dead Band of 5 with a Gain of 0.05 and that quieted the oscillations some.
Here is the Step Response for a 0 move with D=0.
To me, this looks like the motor is moving in concert with the Output value.
IOW, it appears that the Output is telling the motor to oscillate.
This 0.2 P setting with a very low Max Output is not going to provide any speed or torque for moves.
I can set the D to 50,100,1000 or 10000 and then I can increase the Max Output. However, if I increase the P to above 0.2, the motor tries to jump off of the table.
It seems to me I need to know how to get the Output value to stop oscillating in the first place.
Could this problem have something to do with the position changing opposite the Output value?
If I change the Gain to -1, the motor runs away until I flip the DIR values in the code. So, this is the correct Encoder and Motor connections.
If I use the Step response screen to command a Move of 10000, the motor slowly makes one revolution and then returns. The plot shows the position tracks fine without oscillation while moving. Of course, the movement is way too slow.
What can I do?
Thanks.