Text window wont display subroutines
- JThom
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
03 Dec 2023 18:58 #287124
by JThom
Text window wont display subroutines was created by JThom
Hello,
when I call a subroutine that's an external file, the text view (both in axis and gmoccapy) doesn't update to display the called file. The code is executed correctly on the machine, and the current line highlight (red bar in axis) appears to move as if in the appropriate sub-routine file, but the displayed text remains that of the original calling file.
I've tried this with actual working files as well as simple test files, with the same results.
Is this a known limitation/expected behavior or user error on my part?
Running LinuxCNC 2.8.2-11
when I call a subroutine that's an external file, the text view (both in axis and gmoccapy) doesn't update to display the called file. The code is executed correctly on the machine, and the current line highlight (red bar in axis) appears to move as if in the appropriate sub-routine file, but the displayed text remains that of the original calling file.
I've tried this with actual working files as well as simple test files, with the same results.
Is this a known limitation/expected behavior or user error on my part?
Running LinuxCNC 2.8.2-11
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23310
- Thank you received: 4858
09 Dec 2023 11:39 #287643
by andypugh
Replied by andypugh on topic Text window wont display subroutines
This is a known "quirk". There is some background about why it is like this, and possible fixes, in these bug reports.
github.com/LinuxCNC/linuxcnc/issues/1694
github.com/LinuxCNC/linuxcnc/issues/2695
github.com/LinuxCNC/linuxcnc/issues/1694
github.com/LinuxCNC/linuxcnc/issues/2695
The following user(s) said Thank You: JThom
Please Log in or Create an account to join the conversation.
- JThom
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
09 Dec 2023 14:51 #287664
by JThom
Replied by JThom on topic Text window wont display subroutines
OK, good to know.
Re' the discussions on github and why you would want to step into a sub-routine:
In my case, my machine performs many of its operations using one-shot tools moving on rams, clamps, and feeders, all fired off in a variety of predetermined patterns, many times per workpiece. As such I make extensive use of loops combined with parameterised, nested subroutines in external files. The current behaviour means its pretty much running blind. Debugging is very difficult, I'm having to use MSG and Debug comments everywhere.
Is there currently a way to see what the interpreter's current line is outside of the GUIs? Echoing to a terminal window or something? Even with lookahead issues it would be a help.
In terms of what typical users might consider expected behaviour, I can only speak for myself being used to a few Fanuc controls of different vintages: M-codes and remapped G-codes highlight and pause at the call, but sub-program files are always displayed and stepped through. iirc those behaviours can be adjusted on some controls.
It seems to be a difficult, deep rooted problem though.
For now I'll try to write a post-processor of sorts to make an unrolled/flattened version of each job as I use it.
Re' the discussions on github and why you would want to step into a sub-routine:
In my case, my machine performs many of its operations using one-shot tools moving on rams, clamps, and feeders, all fired off in a variety of predetermined patterns, many times per workpiece. As such I make extensive use of loops combined with parameterised, nested subroutines in external files. The current behaviour means its pretty much running blind. Debugging is very difficult, I'm having to use MSG and Debug comments everywhere.
Is there currently a way to see what the interpreter's current line is outside of the GUIs? Echoing to a terminal window or something? Even with lookahead issues it would be a help.
In terms of what typical users might consider expected behaviour, I can only speak for myself being used to a few Fanuc controls of different vintages: M-codes and remapped G-codes highlight and pause at the call, but sub-program files are always displayed and stepped through. iirc those behaviours can be adjusted on some controls.
It seems to be a difficult, deep rooted problem though.
For now I'll try to write a post-processor of sorts to make an unrolled/flattened version of each job as I use it.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23310
- Thank you received: 4858
09 Dec 2023 18:16 #287699
by andypugh
Replied by andypugh on topic Text window wont display subroutines
The HAL pin motion.program-line shows the currently executing line number.
I actually use this quite often to remotely monitor my machines.
In an ssh session (on my Mac, but also works from Linux and probably Windows with Exceed or similar) the command "halcmd loadusr halmeter pin motion.program-line" will pop up a window on your local machine showing what the remote machine is doing. Handily the program line goes to 0 when the machine is waiting for a tool change or has completed.
I actually use this quite often to remotely monitor my machines.
In an ssh session (on my Mac, but also works from Linux and probably Windows with Exceed or similar) the command "halcmd loadusr halmeter pin motion.program-line" will pop up a window on your local machine showing what the remote machine is doing. Handily the program line goes to 0 when the machine is waiting for a tool change or has completed.
Please Log in or Create an account to join the conversation.
Time to create page: 0.068 seconds