axis display not highlighting code line when exicuting
- isdicnc
- Offline
- New Member
Less
More
- Posts: 13
- Thank you received: 0
29 Jun 2022 21:59 - 29 Jun 2022 22:01 #246222
by isdicnc
axis display not highlighting code line when exicuting was created by isdicnc
Hi,
I am running the code below in LinuxCNC using the "axis" GUI. The code runs, but when it ends the G code cursor highlights line 14. Should it not return back up to the top of the program when it hits M30?
Once it has stopped I hit the single block and it doesn't highlight any lines of code until the fifth "click" and then line 11 becomes highlighted.
Shouldn't the GUI be highlighting the active line of code? And why would it skip highlighting lines above 11?
AXIS shows version 2.8.2-131-gf324cd6e2
Cheers,
len
I am running the code below in LinuxCNC using the "axis" GUI. The code runs, but when it ends the G code cursor highlights line 14. Should it not return back up to the top of the program when it hits M30?
Once it has stopped I hit the single block and it doesn't highlight any lines of code until the fifth "click" and then line 11 becomes highlighted.
Shouldn't the GUI be highlighting the active line of code? And why would it skip highlighting lines above 11?
AXIS shows version 2.8.2-131-gf324cd6e2
Cheers,
len
1: %
2: O666
3: (LINUXCNC TEST1)
4:
5: N10
6: G17 G40 G80 G90 G64 G20
7: T01 M06
8: S100 M03
9: G00 G55 X0 Y0
10: G43 H1 M8
11: G00 Z0.1
12: G01 Z0 F10.
13: X-1.0 F100.
14: Y-1.0
15: M30
16: %
Last edit: 29 Jun 2022 22:01 by isdicnc.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23170
- Thank you received: 4860
29 Jun 2022 23:06 #246234
by andypugh
Replied by andypugh on topic axis display not highlighting code line when exicuting
It only highlights lines that create an entry in the motion queue.
There are good reasons for this that it probably isn't worth the trouble to work around.
There are good reasons for this that it probably isn't worth the trouble to work around.
Please Log in or Create an account to join the conversation.
- isdicnc
- Offline
- New Member
Less
More
- Posts: 13
- Thank you received: 0
30 Jun 2022 00:18 #246238
by isdicnc
Replied by isdicnc on topic axis display not highlighting code line when exicuting
It is helpful from our experience to know what has been set and what movement to expect. It can help to avoid breaking things.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23170
- Thank you received: 4860
30 Jun 2022 22:49 #246328
by andypugh
Replied by andypugh on topic axis display not highlighting code line when exicuting
Well, if it is motion that you care about, the motion codes all get higlighted. It's the modal stuff that does not create an item in the motion queue that aren't.
Even if there were dummy items added to the queue to hold line numbers for non-motion codes, they still wouldn't be highlighted (except possibly in single-step mode) as they take zero time to execute.
Even if there were dummy items added to the queue to hold line numbers for non-motion codes, they still wouldn't be highlighted (except possibly in single-step mode) as they take zero time to execute.
Please Log in or Create an account to join the conversation.
- cakeslob
- Offline
- Platinum Member
Less
More
- Posts: 799
- Thank you received: 231
01 Jul 2022 00:54 - 01 Jul 2022 01:00 #246334
by cakeslob
I think thats what he means, single stepping from the start of a program, gets wierd. Theres not really any indication that anything is happening, if theres a motion line, but no motion takes place(you are already in that position) nothing is highlighted or any indication program is running. If you have remaps or toolchange, it jumps 1000's of lines ahead. It becomes more manageable with G61 active, but the first time I single step from the start of a program, I found it jarring.
Replied by cakeslob on topic axis display not highlighting code line when exicuting
(except possibly in single-step mode)
I think thats what he means, single stepping from the start of a program, gets wierd. Theres not really any indication that anything is happening, if theres a motion line, but no motion takes place(you are already in that position) nothing is highlighted or any indication program is running. If you have remaps or toolchange, it jumps 1000's of lines ahead. It becomes more manageable with G61 active, but the first time I single step from the start of a program, I found it jarring.
I also find it annoying, one of the things I want to look into changing, in my quest to make axis feel more like a fanucI am running the code below in LinuxCNC using the "axis" GUI. The code runs, but when it ends the G code cursor highlights line 14. Should it not return back up to the top of the program when it hits M30?
Last edit: 01 Jul 2022 01:00 by cakeslob.
Please Log in or Create an account to join the conversation.
- isdicnc
- Offline
- New Member
Less
More
- Posts: 13
- Thank you received: 0
03 Jul 2022 19:23 #246528
by isdicnc
Replied by isdicnc on topic axis display not highlighting code line when exicuting
Correct, this is in single step mode. We are developing tooling that attaches to our CNC machine and the manual step process is where we verify if something/nothing is going to break expensive tools.
So just from an architectural standpoint where does the code highlighting happen? I assume that the GCODE interpreter in EMCTASK creates actions that do into the motion queue (NML?). Does AXIS pick up that same event and step the cursor? Or is (NML) a separate queue that receives mirrored information?
len
So just from an architectural standpoint where does the code highlighting happen? I assume that the GCODE interpreter in EMCTASK creates actions that do into the motion queue (NML?). Does AXIS pick up that same event and step the cursor? Or is (NML) a separate queue that receives mirrored information?
len
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23170
- Thank you received: 4860
03 Jul 2022 19:50 #246532
by andypugh
Replied by andypugh on topic axis display not highlighting code line when exicuting
It is much as you say. The interpreter converts the G-code in to "canonical commands" which are then sent (via NML, reasons that I am nit entirely sure of, given the current architecture of LinuxCNC) to the trajectory planner. At this point the data is transferred into the motion queue in the realtime layer.
Each motion is part of a struct that also contains the line number of the G-code that created it.
As the queue is executed the currently executing line number is passed back up to userspace.
But, only lines that became an item in the queue have numbers, anything that just caused a modal change in the next command won't show.
This is also why single-step skips non-motion lines, as that happens down at the TC level.
I think that the only way to get non-motion lines to highlight and to single-step would be to insert no-op items into the queue.
Then the question becomes, "is it worth it" and "who dare touch that most fundamental bit of the system"
Each motion is part of a struct that also contains the line number of the G-code that created it.
As the queue is executed the currently executing line number is passed back up to userspace.
But, only lines that became an item in the queue have numbers, anything that just caused a modal change in the next command won't show.
This is also why single-step skips non-motion lines, as that happens down at the TC level.
I think that the only way to get non-motion lines to highlight and to single-step would be to insert no-op items into the queue.
Then the question becomes, "is it worth it" and "who dare touch that most fundamental bit of the system"
Please Log in or Create an account to join the conversation.
- isdicnc
- Offline
- New Member
Less
More
- Posts: 13
- Thank you received: 0
03 Jul 2022 20:20 #246536
by isdicnc
Replied by isdicnc on topic axis display not highlighting code line when exicuting
Thanks andypugh,
I understand the hesitance. Your comments are very helpful. I don't mind digging into it, though I am only proficient in C. The areas of Python and C++ will take some time for me to understand. If anyone has insights that would be much appreciated.
len
I understand the hesitance. Your comments are very helpful. I don't mind digging into it, though I am only proficient in C. The areas of Python and C++ will take some time for me to understand. If anyone has insights that would be much appreciated.
len
Please Log in or Create an account to join the conversation.
Time to create page: 0.057 seconds