Zero Work Offsets using Probe
Posted: Thu May 17, 2018 6:58 pm
Hi
I need to implement a probe function which sets the axes offsets in G54 or whatever offset is currently selected. I could not find any info in the manual. I did find a post referring to example KflopToKMotionCNCFuntions.c and using DoPCFloat(PC_COMM_SET_X,0.0). However this seems to apply to a global offset and not the G54 or G55 work offsets.
I envisage the following steps:
1) Manually select the appropriate work offset on the screen (G54, G55 etc)
2) Click a button on the screen to trigger the probe operation. This will jog the axes to det the probe to touch while watching the I/O pins.
3) After the probe touches I need to
a) Determine which is the current work offset selected on the screen. How
do I need to do that?
b) Read the current value of the axis in G53. I suppose I can use
ch0->OffsetPosition=Position to read the position into variable
OffsetPosition?
c) enter the value of the OffsetPosition for the axis in the selected work
offset.
I will really appreciate assistance with the code to implement this.
Regards
I need to implement a probe function which sets the axes offsets in G54 or whatever offset is currently selected. I could not find any info in the manual. I did find a post referring to example KflopToKMotionCNCFuntions.c and using DoPCFloat(PC_COMM_SET_X,0.0). However this seems to apply to a global offset and not the G54 or G55 work offsets.
I envisage the following steps:
1) Manually select the appropriate work offset on the screen (G54, G55 etc)
2) Click a button on the screen to trigger the probe operation. This will jog the axes to det the probe to touch while watching the I/O pins.
3) After the probe touches I need to
a) Determine which is the current work offset selected on the screen. How
do I need to do that?
b) Read the current value of the axis in G53. I suppose I can use
ch0->OffsetPosition=Position to read the position into variable
OffsetPosition?
c) enter the value of the OffsetPosition for the axis in the selected work
offset.
I will really appreciate assistance with the code to implement this.
Regards