Hello Guest it is October 05, 2024, 12:19:46 AM

Author Topic: Keyboard jogging safety  (Read 3211 times)

0 Members and 1 Guest are viewing this topic.

Keyboard jogging safety
« on: February 23, 2023, 10:57:24 PM »
I had a nasty surprise today:
I was running a program and switched to editing the file and as expected, a new normal looking editing window opened up with the Gcode to be edited. All was fine until I used the cursor keys to move the cursor. The laser moved! The cursor keys were not released when the focus window was switched.

From a machine safety point, if something is non-standard or unexpected event happens, it can be a safety issue or a broken tool or part.
Mach4 ought to disable the modified keys when switching to the editor window.
Bertho
Re: Keyboard jogging safety
« Reply #1 on: February 26, 2023, 07:14:06 PM »
Hi,
its your machine, if you want it to have specific behaviour then you'll have to program it that way.

According to the Keyboard plugin the Cursor keys are for jogging and jogging only. If yoyu wish them to have a different meaning then you'll
have to resolve the clash.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Keyboard jogging safety
« Reply #2 on: February 27, 2023, 11:42:56 AM »
I almost never disagree with Craig!  But Bertho is correct on this one.  Quite dangerous. There was a thread on this when Mach4 first came out.  Mach should check to see if the main window has the focus.  If not then ignore it for Mach proper. 
MTCW
RT
Re: Keyboard jogging safety
« Reply #3 on: February 27, 2023, 02:16:00 PM »
Hi,

Quote
Quite dangerous.

I don't disagree that it dangerous, but Bertho has created that danger by using the cursor keys which are as Mach standard jogging keys.
If you don't want the cursor keys to cause machine movement then for f*****ks sake, disable the jog features, otherwise you are relying on programming to prevent jogging
under some circumstances but not others....and then say Mach is dangerous when some unforeseen circumstance results in the underlying and standard jog functions of the
cursor keys to operate contrary to your intention.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Keyboard jogging safety
« Reply #4 on: February 27, 2023, 03:16:25 PM »
Craig,
I understand the option is there to not use the jogging keys.  You are assuming that only one person is using a machine, there can be various employees, spouses, and kids.  I am not referring to my machine,  Mach4 is sold to the general public and it ought to not have unexpected behavior.

I cannot think of a situation where you need to use the cursor jogging while you are editing gcode.  They ought to be disabled if the main window is not in focus.

I have solved my problem by adding an iMach Vista CNC pendant.  I am writing this to help other people and help Mach4 to be even better.
Bertho
Re: Keyboard jogging safety
« Reply #5 on: February 27, 2023, 03:59:57 PM »
Hi,
the use of the cursor keys for jogging has been standard in Mach, and I'm talking long before Mach4, in fact even Mach3, it was in Mach before that.
You seem to be under the misapprehension that the PC that runs Mach is a PC.....get this.....IT'S NOT!!. The PC that is used to run a Mach machine
is a 'MACHINE CONTROLLER' that just happens to use Windows as an operating system.

Once a PC is connected to a piece of machinery it is, and must now be considered dangerous. You would not tolerate unauthorised personnel come along
and start tapping buttons on a Fanuc machine controller on your VMC would you? No, of course not, it would be dangerous for an unqualified person to randomly start
pushing buttons or spinning the MPG. Why then would you permit such persons to randomly start using your machine controller on your machine. Just
because it looks like a PC does not mean it is so, and neither is it safe for an unqualified person to start using it as a PC as it could cause machine movement.
But, hey, that's what Mach4 IS, it's supposed to make a machine move, that is its primary purpose. If you start doing some word processing or something
then TURN MACH OFF!!

If you don't want the kids or your wife or anyone else to get hurt tell them to leave it alone....its not a toy. Do your kids jump in the car and try to drive it? No, you've taught them
that its not safe to do so.....yet! Well can you not teach them that your machine is potentially dangerous and that they shouldn't fiddle?.

Craig

PS The fact that you're still alive suggests tha you have not made the mistake of telling your wife not to drive the car, a man must be sensible after all!! :D
« Last Edit: February 27, 2023, 04:11:17 PM by joeaverage »
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Keyboard jogging safety
« Reply #6 on: February 27, 2023, 04:51:05 PM »
Craig,
You are arguing against a basic concept: Equipment should be as safe as is reasonably possible and they should behave in an expected manner.
Why argue that it needs to be unsafe?
Disable the keypad jogging if not in active mode and there is a safety improvement.

By the way, I was not using a word processor, I was using the Mach4 "Edit Gcode" function.
Bertho
Re: Keyboard jogging safety
« Reply #7 on: February 27, 2023, 05:01:32 PM »
Hi,

Quote
By the way, I was not using a word processor, I was using the Mach4 "Edit Gcode" function.

That may be so but they keys are assigned as jogging keys in Mach4....are they not?. If you use those key what do you expect to happen?
The machine will move....that's what its supposed to do. If you don't want to have the machine move then disable the buttons, or Disable Mach.

Quote
Disable the keypad jogging if not in active mode and there is a safety improvement.

That is a perfectly good solution....then do it! Its not up to Mach4 or NFS to guess what your situation is. If they did that then there'd be hundreds complaining that
Keyboard Jogging disables all the time. If you have a requirement to make a machine safe then enact it, Mach4 provides all the tools necessary.

Craig

'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Keyboard jogging safety
« Reply #8 on: February 27, 2023, 05:03:45 PM »
You can use the following screen API call to get the active window name - scr.GetActiveWindowText(). You can monitor this in the PLC script and disable the keyboard output when it's not the name of the main GUI window. You can get the name of the main GUI with the following register "core/global/GuiName"
Re: Keyboard jogging safety
« Reply #9 on: February 27, 2023, 05:18:28 PM »
Hi,
that's great idea Swifty.

What is the syntax to using 'scr.GetActiveWindowText()'?. I've never had much success with scr. functions.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'