Understanding what a COMP_FILE in the INI does

More
13 Dec 2023 10:06 #288011 by maxguapo
Hi, for many years (since the time of EMC2) I run LCNC on an very old PC with parallel interface. Now I upgraded my mill with new closed loop steppers, linear scales, new Intel barebone (NUC 13th gen. with 7i processor) with LCNC 2.91 and Mesa 7i96s-7i85s interface. After a lot of tweeking, especially reducing the p-gain and the acceleration, the machine runs fine, except for the precision. The glas scales are connected/configured as position feedback for the stepgen's and my expectation/hope was to reach an accuracy < 0.05mm on all axes. Z-axes perfekt, probalbly because of the weight on the screw, Y-axes more ore less and X-axes bad (~ 0.125).

In the documentation I found the possibility to define a compensation file to elimiate leadscrew faulst. According to the docu the first value is the position, second compensation forward and third compensation backward. But which position is ment? Is it machine coordinates form the trip point of the home switch or what? I defined a file for the x-axis with two triplets, but it did not work. the machine run in to the limit switch.

Would this be a way to get better accuracy?

Thank's for any help and explanation in advance.

Regards, Peter
 

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

More
15 Dec 2023 19:36 #288261 by Aciera
Seems rather odd, a comp_file would be used on an open loop system as on a closed loop system your motors should be positioned by the feedback from the linear scales.
When you say that you have 0.125mm of position error, is that axis oscillating (ie is the pid sending the motor back and forth)?
The following user(s) said Thank You: maxguapo

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

More
16 Dec 2023 04:00 - 16 Dec 2023 04:08 #288286 by Mecanix

Is it machine coordinates form the trip point of the home switch or what?

Would this be a way to get better accuracy?

The process is simple:
1) Home the machine and set DRO to zero
2) [MDI] G1 X-10 F200 and Note the DRO position
3) [MDI] G1 X-20 F200 and Note the DRO position
4) [MDI] G1 X-10 F200 and Note the DRO position
5) [MDI] G1 X0 F200 and Note the DRO position
***************************************
-20.0        -20.000        -20.008
-10.0        -10.017        -10.005
0.0            -0.022*        0.000
***************************************
(*Note -0.022, that's the backlash just before the limit switch). 

Would this be a way to get better accuracy?
On a 2x lathe (open loop, stepper motor, 3200 steps) with a 5mm pitch screw I get an accuracy of +/-0.01mm across 320mm with a COMP_FILE_TYPE = 0. Linear scale used to measure is a 1um scale, the comp triplets have a 10mm graduation. 
Last edit: 16 Dec 2023 04:08 by Mecanix.
The following user(s) said Thank You: maxguapo

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

More
16 Dec 2023 04:21 #288289 by Mecanix
That is the 'correct way' for accurate positioning. Feedback is sent to the drive directly, bypassing the motion control board/overhead/ancient PID/etc.

The following user(s) said Thank You: maxguapo

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

More
16 Dec 2023 09:21 #288306 by maxguapo
Hi Aciera, No, the axis does not oscillat. With the new stepper they run very smothe. In the beginning they oscillated, but after reducing the P_Gain from 1000 to 500 it's gone. I know this from the fly bar less systems (FBL) we use in the model helicopters.
I agree with you, tha a compensation file in a closed loop sytem is odd. But when having troubles one tryes many things even those who are not the right thing.
Anyway, thank you very much for yout explanation!

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

More
16 Dec 2023 15:14 #288338 by Aciera
If it ends up positioning with a residual error like that then you likely need to increase the 'I' value of the PID.
The following user(s) said Thank You: maxguapo

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

More
17 Dec 2023 15:28 #288412 by maxguapo
Thank you Aciera! I wiil try what you sugested and report later. How would you start, with 1, 10 100? I don't know how big the effect ist.

Regards, Peter

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

More
17 Dec 2023 15:40 #288417 by maxguapo
Hi Mecanix, thank you for the explanations and the video. Now it's clear for me, that the compensation file is not the right way. In your video, you moved the glas scale and the servo motor(?) followed the movement. When I tryed the same, I get a "joint x following error". How did you configure you hal- and ini-file?

In the attachment I send you my files and would be glad if you have the time to look over. I'm not absolutly sure if they are right configured. The zaxis is not yet finished. Only the y- and zaxis work.

Have a good time!

Regards, Peter 

File Attachment:

File Name: Mill_2_0.hal
File Size:11 KB
 

File Attachment:

File Name: Mill_2_0.ini
File Size:4 KB
Attachments:

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

More
18 Dec 2023 06:47 #288466 by Mecanix
Hi Peter, unfortunately I am of no remote help for PID tuning and validation. This process is normally carried on-site by an expert who does the math, analysis and validation upfront, then implementation.

Not in mood to mislead anyone by telling them to randomly 'add a lil of this' and 'remove a lil of that'. Based-on-luck setups aren't exactly recommended if system integrity and accuracy is your goal. Do advise to get someone who can MATLAB/LabVIEW your baseline system characteristics first and take it from there.

ps: video is a shill for Delta and their line of closed loop drives. Not mine.
The following user(s) said Thank You: maxguapo

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

More
18 Dec 2023 08:16 #288471 by maxguapo
Hi Mecanics, thank you anyway. I understand your reasons.

Regards, Peter
The following user(s) said Thank You: Mecanix

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

Time to create page: 0.405 seconds
Powered by Kunena Forum