- Posts: 1850
- Thank you received: 0
Spindel problems in Gmoccapy
In Gmoccapy I can not start the spindle, works OK in Axis.
Obviously I have something set wrong but what can that be, spindle starts at 200rpm in Axis.
Please Log in to join the conversation.
linuxcnc.org/docs/html/gui/gmoccapy.html#_basic_configuration
Please Log in to join the conversation.
Attachment not found
slider far left was locked
But, still no visual rpm display. Copied TURBO and his solution
I mean i just got the gmoccapy spindle meter and led working.
In the ini hal section I added
# Single file that is executed after the GUI has started.
POSTGUI_HALFILE = custom_postgui.hal
in custom_postgui.hal
net spindle-fb-rpm-abs-filtered => gmoccapy.spindle_feedback_bar
net spindle-at-speed => gmoccapy.spindle_at_speed_led
So how can I get some rpm feedback having only INDEX pulse on spindle shaft.
Cheers
Bengt
Please Log in to join the conversation.
After that spindle-rpm must be connected in postgui.hal to gmoccapy.spindle_feedback_bar
May be you need to pass the signal through an ABS to get positive values.
Hope that helps.
Norbert
Please Log in to join the conversation.
will give this a try tomorrow.
mfg
Bengt
Please Log in to join the conversation.
What lines should be edited to suit above as I get nowhere with the code as-is.
Cheers
bengt
newbynobi wrote: Here is a simple spindle connection I use for a small machine:
Code:########################################################## # Spindeldrehzahl messen / mesurement spindle revolution # ########################################################## loadrt encoder num_chan=1 addf encoder.update-counters base-thread addf encoder.capture-position servo-thread setp encoder.1.position-scale 1 # Anzahl der Impulse je Umdrehung setp encoder.1.counter-mode 1 # Wenn 1 gesetzt, wird B-Signal ignoriert # disable 4 times encoder, otherwise each klick will ingreas jogwheel-count by 4 instead of 1 # 4-fach-Auswertung vom Encoder ausschalten, sonst wird jogwheel-count bei jedem Klick um 4 statt um 1 erhoeht setp encoder.0.x4-mode FALSE loadrt scale count=1 # Wird gebraucht, um U/Sekunde in U/min umzurechnen addf scale.0 servo-thread setp scale.0.gain 60 # Ausgang = 60 x Eingang net spindle_index parport.1.pin-12-in => encoder.1.phase-A => encoder.1.phase-Z net spindle-index-enable motion.spindle-index-enable <=> encoder.1.index-enable net spindle-rps encoder.1.velocity => scale.0.in net spindle-rpm scale.0.out # Zum Erkennen ob Geschwindigkeit erreicht wurde # For at Speed detection loadrt near addf near.0 servo-thread # Stellt fest ob zwei Werte in etwa gleich sind # Wahr wenn, in1/scale <= in2 <= in1*scale # oder wenn |in1-in2| <= difference # prooves if two values are roughly the same # true if in1/scale <= in2 <= in1*scale # OR |in1-in2| <= difference setp near.0.scale 1.2 setp near.0.difference 10 net spindle-cmd => near.0.in1 # net spindle-revs motion.spindle-revs => near.0.in1 net spindle-rpm => near.0.in2 net spindle-at-speed near.0.out => motion.spindle-at-speed
After that spindle-rpm must be connected in postgui.hal to gmoccapy.spindle_feedback_bar
May be you need to pass the signal through an ABS to get positive values.
Hope that helps.
Norbert
Please Log in to join the conversation.
In your postgui.hal file you need:
Norbert
Please Log in to join the conversation.
Attachment not found
Line 43
net spindle-index => encoder.1.phase-Z => encoder.1.phase-A
Please Log in to join the conversation.
please use the changed code.
See my last post.
Norbert
Please Log in to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
- Posts: 4739
- Thank you received: 2
net spindle-index => encoder.0.phase-Z => encoder.0.phase-A
(There were also other places where encoder.1 should be changed to encoder.0, but Norbert corrected them while I was typing.)
Please Log in to join the conversation.
