G96 CSS problem

More
12 years 7 months ago #45245 by jbunch
G96 CSS problem was created by jbunch
I am having a problem with G96 CSS.

With a start dia of 4.6 inches, D=1000 S=300 My spindle comes up to speed the joints move to start of cut but I do not get a spindle at speed and the joint sits.

It is the same for an X or a Z movement. My lathe is a backtool and this is done with the spindle in reverse or CCW. Testted with CW same thing.

As I raise the SFM higher and higher it will eventualy start to cut. But the speed is well above the 1000 rpm max and the system will take the spindle to absolute max 2500 rpm.

This started with the Gmoccapy GUI so I setup Touchy, I am also seeing the same behavior with Touchy. Also now seeing it with AXIS.

For now I have inserted G97 and it works at a fixed speed no CSS.
Code:
# ---Encoder feedback signals/setup--- setp hm2_5i20.0.encoder.02.counter-mode 0 setp hm2_5i20.0.encoder.02.filter 0 setp hm2_5i20.0.encoder.02.index-invert 0 setp hm2_5i20.0.encoder.02.index-mask 0 setp hm2_5i20.0.encoder.02.index-mask-invert 0 setp hm2_5i20.0.encoder.02.scale 2000 net spindle-index-enable motion.spindle-index-enable <=> hm2_5i20.0.encoder.02.index-enable net spindle-revs motion.spindle-revs <= hm2_5i20.0.encoder.02.position # ---setup spindle control signals--- net spindle-enable <= motion.spindle-on net spindle-cw <= motion.spindle-forward net spindle-ccw <= motion.spindle-reverse net spindle-brake <= motion.spindle-brake net spindle-speed-out abs.2.in <= motion.spindle-speed-out # Change velocity to RPM setp scale.1.gain 60 net spindle-velocity motion.spindle-speed-in near.0.in2 scale.1.in <= hm2_5i20.0.encoder.02.velocity # End Velocity to RPM # *** Spindle speed control # PWM Generator signals/setup setp hm2_5i20.0.pwmgen.02.output-type 1 setp hm2_5i20.0.pwmgen.02.scale 0.00094 net spindle-enable hm2_5i20.0.pwmgen.02.enable <= pid.2.enable net spindle-vel-cmd pid.2.command <= abs.2.out net spin-pid-out pid.2.output hm2_5i20.0.pwmgen.02.value # *** End # *** spindle at speed setp near.0.scale 1.2 net spindle_speed_reqst_scaled near.0.in1 <= motion.spindle-speed-cmd-rps #net spindle_ena_spindle_spd and2.12.in1 <= near.0.out #net spindle_for_rev and2.12.in0 and2.3.in1 <= or2.5.out #setp near.0.scale 1.2 #net spindle_speed_reqst_scaled near.0.in1 <= motion.spindle-speed-cmd-rps #net spindle_ena_spindle_spd and2.12.in1 <= near.0.out #net spindle_for_rev and2.12.in0 and2.3.in1 <= or2.5.out # *** End Spindle at speed

Jim

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

More
12 years 7 months ago #45253 by skunkworks
Replied by skunkworks on topic G96 CSS problem
a shot in the dark - but I think you want motion.spindle-speed-out (it is in rpm though) (or out-rps) I assume

net spindle_speed_reqst_scaled near.0.in1 <= motion.spindle-speed-cmd-rps

sam

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

More
12 years 7 months ago #45255 by BigJohnT
Replied by BigJohnT on topic G96 CSS problem
Open Show Hal Configuration and put the near in's in a watch window and run your spindle.

JT

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

More
12 years 7 months ago #45262 by newbynobi
Replied by newbynobi on topic G96 CSS problem
I do not see pid.2.feedback connection, how does the pid work?
Pwm scale shojld be max spindle rpm

I did mention a link in the gmoccapy thread, did you take a look at it?

I will post a working config, next time i am on my dev pc.

Norbert

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

More
12 years 7 months ago - 12 years 7 months ago #45265 by jbunch
Replied by jbunch on topic G96 CSS problem
JT,

In midi mode all works well and I get spindle at speed. I only have a problem when using G96 CSS.
Synced spindle motion threading is OK also.

Jim

Norbert,

The pid does not realy use feedback it is scaled using setp hm2_5i20.0.pwmgen.02.scale 0.00094 and FF0

Jim
Last edit: 12 years 7 months ago by jbunch.

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

More
12 years 7 months ago - 12 years 7 months ago #45275 by BigJohnT
Replied by BigJohnT on topic G96 CSS problem
What version of LinuxCNC are you using? I use CSS all the time on my CHNC with 2.5.3 and most of my ngcgui subroutines use G96.

JT
Last edit: 12 years 7 months ago by BigJohnT.

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

Time to create page: 0.576 seconds
Powered by Kunena Forum