- Posts: 18
- Thank you received: 0
probe basic lath to define a net spindle-index-en spindle.0.index-enable
7 months 5 days ago #344744
by leexi
hi, I am using a absolute multiturn spindle encoder , it is working but I need to simulate de Z index for G33 and G76
so I define the follow net
net spindle-index-en and2.2.out => spindle.0.index-enable
but always say spindle-index-en and after some test I found spindle.0.index-enable it is already linked
So I delete may hal and leave just basic things like lcec etc.. basic to make my ethercat network working
but any way say the signal is already linked, I made allot names changes and this has the same result
on ini file I have only a call to this hal file.
after I comment the net line and run the linuxcnc
On hal show I look for the linked spindle.0.index-enable, and I can toggle the input spindle.0.index-enable
on bash I look for the variable
[/code]
so I define the follow net
net spindle-index-en and2.2.out => spindle.0.index-enable
but always say spindle-index-en and after some test I found spindle.0.index-enable it is already linked
So I delete may hal and leave just basic things like lcec etc.. basic to make my ethercat network working
but any way say the signal is already linked, I made allot names changes and this has the same result
on ini file I have only a call to this hal file.
after I comment the net line and run the linuxcnc
On hal show I look for the linked spindle.0.index-enable, and I can toggle the input spindle.0.index-enable
on bash I look for the variable
Code:
halcmd show pin spindle.0.index-enable
at moment the linuxcnc probe basic stance running, there is not link result.
so mean that input is not linked jet, but after I close the linuxcnc instance and remove the comment the net on hal file I get the same error,
spindle.0.index-enable already liked
I been using probe basic GUI for lathe. i found that you can simulate the spindle feedback or use the encoder feed back, is this option can declare this spindle input?
as additional comment I have the encoder count working and can calculate the right speed test as tested whit tachometer and it is really precise , so I can control the spindle position [code]net spindle-revs-raw rev_scale.out => motion.spindle-0-revs
but not
net spindle-index-en and2.2.out => spindle.0.index-enable
Any advice
Please Log in to join the conversation.
7 months 1 day ago #344945
by andypugh
Replied by andypugh on topic probe basic lath to define a net spindle-index-en spindle.0.index-enable
You don't say what the inputs to and2.2 are. That is probably important.
A problem you will have is that spindle.0.index-enable is a bidirectional HAL pin, so can't be directly connected to the output of an and2 block.
You can probably work around this with linuxcnc.org/docs/stable/html/man/man9/tristate_bit.9.html
But, are you sure that your spindle encoder driver doesn't offer e direct, bidirectional, index-enable pin?
There is an example of an index-simulator HAL component here:
forum.linuxcnc.org/24-hal-components/388...ation?start=0#223508
It's written for a stepper spindle, but should work just as well (or just as badly) for an absolute encoder assuming that the encoder has an integer "counts" output.
I was going to suggest watching one bit of the binary counts value and tristate-bit. But that wouldn't zero the counts on index.
There _is_ a way to do it with a sample-hold to capture the counts at index, then subtracting that from the raw counts, that would need a bitslice, mux_generic (set up for signed int), edge, and tristate-bit HAL component.
It's do-able but at that point the custom HAL component makes more sense.
A problem you will have is that spindle.0.index-enable is a bidirectional HAL pin, so can't be directly connected to the output of an and2 block.
You can probably work around this with linuxcnc.org/docs/stable/html/man/man9/tristate_bit.9.html
But, are you sure that your spindle encoder driver doesn't offer e direct, bidirectional, index-enable pin?
There is an example of an index-simulator HAL component here:
forum.linuxcnc.org/24-hal-components/388...ation?start=0#223508
It's written for a stepper spindle, but should work just as well (or just as badly) for an absolute encoder assuming that the encoder has an integer "counts" output.
I was going to suggest watching one bit of the binary counts value and tristate-bit. But that wouldn't zero the counts on index.
There _is_ a way to do it with a sample-hold to capture the counts at index, then subtracting that from the raw counts, that would need a bitslice, mux_generic (set up for signed int), edge, and tristate-bit HAL component.
It's do-able but at that point the custom HAL component makes more sense.
Please Log in to join the conversation.
6 months 2 weeks ago #345421
by leexi
Replied by leexi on topic probe basic lath to define a net spindle-index-en spindle.0.index-enable
Dear andypuch
tristate_bit fix it.
thank you,
tristate_bit fix it.
thank you,
Please Log in to join the conversation.
6 months 2 weeks ago #345422
by leexi
Replied by leexi on topic probe basic lath to define a net spindle-index-en spindle.0.index-enable
net simulation-Zindex near.0.out => and2.0.in0
setp and2.0.in1 1
net index-logic-ok and2.0.out => tristate_bit.0.in
net spindle-index-en tristate_bit.0.out <=> spindle.0.index-enable
net spindle-index-en => tristate_bit.0.out-en
tested and works
setp and2.0.in1 1
net index-logic-ok and2.0.out => tristate_bit.0.in
net spindle-index-en tristate_bit.0.out <=> spindle.0.index-enable
net spindle-index-en => tristate_bit.0.out-en
tested and works
Please Log in to join the conversation.
6 months 2 weeks ago #345434
by leexi
Replied by leexi on topic probe basic lath to define a net spindle-index-en spindle.0.index-enable
Dear
I think there are some opportunities in absolute encoders field with low information output as the one that I have.
with only encoder counts in a multi-turn format s32 and encoder spins counter as well as multi-turn format s32.
I make it works but I need to spend some time testing it. but G33 and G76 are working with ethercat absolute encoder as spindle speed and position feedback , and some spontaneous axis following error to debug. ( jitter ? i do not know ).
Thank you.
I think there are some opportunities in absolute encoders field with low information output as the one that I have.
with only encoder counts in a multi-turn format s32 and encoder spins counter as well as multi-turn format s32.
I make it works but I need to spend some time testing it. but G33 and G76 are working with ethercat absolute encoder as spindle speed and position feedback , and some spontaneous axis following error to debug. ( jitter ? i do not know ).
Thank you.
Please Log in to join the conversation.
Time to create page: 0.081 seconds
