Spindel problems in Gmoccapy

More
9 years 6 months ago - 9 years 6 months ago #92282 by tecno
Replied by tecno on topic Spindel problems in Gmoccapy
Now no errors so I can start. But still no rpm show on screen.

I am a bit suspicious on the pulse length that Mach needs quite long pulse.
So maybe there must be some filters schmitt-trigger to make pulse suitable for LCNC.

How to measure incoming pulse width on pin 10?

Found the halscope in gmoccapy. pulsewidth 45/46 ms at low rpm of approx 200rpm
Last edit: 9 years 6 months ago by tecno.

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

More
9 years 6 months ago - 9 years 6 months ago #92286 by Todd Zuercher
Replied by Todd Zuercher on topic Spindel problems in Gmoccapy
You can easily look at parport.0.pin-10-in with Halscope.

But there are some other issues.
Not sure why you added a scale component for the encoder, the encoder has a scale built in.
Try this:
Code:
# Generated by stepconf 1.1 at Mon Apr 17 15:16:45 2017 # If you make changes to this file, they will be # overwritten when you run stepconf again loadrt trivkins loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES loadrt hal_parport cfg="0x378 out" setp parport.0.reset-time 5000 loadrt stepgen step_type=0,0,0 ctrl_type=p,p,v loadrt charge_pump setp charge-pump.enable 1 net charge-pump <= charge-pump.out loadrt encoder num_chan=1 loadrt scale count=1 loadrt near net spindle-cmd-rpm => stepgen.2.velocity-cmd setp stepgen.2.position-scale 0.9 #steps/RPM setp stepgen.2.steplen 5000 setp stepgen.2.stepspace 5000 #setp stepgen.2.dirdelay 35000 setp stepgen.2.maxaccel 5000 addf parport.0.read base-thread addf stepgen.make-pulses base-thread addf charge-pump base-thread addf parport.0.write base-thread addf parport.0.reset base-thread addf encoder.update-counters base-thread addf encoder.capture-position servo-thread addf scale.0 servo-thread addf near.0 servo-thread addf stepgen.capture-position servo-thread addf motion-command-handler servo-thread addf motion-controller servo-thread addf stepgen.update-freq servo-thread net spindle-index => encoder.0.phase-Z => encoder.0.phase-A net spindle-cmd-rpm <= motion.spindle-speed-out net spindle-cmd-rpm-abs <= motion.spindle-speed-out-abs net spindle-cmd-rps <= motion.spindle-speed-out-rps net spindle-cmd-rps-abs <= motion.spindle-speed-out-rps-abs net spindle-at-speed => motion.spindle-at-speed net spindle-position encoder.0.position => motion.spindle-revs net spindle-velocity encoder.0.velocity => motion.spindle-speed-in net spindle-enable <= motion.spindle-on => stepgen.2.enable net spindle-cw <= stepgen.2.step net spindle-ccw <= stepgen.2.dir #setp encoder.0.counter-mode 1 setp encoder.0.position-scale 1 setp encoder.0.counter-mode 1 setp encoder.0.x4-mode FALSE setp scale.0.gain 60 setp near.0.scale 1.2 setp near.0.difference 10 net spindle-cmd => near.0.in1 net spindle-rpm => near.0.in2 net spindle-at-speed near.0.out => motion.spindle-at-speed net coolant-flood <= iocontrol.0.coolant-flood net xstep => parport.0.pin-02-out setp parport.0.pin-02-out-reset 1 net xdir => parport.0.pin-03-out #setp parport.0.pin-04-out-invert 1 net zstep => parport.0.pin-04-out setp parport.0.pin-04-out-reset 1 setp parport.0.pin-05-out-invert 1 net zdir => parport.0.pin-05-out net spindle-cw => parport.0.pin-06-out net spindle-ccw => parport.0.pin-07-out net coolant-flood => parport.0.pin-09-out net charge-pump => parport.0.pin-14-out net spindle-index <= parport.0.pin-10-in net home-z <= parport.0.pin-11-in-not net home-x <= parport.0.pin-12-in-not net estop-ext <= parport.0.pin-15-in-not net spindle-index-enable motion.spindle-index-enable <=> encoder.0.index-enable #net spindle-rps encoder.0.velocity => scale.0.in #net spindle-rpm scale.0.out setp stepgen.0.position-scale [AXIS_0]SCALE setp stepgen.0.steplen 1 setp stepgen.0.stepspace 0 setp stepgen.0.dirhold 35000 setp stepgen.0.dirsetup 35000 setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL net xpos-cmd axis.0.motor-pos-cmd => stepgen.0.position-cmd net xpos-fb stepgen.0.position-fb => axis.0.motor-pos-fb net xstep <= stepgen.0.step net xdir <= stepgen.0.dir net xenable axis.0.amp-enable-out => stepgen.0.enable net home-x => axis.0.home-sw-in setp stepgen.1.position-scale [AXIS_2]SCALE setp stepgen.1.steplen 1 setp stepgen.1.stepspace 0 setp stepgen.1.dirhold 35000 setp stepgen.1.dirsetup 35000 setp stepgen.1.maxaccel [AXIS_2]STEPGEN_MAXACCEL net zpos-cmd axis.2.motor-pos-cmd => stepgen.1.position-cmd net zpos-fb stepgen.1.position-fb => axis.2.motor-pos-fb net zstep <= stepgen.1.step net zdir <= stepgen.1.dir net zenable axis.2.amp-enable-out => stepgen.1.enable net home-z => axis.2.home-sw-in net estop-ext => iocontrol.0.emc-enable-in loadusr -W hal_manualtoolchange net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
Last edit: 9 years 6 months ago by Todd Zuercher.

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

More
9 years 6 months ago #92288 by tecno
Replied by tecno on topic Spindel problems in Gmoccapy
Scale is in Norberts code

No difference, still same 45-46ms pulse width

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

More
9 years 6 months ago #92296 by Todd Zuercher
Replied by Todd Zuercher on topic Spindel problems in Gmoccapy
Sorry, I didn't look close enough to Norbert's post.

Changing this line I think might get you there.
net spindle-velocity encoder.0.velocity => motion.spindle-speed-in
to
net spindle-rpm encoder.0.velocity => motion.spindle-speed-in

Sorry about that.

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

More
9 years 6 months ago #92302 by tecno
Replied by tecno on topic Spindel problems in Gmoccapy
Will try this tomorrow, thanks.

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

More
9 years 6 months ago - 9 years 6 months ago #92324 by tecno
Replied by tecno on topic Spindel problems in Gmoccapy

Todd Zuercher wrote: Sorry, I didn't look close enough to Norbert's post.

Changing this line I think might get you there.
net spindle-velocity encoder.0.velocity => motion.spindle-speed-in
to
net spindle-rpm encoder.0.velocity => motion.spindle-speed-in

Sorry about that.


No such line in hal!

File Attachment:

File Name: Blomqvist_...4-29.hal
File Size:4 KB






Added that line, nothing. No numbers showing real rpm yet.
Attachments:
Last edit: 9 years 6 months ago by tecno.

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

Moderators: newbynobi, HansU
Time to create page: 0.187 seconds
Powered by Kunena Forum