Index pulses

More
27 Oct 2020 22:14 #187481 by lrak
Config dump was created by lrak
I am debugging homing - there are several bits that have default values in ini. So I was looking for a way to dump the ini values as seen by the running program?

I found linuxcnc_info - didn't do anything? (I have an editor configured).

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

More
27 Oct 2020 22:38 #187483 by PCW
Replied by PCW on topic Config dump
halcmd show all ini.

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

More
28 Oct 2020 17:31 #187592 by lrak
Replied by lrak on topic Index pulses
I was exploring the index pulse - I set x-index-enable true - set up to watch it. Jogging found that the index marks are 50mm apart.

Once it hits the pulse, it sets x-index-enable back to false and I get an error (probably sets the count to zero - messing things up?).

In my mind, the index pulse should/could be used as sort of a check - if Z doesn't happen when we expect it, could be something is wrong with the scales, noise etc. I wonder if I could write something in HAL to test the scale hardware?

In the generated setup I found
net x-index-enable <=> pid.x.index-enable
setp hm2_7i93.0.encoder.01.index-mask 0
setp hm2_7i93.0.encoder.01.index-mask-invert 0
net x-index-enable joint.0.index-enable <=> hm2_7i93.0.encoder.01.index-enable

Can't find anything on index-mask - I'm guessing it prevents index-enable from zeroing the counter?

Most of the info I've found is in the encoder man-page bits here and there in the forum..

,..
Eventually, I will have that spindle encoder set up and there the Z indexes one rev - and would match up with A/B every 7 revs - so I will eventually need to understand this.

No shortage of things to absorb here - impressive software.

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

More
28 Oct 2020 17:58 - 28 Oct 2020 18:02 #187595 by PCW
Replied by PCW on topic Index pulses
Index mask is a hardware input that masks the index input signal
Its not typically available in standard firmware but can be used
to mask the index on spindle hardware that has multiple index
pulses per revolution

If you set index enable and an index is detected, the encoder
position is cleared. When LinuxCNC sets index enable it expects
this behavior so it clears the commanded position at the same time
so a following error is not generated.

Ideally index should work differently, it should always be detected
and only affect upper layer offsets and not the low level motor
command and feedback positions. The PID component already has
a kludgey workaround for the step in commanded and feedback positions
when index is detected. Another benefit of always detecting index
(As you mentioned) is its use as a sanity check of the encoder count.

The reason for the current behavior is historical. Many older encoder counters
only had the option to clear the encoder count on index rather than
latch the count.
Last edit: 28 Oct 2020 18:02 by PCW. Reason: clarify
The following user(s) said Thank You: lrak

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

More
27 Feb 2023 02:40 #265470 by lrak
Replied by lrak on topic Index pulses
Time to revive this - from hostmot2 docs
bit r/w) index-invert 
If set to True, the rising edge of the Index input pin triggers the Index event (if index-enable is True).
If set to False, the falling edge triggers.
(bit r/w) index-mask 
If set to True, the Index input pin only has an effect if the Index-Mask input pin is True (or False, depending on the index-mask-invert pin below).
(bit r/w) index-mask-invert  
If set to True, Index-Mask must be False for Index to have an effect. If set to False, the Index-Mask pin must be True.

First - the docs should probably have the defaults: All three default to false.
Next - A mask being true would normally block the event - yet I'm reading this backwards?

I suggest adding a truth table to the docs for clarity for these three inputs.

I have the index-enable connected to motion's spindle index-enable .

So testing with M19 - I never get a index-enable signal?If I disconnect the net and do it manually, I see the expected clearing of position.

I don't really need m19 - but started with it for testing.
For
s50 m3
g33.1 z-10 k1

I do get the index-enable signal - clearing of position - but never get Z motion?
I'm probably missing something simple.







 

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

More
27 Feb 2023 02:44 - 27 Feb 2023 05:51 #265471 by lrak
Replied by lrak on topic Index pulses
Not able to attach svg file - so here is a png
Attachments:
Last edit: 27 Feb 2023 05:51 by lrak. Reason: updated png

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

More
27 Feb 2023 03:03 #265475 by PCW
Replied by PCW on topic Index pulses
g33 will hang if spindle-at-speed is not true
or the spindle encoder position scaling is backwards
The following user(s) said Thank You: lrak

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

More
27 Feb 2023 08:01 #265487 by lrak
Replied by lrak on topic Index pulses
I was missing spindle.0.speed-in

Never got M19 to work??
I don't see the signal index-enable happen with M19? I do see it with G33.1

Seems like index-enable has to happen for M19 to work. I think the signal would originate from the motion's spindle end - but isn't happening.

LinuxCNC ver 2.8.2

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

More
27 Feb 2023 16:17 #265506 by PCW
Replied by PCW on topic Index pulses
Yes, m19 does not affect index enable, I think for orient you need to:
1. Use the orient component
2. Have previously homed the spindle to index at some point
(setting index enable true and spinning the spindle will do)

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

More
27 Feb 2023 22:13 #265522 by lrak
Replied by lrak on topic Index pulses
I have it all connected (see the png above). I've done what you are talking about - it wants to unwind all the turns from after the spindle homing..

Doing a g33.1 should home the spindle.

I would say that m19 is broken as is - it should have a requirement to home and some way to ignore the full turns (what would work would be to reset position with a homing event.).

I've done more than a few searches - never saw confirmation where someone had it working? If I'm wrong - please post here.

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

Time to create page: 0.100 seconds
Powered by Kunena Forum