Physical Buttons in MDI Mode for Macros
- ulistermclane
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
02 Dec 2020 08:47 - 02 Dec 2020 08:51 #190854
by ulistermclane
Physical Buttons in MDI Mode for Macros was created by ulistermclane
I have build an operator panel with physical buttons equivalent to gmoccapy's v-buttons and h-buttons. Button states are collected by an ESP8266 (which is overkill, but that's what I had) and a I2C multiplexer. Button states are transmitted via USB (realtime performance is not needed) using a simple serial protocol. A little python routine(switchpanel.py) takes care to transfer this to the HAL (custom_postgui.hal) .
Everything works nice in all modes except in MDI mode. I have defined two macros (including icons, see UlisCNC.ini) which I can only trigger using the screen buttons but not with the associated physical buttons. How do I need to configure my setup so that the buttons also work for macros? Thanks for a short hint.
Everything works nice in all modes except in MDI mode. I have defined two macros (including icons, see UlisCNC.ini) which I can only trigger using the screen buttons but not with the associated physical buttons. How do I need to configure my setup so that the buttons also work for macros? Thanks for a short hint.
Attachments:
Last edit: 02 Dec 2020 08:51 by ulistermclane.
Please Log in or Create an account to join the conversation.
02 Dec 2020 09:04 #190857
by Aciera
Replied by Aciera on topic Physical Buttons in MDI Mode for Macros
Can you see the pins "switch-h%02d" and "switch-v%02d" change state in "Hal show" when you press the button on the panel?
Please Log in or Create an account to join the conversation.
- ulistermclane
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
02 Dec 2020 09:28 - 02 Dec 2020 10:08 #190862
by ulistermclane
Replied by ulistermclane on topic Physical Buttons in MDI Mode for Macros
Yes, I can see them switching for 100 ms to true and then back to false. As mentioned, all switches work, except for macros in MDI mode. Maybe 100 ms is too short in this case? - just tried 500 ms with no effect so this is not the root cause.
Last edit: 02 Dec 2020 10:08 by ulistermclane.
Please Log in or Create an account to join the conversation.
02 Dec 2020 21:48 #190911
by newbynobi
Replied by newbynobi on topic Physical Buttons in MDI Mode for Macros
Please start your config from a terminal and watch for outputs related to Macros during startup. Then press the physical button and check output.
Do the Macros work if you press the screen button?
Could you post the Macros?
Norbert
Do the Macros work if you press the screen button?
Could you post the Macros?
Norbert
Please Log in or Create an account to join the conversation.
- ulistermclane
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
03 Dec 2020 07:49 #190941
by ulistermclane
Replied by ulistermclane on topic Physical Buttons in MDI Mode for Macros
During startup, both macros are detected:Both macros work in MDI mode. When I push the screen button the output is:and the macro is executed. When I push the physical button, the output is:and nothing more happens. You can find one of the macros in the attachment. It is used to reposition x0/y0 after positioning the mill with a camera which has a certain offset compared to the spindle. The second macro only differs in the offset values .
Thanks for your support!
**** GMOCCAPY INFO ****
**** Entering make macro button
found 2 Macros
Macro cam_offset has image link
Image = /home/uli/linuxcnc/configs/UlisCNC/macros/images/cam_offset.png
Macro las_offset has image link
Image = /home/uli/linuxcnc/configs/UlisCNC/macros/images/las_offset.png
**** GMOCCAPY INFO ****
3 2
RUN
IDLE
Button macro_0 has been clicked
Thanks for your support!
Attachments:
Please Log in or Create an account to join the conversation.
31 Dec 2020 14:40 #193655
by newbynobi
Replied by newbynobi on topic Physical Buttons in MDI Mode for Macros
@ulistermclane
sorry for the delay. I found the bug and was able to fix it. The macro button did expect a pressed signal, but my code sent a clicked signal. I changed that and now it is working as expected. I pushed a fix some minutes ago. After an update to gmoccapy 3.1.2 all should work as expected.
If you use buildbot or the deb packet it could need some time to the fixes to be included.
Norbert
sorry for the delay. I found the bug and was able to fix it. The macro button did expect a pressed signal, but my code sent a clicked signal. I changed that and now it is working as expected. I pushed a fix some minutes ago. After an update to gmoccapy 3.1.2 all should work as expected.
If you use buildbot or the deb packet it could need some time to the fixes to be included.
Norbert
Please Log in or Create an account to join the conversation.
Time to create page: 0.266 seconds