Hello Guest it is April 23, 2024, 02:18:14 PM

Author Topic: Setting to millimeters  (Read 6162 times)

0 Members and 1 Guest are viewing this topic.

Re: Setting to millimeters
« Reply #10 on: December 28, 2017, 04:29:42 PM »
Hi Allen,
not quite sure what you mean. What event has taken place?

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Setting to millimeters
« Reply #11 on: December 28, 2017, 05:03:37 PM »
... ConfigureChanged()

Allowing you to handle any updates to the config.
- Robert Beaubien
- Drone Plastics
-
“Dear Algebra, Please stop asking us to find your X.  She's never coming back and don't ask Y.”
Re: Setting to millimeters
« Reply #12 on: December 28, 2017, 05:28:22 PM »
The act of visiting MMach's configuration screen has screwed up the jog settings that were previously in use. The event was to close this screen, causing Mach to re-load possibly outdated settings from the .INI file. Maybe I just need to flush data more promptly to it rather than waiting for Mach to close. I may give that a try when I have a moment.

Allan
Re: Setting to millimeters
« Reply #13 on: December 28, 2017, 06:53:50 PM »
Hi Allen,
there is not any signal of that description to my knowledge. To define your own signal I believe requires a plugin which is a whole different kettle of fish.

There are some helpful APIs:

Quote
rc = mc.mcProfileFlush(
      number mInst)


Quote
rc = mc.mcProfileReload(
      number mInst)

Quote
I think I've narrowed the bug down
When I first encountered this behavior I too thought I had found a bug but as smurphs explanation makes plain it was that I did not understand how Mach was organized
not a bug at all.

'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Setting to millimeters
« Reply #14 on: December 28, 2017, 06:56:19 PM »
I would call that a bug under any circumstances.  Software should never allow itself to get out of sync with requested settings like that.  It should detect the problem and force a restart or something of that nature.  They clearly understand the issue, they just need to take the time to fix it.
- Robert Beaubien
- Drone Plastics
-
“Dear Algebra, Please stop asking us to find your X.  She's never coming back and don't ask Y.”
Re: Setting to millimeters
« Reply #15 on: December 28, 2017, 07:24:58 PM »
Hi.
I disagree, Mach never gets out of sync with itself it is we who get out of step with Mach.

As you have discovered shutting down and restarting Mach does the trick OR use the APIs provided.

If I am doing something programmatically the I use the APIs for other tweaks is use the shutdown/restart method.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Setting to millimeters
« Reply #16 on: December 28, 2017, 09:05:06 PM »
How would you feel about it if Microsoft Word changed your printer settings after you specifically set something else? And then told you , you have to restart Word anytime you change a printer setting because some machine.ini has conflicting information and is being loaded at the wrong time causing unknown things to happen when you print?  I think you'd agree that was a bug.  Same difference here.  I do software development for a living and if I wrote code like that, I would starve.
- Robert Beaubien
- Drone Plastics
-
“Dear Algebra, Please stop asking us to find your X.  She's never coming back and don't ask Y.”
Re: Setting to millimeters
« Reply #17 on: December 29, 2017, 03:11:02 AM »
Hi,
read smurphs explanation again, there specific times and circumstances that Mach flushes settings to the ini file and certain occasions when it reads it.
There are APIs to force a flush or re-read. The means are there to have Mach perform as you wish...the question is do you want to take advantage of it.

Craig



'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Setting to millimeters
« Reply #18 on: December 29, 2017, 03:21:45 AM »
We're not talking about a setting that hasn't already been saved and loaded due to a reboot, nor are we talking about the setting we are modifying getting out of sync with what is currently loaded.   The current config already has the units set to metric.  The metric setting has already been changed and mach4 rebooted.  Changing the motor Units/min speed should NEVER cause the jog rate to change from metric to inches.  The machine.ini file should contain the metric setting already.  Something is not paying attention to the units selection already loaded and stored and simply setting the jog rate to inches.  That is a bug.  If that doesn't convince you, then we will have to agree to disagree.
« Last Edit: December 29, 2017, 03:31:38 AM by RBeaubien »
- Robert Beaubien
- Drone Plastics
-
“Dear Algebra, Please stop asking us to find your X.  She's never coming back and don't ask Y.”
Re: Setting to millimeters
« Reply #19 on: December 29, 2017, 05:00:22 AM »
As far as I can see, JogUnitsMode is always set to imperial following configuration of Mach4. JogMode is likewise set to continuous. These do not appear in machine.ini, however, so are perhaps defaults within the core. Flushing, saving, or re-loading profiles is not going to help.

The problem is that scripts are unaware of these changes. Yet they could easely take steps to re-initialise if a suitable signal were provided to indicate the potential need for this.

I tend to side with Robert  on this one in thinking that this is an unfortunate feature of Mach4, if not an outright bug.

For now, the best remedy is to restart Mach4 after configuration, whether or not changes were made.

Allan