These are chat archives for machinekit/machinekit

24th
Jun 2016
zhivko
@zhivko
Jun 24 2016 13:33
Hi guys! @mhaberler Can I hit auditorium with linuxcnc question ?
Michael Haberler
@mhaberler
Jun 24 2016 13:33
try it
zhivko
@zhivko
Jun 24 2016 13:34
I want to have constant speed in this my 4 axis cnc machine
So today I made first realtime simulation that gathers data from machinekit - while it is playing gcode.
As I check this simulation - it doesn't looks like it is constant velocity of tool over surface...
Michael Haberler
@mhaberler
Jun 24 2016 13:35
sure
that is what the tp is all about - optimizing moving speed
zhivko
@zhivko
Jun 24 2016 13:36
Do you think I need to adapt tool speed ? because especially at corners it seems the tool is kind a slow speed
hmm..
tp ?
Michael Haberler
@mhaberler
Jun 24 2016 13:36
do you understand why this is the case and actually makes sense?
like accel/vel limits?
constant speed in a sharp corner == infinite jerk
welcome to your heap of scrap metal
;)
zhivko
@zhivko
Jun 24 2016 13:37
ok so I understand there is limitation to velocity and acceleration - so you think I just need to raise this limits ?
and ofcourse - allow mechanics to handle such accelerations and velocity ?
Michael Haberler
@mhaberler
Jun 24 2016 13:38
who allows?
zhivko
@zhivko
Jun 24 2016 13:38
YOu think bringing up velocity limits would make it constant speed over surfac e?
Michael Haberler
@mhaberler
Jun 24 2016 13:39
I dont understand your question
you have a machine which is by definition limited in vel/acc
you do not like the consequences and exceed the limits
what do you think will happen?
zhivko
@zhivko
Jun 24 2016 13:39
sorry - make mechanics in a way that it will allow such speeds ?
ok - so I ask do I just need to bring limits up in configuration ?
Michael Haberler
@mhaberler
Jun 24 2016 13:39
again, accel/decel
give that a try so you see the causality
Alexander Rössler
@machinekoder
Jun 24 2016 13:40
is it a plasma cutter? then you can probably have higher acc/vel than a CNC would have
zhivko
@zhivko
Jun 24 2016 13:40
bah - I am afraid of getting joint following error
Alexander Rössler
@machinekoder
Jun 24 2016 13:40
hower not infinite
zhivko
@zhivko
Jun 24 2016 13:40
This is what I was getting in past when having too big vel / acc...
Michael Haberler
@mhaberler
Jun 24 2016 13:41
that " joint following error" acutally means something: the machine cannot follow your commands
so how are you then going to get "constant speed"
zhivko
@zhivko
Jun 24 2016 13:41
so I a ready to jump from BBB to fpga or what ?
Michael Haberler
@mhaberler
Jun 24 2016 13:42
sorry nothing to do with platform
a following error is not a software issue which you can patch around
zhivko
@zhivko
Jun 24 2016 13:42
isnt joint following mens that some axis is off limit beause hw cannot produce signals fast enough ?
Michael Haberler
@mhaberler
Jun 24 2016 13:43
it is a problem of interaction of a given machine with given limits and a controller which exceeds those limits
NO
zhivko
@zhivko
Jun 24 2016 13:43
this is how I understood reading linuxcnc...
hmm..
Alexander Rössler
@machinekoder
Jun 24 2016 13:43
it can be actually
zhivko
@zhivko
Jun 24 2016 13:43
@strahlex yes it is plasma cutter
Alexander Rössler
@machinekoder
Jun 24 2016 13:43
you are using steppers?
zhivko
@zhivko
Jun 24 2016 13:43
it doesnt hae tool in contact with workpiece so it can move faster
yes
yes
steppers
Alexander Rössler
@machinekoder
Jun 24 2016 13:44
then it actually can be related to the minimum step length
there is a maximum step frequency
you could try using 1/8 or 1/4 steps if you are using 1/16 or 1/32
Michael Haberler
@mhaberler
Jun 24 2016 13:45
@strahlex he is talking about a simulation
Alexander Rössler
@machinekoder
Jun 24 2016 13:45
oh
zhivko
@zhivko
Jun 24 2016 13:45
@mhaberler: "it is a problem of interaction of a given machine with given limits and a controller which exceeds those limits" I think I would get join fol. error also if I disconnect steppers from machine
Michael Haberler
@mhaberler
Jun 24 2016 13:45
sure
Alexander Rössler
@machinekoder
Jun 24 2016 13:45
well this would be only the case on real hardwre
zhivko
@zhivko
Jun 24 2016 13:45
so machine has probably nothing to do here in this statement
Michael Haberler
@mhaberler
Jun 24 2016 13:45
but the LIMITS of the machine have
and you configure those
zhivko
@zhivko
Jun 24 2016 13:46
ah yess - that yes
Alexander Rössler
@machinekoder
Jun 24 2016 13:46
yes, there are per axis limits and total maximum velocity limit
zhivko
@zhivko
Jun 24 2016 13:46
so I tried reducing step period also...
Alexander Rössler
@machinekoder
Jun 24 2016 13:46
which is the combined velocity of all axes
zhivko
@zhivko
Jun 24 2016 13:46
so both limits are honored I guess
Alexander Rössler
@machinekoder
Jun 24 2016 13:46
btw. the solution for plasma cutters is to compensate for the slowdown
e.g. bei increasing the distance between material and nozzle
zhivko
@zhivko
Jun 24 2016 13:47
ugh... I dont like it
Than get wider flame...
and more material is evaporated - more smoke, etc...
Alexander Rössler
@machinekoder
Jun 24 2016 13:48
but first check out the limits in your config
maybe you don't need this
zhivko
@zhivko
Jun 24 2016 13:48
can I paste to pastebin
and you experts can check thiss maybe?
Alexander Rössler
@machinekoder
Jun 24 2016 13:48
take a look at the machinekit docu
there is section about INI values
OK I will look
I am running it on BBB now
Alexander Rössler
@machinekoder
Jun 24 2016 13:51
hmm, you are using the PRU stepgens for the simulation?
zhivko
@zhivko
Jun 24 2016 13:51
yes
I have cramps hat on BBB
So I started from @charlessteinkuhler config
Alexander Rössler
@machinekoder
Jun 24 2016 13:52
can you try to take them out of the loop, just to see where the problem is
maybe it is actually PRU related
zhivko
@zhivko
Jun 24 2016 13:52
yes of course I can try
but this means commenting what line ? or replacing by what ?
Alexander Rössler
@machinekoder
Jun 24 2016 13:53
take a look at steplen and stepspace and then calculate the maximum speed/acc you are actually using
disconnect it from the motion component
axis.0.motor-pos-fb e.g.
see the machinekit docs for more information on the motion component
I need to learn now
sry
zhivko
@zhivko
Jun 24 2016 13:54
ugh sinc eI am not too experienced linuxcnc - this change is huge topic for me...
OK
I will try to do that...
Alexander Rössler
@machinekoder
Jun 24 2016 13:55
there is very good documentation on this
zhivko
@zhivko
Jun 24 2016 13:59
thank you
Bas de Bruijn
@luminize
Jun 24 2016 14:10
@zhivko the steplen and stepspace will give determine the maximum you can set the maxvel and maxaccel pins. So check that maxvel/maxaccel stays under the maximum you can get due to steplen and stepspace
zhivko
@zhivko
Jun 24 2016 14:11
So I have:
MAX_VELOCITY = 200.0
MAX_ACCELERATION = 3000.0
and
STEPLEN = 1000
STEPSPACE = 1000
is there formula so I can check this ?
Bas de Bruijn
@luminize
Jun 24 2016 14:12
steplen + stepspace make a period of 2000ns
zhivko
@zhivko
Jun 24 2016 14:13
ok
ad I have:
# scale is 1600 steps/rev * (1/8) revs/mm
SCALE =  200
So 2000ns - and velocity is in mm/s
Bas de Bruijn
@luminize
Jun 24 2016 14:14
so you have 50kHz rate (1/0.000002)
zhivko
@zhivko
Jun 24 2016 14:15
ok and?
Bas de Bruijn
@luminize
Jun 24 2016 14:15
so 50.000 pulses per sec, means that if you have 1600 pulses/rev you have a max of 31.25 rev/sec
or at 200 pulses/sec that’s 250 rev/sec
zhivko
@zhivko
Jun 24 2016 14:16
but 31.25 rev/sec is far far too much
what I need
but OK I got a point now - I need to make a spreadsheet where I will calculate all this numbers
Bas de Bruijn
@luminize
Jun 24 2016 14:20
yes, and also check that it is in the right units, so make sure you’re calculating in the SI to keep things simple
zhivko
@zhivko
Jun 24 2016 14:20
but if I got it right - it is better to have smaller STEPLEN and STEPSPACE - if stepper driver allow?
Bas de Bruijn
@luminize
Jun 24 2016 14:21
no, not better per se
if you go to the limits, then cable length, wiring, shielding etc will be hugely important. So no need to go ballistic on these numbers if you don’t need them (my take)
zhivko
@zhivko
Jun 24 2016 20:46
So I did some calculation as @luminize suggested - here is result - I see from it that maximal speeds are pretty big - so if I understand @mhaberler correctly - if I put this speeds as max speeds - that should allow for constant speed over surface?
Kazam_screenshot_00000.png
zhivko
@zhivko
Jun 24 2016 21:00
Or I need to increase steplen and stepspace - since I do not need so big speeds ?
Michael Haberler
@mhaberler
Jun 24 2016 21:39
velocity limiting is a feature of the tp, and it has to do with limiting acceleration_ and _deceleration to keep with machine accel/decel limits
therefore fiddling speeds will not have any impact on the decel you see in sharp corners
repeat: accel/decel, not speed
do you understand the concept of limiting accel/decel by the tp?
zhivko
@zhivko
Jun 24 2016 21:41
I guess yes --- it is keeping max allowe acc within limits of all max acc.s ?
Michael Haberler
@mhaberler
Jun 24 2016 21:41
great
zhivko
@zhivko
Jun 24 2016 21:41
SO I need to fiddle - STEPGEN_MAX_ACC = 3400.0 ?
I guess need to increase it
generally increasing acc would result in better acommodating velocity - is that right ?
Michael Haberler
@mhaberler
Jun 24 2016 21:43
certainly
zhivko
@zhivko
Jun 24 2016 21:43
but max acc is again limited by hardware stepgen
It cannot be too big since hw would probably not allow.
but do you think increasing STEPLEN and STEPSPACE could help here in any way ?
Michael Haberler
@mhaberler
Jun 24 2016 21:45
so do you think this is something you can fix with "fiddling" parameters?
I dont know, do you read what I say?
STEPLEN and STEPSPACE have to do with maximum speeds
your problem is an accel problem
zhivko
@zhivko
Jun 24 2016 21:47
ok ... than I will increase it and see result... now it is easier sinc eI can examine result on preview
Michael Haberler
@mhaberler
Jun 24 2016 21:47
fair enough. off for today, cu
zhivko
@zhivko
Jun 24 2016 21:48
OK thank you very much