Open Loop Spindle control with DYN4

  • BeagleBrainz
  • Topic Author
  • New Member
  • New Member
More
5 years 7 months ago #204332 by BeagleBrainz
Replied by BeagleBrainz on topic Open Loop Spindle control with DYN4

Michael wrote: Seems you got it figured out then



No.

I still need a bit of advice in going from a closed loop to open loop config.

Please Log in or Create an account to join the conversation.

More
5 years 6 months ago #204566 by andypugh

BeagleBrainz wrote: I still need a bit of advice in going from a closed loop to open loop config.


Set P, I, D FF1 and FF2 to zero.
Then adjust FF0 to get the correct speed.
The following user(s) said Thank You: BeagleBrainz

Please Log in or Create an account to join the conversation.

  • BeagleBrainz
  • Topic Author
  • New Member
  • New Member
More
5 years 6 months ago #204588 by BeagleBrainz
Replied by BeagleBrainz on topic Open Loop Spindle control with DYN4
Ok so I still need PID that's great to know.

Had it running last night on the test bench, feeding (using correct hal notation)

spindle.0.speed-out straight to hm2_7i92.0.7i83.1.5.analogout5 and was able to get movement, the 7i83 was supplying a calculated voltage that was correct.
Code:
#******************* # SPINDLE S (open loop) #******************* setp pid.s.Pgain 0 setp pid.s.Igain 0 setp pid.s.Dgain 0 setp pid.s.bias 0 setp pid.s.FF0 "adjust to suit" setp pid.s.FF1 0 setp pid.s.FF2 0 setp pid.s.deadband 0 setp pid.s.maxoutput 4000 setp pid.s.error-previous-target true #net spindle-index-enable <=> pid.s.index-enable hm2_7i92.0.encoder.00.index-enable net spindle-enable => pid.s.enable net spindle-vel-cmd-rpm => pid.s.command #net spindle-fb-rpm => pid.s.feedback net spindle-output <= pid.s.output setp hm2_7i92.0.7i83.1.5.analogout5-scalemax 4000 setp hm2_7i92.0.7i83.1.5.analogout5-minlim -4000 setp hm2_7i92.0.7i83.1.5.analogout5-maxlim 4000 net spindle-output => hm2_7i92.0.7i83.1.5.analogout5 net spindle-vel-cmd-rpm <= spindle.0.speed-out

Does the above look right or am I wayyyyy off ? (assuming I have loaded pid.s)

Eventually the encoder output from the servo driver will get connected up, just need to get hold of a small amount of 3 pair shielded twisted pair.

Please Log in or Create an account to join the conversation.

More
5 years 6 months ago #204615 by johnmc1
Have you enabled analog5 elswhere.

Please Log in or Create an account to join the conversation.

  • BeagleBrainz
  • Topic Author
  • New Member
  • New Member
More
5 years 6 months ago #204629 by BeagleBrainz
Replied by BeagleBrainz on topic Open Loop Spindle control with DYN4
Yup, otherwise no magic smoke through tiny copper pipes ;)

Please Log in or Create an account to join the conversation.

More
5 years 6 months ago #204634 by andypugh

BeagleBrainz wrote: Ok so I still need PID that's great to know..


No, you don't need the PID, but if you want to leave it in place and disable it, that is possible by making it an FF0 passthrough.

spindle.0.speed-out => hm2_7i92.0.7i83.1.5.analogout5 is the simplest open-loop arrangement, but needs more HAL changes from where you were.

Please Log in or Create an account to join the conversation.

Time to create page: 0.148 seconds
Powered by Kunena Forum