Download Lube component

More
1 year 11 months ago #314605 by Steffen
Hi,

wollte mich heute um die Zentralschmierung kümmern, leider geht der Download der Lube.py nicht mehr, kann mir jemand aushelfen?

Danke
Grüsse
Steffen

Please Log in to join the conversation.

More
1 year 11 months ago #314606 by Aciera
Replied by Aciera on topic Download Lube component

Please Log in to join the conversation.

More
1 year 11 months ago #314618 by Steffen
Replied by Steffen on topic Download Lube component
Danke, das habe ich gesucht.

Grüße
Steffen

Please Log in to join the conversation.

More
1 year 11 months ago #314666 by Steffen
Replied by Steffen on topic Download Lube component
Hi,
Ich habe die selben Probleme wie sonst im Forum zu lesen, die Lube.py kann nicht gefunden werden.

Ich hab den Pfad neu angeben, Lese/Schreibrechte gesetzt und es ausführbar gemacht. Dazu alles mögliche in der Datei mit Python/2/3 versucht.

Eigentlich brauche ich nur was, wo mir alle 2 Minuten für ein paar Sekunden den Ausgang öffnet, ohne Überwachung.

Kann mir da jemand helfen?

Danke
Grüße
Steffen

Please Log in to join the conversation.

More
1 year 11 months ago #314670 by Aciera

Please Log in to join the conversation.

More
1 year 11 months ago #314674 by Steffen
Replied by Steffen on topic Download Lube component
Der steigt beim laden der Komponenten aus, da alles schon vorhanden ist.
Die Zeit zwischen den Pulsen kann ich da auch nicht einstellen?

Ich hab mal meine Hal und Ini angehängt.

Seither habe ich einen Schalter für die Zentralschmierung in der Custom.Hal, das wurde zum testen ausgeklammert.

Please Log in to join the conversation.

More
1 year 11 months ago #314677 by Aciera
Replied by Aciera on topic Download Lube component
War mehr als Einstieg gedacht zum Anpassen. Fertiglösung zum Einkopieren hab ich nicht zur Hand.

Please Log in to join the conversation.

More
1 year 11 months ago #314680 by Steffen
Replied by Steffen on topic Download Lube component
Danke Dir, ich muss mich damit beschäftigen, ich kapier es nicht.

Habe jetzt vorerst mal einen custom M Code gemacht, den ich an den Anfang oder ans Ende des Programms setzte, der 2 Sek. einen Schmierimpuls auslöst.

Please Log in to join the conversation.

More
1 year 11 months ago #314737 by Aciera
Replied by Aciera on topic Download Lube component
Versuchs mal mit dieser python Komponente.

1. Code unten als 'interval.py' im gleichen Ordner wie deine .ini Datei abspeichern und als Ausführbare Datei markieren.

Code:
#!/usr/bin/env python3 import time import hal h = hal.component("interval") h.newpin("enable", hal.HAL_BIT, hal.HAL_IN) # HIGH enables the interval timer h.newpin("reset", hal.HAL_BIT, hal.HAL_IN) # On change LOW->HIGH restarts the interval h.newpin("start-with-pulse", hal.HAL_BIT, hal.HAL_IN) # If TRUE the interval starts with a pulse h.newpin("out", hal.HAL_BIT, hal.HAL_OUT) # Output of the the interval timer, LOW if 'enable' is LOW h.newpin("delay-time", hal.HAL_FLOAT, hal.HAL_IN) # Interval low time in milliseconds h.newpin("pulse-time", hal.HAL_FLOAT, hal.HAL_IN) # Interval high time in milliseconds h.newpin("time-elapsed", hal.HAL_FLOAT, hal.HAL_OUT) # Elapsed low/high time in milliseconds h.ready() running = False reset = False try:     while 1:         if h['enable']:             delay_time = h['delay-time']             pulse_time = h['pulse-time']             if not h['reset']: reset = False             if h['reset'] and not reset:                 running = False                 reset = True             if not running:                 timer = round(time.time()*1000)                 running = True                 h['out'] = h['start-with-pulse']             else:                 h['time-elapsed'] = round(time.time()*1000) - timer             if not h['out'] and round(time.time()*1000) >= timer + delay_time:                 h['out'] = True                 timer = round(time.time()*1000)             if h['out'] and round(time.time()*1000)  >= timer + pulse_time:                 h['out'] = False                 timer = round(time.time()*1000)         else:             h['out'] = False             h['time-elapsed'] = 0             running = False except KeyboardInterrupt:     raise SystemExit


2. in der ini unter [HAL] diese Zeilen hinzfügen.


Code:
HALCMD = loadusr -W ./interval.py HALCMD = setp interval.delay-time 2000 HALCMD = setp interval.pulse-time 500

3. das 'Show HalConfiguration' tool öffnen, im linken Teil die 'interval' Komponente suchen und im 'Watch' tab die pins anzeigen. Dann 'interval.enable' auf True setzen und der Timer sollte laufen. :

 

Attachment not found

Please Log in to join the conversation.

More
1 year 11 months ago #314805 by Steffen
Replied by Steffen on topic Download Lube component
Ich komm leider auch damit nicht weiter, bei usr/bin/env kommt Verzeichnis nicht gefunden, wenn ich das env wegmache kommt permission denied. 

Attachment not found

Attachment not found



Ich hab zwei System, richtig arbeiten tut LinuxCNC 2.81, auf einem Raspberry Pi zum Testen hab ich auch 2.93 auf einem zweiten RPI installiert, die Fehler oben kommen vom dem 2.93 System, auf 2.81 passiert garnichts, vermutlich wegen alter Python Version.

Kann es auch ein grundsätzliches Problem an der RPI Installation sein?

Danke
Grüsse
Steffen

Please Log in to join the conversation.

Time to create page: 0.062 seconds
Powered by Kunena Forum