Spindle index

More
19 Jul 2017 19:45 #96097 by russkinch
Replied by russkinch on topic Spindle index
I think hal scope is running in base thread but I will check in morning. I did manage to get a square sign but that was using phase-b. I did not a few things before I left work in case they make sense to you:
encoder.0.counts is at 11447 and increases when I turn chuck by hand
encoder.0.counts-latched is -437
encoder.0.index-enabled is always false
encode.0.position is at 255.0667 and increases when I turn the chuck by hand. However, I thought 1 revolution would be 360 however it increases only by about 7 in one full revolution.
encoder.0.position-latched is -9.711111
encoder.0.position-rawcounts is at 11915

i tried M3 and M4 but no difference. I have changed all the O words that I got of this site to M4 from M3 as my chuck is not a backtool and my chuck turns anti-clockwise

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

More
19 Jul 2017 21:43 #96105 by andypugh
Replied by andypugh on topic Spindle index

I think hal scope is running in base thread but I will check in morning. I did manage to get a square sign but that was using phase-b

Do you mean the phase-b signal, the B-phase parallel port pin or the encoder.0.phase-b pin?



[quote[encoder.0.counts is at 11447 and increases when I turn chuck by hand[/quote]If you have encoder.0.phase-a connected to the parallel port A-phase pin then that means that the scale is correct _and_ that the A-phase opto is working.
But you seem to be saying elsewhere that none of this is true?

encoder.0.index-enabled is always false

It will be unless motion sets it to true prior to a threading pass. You can set it to true if you want, then see if it goes false. (in a terminal, halcmd sets index-enable true)

encode.0.position is at 255.0667 and increases when I turn the chuck by hand. However, I thought 1 revolution would be 360 however it increases only by about 7 in one full revolution.

It should increase by 1 for a full revolution, if the encoder scale is set correctly.

i tried M3 and M4 but no difference. I have changed all the O words that I got of this site to M4 from M3 as my chuck is not a backtool and my chuck turns anti-clockwise

M3 turns the chuck anticlockwise on a front-toolpost lathe. The reason that M3 M4 makes no difference is because you are using the "abs" version of spindle speed. Do you have any sort of spindle-reverse configured?

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

More
20 Jul 2017 18:04 #96156 by russkinch
Replied by russkinch on topic Spindle index
Ok....yay!!!! I am making progress. After reading a lot of what you said and also pages and pages of goole I found that my encoder.0.position-scale was set correct to 45 (number of slots) but my custom_postgui lowpass.0.gain was set to 0.001. I changed this to 1 and I get a nice square wave form. I can also thread cut!! But I think the optocoupler is very slow as the maximum speed I can thread at is 285RPM, after that the motors make some funky noises and the RPM display becomes erratic. Can to tell me what I need to buy to make one of the readers that you use. I can get the sensor for RS component, I can also get the diodes etc from maplin down the road. Anything else?

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

More
20 Jul 2017 18:17 #96157 by andypugh
Replied by andypugh on topic Spindle index
In the HAL file you posted the lowpass wasn't even used. And that should have _absolutely_ no effect on the A-phase signal.

Unless... Please tell me you are not lowpass-filtering the encoder pulses?

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

More
20 Jul 2017 18:53 #96163 by russkinch
Replied by russkinch on topic Spindle index
um... I actually have no idea as I just used the stepconf to generate the hal file. What should I look for to comment out or delete. The lowpass is in the custompost hal file

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

More
20 Jul 2017 19:32 #96169 by andypugh
Replied by andypugh on topic Spindle index
Can we see that file?

I am completely baffled, as you seem to be saying that you have no A-phase but the encoder still counts.

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

More
20 Jul 2017 20:15 #96175 by russkinch
Replied by russkinch on topic Spindle index
Sorry. I think there is some confusion. I wrote the hal file like you said, uncommenting the phase-a and phase-b. I made sure the encode.0.position-scale was set at 45 like my wheel. I then checked the custom_postgui.hal file and found a line that says setp lowpass.0.gain. This was set at 0.001 and I change it to 1. I now have a square sign on the hal scope for both phase-a and index, but phase-a terminates at 285RPM and goes to 0. Should I maybe create a whole new stepconf for my lathe and see if it makes any difference. I am using axis with pyngcgui (containing the sub routines from here)

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

More
26 Jul 2017 11:48 #96459 by andypugh
Replied by andypugh on topic Spindle index
What does the lowpass filter filter?

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

More
07 Aug 2017 16:42 #97111 by russkinch
Replied by russkinch on topic Spindle index
To be perfectly honest, I have no idea. Its what the stepconf automatically writes when I go through all the processes. I can screw cut. Just at 275RPM. Not ideal speed for steel but mainly doing ali at moment. I wonder if maybe the sensor cant read fast enough. Maybe I should make one like you made and see if its any better??

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

More
07 Aug 2017 17:08 #97114 by andypugh
Replied by andypugh on topic Spindle index

To be perfectly honest, I have no idea. Its what the stepconf automatically writes when I go through all the processes. I can screw cut. Just at 275RPM. Not ideal speed for steel but mainly doing ali at moment. I wonder if maybe the sensor cant read fast enough. Maybe I should make one like you made and see if its any better??


It could be a slow (or heavily debounced) sensor. It could be a slow break-out board. An oscilloscope is the only way to be sure, I think.

There are filter caps on the sensor board, IIRC. You could try shorting across them to see what happens.

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

Time to create page: 0.126 seconds
Powered by Kunena Forum