spindle control

More
18 Aug 2010 09:36 #3801 by M4MazakUser
Replied by M4MazakUser on topic Re:spindle control
um, thats fine, but what should spindle-index be connected/referring to?

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.

More
18 Aug 2010 11:20 #3802 by BigJohnT
Replied by BigJohnT on topic Re:spindle control
spindle-index is the signal

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.

More
18 Aug 2010 12:40 #3806 by andypugh
Replied by andypugh on topic Re:spindle control
M4MazakUser wrote:

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.

More
19 Aug 2010 00:56 #3815 by cmorley
Replied by cmorley on topic Re:spindle control
If you can confirm the error, I will fix pncconf. I currently don't have anything to test with.

Thanks.
Chris Morley

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

More
19 Aug 2010 02:09 #3816 by cmorley
Replied by cmorley on topic Re:spindle control
Hmm I don't think this is the problem.
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.

More
19 Aug 2010 02:19 - 19 Aug 2010 02:22 #3817 by cmorley
Replied by cmorley on topic Re:spindle control
ok I think I got it .

pncconf forgot to connect motion.spindle-revs to encoder.position

add the line:

net spindle-revs => hm2_5i20.0.encoder.02.position
Last edit: 19 Aug 2010 02:22 by cmorley.

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

More
19 Aug 2010 08:54 - 19 Aug 2010 08:56 #3821 by M4MazakUser
Replied by M4MazakUser on topic Re:spindle control
ill try that tomorrow -thanks heaps!

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!

File Attachment:

File Name: mazak.txt
File Size:17 KB
Attachments:
Last edit: 19 Aug 2010 08:56 by M4MazakUser.

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

More
19 Aug 2010 11:01 #3823 by BigJohnT
Replied by BigJohnT on topic Re:spindle control
I use two different inputs to select my X and Z axis for jogging.

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.

More
20 Aug 2010 04:42 #3826 by cmorley
Replied by cmorley on topic Re:spindle control
please post all your emc file including the pncconf file.

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

More
18 Oct 2010 05:57 - 18 Oct 2010 05:58 #4734 by cmorley
Replied by cmorley on topic Re:spindle control
Good find John! pncconf Is giving the wrong axis number for Z axis.
I see the error in the code.
This will effect lathe configs.
Thanks.
Last edit: 18 Oct 2010 05:58 by cmorley.

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

Moderators: cmorley
Time to create page: 0.078 seconds
Powered by Kunena Forum