Index-Input instead of Index-enable signal

More
18 Aug 2022 21:36 #250039 by schachris
Hey guys! Im Chris, and completely new to LinuxCNC.I got a problem with my spindle.0.index-enable signal, and I couldn't find anything in the other topics, so im opening one.Currently im retrofitting a EMCO PCMILL 100, 7i76e card, using a servo spindle controlled via step/dir and via PID for the orient.The orient is used for the toolchange. The index signal is from a proximity sensor looking directly on the spindle. Its not the index from the servo encoder.The problem is, the index-enable is somehow not working, every time I do the orient M19 R0, the spindle stops at a different position.Maybe because the counts are not reseted? The only signal im getting in halshow is hm2_7i76e.0.encoder.00.input-index, this signal works like the index-enable should work, but it I can't connect this signal to the spindle.0.index-enable.Inputs a and b work just fine.Even if I connect the index signal from the servo encoder it doesn't work...I attachted my hal and ini files and a picture of the halshow signals.I don't know what to do anymore...hope someone can help me Thanks  
Attachments:

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

More
18 Aug 2022 23:02 - 18 Aug 2022 23:03 #250044 by PCW
The way index-enable works is that:

Index-enable is set by LinuxCNC or hal to enable a search
for index in the encoder hardware. When the hardware detects
the index, two things happen: 1 the encoder position is zeroed,
and 2, the encoder index enable pin is cleared, signalling to LinuxCNC
that  index has been detected and that the encoder position has been
cleared.

Not sure if orient will work unless you have the encoder geared 1:1
with the spindle.
Last edit: 18 Aug 2022 23:03 by PCW.
The following user(s) said Thank You: schachris

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

More
18 Aug 2022 23:59 #250046 by andypugh

Not sure if orient will work unless you have the encoder geared 1:1
with the spindle.

It should be fine as long as the index is 1:1 with the spindle (and he said that it is) and the scaling is set appropriately (ie, encoder counts x gear ratio)

The signal from the sensor needs to be wired (hardware) to the encoder pulse input on the 7i76E. 
Then spindle.0.index-enable needs to be connected (in HAL) to hm2_7i76.0.encoder.00.index-enable (note, I guessed that last pin name) 
 
The following user(s) said Thank You: arvidb, schachris

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

More
19 Aug 2022 00:39 - 19 Aug 2022 00:39 #250047 by PCW
Just wondering if the connection is geared or belt driven
so potentially has a somewhat indeterminate ratio.

I guess orient only goes one turn max after index so the
position error should be small
Last edit: 19 Aug 2022 00:39 by PCW. Reason: sp

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

More
19 Aug 2022 05:20 - 19 Aug 2022 05:22 #250054 by schachris
The hardware doesnt detect the index signal. Only the so called „input-index“ signal.

Index-enable signal isnt found neither with the index sensor on the spindle nor the index signals from the motor encoder.

Spindle is geared to the motor via belt. Ratio is 1,76470588.
Last edit: 19 Aug 2022 05:22 by schachris. Reason: spelling

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

More
19 Aug 2022 05:33 - 19 Aug 2022 05:37 #250055 by PCW
If input index is found, index enable will work.
A way to test this is to manually "sets" the signal for
index-enable true and then monitor index-enable,
it should get cleared when index is detected.
( This test can be done with halshow)

For spindle orient to work with index, you must have
something in the hal file that sets index-enable true
and does the home to index motion.

It's unfortunate LinuxCNC does not have spindle homing/rehoming
built-in.
Last edit: 19 Aug 2022 05:37 by PCW. Reason: clarify

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

More
19 Aug 2022 05:37 - 19 Aug 2022 05:38 #250056 by schachris
The sensor signal is connectet to the Z+ pin from the 7i76e.

In my custom_postgui.hal the connection looks like this:

net spindle-sync     spindle.0.index-enable  <=  [HMOT](CARD0).encoder.00.index-enable


But linuxcnc cant find the index signal. Neither from sensor nor from the encoder index signals.

Tried connecting the sensor to a input to check if it goes high if at the right position and it just works like it should.
 
Last edit: 19 Aug 2022 05:38 by schachris. Reason: spelling

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

More
19 Aug 2022 05:38 - 19 Aug 2022 05:57 #250057 by PCW
Index must go the encoder index pin on the 7I76E

Did you try manually setting spindle-sync true and then
seeing if it gets set false on index?

I think one basic issue is that you need something in the
hal file that sets spindle-sync true when you run an orient
cycle (the "sets spindle-sync 1" in the hal file only works
once at startup)
Last edit: 19 Aug 2022 05:57 by PCW.

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

More
19 Aug 2022 06:50 #250061 by schachris
Okay i will try this today and give you an update!

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

More
19 Aug 2022 19:34 #250085 by schachris
I forced the spindle-sync to true and then looked at the halshow. Like you said it got cleared when it passed the index.

How could i implement a „home to index motion“?

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

Time to create page: 0.113 seconds
Powered by Kunena Forum