spindle control
- M4MazakUser
- Offline
- Elite Member
- Posts: 187
- Thank you received: 5
if i try to hook it to an input pin, it says it cant, as it is an output??
\
Please Log in or Create an account to join the conversation.
motion.spindle-index-enable I/O bit
For correct operation of spindle synchronized moves, this signal must be hooked to the index-enable pin of the spindle encoder.
encoder.N.index-enable bit i/o (same for hostmot2)
When true, counts and position are reset to zero on the next rising edge of Phase-Z. At the same time, index-enable is reset to zero to indicate that the rising edge has occurred.
both pins are I/O pins and will not give you that error. There must be something else giving you that error.
this is the line from my config for spindle enable.
net spindle-index motion.spindle-index-enable <= hm2_5i20.0.encoder.02.index-enable
read this: www.linuxcnc.org/docview/html//hal_basic_hal.html
post your .hal file (rename it to .txt and attach it)
btw, I use comment marker to find the error lines in my hal files. Comment a suspect line and try and load...
John
Please Log in or Create an account to join the conversation.
Yes in my thinking, the spindle index should reset the count every revolution therefore making the spindle revs a meaningful number. This would also make the spindle position meaningful.
The spindle index pulse should not reset the spindle revs every revolution, only when requested to do so by motion.spindle-index-enable.
Normally the spindle.revs number counts up (or down) indefinitely. Resetting every rev would make threads of more than one turn impossible..
Please Log in or Create an account to join the conversation.
Thanks.
Chris Morley
Please Log in or Create an account to join the conversation.
the two components are connected, they are just connected on two lines instead of the same line.
Please Log in or Create an account to join the conversation.
pncconf forgot to connect motion.spindle-revs to encoder.position
add the line:
net spindle-revs => hm2_5i20.0.encoder.02.position
Please Log in or Create an account to join the conversation.
- M4MazakUser
- Offline
- Elite Member
- Posts: 187
- Thank you received: 5
here is my hal file ...
i also have a problem in that neither my handwheel, or joystick work, i feel that there is connection missing that links the selected joint with the axis you select.
# connect jogwheel signals to mesa encoder - shared MPG
net joint-selected-count <= hm2_5i20.0.encoder.03.count
setp hm2_5i20.0.encoder.03.filter true
setp hm2_5i20.0.encoder.03.counter-mode false
# for axis x MPG
setp axis.0.jog-vel-mode 0
net selected-jog-incr => axis.0.jog-scale
net joint-select-a => axis.0.jog-enable
net joint-selected-count => axis.0.jog-counts
# for axis z MPG
setp axis.1.jog-vel-mode 0
net selected-jog-incr => axis.1.jog-scale
net joint-select-b => axis.1.jog-enable
net joint-selected-count => axis.1.jog-counts
i havent really looked in depth at it, just very happy to have ran the machine all day!
the x axis works *handwheel/ joystick, but the selection switch i have wired in -
# --- JOINT-SELECT-A ---
net joint-select-a <= hm2_5i20.0.gpio.035.in_not
# --- JOINT-SELECT-B ---
net joint-select-b <= hm2_5i20.0.gpio.035.in
-links to jog enable, but dosent seem to send anything to the z axis motor -( the velocity registers on the screen, and throws the machine into an a "z axis following error")
and thanks for the time you have spent on my problems!
Please Log in or Create an account to join the conversation.
net mpg-x axis.0.jog-enable <= hm2_[HOSTMOT2](BOARD).0.gpio.054.in_not
net mpg-z axis.2.jog-enable <= hm2_[HOSTMOT2](BOARD).0.gpio.052.in_not
You can send the jog counts to all axis at the same time as only the one that is enabled will move.
net mpg-count <= hm2_5i20.0.encoder.03.count
net mpg-count => axis.0.jog-counts
net mpg-count => axis.2.jog-counts
My scale selector switch is set up like this and no input is for the shortest move per pulse... also note that I named my mux4 for clarity.
# MPG Scale
loadrt mux4 names=mpg-scale
addf mpg-scale servo-thread
setp mpg-scale.in0 .000025
setp mpg-scale.in1 .00025
setp mpg-scale.in2 .0025
# set the MPG scale based on the inputs from the selector switch
net pos2 mpg-scale.sel0 <= hm2_[HOSTMOT2](BOARD).0.gpio.037.in_not
net pos3 mpg-scale.sel1 <= hm2_[HOSTMOT2](BOARD).0.gpio.035.in_not
in comparison it seems you have all hooked up... Z is axis.2
John
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I see the error in the code.
This will effect lathe configs.
Thanks.
Please Log in or Create an account to join the conversation.