Modal functions after M30

More
24 Oct 2015 11:41 #64204 by fixer
Hello,

Am I the only one, that is very frustrated by the fact that modal functions display get updated after the look ahead reaches them? The same for current feed rate display, it shows the next programmed feed and not the current one...

for example. I am machining something in my vice, that is always mounted on the machine table and I have it zeroed in G57. Running a program with g57 in firs line, it is moving ok, but the DRO is showing me G54 values, because interpreter lookahead already hit the end of a program... Even more frustrating, having a program that machines something in G57, and something else in another offset, on the DRO and in active G codes list there is always G54.. The same for all other modal functions, like G91,...

In my opinion, Modal G codes should retain after M30, and even more important, the active g codes display should get updated at the moment the function is reached by the program, and not when reached by look-ahead.

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

More
24 Oct 2015 13:28 #64205 by Rick G
Replied by Rick G on topic Modal functions after M30

Running a program with g57 in firs line, it is moving ok, but the DRO is showing me G54 values, because interpreter lookahead already hit the end of a program...

You can try starting and ending your g code with a % instead of ending with a M2 or M30. In which case when the program ends you will still be in G57.
M2 M30
linuxcnc.org/docs/html/gcode/m-code.html#mcode:m2-m30

%
linuxcnc.org/docs/html/gcode/overview.ht...ec:file-requirements

I prefer to use a % and a proper preamble / post amble on all G code. So if you normally work in G57 when you end a program and want to enter a MDI command such as G0 the machine is still in G57 and the results will be as expected.

Rick G
The following user(s) said Thank You: fixer

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

More
24 Oct 2015 13:47 #64206 by fixer
Replied by fixer on topic Modal functions after M30
yeah, but active G-codes still shows the last modal programmed, and not the current one. If you work in G56, and after you change in G57 in the same program, it shows G57 all the time. The active G-Codes should be updated at the moment the program hits it, and not in advance. Is this possible to achieve with the current Linuxcnc build?

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

More
24 Oct 2015 14:20 #64208 by Rick G
Replied by Rick G on topic Modal functions after M30
The codes showing are to be applied to what you would enter in the MDI box. As such they would correctly show the state when the program ends and you would enter some code.

9.3.6 Code Entry
Manual Data Input (also called MDI), allows G-code programs to be entered manually, one line at a time. When the machine is
not turned on, and not set to MDI mode, the code entry controls are unavailable.
Figure 9.4: The Code Entry tab
9.3.6.1
MDI:
This allows you to enter a g-code command to be executed. Execute the command by pressing Enter.
9.3.6.2
Active G-Codes
This shows the
modal codes
that are active in the interpreter. For instance,
G54
indicates that the
G54 offset
is applied to all
coordinates that are entered.

The DRO tab may give you better current information.

Rick G

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

More
24 Oct 2015 14:34 - 24 Oct 2015 14:36 #64209 by fixer
Replied by fixer on topic Modal functions after M30
Using % then the last g-code stays active after prg end. This works, thank you for that. I wasn't aware of that.

But when machining in Auto, when I use different modal functions from the same group, it shows the last code in program file as active from start to end. Example below, it always show G56 on DRO, even when machining on first fixture.
%
G55G17G90
(MACHINING ON FIRST FIXTURE)
G0Z200
X0Y0
Z0
G1X100Y00Z-5F100
(...)
G0Z200
(MOVE TO ANOTHER FIXTURE)
G56
X0Y0
Z0
G1X100Y00Z-5F100
(...)
%
Last edit: 24 Oct 2015 14:36 by fixer.

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

Time to create page: 0.068 seconds
Powered by Kunena Forum