ini w/o restart

More
06 Jan 2011 17:30 - 06 Jan 2011 17:31 #6479 by joeCT
ini w/o restart was created by joeCT
Can anyone tell me how to do this or if you know for sure it is impossible.
I'm using a touch probe to set zero positions for rotational axes. Code updates the ini file with new Home_Offset parameters for the updated zero position. I'd like to get those new zeros active without shutting down and restarting. Thanks alot.
JoeCT
Last edit: 06 Jan 2011 17:31 by joeCT.

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

More
06 Jan 2011 17:46 #6481 by andypugh
Replied by andypugh on topic Re:ini w/o restart
joeCT wrote:

Can anyone tell me how to do this or if you know for sure it is impossible.
I'm using a touch probe to set zero positions for rotational axes. Code updates the ini file with new Home_Offset parameters for the updated zero position. I'd like to get those new zeros active without shutting down and restarting. Thanks alot.
JoeCT


I can think of a couple of ways to do it, but writing to the INI file is not the right way, and won't ever work.

You ought to be able to achieve what you want in G-code, using G10 L2 or G10 L20:
www.linuxcnc.org/docview/html/gcode_main...:G10:-Set-Coordinate
(This is what touch-off does, I believe)

Alternatively (a rather different effect) you could insert offsets between the axis command pins and the stepgen input pins using the hal sum2 (or scale) functions then write to the offset pins of the chosen function using halcmd.

There may be other ways.

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

More
06 Jan 2011 20:10 #6485 by joeCT
Replied by joeCT on topic Re:ini w/o restart
Hey, thanks for the thoughts. I did consider an axis offset but I have a lot of code already running in G53 basic coordinates. It's still an option. the second idea I will look into with my colleague who is more familiar with the "wiring".
Thanks
By the way, rewriting the ini does work, it's just that I have to restart so I guess I agree it's not the way to go even though I can do it through code. It's a waste of time. Any other thought's on this would still be appreciated.

If I can run the ini file without restart, it still seems like a simple way to go to me.

JoeCT

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

More
06 Jan 2011 20:49 #6486 by andypugh
Replied by andypugh on topic Re:ini w/o restart
You can't run the INI file without restarting, that is sort-of why it is called an INI file.

However, many of the parameters in the INI file are used by the HAL file (and nowhere else), you can re-write those values with halcmd setp commands in a shell.

A brief check shows that the home positions are not read by the hal file, nor are there any pins which allow home switch positions to be changed on the fly.

In fact, I have a strong suspicion that changing the home switch position isn't really what you want to do anyway. The [AXIS_0] HOME position is only used during homing, when the sequence is finished then the value of X in machine coordinates (G53) is set to that value. Effectively a G10 L2 P0 (which I think is invalid)

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

Time to create page: 0.074 seconds
Powered by Kunena Forum