Strange Behaviour of orient component G33 works ,.

More
28 May 2015 17:27 #59149 by andypugh

hi now i ue the gm encoder wors perfect ,.. i kan do G33.1 perfect but at orientation it does stop an unpredictable positions (it looks like AMT102V is doing 4 times the index per rev but this isnt true ) so after i do M19 R0 i have index anable on when i turn spindle by hand somewher the counts are reseted then (wher i thought first the index is ) but this position is always somewhere else ,..


Is the encoder geared 1:1 with the spindle?

Which version of LinuxCNC are you using?
If you are using 2.7 you can manually set the encoder index-enable with www.linuxcnc.org/docs/2.7/html/man/man1/sim_pin.1.html, otherwise it is a little more difficult.

Assuming you are not using 2.7:
open a terminal with LinuxCNC running and type
halcmd -kf
loadusr halmeter sig spindle-index-enable
loadusr halmeter pin gm.0.encoder.4.position
sets spindle-index-enable 1

Rotate the spindle by hand and check that the position increases by exactly 1.0 per revolution. At some point you will see the position go to zero. when that happens "sets spindle-index-enable 1" again and see if the position is zeroed in the same place next time round.
It is possible that you might not be able to sets spindle-index-enable without "unlinkp motion.spindle-index-enable" but I think it should be OK.
The following user(s) said Thank You: tkamsker

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

More
01 Jun 2015 19:27 #59303 by tkamsker
Hi ,
no i use an 2.6.x no 2.7 so far.
Today morning i changed the encoder used an oscilloscope to make sure the X comes through and it seems that with the new encoder it works much better then with the old one.
(but then i had to head for my day job ) i now think that i have had 2 overlapping problems with my hal and andys suggestion

it looks like that in orient-pid the saturation is not working properly

when i read the explanation of orient component which is calculating the desired value how das the orient-pid command the turn direction ?
it looks like i need to go with one direction that may be the case when left turn is assumed but right turn happens the target and should values will never meet isn't it ?

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

More
01 Jun 2015 20:33 #59308 by andypugh

when i read the explanation of orient component which is calculating the desired value how das the orient-pid command the turn direction ?
it looks like i need to go with one direction that may be the case when left turn is assumed but right turn happens the target and should values will never meet isn't it ?


Does your spindle encoder count up in one direction and down in the other?
Does a negative output from the PID rotate the spindle in the opposite direction to a PID output that is positive?
Do the PID and the encoder agree about which direction is positive?

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

More
02 Jun 2015 14:20 #59332 by tkamsker
hi andy i now found what happened ,.. the spindle to encoder has an 1,85 reduction means encoder turns faster
so system works as designed my bad .. that is why if i use index from encoder the position moves ,.. i have almost 2 times index per revolution
i am now thinking of using cleaar mimic the index-enabled stuff ,...

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

More
02 Jun 2015 16:15 #59335 by andypugh

i am now thinking of using cleaar mimic the index-enabled stuff ,...


That's awkward. The best solution is probably to ignore the index on the actual encoder and set up a sensor of some sort to pick up a keyway or similar on the spindle, and wire that back to the controller as the index pulse.
The following user(s) said Thank You: tkamsker

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

More
10 Jun 2015 23:14 #59676 by tkamsker
Hi i now have it almost working
i got the G33.1 working to me it is not clear on which signal it reacts it looks like it uses motion.sindle-index-enable as start but waits for some positions before it starts to do its thing ,..
the orient stuff is similar it uses the index enable for zeroing ant then start to orient in positions in my case the problem is because the spindle turns the encoder 1,8 times i almost got more than one index per revolution which leads to funny behavior so i mimic now the encoder behavior with my old hall sensor which is really connected to the spindle
so the encoder uses the axis for fast position and counting and if orient is yes index enable is yes i di an encoder reset this works fine
i also have managed that i exactly have position = 1 after 1 revolution ,..
but problem, is my hall sensor is an sick M12 so it is 0,22 positions wide ,..

i think that my problems arise because i do the stuff when the index gets on but it still changes positions till it leaves the hall sensor zone
Whatever if anyone has an idea how to best mimic the encoder index-enable behavior by an wide sensor i would be very interested ,..
thx
thomas k

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

More
11 Jun 2015 17:13 #59697 by ArcEye
Hi Thomas

If it is of any use to you, I have made sensors of various field widths, by a quite simple construction.

I bore out a piece of M10 studding ( could be larger, but that is minimum).
The hall sensor with resistor soldered in place and wired up, is encased in heat shrink.
Then insert the package into the bored out studding.

The distance the sensor is from the top of the studding determines the field width.
Down 12mm from the top effectively narrows it down to the width of the bored out opening, right at the top gives quite a spread either side.

When happy, pot it in place with epoxy resin for a coolant proof sensor which you can adjust in and out on the external threads.

I use 4 of these on my large mill, 3 for home switches and 1 for spindle index.

regards

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

More
11 Jun 2015 17:26 #59698 by tkamsker
Hi,
that sounds interesting (maybe for the endstopps ) but i now know where the problem is
to fix it it is a little more difficult

but tuesday i have next try
thx
thomas

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

More
12 Jun 2015 02:46 #59721 by andypugh

my hall sensor is an sick M12 so it is 0,22 positions wide


That shouldn't matter. The index will trigger on the same rising edge every time.

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

More
23 Jun 2015 21:16 #60090 by tkamsker
Hi,
i now have it working to 50% of the time my question is there an situation
where the motion.orient goes true without any given command just for fun ?
to compensate all the problems of the machine i have written an workaround component
which simply suppresses index-enable for orient (i use the orient comp and the near function and
does special handling for index -enable for G33.1

but if i set index-enable and watch the pin after 10-30 seconds it changes to false ,... and i don't have an explanation for that.
My workaround component has the function to compensate the M12 Index pin / revolution means if index-anable = true and Index pin = true i set an marker
if the index-pin goes false and the marker was true i do a reset (basically when the Index pin goes from True to false falling edge) then irt resets the count to 0
this works for G33.1 and M19
but because of the situation that index.enable doesn't stay true if you put it true (even if nothing is moving in the machine ) sometimes i goes on false an then my index pin is not where it used to be and M19 gives wrong result (unpredictable )
maybe i am now "betriebsblind" (Sorry no proper translation for my english skills ;)- dict.leo.org/ende/index_en.html#/search=...ltiwordShowSingle=on )

so if anyone does have an hint or something i should try i will give it a go i soon run out of ideas ,...
One of the problems is that the old trafo and electronics we left in the machines does produce some electric noise which gives some funny results in speed but sufficient ok for our needs ,..

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

Time to create page: 0.104 seconds
Powered by Kunena Forum