Zwei von einander abhaengige Achsen ansteuern

More
10 Apr 2017 12:03 #91113 by wicki
Hi zusammen,

die Fragestellung ist etws komplex, so dass ich sie erst mal auf deutsch poste
und hoffe, dass sie verstaendlich rueberkommt. Und mir dann jemand bei der
Problemloesung helfen kann - oder mir sagt, wo ich am besten danach frage.

Also ich habe hier eine "cerec"-Dentalfraese zerlegt und die Mechanik an LinuxCNC
angeschlossen. Sie hat 2 Linearachsen, die gleichzeitig auch noch rotieren koennen.
An der (grundsaetzlich auch drehbaren) Z-Achse sitzt eine turbinengetriebene
Diamantscheibe.

Die Z-Achse ist z.Zt. fixiert und kann nur linear rauf und runter.
Die Y-Achse kann linear rein und raus - und die X-Achse kann rotieren.
Das ganze will ich zum innen- und aussengravieren von Rotationskoerpern
benutzen.

Systemimmannent bedingt jedoch eine Bewegung in X-Richtung (rotation) aber
zugleich eine Bewegunbg in Y-Richtung (rein oder raus).
D.h.: wenn ich nur eine Rotation wunesche, dann muss ich gegen diese
Zwangsbewegung in Y-Richtung gegensteuern.

Wo und wie bringe ich sowas unter? Gibt es dafuer eine Standard-Handling
oder muss ich mir mittels der Kinematics was eigenes basteln?

Der sinnvollste Ansatz scheint mir der des "Seilzug-Syroporschneiders" zu sein.
Sehe ich das richtig oder falsch oder hat da jemand einen besseren Tip ?

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

More
10 Apr 2017 20:53 #91146 by tommylight
Das mit der Axis can ich nicht verstehen, gibt es bilder bitte?
MFG
Tom

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

More
11 Apr 2017 03:42 #91163 by wicki

gibt es bilder bitte?


OK, let me try to explain together with pictures....


The Z-axis moves up and down, the Y-axis moves in and out, the X-axis is an angular axis.
But the mechanical construction implies a rotation of the X-axis while moving in/out.

So I have to correct the position of the (angular) X-axis while any Y-axis move.


Attachments:

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

More
11 Apr 2017 06:00 - 11 Apr 2017 06:06 #91166 by wicki
when I try to start a fresh compiled source from git, I get:

"this version of linuxcnc seperates the .... press YES to convert"
when I say YES I get:

invalid command name "parse_ini"
while executing
"parse_ini $inifile"
a look into "check_config.tcl" offers, that there is no
"parse_ini" is defined:
line 81:
#
# begin
package require Linuxcnc ;# parse_ini

set ::progname [file rootname [file tail [info script]]]
set inifile [lindex $::argv 0]
if ![file exists $inifile] {
err_exit
    }
    if !
[file readable $inifile] {
err_exit
    }
    parse_ini $inifile

when I remove line 93 (parse_ini $inifile - because the header is in a wrong place)
I get:

check_config: ERROR
Missing [KINS]KINEMATICS=
Missing [KINS]JOINTS=

check_config validation failed
LinuxCNC terminated with an error. You can find more information in the log:
/home/xxx/linuxcnc_debug.txt

an in "linuxcnc_debug.txt" I find:

Can not find -sec EMC -var VERSION -num 1
Last edit: 11 Apr 2017 06:06 by wicki. Reason: stupid formatting

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

More
11 Apr 2017 06:13 #91167 by wicki
sorry, but it seems to be impossible, to put the above message in a clean format......

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

More
12 Apr 2017 00:11 #91214 by tommylight
Did you get past the Kinematics error?

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

More
12 Apr 2017 04:26 #91223 by wicki

Did you get past the Kinematics error?


yes...
just tested it again and now an old 2.7.x-conf was converted.

maybe the reason yesterday was an wrong path-setting while testing different versions
with wrong RIP-env.

but my axis-problem is not solved....
here is a video to show the problem:
asteb.de/cerec1.avi

I'm not sure, which is the right way to solve it:
by a kinematics-file or by a hal-config - or by g-code?

what I need is: rotation of one axis (here named X) should result in an lef/right move of the other axis...

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

More
13 Apr 2017 00:27 #91279 by tommylight
Is the spindle on the vertical axis or the horizontal one?
Does the horizontal one have 2 separate motors ? In the video it looks like it has 2.
That is quite easy to set up in Linuxcnc and can be done in several ways.
One is having a normal X axis that rotates so you do the calculations of radius depending on the diameter of the part. The other is having that X axis set as A or B axis, rotational so it does the calculations in Linuxcnc, that is 4th axis.

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

More
13 Apr 2017 04:44 - 13 Apr 2017 04:45 #91283 by wicki
Replied by wicki on topic back to the problem... ;-)

Is the spindle on the vertical axis or the horizontal one?
Does the horizontal one have 2 separate motors ? In the video it looks like it has 2.


The "spidle" is on the Z-axis - you can see it in the picture lying on the left side in front of the controller.
It is a water-steam-driven turbine.
I want to use the rotating axis as an X-axis - yes, is has 2 motors.
The Z-axis is theoretically also able to rotate (but no second motor is installed on this axis).

First I tried the x/y-linking with a kinematic-file - it works rudimentary but it is not nice
for testing and debugging.
Now I'm trying it with HAL and a python-program. It seems to be the faster way for testing.

What I have to solve now: If X for example moves form 0 to 10,
I must calculate the position-correction for Y for every motor-step, to hold the Y-axis in place.
Let's see, if it works ;-)
Last edit: 13 Apr 2017 04:45 by wicki. Reason: re-changed topic...

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

More
13 Apr 2017 16:20 - 13 Apr 2017 16:24 #91324 by wicki
Replied by wicki on topic back to the problem... ;-)
Back again...
now a little help would be fine... ;-)

The Program below does what I need.
The "jog"-line moves the Y-axis against the wrong movement while turning the
X-axis.
But what I need now (if (xdiff!=0)): the X-movement should stop until the
correction of the "Y"-axis (here done by "linuxcnc.JOG_INCREMENT") is ready.

And: this solution only works in jog-mode - in mdi-mode errors are thrown:

can't do that (EMC_AXIS_INCR_JOG:125) in MDI mode
can't do that (EMC_AXIS_ABORT:120) in MDI mode


Any hints for me ?




#!/usr/bin/python
import hal, time, serial,subprocess,string
import linuxcnc

c = linuxcnc.command()
h = hal.component("ceradjust")
x = hal.component("X")
y = hal.component("Y")
z = hal.component("Z")
x.newpin("inx", hal.HAL_FLOAT, hal.HAL_IN)
x.newpin("outx", hal.HAL_FLOAT, hal.HAL_OUT)
x.ready();
y.newpin("iny", hal.HAL_FLOAT, hal.HAL_IN)
y.newpin("outy", hal.HAL_FLOAT, hal.HAL_OUT)
y.ready();
z.newpin("inz", hal.HAL_FLOAT, hal.HAL_IN)
z.newpin("outz", hal.HAL_FLOAT, hal.HAL_OUT)
z.ready();
loop=0
maxloop=100



def getstat():
global znowpos,serval,loop,loopdiv,you,yin,xou,xin
stat=linuxcnc.stat()
stat.poll()
zin=stat.axis[2]["input"]
zou=stat.axis[2]["output"]
xin=stat.axis[0]["input"]
xou=stat.axis[0]["output"]
yin=stat.axis[1]["input"]
you=stat.axis[1]["output"]
if (loop>=maxloop):
print "A2 input: xin: %3.5f yin: %3.5f zin %3.5f loop: %i maxloop=%3.5f" %(xin,yin,zin,loop,maxloop)
loop=0
loop=loop+1


znowpos=stat.axis[2]["output"]
return

print "cerec started....."

getstat()
lastx=xou
while (1 != 9):
try:
getstat()
xdiff=.5*(lastx-xou)
if (xdiff!=0):
print "move axis 1 %3.5f " %( xdiff)
#jog(linuxcnc.JOG_INCREMENT, axis, velocity, distance)
c.jog(linuxcnc.JOG_INCREMENT, 1, 150, xdiff)
c.jog(linuxcnc.JOG_STOP,0)
lastx=xou
except KeyboardInterrupt:
raise SystemExit[/li]
Last edit: 13 Apr 2017 16:24 by wicki. Reason: format...

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

Time to create page: 0.289 seconds
Powered by Kunena Forum