Running Mcode or O subroutine from classicladder

More
6 years 8 months ago #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 to join the conversation.

More
6 years 8 months ago #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

Please Log in to join the conversation.

More
6 years 8 months ago #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 to join the conversation.

More
6 years 8 months ago #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.

Please Log in to join the conversation.

Time to create page: 0.077 seconds
Powered by Kunena Forum