M 100 Code

More
3 years 7 months ago #265647 by Steff87
M 100 Code was created by Steff87
Ich brauche ein bisschen Hilfe.
Ich möchte gern verschiedene Ausgänge über die M100-M199 schalten.
Das Prinzip versteh ich, leider kann ich den M-Befehl nicht laden.

In der INI steht 'USER_M_PATH = /home/cnc/linuxcnc/configs/CNC-Frank/M-Code/' (ein neuer Ordner in der config)
M112 als Programm ausführbar.

Beispiel:
#!/bin/bash
setp hm2_7i97.0.ssr.00.out-04 true
exit 0

Es erscheint auch kein Fehler wenn ich ich in der MDI 'M112' eingebe.

Was mach ich falsch oder worauf muss ich noch achten?
linuxcnc.org/docs/2.8/html/gcode/m-code.html#mcode:m100-m199
Hab ich schon durchgelesen.
 

Please Log in to join the conversation.

More
3 years 7 months ago #265648 by MaHa
Replied by MaHa on topic M 100 Code
Vermutlich braucht es halcmd
Code:
halcmd setp hm2_7i97.0.ssr.00.out-04 true

Please Log in to join the conversation.

More
3 years 7 months ago #265650 by Steff87
Replied by Steff87 on topic M 100 Code
Hab ich auch schon versucht, leider ohne erfolg.

Please Log in to join the conversation.

More
3 years 7 months ago #265660 by chris@cnc
Replied by chris@cnc on topic M 100 Code
Moin,
vermutlich ist der PIN  schon in gebrauch und kann nicht extern beschrieben werden.
Wenn du linuxcnc im Termial startest werden die einige Informationen angezeigt. Alternativ kann in der ini der Debug level einstellt werden und du bekommst mehr informationen angezeigt.
linuxcnc.org/docs/stable/html/config/ini...html#sec:emc-section

So ins blaue würde ich raten und in M100 schreiben
Code:
#! /bin/bash halcmd unlinkp hm2_7i97.0.ssr.00.out-04   # Pin in hal deaktivieren sleep 1                                   # 1s warten halcmd setp hm2_7i97.0.ssr.00.out-04 true # Pin setzten  exit 0

Please Log in to join the conversation.

More
3 years 7 months ago #265666 by HansU
Replied by HansU on topic M 100 Code
Funktioniert denn der Befehl "halcmd setp hm2_7i97.0.ssr.00.out-04 true", wenn du ihn so in der Konsole ausfuehrst?

Please Log in to join the conversation.

More
3 years 7 months ago #265698 by Steff87
Replied by Steff87 on topic M 100 Code
halcmd setp hm2_7i97.0.ssr.00.out-04 true
reagiert.

#! /bin/bash
halcmd unlinkp hm2_7i97.0.ssr.00.out-04 # Pin in hal deaktivieren
sleep 1 # 1s warten
halcmd setp hm2_7i97.0.ssr.00.out-04 true # Pin setzten
exit 0

reagiert leider nicht

Please Log in to join the conversation.

More
3 years 7 months ago #265699 by Steff87
Replied by Steff87 on topic M 100 Code
Hier die Bildschirmfotos

Please Log in to join the conversation.

More
3 years 7 months ago #265702 by MaHa
Replied by MaHa on topic M 100 Code
Ich würde M112 mal Versuchsweise in ncfiles ablegen, nochmals die Berechtigung prüfen, und linuxcnc neu starten.

Please Log in to join the conversation.

More
3 years 7 months ago #265705 by Steff87
Replied by Steff87 on topic M 100 Code
Hab ich grad gemacht. Auch nichts

Please Log in to join the conversation.

More
3 years 7 months ago #265707 by MaHa
Replied by MaHa on topic M 100 Code
Bei meinen M codes setzte ich 1 oder 0 und nicht true/false

Please Log in to join the conversation.

Time to create page: 0.134 seconds
Powered by Kunena Forum