M 100 Code

More
01 Mar 2023 12:11 #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 or Create an account to join the conversation.

More
01 Mar 2023 12:53 #265648 by MaHa
Replied by MaHa on topic M 100 Code
Vermutlich braucht es halcmd
halcmd setp hm2_7i97.0.ssr.00.out-04 true

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

More
01 Mar 2023 13:16 #265650 by Steff87
Replied by Steff87 on topic M 100 Code
Hab ich auch schon versucht, leider ohne erfolg.

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

More
01 Mar 2023 16:43 - 01 Mar 2023 16:44 #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
#! /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
Last edit: 01 Mar 2023 16:44 by chris@cnc.

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

More
01 Mar 2023 18:14 #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 or Create an account to join the conversation.

More
02 Mar 2023 07:52 #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 or Create an account to join the conversation.

More
02 Mar 2023 07:56 #265699 by Steff87
Replied by Steff87 on topic M 100 Code
Hier die Bildschirmfotos
Attachments:

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

More
02 Mar 2023 08:20 #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 or Create an account to join the conversation.

More
02 Mar 2023 09:17 #265705 by Steff87
Replied by Steff87 on topic M 100 Code
Hab ich grad gemacht. Auch nichts
Attachments:

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

More
02 Mar 2023 10:21 #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 or Create an account to join the conversation.

Time to create page: 0.086 seconds
Powered by Kunena Forum