Encoder Index

More
5 years 11 months ago #190101 by Stigoe
Encoder Index was created by Stigoe
Hi, all.

I'm running PP 2.5.1 on a modified WM290 (same as PM1127VF-LB) and I tried to do threading for the first time yesterday, but it just stops on the threading line. My suspicion is that it is waiting for the index signal. I've tried to check that the index signal is coming in using Halscope and to me it looks to come in as it should. Another possibility is that the index signal is wrong polarity. What polarity is the index signal supposed to be? Mine is active low (the Index led on the Status page is lit all the time). Could this be the problem?

From a post by PCW in the thread about fitting an encoder to a 1100 ( Link ) it seems the index signal is active high. It also says to check that the index signal is working by doing "halcmd sets index_enable" and rotating the spindle to see if it clears. Some handholding on how to do this?

Br,
Stig

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

More
5 years 11 months ago - 5 years 11 months ago #190118 by PCW
Replied by PCW on topic Encoder Index
With Mesa hardware the index polarity doesn't matter (its edge triggered)
You can change the polarity in hal but this will only change which edge
is active.

To know which signal you need to "sets" you would need to look at your hal file
and see which signal the low level hardware index pin is "net"ed to.

The you would run halcmd (not sure how you do this on PP) and halshow
to sets and watch this signal on a running PP system.
Last edit: 5 years 11 months ago by PCW.

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

More
5 years 11 months ago #190125 by Stigoe
Replied by Stigoe on topic Encoder Index
Thanks, PCW.

This is the encoder part of my .hal-file:
Code:
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.scale [SPINDLE]ENCODER_SCALE setp hm2_[HOSTMOT2](BOARD).0.encoder.00.counter-mode 0 # see 'man hostmot2' for descriptions setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-mask 0 net spindle-position hm2_[HOSTMOT2](BOARD).0.encoder.00.position => motion.spindle-revs net spindle-raw-velocity hm2_[HOSTMOT2](BOARD).0.encoder.00.velocity => motion.spindle-speed-in lowpass.0.in net spindle-velocity lowpass.0.out net spindle-index-enable hm2_[HOSTMOT2](BOARD).0.encoder.00.index-enable <=> motion.spindle-index-enable # note: gpio pins only read at servo thread frequency # these nodes are only for driving diagnostic "LEDs" in the UI # this is only going to be useful when the spindle is rotated by hand slowly net spindle-phase-A hm2_[HOSTMOT2](BOARD).0.gpio.016.in net spindle-phase-B hm2_[HOSTMOT2](BOARD).0.gpio.015.in net spindle-phase-Z hm2_[HOSTMOT2](BOARD).0.gpio.014.in_not net spindle-encoder-count hm2_[HOSTMOT2](BOARD).0.encoder.00.count

So I guess I would need to sets spindle-index-enable? Or would it be motion.spindle-index-enable?

I tried halcmd in a terminal, but the command was unknown. I found it in operator/tmc/bin. When I tried ./halcmd on spindle-index-enable, it complained about needing 2 arguments, while only 1 was given. Tried with "./halcmd sets spindle-index-enable 1", which worked, and when I checked both in halshow, they were both high and turned low after I had rotated the spindle some.

Any idea what to check next?

Br,
Stig

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

More
5 years 11 months ago #190152 by snowgoer540
Replied by snowgoer540 on topic Encoder Index
Did you see this post: forum.linuxcnc.org/pathpilot/34005-fitti...1100?start=60#166309

Clive basically laid out all the changes that need to happen to make this work. I am sure you can adapt it around what you've done...
The following user(s) said Thank You: Clive S

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

More
5 years 11 months ago #190164 by PCW
Replied by PCW on topic Encoder Index
OK so that indicates that index works.

Another possibility is that you don't have a valid spindle at speed signal

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

More
5 years 11 months ago #190187 by smgvbest
Replied by smgvbest on topic Encoder Index
I believe a ADMIN HALCMD ... will work from the MDI
for HALSHOW there are instructions for this one in the forum but I recall Tormach may have fixed this and it works now. I'm not where I can test and be sure but you can try ADMIN HALSHOW and see if it works

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

Time to create page: 0.154 seconds
Powered by Kunena Forum