Switching HAL pin in subroutine (macro)
- JuFu
- Offline
- New Member
-
Less
More
- Posts: 11
- Thank you received: 0
21 Feb 2025 10:16 #322190
by JuFu
Switching HAL pin in subroutine (macro) was created by JuFu
I want to set / reset a HAL pin by using G-codes (switching a pneumatic valve on/off).
In the documentation G-code Overview | 4. HAL pins and INI values is written: " ... the only way to set HAL pins from G-code remains M62-M65, M67, M68 and custom M100-M199 codes."
I wrote the below subroutine (macro):
o<test> sub
(MSG, Spannzange öffnen)
M62 #<_hal[hm2_7i76e.0.7i76.0.0.output-00]
o<test> endsub
M2
When I run the macro, the response is: "Benannter Parameter nicht beendet"
(Using gmoccapy Ver 3.4.9 in German language)
Is there a better way to control HAL pins?
If not, what do I need to do?
Juergen
In the documentation G-code Overview | 4. HAL pins and INI values is written: " ... the only way to set HAL pins from G-code remains M62-M65, M67, M68 and custom M100-M199 codes."
I wrote the below subroutine (macro):
o<test> sub
(MSG, Spannzange öffnen)
M62 #<_hal[hm2_7i76e.0.7i76.0.0.output-00]
o<test> endsub
M2
When I run the macro, the response is: "Benannter Parameter nicht beendet"
(Using gmoccapy Ver 3.4.9 in German language)
Is there a better way to control HAL pins?
If not, what do I need to do?
Juergen
Please Log in or Create an account to join the conversation.
- JuFu
- Offline
- New Member
-
Less
More
- Posts: 11
- Thank you received: 0
21 Feb 2025 10:50 #322193
by JuFu
Replied by JuFu on topic Switching HAL pin in subroutine (macro)
Issue solved by using M100
Please Log in or Create an account to join the conversation.
Time to create page: 0.048 seconds