Removing "Run Anyway" message and button in the dialogue?

More
27 Jan 2020 12:05 #155894 by ytiuqibu
Is it possible to remove the "run Anyway" message and button from the dialogue that appears when a file will exceed soft limits?
We are still trying to track down some intermittent joint error causes on X and Z (Y axis is happy with pin set to Both Limits + Home) so in order to have the machine running we have set X and Z to Home only. As a result we will be relying on soft limits in our working config and would rather have users forced to abandon their job if they exceed design parameters (we can use a separate config for those jobs that require pass through or tiling of work pieces).

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

More
27 Jan 2020 15:44 #155920 by bbsr_5a
USE HOME Ref alone untill it runs your way
and dont Forget
HOME_Offset is the SWITCH Position
HOME is the Location the Machine DRIVES to

SO BOTH needs to be Different as Special on More Switches to one PIN
i got all 9Switches on one PIN and it workes great

if you POST your INI the Users here can look at it and Correct the Faults
it is a understanding problem as most are not the English native Thinkers as me also

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

More
28 Jan 2020 06:32 #155978 by ytiuqibu
Thank you I understand the switches fairly well now.
I just need to know how to change the message dialogue box that pops up when a job is outside the limits I have set.

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

More
28 Jan 2020 10:46 #155985 by bbsr_5a
this is for safty
if you want to have no messages set your box to a greater value for testing
and ofcause you can delete the VAR and var.bak file so the setup doesent know were you have been

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

More
28 Jan 2020 11:15 #155992 by ytiuqibu
Yes thank you I understand that too - I don't want to stop the message from appearing I just want to have only one option - that is "Close" so users will come and ask me why they can't run their jobs.
We are a Men's Shed with 90 members and a shared CNC (and other machinery) I can tell them not to click the "Run Anyway" button if the message appears but I would prefer if that button option was not available. In fact it would be good if I could change the words in the message to say "see the supervisor".
Thanks again anyway.

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

More
28 Jan 2020 13:56 #156009 by cmorley
You would need to modify AXIS - this is not configurable otherwise.

Chris

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

More
28 Jan 2020 14:28 #156011 by bbsr_5a
as far as i know THE machine will not run Anyway if there is a Gcode error
did you try to run a G-code that is out of software limits
i just checkt on Plasma and on mill it wont run on my machines in any cases if there is a Limit out of Bounce

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

More
29 Jan 2020 02:12 #156061 by phillc54
You can add this code to your ~/.axisrc file, it will run instead of the same named function in Axis.
def run_warn():
    warnings = []
    if o.canon:
        machine_limit_min, machine_limit_max = soft_limits()
        for i in range(3): # Does not enforce angle limits
            if not(s.axis_mask & (1<<i)): continue
            if o.canon.min_extents_notool[i] < machine_limit_min[i]:
                warnings.append(_("Program exceeds machine minimum on axis %s")
                    % "XYZABCUVW"[i])
            if o.canon.max_extents_notool[i] > machine_limit_max[i]:
                warnings.append(_("Program exceeds machine maximum on axis %s")
                    % "XYZABCUVW"[i])
    if warnings:
        text = "\n".join(warnings)
        return int(root_window.tk.call("nf_dialog", ".error",
            _("Program exceeds machine limits"),
            text,
            "warning",
            0, _("Please see the supervisor"),)) + 1
    return 0
The only change to the original is:
            0, _("Please see the supervisor"),)) + 1
was:
            1, _("Run Anyway"), _("Cancel")))
This change makes only one button and returns 1 so it will always cancel the run command.

If you don't have ~/.axisrc you can create a new one. Be aware that ~/.axisrc applies to all LinuxCNC configs, if you want it for a specific config you need a USER_COMMAND_FILE set in the .ini file for that config.

linuxcnc.org/docs/devel/html/gui/axis.html#_axisrc
linuxcnc.org/docs/devel/html/gui/axis.html#_user_command_file

Tested on LinuxCNC 2.9 but should work on 2.7 & 2.8

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

More
29 Jan 2020 08:08 #156073 by ytiuqibu
Thanks very much Phil - this will give what we need!

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

More
06 Feb 2020 15:16 - 06 Feb 2020 15:16 #156639 by andypugh

Is it possible to remove the "run Anyway" message and button from the dialogue that appears when a file will exceed soft limits?


The dialog is here:
github.com/LinuxCNC/linuxcnc/blob/a7eaec...cripts/axis.py#L1801

I think you would need to change the dialog to always return true (looking at where it is used)

Maybe
    if warnings:
        text = "\n".join(warnings)
        dummy =  int(root_window.tk.call("nf_dialog", ".error",
            _("Program exceeds machine limits"),
            text,
            "warning",
            1, _("Run Anyway"), _("Cancel")))
        return 1
Last edit: 06 Feb 2020 15:16 by andypugh.

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

Time to create page: 0.083 seconds
Powered by Kunena Forum