Kleines Script zum "Bewussten" runterfahren *howto*

More
09 May 2019 19:25 - 07 Jun 2019 04:26 #133272 by spicer
Hatte das Problem, dass ich vor dem Runterfahren vergass, die Y Achse nach oben (ins Plus) zu fahren.
Da ich in Plusrichtung referenziere hatte das dann die Folge, dass beim nächsten Einschalten der CNC immer der ganze Weg (über 1100mm) langsam durchgefahren werden musste zum referenzieren. Da 2 Y-Motoren vorhanden sind, kann ich auch nicht im JOG-Mode fahren vor dem Referenzieren.
Habe mir nun ein kleines Script geschrieben, welches vor dem Runterfahren oder Abmelden ein Nachfrage-Fenster erscheinen lässt.

Script:
#!/bin/bash

xterm  -T "Wirklich ausschalten?" -e 'echo "Y Achse hoch gefahren (mit G00 Y1100)?"
read -p "j wenn ja: " eing
if [ "$eing" = "j" ]
	then
#		/usr/bin/xfce4-session-logout		#Ausschaltmenu
		/usr/bin/xfce4-session-logout --halt	#Direkter Shutdown
fi'

Dieses muss unter /usr/local/bin/xfce4-session-logout gespeichert und als ausführbar markiert werden.
Im Script kann man noch auswählen, ob nach j Eingabe direkt runtergefahren werden oder das Ausschaltmenu erscheinen soll.
Einfach das Gewünschte auskommentieren.
Attachments:
Last edit: 07 Jun 2019 04:26 by spicer.

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

More
09 May 2019 19:44 - 09 May 2019 19:57 #133277 by Grotius
The main problem of this is at higher level.

I have issued this problem before. Norbert say's that it is alway's possible to jog, but i think not.
When you have machine config XYZ, you can always jog, even when not homed.
When you have machine config XXYZ, you have a problem.

Jog mode must be alway's 100 % possible, even when not homed. If jogging was always possible you did not have to write your bash log off script. In fact you could connect your bash log off command's to linuxcnc when using linuxcnc terminal command's integrated in your scripting, this then will only pop up when x or y value's are at a certain level.

And you don't have to have 2 startup icon's. (second solution : one startup icon for homing and one startup icon for non-homing)

So i hope they can do a git push, or how it's called very soon about this item. I will smile if jogging is alway's possible with exeption of auto mode off course.

In safety prospect, a machine or robot jog mode must be possible at any time when a accident has happened. If not we can call Houston.
Last edit: 09 May 2019 19:57 by Grotius.

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

More
09 May 2019 20:06 #133281 by spicer
Ich habe XYYZ. Siehe "Da 2 Y-Motoren vorhanden sind, kann ich auch nicht im JOG-Mode fahren vor dem Referenzieren.".
Ich kann ohne Referenzfahrt lediglich X und Z im JOG-Mode bewegen.

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

More
09 May 2019 20:14 #133282 by Grotius
Exactly !!!

When linuxcnc code is updated at this section the problem is solved. But i am not the one to push the update to Git.
I have my own git repro. But i think i will look at a solution coming time. I will put this one on my bucketlist !!!

And in the mean time, have fun with linuxcnc !!

Good luck.

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

More
10 May 2019 07:43 #133336 by spicer
Wenn es möglich wäre, Befehle aus dem Terminal an LCNC zusenden bzw Positonsdaten von LCNC auszulesen?
Dann könnte ich das Script so erweitern, dass gefragt wird, ob die Y-Achse zuerst nach oben fahren soll, wenn diese zuweit unten steht.

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

More
10 May 2019 15:57 #133371 by 3D-Master
Eventuell solltest du es mal damit versuchen. Einfach die Koordinaten eingeben und schauen was passiert. (Falls es noch möglich ist, Koordinierte Bewegungen auszuführen)

2.7. [HAL] section
TWOPASS=ON - Use two pass processing for loading HAL comps. With TWOPASS processing, all [HAL]HALFILES are first read and multiple appearances of loadrt directives for each moduleb are accumulated. No hal commands are executed in this initial pass.

HALFILE = example.hal - Execute the file example.hal at start up. If HALFILE is specified multiple times, the files are executed in the order they appear in the ini file. Almost all configurations will have at least one HALFILE, and stepper systems typically have two such files, one which specifies the generic stepper configuration (core_stepper.hal) and one which specifies the machine pin out (xxx_pinout.hal)

HALCMD = command - Execute command as a single HAL command. If HALCMD is specified multiple times, the commands are executed in the order they appear in the ini file. HALCMD lines are executed after all HALFILE lines.

SHUTDOWN = shutdown.hal - Execute the file shutdown.hal when LinuxCNC is exiting. Depending on the hardware drivers used, this may make it possible to set outputs to defined values when LinuxCNC is exited normally. However, because there is no guarantee this file will be executed (for instance, in the case of a computer crash) it is not a replacement for a proper physical e-stop chain or other protections against software failure.

POSTGUI_HALFILE = example2.hal - (Only with the TOUCHY and AXIS GUI) Execute example2.hal after the GUI has created its HAL pins. See section pyVCP with Axis Section for more information.

HALUI = halui - adds the HAL user interface pins. For more information see the HAL User Interface chapter.

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

More
12 May 2019 00:51 - 12 May 2019 12:06 #133494 by spicer
Danke.
Aber verstehe jetzt erst mal Bahnhof. Zumal mein Englisch zu schwach ist.
Darum schreibe ich ja in der DE Sektion ^^

Laut Grotius wird der Mangel des "kein-JOG-Mode vor dem referenzieren" ja ev gelöst werden.
Kann mit meiner Lösung (inkl Parkpositions-Knopf) momentan gut leben.
Wenn es halt mal so ist, dass Y so lange rauf fahren muss, gehe ich mir ein Kaffee holen :dry:
Der Following-error macht mir mehr zu schaffen.
Diesen kriege ich, wenn ich die Beschleunigung oder Geschwindigkeit erhöhe.
Technisch wären 6000mm/min bzw 200mm/s^2 möglich.
Habe aber momentan 3600mm/min und 110mm/s^2 eingestellt, damit der Fehler nicht kommt.
Habe kein Wegmesssystem und den FERROR bereits auf 10 erhöht. Der Fehler kommt so aber trotzdem.

So sieht das Projekt bis jetzt aus:
www34.zippyshare.com/v/mxGjXLvy/file.html
www34.zippyshare.com/v/FK5tETtd/file.html
www34.zippyshare.com/v/sHAFaV8E/file.html

Anderer Link, da Zippyshare in DE gesperrt ist:
filer.net/folder/261a8ccb7824e75f
Last edit: 12 May 2019 12:06 by spicer.
The following user(s) said Thank You: tommylight

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

More
15 May 2019 16:53 #133858 by pl7i92
Ich nutze eine FEIERABEND Button
der via Shutdown auslöst

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

More
06 Jun 2019 21:48 #136102 by spicer
Interessant. Wie hast Du diesen Knopf realisiert?

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

Time to create page: 0.267 seconds
Powered by Kunena Forum