Great. Thanks for taking the time to post back.
This works. I am getting 1.5mV on KFLOP JP6 Pin 16 (IO35) with this relay connect and 3.27VDC on KFLOP JP6 Pin 16 (IO35) when I turn it on in Kmotion Digital I/O screen and the relay is pulled in.
Thanks Tom ...........
Link to Word Doc.
Taig CNC Machine Quick Links
....
....
KFLOP Power Suppy
Stepper Motor Power Supply Used
Stepper Motor Used on Taig
Taig CNC Machine Counter Weight Design
Taig CNC Machine Counter Weight Design - 3D STEP File
Word Doc. of my Calculation for the Trajectory Planner
Word Doc. E6 Optical Kit Encoder
Relay Connection to KFLOP JP6 Pin 16 (I/O 35)
....
....
Great. Thanks for taking the time to post back.
Regards
TK http://dynomotion.com
I will not be able to use Linear Glass Scale on the Taig ... just not enough room for mounting it on the X-Axis.
So, I will be going with the US Digital E6 rotatory encoder.
Tom,
If more is better and I will max. out at 1000 RPM with these stepper motors,
shouldn't I use an encoder with 4000 CPR?
Another question I have is, should I be configuring these encoders with the "Index" or "No Index"?
Thanks,
Taig CNC Machine Quick Links
....
....
KFLOP Power Suppy
Stepper Motor Power Supply Used
Stepper Motor Used on Taig
Taig CNC Machine Counter Weight Design
Taig CNC Machine Counter Weight Design - 3D STEP File
Word Doc. of my Calculation for the Trajectory Planner
Word Doc. E6 Optical Kit Encoder
Relay Connection to KFLOP JP6 Pin 16 (I/O 35)
....
....
Hi Peter,
4000 cycles/rev would be:If more is better and I will max. out at 1000 RPM with these stepper motors,
shouldn't I use an encoder with 4000 CPR?
4000 x 4 x 1000 / 60 = 267K counts/sec
and should work fine.
An Index pulse can help with more accurate homing. You would first search for a home/limit switch and then search for up to one revolution for the index pulse. Its up to you. If you include the Index pulse output you can always just not connect it and not use it.Another question I have is, should I be configuring these encoders with the "Index" or "No Index"?
Regards
TK http://dynomotion.com
..............
..............
..............
Tom,
I am using the E6 Rotary Encoder on the back of one Stepper motor for testing.
I have put together of HTML link for a Cable Pinout from the Encoder to KFLOP via RJ45 and a C46 Differential to Single Ended Converter (from Welcome to CNC4PC).
Can you please double check my pinout?
My main concern is the last image of the HTML Link to ensure I am understanding the connection to KFLOP.
This is only for one axis; however, the last RJ45 connection to KFLOP will be with all three axis.
Taig CNC Machine Quick Links
....
....
KFLOP Power Suppy
Stepper Motor Power Supply Used
Stepper Motor Used on Taig
Taig CNC Machine Counter Weight Design
Taig CNC Machine Counter Weight Design - 3D STEP File
Word Doc. of my Calculation for the Trajectory Planner
Word Doc. E6 Optical Kit Encoder
Relay Connection to KFLOP JP6 Pin 16 (I/O 35)
E6 Encoder PinOut to KFLOP PinOut
....
....
Hi Peter,
That seems correct to me.
But it isn't clear that GND and +5V from KFLOP are being supplied to all the encoders (C46) pins 1 and 2.
Regards
TK http://dynomotion.com
Yes .... I should have depicted this as well , I was thinking I would connect to the RJ45 break-out board Pin #2 & Pin #1 with the use of KFLOP JP6-Pin #1 for +5VDC and KFLOP JP6-Pin #8 for Ground, respectively.
Do you see any issues with this?
Thanks,
Taig CNC Machine Quick Links
....
....
KFLOP Power Suppy
Stepper Motor Power Supply Used
Stepper Motor Used on Taig
Taig CNC Machine Counter Weight Design
Taig CNC Machine Counter Weight Design - 3D STEP File
Word Doc. of my Calculation for the Trajectory Planner
Word Doc. E6 Optical Kit Encoder
Relay Connection to KFLOP JP6 Pin 16 (I/O 35)
E6 Encoder PinOut to KFLOP PinOut
....
....
That should work.
Regards
TK http://dynomotion.com
....
.....
.....
I finally got everything connected in a working PC case (Enclosure) . I am now ready to start testing the X-Axis with the rotary axis encoder connected to the back-side of the stepper motor.
However, I am not sure on what I should be using on "I" Gain for the initial PID ("I" Gain ) setting for testing in the "Step Response" screen on my testing.
I have a few question:
REF.: 4000 * 4 * (1000/60) = 267K Counts/Sec.
1.) When dealing with rotary and/or linear encoders, is the Cycles/Rev. the Same as the Step/Rev?.
2.) Is my math correct? If I have a rotary Encoder that has a 4000 cycles/Rev. = 4000 Cycles/Rev. * 20 Rev. /IN = 80,000 Cycles / IN?
3.) If this is correct, then (80,000 Cycles/IN) / (64,000 Steps/ IN) = 1.25, which will = the Input "I" Gain on KFLOP "Step Response" screen. I should be using this "I" Gain for testing my X-Axis with a Rotary Axis on the stepper motor on the initial tuning.
...
Taig CNC Machine Quick Links
....
....
KFLOP Power Suppy
Stepper Motor Power Supply Used
Stepper Motor Used on Taig
Taig CNC Machine Counter Weight Design
Taig CNC Machine Counter Weight Design - 3D STEP File
Word Doc. of my Calculation for the Trajectory Planner
Word Doc. E6 Optical Kit Encoder
Relay Connection to KFLOP JP6 Pin 16 (I/O 35)
E6 Encoder PinOut to KFLOP PinOut
....
....
Last edited by PeterTheWolf; 01-27-2020 at 07:24 PM. Reason: Spelling
Hi Peter,
Start with a small number such as 0.0001 to observe gradual corrections.I am not sure on what I should be using on "I" Gain for the initial PID ("I" Gain ) setting for testing in the "Step Response" screen on my testing.
I don't understand what you are asking. Rotary encoders have quadrature counts per rev. Linear encoders have quadrature counts per inch.1.) When dealing with rotary and/or linear encoders, is the Cycles/Rev. the Same as the Step/Rev?.
I believe that is correct. But we are normally interested in quadrature counts not cycles. So that would be X 4 or 320,000 counts/inch.2.) Is my math correct? If I have a rotary Encoder that has a 4000 cycles/Rev. = 4000 Cycles/Rev. * 20 Rev. /IN = 80,000 Cycles / IN?
Assuming 320,000 encoder counts/inch and 64,000 steps/inch then the InputGain should be 64000/320000 = 0.2 to have them count at the same rate.3.) If this is correct, then (80,000 Cycles/IN) / (64,000 Steps/ IN) = 1.25, which will = the Input "I" Gain on KFLOP "Step Response" screen. I should be using this "I" Gain for testing my X-Axis with a Rotary Axis on the stepper motor on the initial tuning.
Note I believe you are confusing Integrator gain ('I' gain) on the Step response screen with InputGain on the Configuration Screen. They are different things. The first just scales the encoder reading. The latter controls how fast errors are attempted to be corrected. You might read this.
HTH
Regards
TK http://dynomotion.com
.......
...
.......
Tom,
I have the rotatory Encoder connected to the back of the stepper motor's shaft and I am trying to tune the one Axis (X-Axis Motor) on the bench without a load.
However, I am experience issues once again. I always get confused on this part of using KFLOP.
Here are the screen images of my settings:
Can I please get some more advice on the direction I need to go to correct what is happening?
What I am seeing on the motor is the motor making the move and at the end of the move it seem like it is hurting for a final position. I have to tick off the I/O State #45 to shut it down.
...
Taig CNC Machine Quick Links
....
....
KFLOP Power Suppy
Stepper Motor Power Supply Used
Stepper Motor Used on Taig
Taig CNC Machine Counter Weight Design
Taig CNC Machine Counter Weight Design - 3D STEP File
Word Doc. of my Calculation for the Trajectory Planner
Word Doc. E6 Optical Kit Encoder
Relay Connection to KFLOP JP6 Pin 16 (I/O 35)
E6 Encoder PinOut to KFLOP PinOut
Hi Peter,
That looks like the hardware is working correctly. Servo hunting/dither is normal as the feedback keeps trying to drive the error to zero. You might read this article. In the future post the data file so we can re-plot the data as necessary.
Regards
TK http://dynomotion.com
Tom,
I have read the information on Servo Dither/Hunting & Dead Band Tuning Parameters as suggested.
Can I please get abit more clarity on the Dead Band and the use of it and what I may see once I get this stepper motor attached to the CNC machine?
I have made a video of my testing with this Dead Band and I have saved the Response Data files for your review.
The video can be download here (29,2mb.) This file can be view with the Free Media Player VLC Media Player. This file format keep the best resolution and the smallest size.
You can download the Response Data File Here: I have made six test at different size steps trying to understand the use of the Dead Band parameters.
Thanks,
...
Taig CNC Machine Quick Links
....
....
KFLOP Power Suppy
Stepper Motor Power Supply Used
Stepper Motor Used on Taig
Taig CNC Machine Counter Weight Design
Taig CNC Machine Counter Weight Design - 3D STEP File
Word Doc. of my Calculation for the Trajectory Planner
Word Doc. E6 Optical Kit Encoder
Relay Connection to KFLOP JP6 Pin 16 (I/O 35)
E6 Encoder PinOut to KFLOP PinOut
....
....
Hi Peter,
Its actually better to not use Dead Band because it basically adds backlash/slop to your system. With range of 1.8 and gain of 0.0001 it basically adds 1.8 steps of error to the system. Once the error becomes less than 1.8 steps the servo basically says, "ok that's good enough stop making any more corrections.". It should only be used if the dither around zero error is annoying for you and you are willing to allow some small error to avoid it. The type of dither you get when stopped is highly dependent on Tuning, Load, Friction, etc. so it probably isn't worth spending a lot of time on it at this point.Can I please get abit more clarity on the Dead Band and the use of it and what I may see once I get this stepper motor attached to the CNC machine?
On a side note you should realize where the axis is commanded can make a difference on the type of dither. The encoder only reads integer counts. Or because of the Input Gain of 0.2 Positon reads multiples of 0.2 Steps. If the axis happens to be commanded to an exact multiple of 0.2 steps (like 0 or 50000.0) then it is possible to have exactly zero error. In this case if there is enough friction, no disturbances and such the axis might sit still with zero error and need no corrections and be happy. However if commanded to some random non-multiple of 0.2 such as 123.05, then without any Dead Band it is impossible to not dither because the position will either be 123.0 or 123.2. In fact the servo will dither in a manner to spend 25% of the time at 123.2 and 75% of the time as 123.0 so the average position will be 123.05. For this reason when I'm looking at dither I intentionally move to some non-multiple position.
The size of the move shouldn't really have any effect on the dither after the axis stops. Other than that after a big move the machine/motor might be rocking in a manner to excite some dither.
Note that your I gain is very low (0.0001). So error corrections are being made so gradually and slow that they have a very minimal effect if any during your moves. For example in your quick move of 500 steps the green error correction plot is only showing a correction of ~ 0.05 steps. It basically takes at least 1 motor step to make some difference.
HTH
Regards
TK http://dynomotion.com
......
......
Tom,
I have a few question concerning the Kflop/Kstep I am working with.... still....
1.) After I figure out my 2nd and 3rd order motion parameters and copy them to KmotionCNC.... what controls the movement speed when using the axis rapid arrow keys in KmotionCNC?
I am seeing much faster movement when using these arrow keys compared to what I am entering coping over from the Step/Response screen and I am getting following errors when I use these keys.... over a longer movement. Which leads me to the next question.
2.) What should I be using for my following error settings?
What I mean is, on steppers with encorders should I be using something small? Since I have 64,000 steps/in. I am thinking 500-1000 should be more than high enough; however.... leads to question #3.
3.) When I set the following errors this low I get following errors on all axis when I run KmotionCNC and when I hit my INIT button.
.....
.....
Thanks,
Pete..
..
Hi Pete,
Jog Speeds in the Trajectory Planner Screen shown here.1.) After I figure out my 2nd and 3rd order motion parameters and copy them to KmotionCNC.... what controls the movement speed when using the axis rapid arrow keys in KmotionCNC?
They should be set slightly larger than your worst case following error under normal conditions. Use the Step Response Screen to observe what errors you have for various move types.2.) What should I be using for my following error settings?
What I mean is, on steppers with encorders should I be using something small? Since I have 64,000 steps/in. I am thinking 500-1000 should be more than high enough
I would expect 1000 counts (1/64th inch) to be more than large enough. Again use the Step Response Screen to check what is going on. Either tuning is not great, or the Velocities and Accelerations are too aggressive. Another possibility with regard to the INIT button might be something like an attempt to move before the Amplifiers are fully enabled. Does your INIT Program move the motors?When I set the following errors this low I get following errors on all axis when I run KmotionCNC and when I hit my INIT button.
Regards
TK http://dynomotion.com
.....
.....
Well, I am starting from the beginning again of trying to get my axis working from the Step/Response screen in KFLOP.
Since I was getting the oldham motor couplers slipping I had to remove the stepper motors and put flats on the axis shafts.
Now everything seems to be whacked out
I am no longer getting the Position output and my encoder response seem way off I am not sure what I have wrong.
Tom,
Can you please offer some advice?
Working with these steppers motor and encoders I though would be a "cake-Walk"; however, it is proving to be the opposite.
Here is a couple of screen images with the Response and the Data file as a attachment:
.....
.....
Thanks,
Hi Pete,
Well the encoder is not working at all. Is it rotating? Is it connected to Input #4? (JP5 pins 1 and 2) Does it have power?
btw Alt-Print Screen will capture one window rather than the whole desktop.
Regards
TK http://dynomotion.com
....
....
....
I am getting following errors on the Y-axis when I initialize in KmotionCNC. I am not seeing any jump on this axis when I initialize it.
Is there a way of knowing what causes this following error on initialize?
Here is an image of the parameters being used:
Attached is the Y-Axis Data file and my initialization file.
Hi Pete,
A following error occurs whenever the commanded Destination is different from the measure Position by more than the Max Following Error limit.
The Enable command in the Init file:
EnableAxisDest(0,0);
sets the Destination to zero. If the Position happens to be a big number then a following error will immediately occur, or otherwise a likely violent servo output to drive the Axis to 0.
There are two common solutions:
#1 - Zero the Encoder Position before Enabling the Axis with Zero(0);
#2 - Enable the axis setting the commanded Destination to be where the Axis happens to be with EnableAxisDest(0,ch0->Position). Actually EnableAxis(0); will also do this by default for that Servo Mode.
HTH
Regards
TK http://dynomotion.com