Digital Dream Technology support

Title: Lots counting errors at using the DDCSV with MPG [Print This Page]

Author: arco    Time: 2018-2-7 10:49
Title: Lots counting errors at using the DDCSV with MPG
Dear Madam Dear Sirs,

I bought the DDCSV2.1 from you. And connected it with a MPG (Handwheel).

The precision was set for MPG to 0.005, if I move the handwheel
slowly or fast it gives me not a continous incrementing or decrementing
of the counters on the display.

- set precision to 0.005
- Counter incrementation on display
+0.005
+0.006
+0.005
+0.004
+0.002
+0.005
+0.005
+0.002

and not what is required, like this:
+0.005
+0.005
+0.005
+0.005
+0.005
+0.005
+0.005
+0.005

I replaced also the MPG and used also other precision.
The result is same bad, the countin is not continous.

Seems there is somewhere a bug or wrong. Please help me to
fix the error of this DDCSV2.1, else I can not use it.


Author: ytliu    Time: 2018-2-8 11:39
Set # 448 (MPG control mode) parameter to 0 (open) to solve this problem
Author: ytliu    Time: 2018-2-8 12:03
Under the precise control mode of mpg(#448=0), after the handwheel stops shaking, the corresponding axis still moves until all the pulses in handwheel buffer are sent;Otherwise, once the handwheel stops shaking, the corresponding axis immediately decelerates stop.
Author: Will_D    Time: 2018-2-24 06:56
@ytliu: I could not find parameter #448 in either the version 1 or version 2 user manual!

@arco: My MPG settings are as follows:
           #428 = 1, #429 = 0, #430 = 1 (standard MPG), #431 = 0.001 (totally different to what the manual says!!), #432 = 0, #434 = 0 (not in manual)

           What are your settings and does your MPG have a standard output as opposed to UART?

Hope this helps

Will
Author: ytliu    Time: 2018-2-24 18:33
Hello,
Parameter #448 is added in the newer version, the new version can be downloaded from http://www.ddcnc.com/forum.php?m ... &extra=page%3D1 post
Author: DAMIGO    Time: 2018-2-27 02:16
Hi ytliu,

I tried your parameter settings for the #448. It does not change much or stabilize the counting. I understand that one mode is moving the motor so long i turn the wheel,
the other mode should exactly move the motor as the given value as turn by the mpg. I tried fast moving I tried slow moving, nothing changes or move the motor precise.
The digital display shows a not continous incrementing like described in the first posting.

So I measured the signals with an oscilloscope, and they are fine, no noise, no spikes, no glitches. Sadly I can not upload any pictures here from the measurement.

Kind regards
Daniel

Author: ytliu    Time: 2018-2-27 06:31
Last edited by ytliu In 2018-2-27 08:52 Editor

Hi DAMIGO!
When turn the handwheel, if the screen coordinates only a small amount of change, the reason is generally handwheel A / B signal missing all the way caused。
Can judge the reason of the problem like this:
Disconnect handwheel B signal from controller, then turn handwheel,If the screen coordinates are still a slight change, the hand wheel A phase signal is connected to the controller B phase signal port,Then turn the handwheel, if the screen coordinates is still a slight variation, indicating the hand wheel problem, if the screen coordinates no change, indicating the controller problem.
If it is a controller fault, you can contact the dealer to replace, you can also locate and repair the fault,The figure is a schematic diagram of the handwheel coded signal.
If FPGA_WHA, FPGA_WHB signal waveforms are correct, then I'm sorry, you can only contact the vendor for replacement.

1.png (7.76 KB, Down times: 465)

1.png

Author: DAMIGO    Time: 2018-2-27 19:30
Hi ytliu,

thank you very much for your detailed explainations. I appreciate you effort to solve and to have a good product and Service.

Well this analysing I am through already. Also used 2 MPG plus a Quadrature Encoder. All of them Shows same behaviour. Please be informed my colleque Jay from the USA which have also a
DDCSV modul, has the same issues with unprecise counting. We both guess that there is a debouncer and a stable counting mechanism missing in the software.
The electronic in my humble opionion is really fine.

As Example: If am slowly turning I get Stepwidth is 0.5:

+0.5
+0.5
+0.4
+0.6
+0.5

now I turn back:
-0.5
-0.6
-0.4
-0.5
-0.5

Ist really ate the same counting back. For sure if I move very fast the MPG then it happens that's missing such counting easily and having values between 0.2-0.4.
But for now I would like to know, how this values are coming, because per tick you have to count 0.5 (given value) and to move the motor for 0.5, there can be
no way of 0.4 or 0.6 because the stepwidth is set to 0.5. So if the device would have a distortion or problem then it would miss one time 0.5 or having a 0.5 too much,
but not a value like 0.4 or 0.6.

Simulated electronic distortion:

MPG turn (tick)              Value
1                                  +0.5
1                                  +0.5
1                                  +0 or -0.5 (ooops device miss a tick or interprete the signalform wrongly)
1                                  +0.5
and so on.

   A: ___|-----|___
   B: _____|-----|____

If you respect rising and falling signal and you have a stepwidth 0.5 a counting of 2x 0.25 (rising and falling edge respected , dual Resolution)
If you respect only rising Signal and you have a counting stepwidth 0.5 a counting of 0.5 (single precision, single Resolution)

but never a range between 0.1 to 0.5 at a stepwidth of 0.5, it is just digital signal

Author: ytliu    Time: 2018-2-27 21:21
Last edited by ytliu In 2018-2-27 21:35 Editor

Hi DAMIGO!
You said the problem should be caused by cumulative error, you can set "the pulse equivalency" to 1000 (there will be no cumulative error), and then observe the hand wheel running state.What is your current pulse equivalent setting?


Author: enjoy_cnc    Time: 2018-2-27 23:21
DAMIGO Posted at 2018-2-27 19:30
Hi ytliu,

thank you very much for your detailed explainations.  I appreciate you effort to solve  ...

Hello DAMIGO!

I am one of the DDCSV controller technical support engineers and I am happy to respond to your questions.

You said the handwheel problem I did not reproduce here;

Can you upload the parameter picture?
I follow the parameters you set to test under.

Please upload the following parameters to me via photo or text:

[Motor Parameters]
34 X axis pulse equivalency =?
35 Y axis pulse equivalency =?
36 Z axis pulse equivalency =?
38 A axis pulse equivalency =?

[MPG parameters]
428 =?
429 =?
430 =?
431 =?
432 =?
434 =?
448 =?

Thank you!
Author: DAMIGO    Time: 2018-2-28 01:49
Dear enjoy_cnc,

My actual parameters, have actually the parameter from 431 set to 0.010, but it does not change at the
described behaviour:

[Motor Parameters]
34 X axis pulse equivalency =640,00
35 Y axis pulse equivalency =640,00
36 Z axis pulse equivalency =640,00
38 A axis pulse equivalency =640,00

[MPG parameters]
428 =Enable
429 =Low
430 =Standard
431 =0.010
432 =Low
434 =Low
448 =Open (also tried with Close, no difference)

Kind regards
Daniel

Can you guys, update this forum software for having the option to upload the pictures or data files,
else i have to send them all the time via email to you.
Author: DAMIGO    Time: 2018-2-28 02:36
Dear enjoy_cnc, Dear ytlui,

I tried your recommendation of your setting with 10000 als pulse equivalent, this setting reduced this error very very much, only at very
fast moving it seems it miss some signals from the MPG, seems the used optocoupler are maybe too slow. But nevertheless this error
got very very much reduced. and i got some times an error between +/- 0.001 to 0.006

So now i set my final values from my real motors, stepper power controller and leadscrew:

x/y has a leadscrew of 10mm/rev
z has a leadscrew of 2mm/rev

x/y motor set to 800 pulse per turn
z motor set to 400 pulse per turn

calculated values are then:
34 X axis pulse equivalency =80,00
35 Y axis pulse equivalency =80,00
36 Z axis pulse equivalency =200,00

with this values the error got seriously worst for x/y
turn 1 tick to pos = +0.013
turn 1 tick to neg = -0.012
if i turn more the mpg it it does not continous increment predictable stable values,
they jump like crazy between 0.010 - 0.019 some thing there in between.
Roll a dice for the next final position

for z at beginning and very slow slow turning it works +0.01 +0.1 etc.
but if i move just a little faster the mpg then i get +0.015 +0.01 +0.015 as
incremental or decremental values but always a difference of 0.005 as error
if this error occurs. That seems be not nice but somehow still accceptable.

The machine which I have, can work up to a precision to around 0.02 mm.

I can try to set higher revolution values for the x/y axis for minimizing the error,
but i will get weaker power on the motors if the have to move faster. for the Z
axis due the 2mm leadscrew I have to stay at the values of 200 thats a precision
of 0.005

At further testing and analysing, I think I found the problem:

At your email soon you will find the excel sheet calculation for the precision of the parameters,
I guess you will need to add some more information in your manual about the resolution in relation
of leadscrew and motor puls per revolution provided by the power stepper. Then the values
are explainable and also somehow the unprecision of the values. Seems sometimes a rounding error too.
Author: Lukasz    Time: 2018-2-28 03:23
Hello CNC fans,

Today I have conneced MPG to my DDCSV2.1 and I noticed a simillar behaviour as described in previous posts. I had tried to play a with parameters but without big differences. But I noticed that for for #431 "MPG precision" set to 0.010 the step I got every tick was 0.009 , 0.011, 0.009, 0.011 ... and so on. So the average is 0.010 (as set in parameters).

From my point of view it looks like hardware is working correctly and the problem is somewhere in the software (currently Im using version 2018-01-21).

@ enjoy_cnc, ytlui
I would suggest to check number roundings in the firmware (for example for displaying purpose).

Regards
Lukasz
Author: enjoy_cnc    Time: 2018-2-28 11:44
Lukasz Posted at 2018-2-28 03:23
Hello CNC fans,

Today I have conneced MPG to my DDCSV2.1 and I noticed a simillar behaviour as desc ...

Dear DAMIGO  , Dear LuKasz,

The following controller parameters are used as analysis conditions:

[Motor Parameters]
34 X axis pulse equivalency = 640,00
35 Y axis pulse equivalency = 640,00
36 Z axis pulse equivalency = 640,00
38 A axis pulse equivalency = 640,00

[MPG parameters]
428 = Enable
429 = Low
430 = Standard
431 = 0.010
432 = Low
434 = Low
448 = Open

Hand-held box
Axis Select the X axis
Magnification x1



  A: ___ | ----- | ___
   B: _____ | ----- | ____

1tick = 4 unit

1 unit = 0.01 / 4 = 0.0025 mm = 640 * 0.0025 mm = 1.6 pulses

1tick = 1.6 * 4 = 6.4 pulses

1tick can not issue 6.4 pulses, can only send 6 or 7;




                         init             1tick            1tick               1tick                 1tick           .......
    
REL unit              0                4                  4                    4                     4              .......

ABS unit             0                4                   8                   12                    16           .......

ABS Pulse out     0            4 * 1.6≈6       8 * 1.6≈13      12 * 1.6≈19      16 * 1.6≈26        ........
   
ABS pos show   0.000      0.009 (6/640)   0.020 (6/640)   0.029 (19/640)   0.040 (26/640)   ........

REL pos             0.00        0.009                0.011              0.009                 0.011             ........


   

As can be seen from the table above, the maximum deviation after shaking the handwheel will not exceed (1p = 0.0015625mm), which is determined by the drive and screw precision;

Coordinate display is the real-time display of the current actual location, if 0.009 mandatory display 0.010, this is not appropriate;

Due to the limitation of the shaking speed of the handwheel within the software, when the handwheel is shaken at the limit and the handwheel is lost,

Suggest the following:

When you are far from the target position, you can choose x10 or x100 gear, and the manual speed parameters increase, even the normal speed of the hand wheel can also allow the machine to achieve rapid movement effect;
When close to the target position, you can choose x1 gear to slow precise positioning;


Do not recommend the following:

Hand wheel in the x1 file, and fast speed handwheel used to achieve rapid movement effect This is an unconventional approach;



The following G code and the above hand wheel analysis principle is the same;

G90 G54

G01 X0
G01 X0.01 (show 0.009)
G01 X0.02 (show 0.020)
G01 X0.03 (show 0.029)
G01 X0.04 ​​(show 0.040)

M30


When the pulse equivalent is 80 or other values, it can also be analyzed according to the above table.

I hope my answer will make everyone satisfied!

Kind regards
Author: Lukasz    Time: 2018-2-28 15:08
Hello enjoy_cnc,

Thanks for great explanation. I think it's clear right now.

@DAMIGO
To upload picture/file you need to switch a new post window to "High mode" (upper right corner). Then you will be able to select files from your local drive.

Regards
Lukasz
Author: DAMIGO    Time: 2018-3-1 03:43
Dear all,

thank you for the analysing and trying to sort out the problem, we come to the
solutuion more near...

And mega thanks for the advice with the high mode :-) finally i can upload the stuff.

Well if the calculated precision value 0.0125 mm/stp and the MPG set to 0.01
then at moving positiv one tick i get: +0.013 (correct because last digit round up)
and in neg direction 0.012 (correct rounded). If you know this  speciality then
everything is explainable that with the presetting of 640 mm/step and 0.01 mpg precision
can not work because:

I assumed for the 640 mm/stp value:
16 x microsteps
5mm leadscrew
200step (1,8 degree) motor
gives a minimum resolution of 0.01563

So if you use then this value 0.01 as mpg precision, it will drives you
mad with the driven distance with the precision which can not be
reached of it. And if you turn the mpg you get non explainable values
which are rather jumpy.

So I add a calcsheet which i got from another cnc forum from
http://www.machsupport.com/forum/index.php/topic,16315.0.html
(you will need libreoffice or openoffice for the file which i add or load it from
the other forum which is in MS-Office).

With help of this file you can calculate the precision of your combination
of steps, leadscrew, motor and set microsteps. this calc minimum resolution
is the value which you need to set for the MPG precision.

If you have combination like my machine with different settings you
need to calc for all axis and readjust the parameters so that you find
a base together. for me was it then to set my setup for the Z axis to
a precision of 0.005 and the x,y Axis to precision of 0.01 (required to
change the microsteps from 4 to 5 to gain 1000 steps for 10mm leadscrew).
This is then the common base of 0.01 and this  i can set inside the MPG parameter
and the behaviour is then as mostly expected, but sometimes in rarely cases it miss
sometimes a signal. But for me still somehow OK.

StepperCalc_ALENZ_rev1.zip

23.12 KB, Down times: 551


Author: enjoy_cnc    Time: 2018-3-1 10:38
DAMIGO Posted at 2018-3-1 03:43
Dear all,

thank you for the analysing and trying to sort out the problem, we come to the

Dear DAMIGO,

Thank you for your DDCSV product support.


According to your machine XYZ pulse equivalent X: 80 Y: 80 Z: 200 can be obtained
The accuracy of control commands for each axis is:

X: 0.0125 mm / p
Y: 0.0125 mm / p
Z: 0.005 mm / p


Hand wheel control software design principles as analyzed above 14 # as,

Each tick of the handwheel will be incremented and decremented by 0.8 (0.01 * 80) pulses,
Since 0.8 is not an integer, each pulse issued after the rounding operation will have errors;
But the overall error will not exceed 0.0125mm after the handwheel finally stops;


The minimum accuracy is 0.0125mm, then the precise control of each step 0.01mm is impossible to achieve!


There is a minimum precision of 4 decimal places, the display accuracy is 3 decimal places,
So the third decimal point display in the floating-point to string casting accuracy loss, resulting in the phenomenon of 0.013 or 0.012, is a normal phenomenon;

The purpose of the software is such that the MPG can shake 100 or 500 ticks continuously, then the machine movement distance will be 100 * 0.01 mm, 500 * 0.01 mm; to achieve precise control;

It can also be designed such that the MPG accuracy unit is pulse, for example, 1 puse. This design accurately increments or decrements the MPG by 0.0125 mm for each shake; and the forward and reverse displays are very accurate.


If you want to precisely control and unify the control accuracy of all axes, you can follow the following method.


A known:
Z 0.005 mm
XY 0.0125 mm

It is recommended that the MPG accuracy be set to 0.025 (2 pulse) 0.05 (4 pulse). . . .

Z axis:
   0.025 / 0.005 = 5 step

    0.05 / 0.005 = 10 steps

The MPG can also be set to 0.0125, but the number of steps in the Z axis is 0.0125 / 0.005 = 2.5 steps. It is not an integer;


Accuracy of the above handwheel (0.0125 * n) can be accurately displayed under the handwheel operation, and the increment and decrement of each tick are the same;

Because the movement of 0.0125 * n (n> 1) corresponding to the XYZ issued pulse is an integer;


Kind regards!






Welcome Digital Dream Technology support (http://bbs.ddcnc.com/) Powered by Discuz! X3