- Posts: 3
- Thank you received: 0
macros not triggered with physical button switch
- Joergm
- Topic Author
- Offline
- New Member
-
Less
More
4 years 2 months ago #250029
by Joergm
macros not triggered with physical button switch was created by Joergm
Hi all,
I'm a completely newby with Linuxcnc but was able to get the basics working.
But sorry for the maybe beginners question.
I use a Mesa 7i76e and my xyz steppers are working perfect.
I created a simple macro file which is also working fine when I execute it with the mouse click in MDI mode.
I connected a physical switch on input-00 which is also working as I can see in "auto mode" (the "Load a new program" h-button.button-0 is executed when I press the external button)
But in MDI mode, the first macro is not getting triggered.
My custom_postgui.hal is:
net macro-switch1 gmoccapy.h-button.button-0 <= hm2_7i76e.0.7i76.0.0.input-00
After searching all docus I understand that a macro can only triggerd by external button by going through the virtuell h-buttons. Is this correct?
Any idea what I can try to get macros triggered by a physical button?
Many thanks & best Regards,
Joerg
I'm a completely newby with Linuxcnc but was able to get the basics working.
But sorry for the maybe beginners question.
I use a Mesa 7i76e and my xyz steppers are working perfect.
I created a simple macro file which is also working fine when I execute it with the mouse click in MDI mode.
I connected a physical switch on input-00 which is also working as I can see in "auto mode" (the "Load a new program" h-button.button-0 is executed when I press the external button)
But in MDI mode, the first macro is not getting triggered.
My custom_postgui.hal is:
net macro-switch1 gmoccapy.h-button.button-0 <= hm2_7i76e.0.7i76.0.0.input-00
After searching all docus I understand that a macro can only triggerd by external button by going through the virtuell h-buttons. Is this correct?
Any idea what I can try to get macros triggered by a physical button?
Many thanks & best Regards,
Joerg
Please Log in or Create an account to join the conversation.
- HansU
- Offline
- Moderator
-
Less
More
- Posts: 731
- Thank you received: 217
4 years 2 months ago #250087
by HansU
Replied by HansU on topic macros not triggered with physical button switch
I don't know any other method to run a macro by a hardware pin other than via the h-button.button-0.
What is the problem doing it via this pin?
Maybe you can add a VCP and express that what you want to do in a little python script.
What does your macro do?
What is the problem doing it via this pin?
Maybe you can add a VCP and express that what you want to do in a little python script.
What does your macro do?
Please Log in or Create an account to join the conversation.
- Joergm
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 3
- Thank you received: 0
4 years 2 months ago - 4 years 2 months ago #250094
by Joergm
Replied by Joergm on topic macros not triggered with physical button switch
Thanks Hans,
when I run Linuxcnc from the terminal, the output shows me that the "Button macro_0 has been clicked".
But the macro_0 is not running and nothing happening.
When I click the same macro_0 with the mouse, the macro_0 is executed and runs his gcode.
The macro_0 is a very simple gcode as attached.
I'm running Linuxcnc version 2.8.1 and gmoccapy 3.0.9.1. (not sure if it's worth downgrading ..)
On the end of the day, I try to get a machine working like a "Rose Engine" for engravings
Joerg
when I run Linuxcnc from the terminal, the output shows me that the "Button macro_0 has been clicked".
But the macro_0 is not running and nothing happening.
When I click the same macro_0 with the mouse, the macro_0 is executed and runs his gcode.
The macro_0 is a very simple gcode as attached.
I'm running Linuxcnc version 2.8.1 and gmoccapy 3.0.9.1. (not sure if it's worth downgrading ..)
On the end of the day, I try to get a machine working like a "Rose Engine" for engravings
Joerg
Last edit: 4 years 2 months ago by Joergm.
Please Log in or Create an account to join the conversation.
- HansU
- Offline
- Moderator
-
Less
More
- Posts: 731
- Thank you received: 217
4 years 2 months ago - 4 years 2 months ago #250095
by HansU
Replied by HansU on topic macros not triggered with physical button switch
You are running a fairly old version of Gmoccapy. 3.1.3.8 is the version in current 2.8.3 release. Maybe it's worth upgrading
.
However, your file needs and M2 command at the end. Then it works for me also with gmoccapy.h-button.button-0. (only tried with 3.1.3.10)
However, your file needs and M2 command at the end. Then it works for me also with gmoccapy.h-button.button-0. (only tried with 3.1.3.10)
Last edit: 4 years 2 months ago by HansU.
The following user(s) said Thank You: Joergm
Please Log in or Create an account to join the conversation.
- Joergm
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 3
- Thank you received: 0
4 years 2 months ago #250100
by Joergm
Replied by Joergm on topic macros not triggered with physical button switch
It is working now perfectly after upgrading Lcnc to 2.8.3 with Gmoccapy 3.1.3.8! image missing /media/kunena/emoticons/smile.png
I insert the M2 command before, but it was not solving the issue.
Thanks so much Hans! highly appreciate you help!
Joerg
I insert the M2 command before, but it was not solving the issue.
Thanks so much Hans! highly appreciate you help!
Joerg
Please Log in or Create an account to join the conversation.
Moderators: newbynobi, HansU
Time to create page: 0.054 seconds