New MOVE_TO_COMMAND diagonal move problem

75 views
Skip to first unread message

Łukasz

unread,
Apr 6, 2021, 11:51:35 AM4/6/21
to OpenPnP

Hi,
In new Advanced Motion Control my move XY command looks like: M204 S745 X100 Y200 F1000.  I understand it is acceleration and veliocity for XY motion vector but i need separated S and F for X axis and separated for Y axis. How can i get it?

ma...@makr.zone

unread,
Apr 6, 2021, 12:03:23 PM4/6/21
to ope...@googlegroups.com

Hi

You can't :-(

Is this for a custom controller?

_Mark

Am 06.04.2021 um 17:51 schrieb Łukasz:

Hi,
In new Advanced Motion Control my move XY command looks like: M204 S745 X100 Y200 F1000.  I understand it is acceleration and veliocity for XY motion vector but i need separated S and F for X axis and separated for Y axis. How can i get it?
--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/482b2c7a-65b2-4683-8a98-656f0aacb535n%40googlegroups.com.

Jarosław Karwik

unread,
Apr 6, 2021, 12:08:07 PM4/6/21
to OpenPnP
Blasphemy !!!

Well, but seriously - what you suggest would result in non synchronic arrival to end point for X and Y.
If you have different characteristic for X and Y then it should be handles in the controller itself - it would scale movement to slowest axis ( after casting F to X and Y axis). 

ma...@makr.zone

unread,
Apr 6, 2021, 12:27:52 PM4/6/21
to ope...@googlegroups.com

If this is a self made controller, the calculation is simple.

Let's use these names:

s = distance (see calculation below)

V = feedrate (the value given by the F word)

a = acceleration (the value given by the M204 S word)

X = X (the value given by the X word)

VX  = the feedrate for the X axis

aX = the acceleration for the X axis

etc. for the other axes.

Calculation:

s = √(X²+Y²+...)

VX = V*X/D

aX = a*X/D

and analog for Y, Z, ...

_Mark

Łukasz

unread,
Apr 6, 2021, 12:59:45 PM4/6/21
to OpenPnP
Yes, its my own  controller  based on STM32 . I think it would be best if openpnp could just deliver me calculated feedrate and acceleration  for x and y axis separatly so XY could make synchronated move.
What i actually get is preety useless for me beacuse my controller have to calculate it separatly for XY axis what i think is waste of controller time. But if there is no other way i will calculate it in my controller. Thanks for mathematical formulas.

Jarosław Karwik

unread,
Apr 6, 2021, 2:48:46 PM4/6/21
to OpenPnP
STM32 is powerfull enough to calculate it ( I use Stm32H7 for my controller and it has huge overkill for it)

You will not avoid quite many other calculations - even if you want only trapezoidal  shape of speed for the moves. 

Łukasz

unread,
Apr 6, 2021, 3:02:24 PM4/6/21
to OpenPnP
I like keep it as simple as it can be.
Im using trinamic stepper drivers so i only need to write calculated acceleration,feedrate and target position via SPI. Then magic happens.
Reply all
Reply to author
Forward
0 new messages