Running Mcode or O subroutine from classicladder

More
09 Feb 2020 12:34 #156872 by james891
Hi there, is it possible to call an Mcode or an O subroutine from classic ladder? For example, I push a button and when I do, an Mcode runs.

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

More
09 Feb 2020 16:30 #156887 by Todd Zuercher
Indirectly yes. By setting up a Halui command Classicladder can trigger the hal pin for the Halui command.
linuxcnc.org/docs/html/man/man1/halui.1.html
The following user(s) said Thank You: james891

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

More
26 Feb 2020 12:53 #158530 by andypugh
Though bear in mind this only works if the system is idle. (ie, not when already running G-code).
Think of it like a way to run MDI commands using HAL pins.

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

More
26 Feb 2020 14:00 - 26 Feb 2020 14:02 #158540 by Todd Zuercher
I didn't think to include that caveat. I don't know if there is any way to interrupt running g-code (auto mode) with other g-code (including m-codes, o-subs...). If you are wanting to execute some g-code process during program execution, you will need to find another way to perform that process that doesn't involve g-code.
Last edit: 26 Feb 2020 14:02 by Todd Zuercher.

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

Time to create page: 0.080 seconds
Powered by Kunena Forum