synthetos / TinyG

Affordable Industrial Grade Motion Control
https://github.com/synthetos/TinyG/wiki
897 stars 293 forks source link

machining state is set on M commands but not reset #112

Open jkuusama opened 9 years ago

jkuusama commented 9 years ago

See https://www.synthetos.com/topics/file-not-open-error/

"The file not open error is returned when someone tries to change values in EEPROM while the machine is moving (for EEPROM writes, interrupts have to be disabled for a “long” time which would mess up step pulses etc). The new value is still being set, but not written back to EEPROM, so the old value will be used after you reset the tinyg.

The machining state is correctly set when the machine is moving, and also correctly reset when the movement is finished. The funny thing (aka bug) is that it is also set when M8 (or any other M command) is executed after the movement stops. It is only reset when another movement is started and finished."

aldenhart commented 9 years ago

"File not open" is a bit opaque, but the intention is to warn the user that commands that change values cannot perform persistence (EEPROM writes) while the machine is moving. I will leave this issue open as we would like a better solution for this condition.

jkuusama commented 9 years ago

Hi Alden,

This is ok (with the explanation). The message isn’t the clearest, but not intended to an end user anyway. As a developer, knowing what the problem is, is enough.

But talking about setting values: My machine probes Z height regularly. It works fine (see https://www.youtube.com/watch?v=0bYrwi3UA_A , first probe about 2min into the video). However, I’m concerned about EEPROM endurance. There has been some discussion about probing, any news on this? Or is this a real problem in the first place?

Are you reading EEPROM values directly or do you have a RAM copy of the values? If latter, how difficult would it be to setup a guard flag for settings: reset on start, set/reset on command. While set, setups work as normally but values are stored. I’m asking from two angles: I appreciate very much your effort on the software, and hate to put extra burdens on you. Still, if this is trivial, it would be nice. The other angle is that if it is not trivial, how difficult would you think it might be for someone not familiar with your code (but knowing how to program) to implement something like this?

Best regards

Juha

From: Alden Hart [mailto:notifications@github.com] Sent: Monday, February 23, 2015 1:27 PM To: synthetos/TinyG Cc: Juha Kuusama Subject: Re: [TinyG] machining state is set on M commands but not reset (#112)

"File not open" is a bit opaque, but the intention is to warn the user that commands that change values cannot perform persistence (EEPROM writes) while the machine is moving. I will leave this issue open as we would like a better solution for this condition.

— Reply to this email directly or view it on GitHub https://github.com/synthetos/TinyG/issues/112#issuecomment-75526095 . https://github.com/notifications/beacon/AEeI5vB7xEzaAaUhvtumAVRjXznpniIeks5nuwX2gaJpZM4DKnB9.gif