1 Attachment(s)
KFLOP Stepper Motor Encoder Set up
Hi Tom
After getting my Kstep/Kflop working fine a few months ago with external jog buttons and being away with work for 3 months in the US . I have decided to get the Kanalog connected after a few hiccups with which bits the step/dir controls are through JP5/JP26 connectors it is all working now as it was before adding the Kanalog
i have now added a 200 PPR optical encoder to Channel 0 but i am not sure how to set up the counts , i know it is the channel input gain setting and i have read posts that show the command and position traces on top of each other but i cant seem to achieve this . see attached picture
Also i cannot untick the output boxes on the digital I/O screen for bit 2 and 3 ( i have probably set it as an output somewhere by mistake )
Regards
Sean
Re: KFLOP Stepper Motor Encoder Set up
Hi Sean,
It looks like the plots would overlay if you zeroed both the command and encoder position before the move so they both started at zero.
I think you have
KStepPresent=TRUE; // enable KSTEP input multiplexing
still set in your INIT Program which tells KFLOP to use bits 2 and 3 to control the multiplexing of the 16 KStep Opto inputs. Remove that and re-boot KFLOP.
HTH
Re: KFLOP Stepper Motor Encoder Set up
Hi Tom
Thank you for your speedy reply , zeroed the plots and overlayed perfectly
i have commented out the ,
KStepPresent=TRUE; // enable KSTEP input multiplexing
saved the file and rebooted
But channel 2 and 3 are still ticked ,if i click on them the tick disappears for a millisecond then re-enables as an output
Thank you so much for your help
Sean
Re: KFLOP Stepper Motor Encoder Set up
Hi Sean,
Maybe you Flashed KStepPresent into KFLOP. Reset KFLOP to its default state by re-Flashing New Version.
HTH
1 Attachment(s)
Re: KFLOP Stepper Motor Encoder Set up
Hi Tom
Thank you ,that was the problem have re-flashed new version and can no set 2 and 3 as inputs
I have attached encoder output trace from channel 0 (x axis) if you wouldn't mind having a look to see if i'm on the right track as i'm not 100% sure what i am looking at :-)
Sean
Re: KFLOP Stepper Motor Encoder Set up
Join the Illuminati official of wealth and powers fame and protection and get rich from generations to generations. interested contact us on WhatsApp +14305583146
Join the illuminati brotherhood secret society
Join the Illuminati official of wealth and powers fame and protection and get rich from generations to generations. interested contact us on WhatsApp +14305583146
Join the illuminati brotherhood secret society USA
Join the Illuminati official of wealth and powers fame and protection and get rich from generations to generations. interested contact us on WhatsApp +14305583146
1 Attachment(s)
Re: KFLOP Stepper Motor Encoder Set up
Hi Tom
this topic seems to have been hijacked with spam
I have added error v output plot
sean
Quote:
Originally Posted by
sean69_uk
Hi Tom
Thank you ,that was the problem have re-flashed new version and can no set 2 and 3 as inputs
I have attached encoder output trace from channel 0 (x axis) if you wouldn't mind having a look to see if i'm on the right track as i'm not 100% sure what i am looking at :-)
Sean
Re: KFLOP Stepper Motor Encoder Set up
Hi Sean,
See how the error oscillates about 25 steps peak-peak? I don't think it is caused by the closed loop feedback. You might do an open loop move to verify that (set PID gains to zero). We don't know anything about your machine or how it is constructed or what the resolution is. Looks like there are about 16 oscillations. If you have a lead screw does it rotate about 16 times for that size of move?
Note Alt-PrintScreen will capture a single window.
Its good to attach the raw data so we can re-plot it and zoom in to see things. You may need to zip it to reduce the size so cnczone will allow it.
4 Attachment(s)
Re: KFLOP Stepper Motor Encoder Set up
Hi Tom
Sorry for Delay i'm still on central time
My machine is a retro fit to a Boxford VMC
Stepper motors are STC HY200-2232-190 200 Step hybrid running on 48v Supply
16 T pulley on motor to a 20T pulley on a 2.5mm pitch Ball Screw
200 ppr optical encoder mounted to motor shaft with channel A connected to A0+ and channel B to B0+ on kanalog
Table moves approximately 35mm during the test 14 turns of ball screw , hard to measure accurately as its all enclosed
hope this helps
SEAN
Re: KFLOP Stepper Motor Encoder Set up
Hi Sean,
Quote:
Sorry for Delay i'm still on central time
No rush from our end :)
Quote:
Stepper motors are STC HY200-2232-190 200 Step hybrid running on 48v Supply
16 T pulley on motor to a 20T pulley on a 2.5mm pitch Ball Screw
If I did the math right that comes out to 3200 steps/motor rev and 1600 steps/mm (40640 steps/inch)
So the move of 50000 would be 50000/3200 = 15.625 motor revs which matches the number of oscillations. Strange to have 25 micro steps of error when measured at the motor shaft. If we were measuring at the lead screw or with linear scales at the stage then an off center pulley or lead screw wobble could be the cause. But this is measured right at the motor shaft. A poorly mounted encoder disk (off center) can cause something like this.
This corresponds to +/-12 steps / 1600 step/mm = +/- 7.5um
You might try moving very slowly or to specific motor rev angles and stopping to see if the error is purely a function of motor angle as opposed to time.
Quote:
channel A connected to A0+ and channel B to B0+ on kanalog
I'm surprised this works. Connecting to one differential signal only and leaving the other floating is normally unreliable. But loosing counts and such would show up differently than an oscillation like this.
Re: KFLOP Stepper Motor Encoder Set up
Hi Tom
Thanks for the quick reply , i will re check the encoder wheel as its one of the Broadcom ones where the wheel is tiny and not part of the assembly you have to use a setting tool to align the sensor housing .
i did try connecting the A-B channels to A0+ and A0- firstly on the kanqlog but didn't get an output signal .it is a single-ended quadrature encoder as only has A and B channels
Sean
Re: KFLOP Stepper Motor Encoder Set up
Quote:
i did try connecting the A-B channels to A0+ and A0- firstly on the kanqlog but didn't get an output signal .it is a single-ended quadrature encoder as only has A and B channels
You should add a differential driver such as this or connect to KFLOP's single ended inputs.
Re: KFLOP Stepper Motor Encoder Set up
KFLOP's Single ended inputs on JP7 that is connected to the kanalong JP14 , break into the ribbon cable ?
"JP1 converts 8 of the signals and connects them to Kflop I/O bits 0-7 (Kflop JP7 Pins 7-14) which are Kflop's 4 encoder A/B input channels"
Re: KFLOP Stepper Motor Encoder Set up
The encoder inputs can be moved from JP7 and JP5 to JP4 and JP6. See the MuxEncoders.c example.
3 Attachment(s)
Re: KFLOP Stepper Motor Encoder Set up
Tom
Couldn't see any wobble in encoder wheel so replaced the whole encoder , larger wheel diameter with 500ppr
attached are screen shots and file , all settings the same except input gain changed to 1.6 from 4 so command and position traces align
Re: KFLOP Stepper Motor Encoder Set up
Hi Sean,
That looks good to me. I think its time to go closed loop to see if you can reduce the errors. Low Pass filter, I gain, and Feed Forward.
2 Attachment(s)
Re: KFLOP Stepper Motor Encoder Set up
Thanks tom
glad thats ok , because enabling the MUX for encoder inputs on JP4 and JP6 messed everything up and all the bits stayed high regardless
Am i adjusting I gain to get output trace to match the command and position traces as attached picture
Re: KFLOP Stepper Motor Encoder Set up
Hi Sean,
Quote:
glad thats ok , because enabling the MUX for encoder inputs on JP4 and JP6 messed everything up and all the bits stayed high regardless
That doesn't make sense. Maybe you were missing a GND or miss wired?
Quote:
Am i adjusting I gain to get output trace to match the command and position traces as attached picture
No. The goal is make the error plot as close to zero as possible. Right now the position is lagging behind by about -30 counts while moving positive and +30 counts while moving negative. The output should be going to 30 steps to correct this. The Integrator works by looking at the error and based on the magnitude of the error and the magnitude of the I gain and ramps correction (output) based on their product. In your case the Integrator is correcting the error but ramping so slowly it has only corrected 2 steps of the needed 30 by the time the move is over. Then on the move back the error is +30 so the Integrator ramps negative but only gets back to zero by the time that move is over. The idea is to make the Output correct the error as quickly as possible without over-correcting and going unstable.