- Posts: 60
- Thank you received: 0
Problem homing with index
5 years 3 months ago #214072
by Stigoe
Problem homing with index was created by Stigoe
Looking through the forum, I see I'm not the only one with homing problems... 
I have a converted benchtop lathe (same as PM1127-VF-LB) running PathPilot, currently v2.5.1, with stepper motors, 5i25, 7i76 and 7i85s.
I have homing working properly, but when I try to use the index pulse from my glass scales, that's when I run into problems.
My part of Z-axis from the .ini:
Here it will home to the switch and then back off it and stop, and all is good. Home is at the tailstock end.
When I try to use the index from the glass scale (index mark is closer to the spindle than the limit switch), there seem to be no rhyme nor reason to where it will eventually stop. Where it will stop can vary a fair bit between each time I restart PP, even without changing anything in the ini-file.
My part from the .ini for index-based homing:
I had it homing to almost where I wanted it with HOME_OFFSET = -0.650, but I wanted it about 1mm closer to the tailstock, so I changed HOME_OFFSET to -0.700. Now it moved about 5-6mm too far and hit my hard stop. Put HOME_OFFSET back to -0.650 and it stopped 10-15mm short of where it should stop. I restart PP between each time I change the .ini-file.
I have a converted benchtop lathe (same as PM1127-VF-LB) running PathPilot, currently v2.5.1, with stepper motors, 5i25, 7i76 and 7i85s.
I have homing working properly, but when I try to use the index pulse from my glass scales, that's when I run into problems.
My part of Z-axis from the .ini:
Code:
MIN_LIMIT = -18.45
MAX_LIMIT = 0.000001
HOME_OFFSET = 0.025
HOME_SEARCH_VEL = 0.750
HOME_LATCH_VEL = 0.050
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
Here it will home to the switch and then back off it and stop, and all is good. Home is at the tailstock end.
When I try to use the index from the glass scale (index mark is closer to the spindle than the limit switch), there seem to be no rhyme nor reason to where it will eventually stop. Where it will stop can vary a fair bit between each time I restart PP, even without changing anything in the ini-file.
My part from the .ini for index-based homing:
Code:
MIN_LIMIT = -18.45
MAX_LIMIT = 0.000001
HOME_OFFSET = -0.680
HOME_SEARCH_VEL = 0.750
HOME_LATCH_VEL = -0.100
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
HOME_USE_INDEX = YES
HOME_FINAL_VEL = 0.2
I had it homing to almost where I wanted it with HOME_OFFSET = -0.650, but I wanted it about 1mm closer to the tailstock, so I changed HOME_OFFSET to -0.700. Now it moved about 5-6mm too far and hit my hard stop. Put HOME_OFFSET back to -0.650 and it stopped 10-15mm short of where it should stop. I restart PP between each time I change the .ini-file.
Please Log in to join the conversation.
5 years 3 months ago #214094
by andypugh
Replied by andypugh on topic Problem homing with index
What is the index pulse wired to? Presumably to the encoder index?
Are you sure that there is only one index?
Is joint.N.index-enable connected to the encoder.M.index-enable pin in HAL?
Please attach your HAL file.
Are you sure that there is only one index?
Is joint.N.index-enable connected to the encoder.M.index-enable pin in HAL?
Please attach your HAL file.
Please Log in to join the conversation.
5 years 3 months ago #214106
by Stigoe
Yes, the index is connected to the encoder index input in HAL
The glass scales have index marks every 50 or 100mm, according to the datasheet. On my X-axis scale (5um) it looks like it is every 100mm. On my Z-axis (1um), I'm not sure, it doesn't move very far before it hits the index mark.
My HAL-file is an altered version of the PP file, so it's a bit of a mess, with a lot of commented out parts. Makes it easier to find what I have altered when upgrading to a later version instead of making it a highly optimized file...
Another thing, I have changed num_encoders=2 to num_encoders=5 in the ini-file to include the encoders from the 7i85s, so I have encoder00 to encoder04, but both encoder00 and encoder01 show the same (spindle rotations). Should I change to num_encoder=6? Why was it num_encoder=2 earlier, when 7i76 only have one encoder input?
TiA,
Stig
Replied by Stigoe on topic Problem homing with index
Hi, Andy.What is the index pulse wired to? Presumably to the encoder index?
Are you sure that there is only one index?
Is joint.N.index-enable connected to the encoder.M.index-enable pin in HAL?
Please attach your HAL file.
Yes, the index is connected to the encoder index input in HAL
Code:
net xindex-enable axis.0.index-enable <=> hm2_5i25.0.encoder.02.index-enable
net zindex-enable axis.2.index-enable <=> hm2_5i25.0.encoder.03.index-enable
My HAL-file is an altered version of the PP file, so it's a bit of a mess, with a lot of commented out parts. Makes it easier to find what I have altered when upgrading to a later version instead of making it a highly optimized file...
Another thing, I have changed num_encoders=2 to num_encoders=5 in the ini-file to include the encoders from the 7i85s, so I have encoder00 to encoder04, but both encoder00 and encoder01 show the same (spindle rotations). Should I change to num_encoder=6? Why was it num_encoder=2 earlier, when 7i76 only have one encoder input?
TiA,
Stig
Please Log in to join the conversation.
5 years 3 months ago #214112
by andypugh
Replied by andypugh on topic Problem homing with index
To test the index pulses:
(assuming that PP isn't _too_ different from LinuxCNC.)
Open a terminal
halcmd loadusr halmeter
Then set the halmeter to look at the zindex-enable signal.
Then
halcmd sets zindex-enable 1
Though change the value in the halmeter
Then jog past an index, you should see the halmeter switch to false.
(assuming that PP isn't _too_ different from LinuxCNC.)
Open a terminal
halcmd loadusr halmeter
Then set the halmeter to look at the zindex-enable signal.
Then
halcmd sets zindex-enable 1
Though change the value in the halmeter
Then jog past an index, you should see the halmeter switch to false.
Please Log in to join the conversation.
5 years 3 months ago #214120
by PCW
Replied by PCW on topic Problem homing with index
On a 7I76 with firmware for 7I75/7I85S, multiplexed encoders are used ,
this causes the (non multiplexed) spindle encoder on the 7I76 to have an aliased encoder.
Its not harmful.
Is it possible you have a noise issue? This could cause apparent random index locations
You can test this by setting index enable as Andy suggested and seeing if it ever
gets reset spontaneously (that is, when not actually at the index location)
this causes the (non multiplexed) spindle encoder on the 7I76 to have an aliased encoder.
Its not harmful.
Is it possible you have a noise issue? This could cause apparent random index locations
You can test this by setting index enable as Andy suggested and seeing if it ever
gets reset spontaneously (that is, when not actually at the index location)
Please Log in to join the conversation.
5 years 3 months ago #214128
by Stigoe
Replied by Stigoe on topic Problem homing with index
PathPilot seems to be slightly different from vanilla LinuxCNC, as I couldn't use your halcmd, but when I had started PP, I could do ADMIN HALMETER and ADMIN HALSHOW, where I could run HAL commands. zindex-enable switched to false when passing the index mark. Index marks are every 100mm on Z-axis scale, same as on X-axis scale.To test the index pulses:
(assuming that PP isn't _too_ different from LinuxCNC.)
Open a terminal
halcmd loadusr halmeter
Then set the halmeter to look at the zindex-enable signal.
Then
halcmd sets zindex-enable 1
Though change the value in the halmeter
Then jog past an index, you should see the halmeter switch to false.
Tried jogging back and forth several times between two index marks. zindex-enable stayed true the whole time. The glass scale cable is metal-wrapped and the shield is grounded, but my electrical cabinet is made out of wood instead of steel. Don't know if that could cause any problems.Is it possible you have a noise issue? This could cause apparent random index locations
You can test this by setting index enable as Andy suggested and seeing if it ever
gets reset spontaneously (that is, when not actually at the index location)
Please Log in to join the conversation.
5 years 3 months ago #214148
by PCW
Replied by PCW on topic Problem homing with index
OK backing up a bit, Are you using the step motor drives in a closed loop
with encoder feedback?
with encoder feedback?
Please Log in to join the conversation.
5 years 3 months ago #214160
by Stigoe
Replied by Stigoe on topic Problem homing with index
Not yet. That is the plan later, but now it's just getting homing working properly. I'm using Chinese inductive switches and since they are not incredibly accurate, I wanted to use the index marks in the scales to get more accurate homing.
Please Log in to join the conversation.
5 years 3 months ago #214178
by PCW
Replied by PCW on topic Problem homing with index
LinuxCNC expects the joint position feedback to be zero'ed
at index detection. The standard stepgen does not do this
(it has no connection with index at all) So homing to index on a
step/dir system does not currently work unless you use encoder
feedback. There is new firmware and support in LinuxCNC 2.9
for homing to index on pure step/dir systems if you want to try
it. This does require a direct input for the stepgen index though
it can be shared with an encoder index say on a 7I85/7I85S
at index detection. The standard stepgen does not do this
(it has no connection with index at all) So homing to index on a
step/dir system does not currently work unless you use encoder
feedback. There is new firmware and support in LinuxCNC 2.9
for homing to index on pure step/dir systems if you want to try
it. This does require a direct input for the stepgen index though
it can be shared with an encoder index say on a 7I85/7I85S
Please Log in to join the conversation.
5 years 3 months ago #214181
by Stigoe
Replied by Stigoe on topic Problem homing with index
So if I want to use encoder feedback, I need to set up PID and tune it before homing to index will work? Trying the new firmware and LinuxCNC 2.9 would probably not play nice with PP, I guess? At least, not without a lot for work? I think PP is based on an early version of 2.8.
Please Log in to join the conversation.
Time to create page: 0.917 seconds
