Running Mcode or O subroutine from classicladder
- james891
- Offline
- New Member
Less
More
- Posts: 19
- Thank you received: 0
09 Feb 2020 12:34 #156872
by james891
Running Mcode or O subroutine from classicladder was created 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.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 4957
- Thank you received: 1441
09 Feb 2020 16:30 #156887
by Todd Zuercher
Replied by Todd Zuercher on topic Running Mcode or O subroutine from classicladder
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
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.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23178
- Thank you received: 4861
26 Feb 2020 12:53 #158530
by andypugh
Replied by andypugh on topic Running Mcode or O subroutine from classicladder
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.
Think of it like a way to run MDI commands using HAL pins.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 4957
- Thank you received: 1441
26 Feb 2020 14:00 - 26 Feb 2020 14:02 #158540
by Todd Zuercher
Replied by Todd Zuercher on topic Running Mcode or O subroutine from classicladder
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.052 seconds