Kflop Wiring for Leadshine Close loop step servo CSM22430

Moderators: TomKerekes, dynomotion

User avatar
TomKerekes
Posts: 591
Joined: Mon Dec 04, 2017 1:49 am

Re: Kflop Wiring for Leadshine Close loop step servo CSM22430

Post by TomKerekes » Fri Aug 23, 2019 6:08 pm

Hi Amit,
1. As you sent the below waveforms 1,2,3, kindly confirm the measured points in the KFLOP to get the waveform on the Oscilloscope:- Its a Point A with respect to B or Point B with respect to C on the image 5 below?
B with respect to C (GND)


2. For measuring the PUL/DIR Voltage level by multimeter, Measuring point will be "PUL+ w.r.t PUL-" or "PUL- w.r.t GND"? Because we are getting different reading. Which point is correct?
You can measure either one. This is basic electronics. The relationship is V1 + V2 = 5V. But what the Drive cares about is what it "sees" : "PUL+ w.r.t PUL-"

3. KFLOP also supports for Common Cathode (PNP Signal)? Is “LVTTL-step/Dir” is a Common Cathode?
Yes. A TTL output will both source and sink current. But a High TTL level is only guaranteed 2.4V minimum.

4. Both Waveform 1 &2 above is an Open collector configuration?
Yes

5. As driver Manufacturer said, Low Polarity (Inverted) Pulse (Fig2) is a common Anode and High Polarity(Non Invert) signal (Fig 1) is Common Cathode configuration. Is this true?
No. The drive method 'TTL' vs 'Open Collector' can be set independently of the polarity. KFLOP supports all 4 possibilities.

6. For FPGA(STEP_PULSE_LENGTH_ADD)=XX; Initially i.e before pulsing(No Pulse) the I/O switch on the KFLOP(Fig 5) is opened or closed(Grounded)?
7. For FPGA(STEP_PULSE_LENGTH_ADD)=XX+0x80; Initially i.e before pulsing(No Pulse) the I/O switch on the KFLOP(Fig 5) is opened or closed(Grounded)?
See the scope plots for the answer


HTH
Regards,

Tom Kerekes
Dynomotion, Inc.

AmitKumar171
Posts: 40
Joined: Tue Feb 20, 2018 7:35 am
Location: India
Contact:

Re: Kflop Wiring for Leadshine Close loop step servo CSM22430

Post by AmitKumar171 » Thu Sep 26, 2019 11:03 am

Dear Tom,

Thank you very much for your support.

Leadshine motor-drivers are working fine, still there is no issue except some axis accuracy. we have changed the Backlash and it seems to be solved.

1. Except "Backlash", all other parameters are the default value. So Kindly advice what are the parameters we have to re-configure to achieve Good Machine Accuracy.

Regarding to ABC Manufacturer Driver/Encoder (But Specification is same as LeadShine Drivers):
After running 2-3 days without any issues, all the Drivers-Encoders-motors getting fails/damage one by one after few day’s(Someone in months), the manufacturer saying Driver/Encoder failures due to the insufficient signal voltage from the controller board.
2. Is this true? Insufficient signal voltage level will cause the driver/encoder failure?
3. "Instead of Inverse signal we may using-Non Inverse signal or vice versa" Do this cause driver/Encoder failure? Any other reason for the driver and encoder failure?

4. Can we use Transistor circuit as a line converter for increasing the signal voltage level like 0 and 5V as shown below image?
5. Is this circuit works efficiently? or it will effect to the machine accuracy?
Line Converter-KFLOP.png
Thank You

AMIT KUMAR

User avatar
TomKerekes
Posts: 591
Joined: Mon Dec 04, 2017 1:49 am

Re: Kflop Wiring for Leadshine Close loop step servo CSM22430

Post by TomKerekes » Thu Sep 26, 2019 4:07 pm

Hi Amit,
1. Except "Backlash", all other parameters are the default value. So Kindly advice what are the parameters we have to re-configure to achieve Good Machine Accuracy.
You would have to supply a lot more information. Normally with Stepper Motor systems the motors either step properly or not. Accuracy is then determined by the mechanics.


Regarding to ABC Manufacturer Driver/Encoder (But Specification is same as LeadShine Drivers):

After running 2-3 days without any issues, all the Drivers-Encoders-motors getting fails/damage one by one after few day’s(Someone in months), the manufacturer saying Driver/Encoder failures due to the insufficient signal voltage from the controller board.

2. Is this true? Insufficient signal voltage level will cause the driver/encoder failure?
I think this would be unlikely but possible. Only the Manufacturer would know if their design is susceptible to failure just be cause the Step/Dir signals are low.

I can't see how it could possibly effect the encoder.

3. "Instead of Inverse signal we may using-Non Inverse signal or vice versa" Do this cause driver/Encoder failure? Any other reason for the driver and encoder failure?
Same as above.

4. Can we use Transistor circuit as a line converter for increasing the signal voltage level like 0 and 5V as shown below image?
5. Is this circuit works efficiently?
Yes that should work well. 3rd party line driver modules could be another choice.


or it will effect to the machine accuracy?
It should not effect machine accuracy. The module should be close to KFLOP to minimize noise pickup in the wiring to the base of the transistor.
Regards,

Tom Kerekes
Dynomotion, Inc.

AmitKumar171
Posts: 40
Joined: Tue Feb 20, 2018 7:35 am
Location: India
Contact:

Re: Kflop Wiring for Leadshine Close loop step servo CSM22430

Post by AmitKumar171 » Thu Oct 10, 2019 2:39 pm

Dear Tom,

We are facing some issues, Kindly advise to solve this.


PFA the C-Programing file what we are using now for your reference.
INIT-Eth-LEADSHINE.c
(19.96 KiB) Downloaded 2 times
Case 1 Circle shape Milling:
If Backlash is OFF or both X and Y Backlash value is same:- the result is Circular shape without shifting, but the dimension will not be accurate like the X dimension will be 0.2mm lesser and Y dimension will be 0.03mm lesser.

Case 2 Circle shape Milling:
If Backlash is ON with X and Y Backlash value is different:- The result is like two semi Circular shape with shifting and the dimension will be the required value(Approximately accurate).
Circle With Backlash.jpg
Case 3 Rectangle shape Milling:
If Backlash is OFF :- the result is Rectangle shape without shifting, but the dimension will not be accurate like the X dimension will be 0.2mm lesser and Y dimension will be 0.03mm lesser.

Case 4 Rectangle shape Milling:
If Backlash is ON & both X and Y Backlash value is same :- the result is Rectangle shape without shifting, but the dimension will not be expected value like the X dimension will be Correct Value but Y dimension will be more compare to expected value.

Case 4 Rectangle shape Milling:
If Backlash is ON I.e X is (78.8) and Y is (23.6) :- the result is Rectangle shape without shifting and the dimension will be expected value for both X & Y.
Rectangle.jpg
1. According to above cases, We can achieve case 4 with rectangle object, but if we applied same values to the circular object the half of the circle will get shifted like shown in image.

2. Whatever backlash value tried for the circular shape unable to get both Shape and dimensions. Either we can get Shape or Dimension, Not able to get both.

3. We are getting Y axis is -1 on the window even in NO-Operations.
4. If we put our Hands on top of the KFLOP (Without touching) the Axis valus on the KMOTION will be keep on Varying. Is there any issue? This is the reason for the above issues like accuracy, Shifting?
Axis Window.png
Kindly help us to solve this issue.
Thank You

AMIT KUMAR

User avatar
TomKerekes
Posts: 591
Joined: Mon Dec 04, 2017 1:49 am

Re: Kflop Wiring for Leadshine Close loop step servo CSM22430

Post by TomKerekes » Thu Oct 10, 2019 6:26 pm

Hi Amit,

Regarding backlash: It seems your INIT file has 78 steps of backlash for both x and y. Shouldn't they be different?

What is the resolution of your Axes?

Please be more clear about what you are doing and what happens.

The backlash rate of 78 steps/sec seems slow. That would take 78 (steps) / 78 (steps/second) = 1 second to correct. Try a backlash rate of 780 to correct in 0.1 seconds. Is it improved?

How fast are you cutting the circle?


3. We are getting Y axis is -1 on the window even in NO-Operations.
4. If we put our Hands on top of the KFLOP (Without touching) the Axis valus on the KMOTION will be keep on Varying. Is there any issue? This is the reason for the above issues like accuracy, Shifting?
It is normal for floating/unconnected inputs to pick up noise. Do not configure the Axis for Encoder Input mode if you don't have Encoders. But anyway the Position is not used and will have no effect on accuracy.
Regards,

Tom Kerekes
Dynomotion, Inc.

AmitKumar171
Posts: 40
Joined: Tue Feb 20, 2018 7:35 am
Location: India
Contact:

Re: Kflop Wiring for Leadshine Close loop step servo CSM22430

Post by AmitKumar171 » Fri Oct 11, 2019 1:58 pm

Dear Tom,

Thanks for the information.
Regarding backlash: It seems your INIT file has 78 steps of backlash for both x and y. Shouldn't they be different?
Yes we tried with same values and also with different values. But there is no improvements. Its explained in detail below.
Please be more clear about what you are doing and what happens.
In beginning, the Backlash mode was OFF, (Mentioned Values is only for reference and its not experimental value)
While homing every time we are getting different values for all the axis and there is no repeatability.
We tried to move X or Y axis manually and measured using Dial Guage. In one direction if we move for 1mm its moved 1mm distance and its measured using dial Gauge. If we change the direction, if we move for 1mm its moved 0.5mm distance for first step then its move 1mm correctly from the second step) This will be happens whenever we change the direction.

To overcome the above issue we have find the Backlash value by using manual Jog Mode and we fixed the above issue. After using backlash for both the direction it can move by 1mm distance even if we change the direction. As per the manual (Jog Mode) Trials-testing we found X backlash should be 78.8 and Y Backlash should be 23.6.

For testing we have chosen two jobs. 1. to cut the wood in Rectangle Shape 2. Cut the wood in Circular Shape. and each explained below.

1. RECTANGLE SHAPE CUTTING:
By using manual cutting (Jog Mode) method, We tried to cut the rectangle shape and we achieved within 30micron tolerance. even we tried same backlash values (X=78 and Y=23) by machine cutting(NC Program) and we achieved with the same tolerance i.e 30 micron.

If we disable the Backlash or change the backlash value or X and Y backlash values are equal: In these 3 cases The cutting result will be Rectangular shape but the X and Y dimensions of the rectangle will not be the expected value( Inaccurate like 0.1 to 0.3 mm tolerance) like X=correct, Y=Small/Big or Y=Correct, X=small/big .

Even though Rectangle shape cutting was good with accepted tolerance we are doubting ourself whether rectangle shape cutting was correct or wrong because of the below cases in Circular shape cutting.

2) CIRCULAR SHAPE CUTTING:
But, We tried the same(X=Y=78 or X=Y=23 or X=Y=xx) and different(X=78 and Y=23 and we tried with some other values also) backlash value for X and Y FOR Circular Shape Cutting, we are found 3 case issues here,(Expected Cutting result should be Circular shape with <30micron dimension accuracy/tolerance), But we found:
1. If X and Y Backlash values are different: Circle will be two semi-circles(Shifting) as shown in Image.
Circle With Backlash & Diff Value.jpg
2. If X and Y values are same: Circle will be an Elipse(X & Y diameters are different) shape and the dimensions will be unexpected values like +/- 0.1 to 0.3mm tolerance as shown in the image(Given Dimensions in the image is only for reference and its not correct value).
Circle Without Backlash or same value.jpg
3. Backlash=OFF: The Cutting result will be Elipse shape (X & Y diameters are different).
What is the resolution of your Axes?
0.01mm for X,Y,Z axis and 0.01degree for rotary axis.
How fast are you cutting the circle?
2000mm/minute
The backlash rate of 78 steps/sec seems slow. That would take 78 (steps) / 78 (steps/second) = 1 second to correct. Try a backlash rate of 780 to correct in 0.1 seconds. Is it improved?
We tried Backlash Rate=780 and even tried with some other different values from 100 to 15000, Its not improved. If the backlash rate increases, Backlash feature will be skipped(We are guessing, because this cutting result is same as the results when the backlash was OFF).

As shown in the In C configuration file has been attached before, we have configured only
Backlash
Velocity, Accel, Jerk
Limit Switch, Soft Limit,
Output Mode, Output Channel.
Remaining parameters we have not tried because we don't know whether its required or not.


If you need more information kindly ask we will provide.

Kindly Please help us to solve this issue.
Thank You

AMIT KUMAR

User avatar
TomKerekes
Posts: 591
Joined: Mon Dec 04, 2017 1:49 am

Re: Kflop Wiring for Leadshine Close loop step servo CSM22430

Post by TomKerekes » Fri Oct 11, 2019 6:49 pm

Hi Amit,

It seems backlash correction will not work well with your system. Backlash correction will only help if the backlash is consistent and any disturbance forces (cutting forces) are not large enough to move the axis. Ironically friction can sometimes help.

Imagine pulling a sled with a rope 1m long. If you pull the sled slowly and keep tension in the rope you can control the position of the sled. To reverse direction you must quickly run 2m in the opposite direction to put tension in the rope and then continue moving normally. This is how backlash correction works and what KFLOP does. If for example pulling the sled down a hill, or if something pushes on the sled, or the rope is jerked, then the sled will not be in the correct place and the correction will fail.

0.5mm of backlash is quite large. Why do you have so much?

Backlash is never good and you should always try to eliminate it mechanically first.

It doesn't make sense to set the x and y to the same values.

0.5mm should be 50 steps not 78.8?

2000mm/min is fairly fast. For a 50mm circle this will take:
50mm x Pi / (2000/60) = 4.7 seconds.

So any corrections will need to be made quickly ie. 0.1 seconds to be effective.

You might try cutting very slowly to see if there is a change.

Another consideration is the direction around the circle. In one case the cutting tool may be pulling the axis forward vs pulling the axis backward.

A "shift" like in your shifted photo would indicate the software backlash correction is greater than the actual mechanical backlash.

Another issue may be that your mechanics have compliance rather than backlash. Or a combination of both. This is like pulling the sled with a spring. In this case the amount the sled lags behind will be dependent on load, friction, cutting forces, jerking, etc.

You might do some careful studies on how your "backlash" behaves. Does it change when moving gradually or quickly. How much force can be applied before the axis moves though the backlash? How much does it vary?
Regards,

Tom Kerekes
Dynomotion, Inc.

AmitKumar171
Posts: 40
Joined: Tue Feb 20, 2018 7:35 am
Location: India
Contact:

Re: Kflop Wiring for Leadshine Close loop step servo CSM22430

Post by AmitKumar171 » Mon Oct 14, 2019 2:52 pm

Dear Tom,

Thank you for the information and appreciate your Support.
It seems backlash correction will not work well with your system. Backlash correction will only help if the backlash is consistent and any disturbance forces (cutting forces) are not large enough to move the axis. Ironically friction can sometimes help.
As per our Testing analysis, we think Backlash was in consistence and regarding to Cutting Force-We tried with slower Speed but there is no difference.
0.5mm of backlash is quite large. Why do you have so much?
Sorry it ‘s not 0.5mm, we given imaginary value for reference.

Practically we tested and noted few values(PFA file). We tried to move (Forward & Backward repeatedly) the X axis or Y axis individually for 0.1mm and we got the distance results which is actually moved (measured by Dial Gauge). PFA file and kindly advise reason for the Inconsistency.
error-backlash.xlsx
(12.62 KiB) Downloaded 2 times
1. Backlash feature will only compensate when the direction of the axis getting change right?
2. If the axis moving in only one direction also we are not getting Consistence results, we are getting upto 60micron error. You can see it in the Excel file. We should consider this error strongly right? Kindly advice any reason behind this? How to resolve?
3. Sent List is Without Backlash and if we enable the Backlash we are getting same results except when the direction change we are getting less than 10micron which is 20-30micron in without backlash cases.
Backlash is never good and you should always try to eliminate it mechanically first.
4. We Don’t know what is the exact reason behind this, Either from Software configuration missing or Mechanical issue, If in configuration we don’t know what are all parameters should be consider? If issues with Mechanical we don’t know which mechanical part was the issue? Kindly Advice how we can solve.
It doesn't make sense to set the x and y to the same values.
Cutting Errors.png
I tried setting both x and y different values attached image, I am getting error of shifting circle, oval shape as mentioned in image.

Yes, If we set same Value, we will get oval shape, shifting will not be there but dimension difference is there.
0.5mm should be 50 steps not 78.8?
In your case you might have taken steps per unit as 100 counts that’s why it is 50 steps, but in my case steps per unit (counts per inch) is 8128, and counts per mm is (320).

So in my case backlash steps counts for 0.5mm will be 0.5*320 = 160.
And 78.8 is for practical value of 78.8/320 = 0.25mm
You might try cutting very slowly to see if there is a change
.
There is no change in cutting at a speed of 200mm/min.
Another consideration is the direction around the circle. In one case the cutting tool may be pulling the axis forward vs pulling the axis backward.
I tried changing cutting direction also (climb milling as well as conventional milling). For both cases results are similar.
A "shift" like in your shifted photo would indicate the software backlash correction is greater than the actual mechanical backlash.
Images are only for understanding the case-Shifting was not that much we have edited the image; backlash is not that much.
You might do some careful studies on how your "backlash" behaves. Does it change when moving gradually or quickly. How much force can be applied before the axis moves though the backlash? How much does it vary?
Yes backlash compensation is same when I am moving the axis quickly. For the forces I am measuring while jogging the axis (from excel sheet). And also measuring after cutting (from image) actual circle dimensions. Errors are same in both cases.

5. Kindly advise in detail what are all the things we have to do for solve these issues
Thank You

AMIT KUMAR

User avatar
TomKerekes
Posts: 591
Joined: Mon Dec 04, 2017 1:49 am

Re: Kflop Wiring for Leadshine Close loop step servo CSM22430

Post by TomKerekes » Mon Oct 14, 2019 6:15 pm

Hi Amit,

I plotted the X error. As you can see the errors are not pure backlash:
X Error.png

Pure backlash would have a sudden change of error when the direction reverses.


There seems to be a scale factor error of ~4.5%. Here is simulating a correction error of 4.5%. Now it appears more like a backlash problem:
X Error 1.045.png


Simulating a correction of 0.03mm of backlash at the direction reversals is:
X Error 1.045 backlash 0.03.png


The Y axis seems to have less of this scaling effect. Here is the raw Y error plotted.
Y error.png


Please investigate why your mechanical system behaves this way.

I don't think your scaling could be completely off by 4.5% In this case your 50mm circle would have an error of 50mm x 0.045 = 2.25mm !

So the scaling error is more likely something local like leadscrew error. Where some places the motion is greater than commanded and other places it is lesser than commanded. Your Excel data is good but you should have collected much more data over a longer distance. Also at different places on the lead screw. What is your lead screw pitch?

Its also important to note what direction you were last moving before collecting the data.

You might consider adding linear encoder onto your system (temporarily) to help you diagnose and understand the problems with your mechanics.

Or even better obtain a laser interferometer.


I tried setting both x and y different values attached image, I am getting error of shifting circle, oval shape as mentioned in image.
Such "shifting" has to do with using a backlash correction greater than your system's backlash, not with using different x and y values.

Note you seem to have your x and y values confused.


Yes backlash compensation is same when I am moving the axis quickly. For the forces I am measuring while jogging the axis (from excel sheet). And also measuring after cutting (from image) actual circle dimensions. Errors are same in both cases.
This is good news. If the errors changed with speed or cutting forces then it would be much more difficult to solve the mechanical problems.


Also attached is the Excel Spreadsheet modified to plot the errors and to simulate scaling and backlash corrections.
Attachments
error-backlash simulation.xlsx
(21.13 KiB) Downloaded 4 times
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply