G95
Moderators: TomKerekes, dynomotion
G95
Hello Tom,
On my lathe I encountered an issue with G95, at the G1 after the axis would not move
Here is the code :
G43 H1007
G95
G96 M3 S80 D500
G0 X14 Z0
G1 X-1 F0.1
I am using 4.35f version and CSS works very well when jogging. I also tried to use M4 instead of M3 did not work neither. No encoder on the spindle and it is in step/dir mode. (init file attached)
Do you see something incorrect in my code?
Cordially,
Francois
On my lathe I encountered an issue with G95, at the G1 after the axis would not move
Here is the code :
G43 H1007
G95
G96 M3 S80 D500
G0 X14 Z0
G1 X-1 F0.1
I am using 4.35f version and CSS works very well when jogging. I also tried to use M4 instead of M3 did not work neither. No encoder on the spindle and it is in step/dir mode. (init file attached)
Do you see something incorrect in my code?
Cordially,
Francois
- Attachments
-
- Init_CSS.c
- (17.17 KiB) Downloaded 105 times
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: G95
Hi Francois,
Well to do G95 motion synchronized to the Spindle you are expected to have an encoder on the spindle. Since you don't there is no measured Spindle motion and therefore no feed.
To cause the motion to be based on the commanded motion rather than the measured Position you might add this to your forever loop to overwrite the configuration to use Destination.
HTH
Well to do G95 motion synchronized to the Spindle you are expected to have an encoder on the spindle. Since you don't there is no measured Spindle motion and therefore no feed.
To cause the motion to be based on the commanded motion rather than the measured Position you might add this to your forever loop to overwrite the configuration to use Destination.
Code: Select all
Spindle.pEncoderPos = &chan[2].Dest;
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: G95
Hello Tom,
I have been working on the machine, added an encoder on the spindle and some more stuff (also changed the VFD using now analog output from Konnect following the manual) but now G95 doesn't want to work again.
I tried with and without this code in the forever loop Spindle.pEncoderPos = &chan[2].Dest;
I guessed I messed something up in the init file, but I could not figure out what...
Any idea what can be wrong in my code?
Cordially,
Francois
I have been working on the machine, added an encoder on the spindle and some more stuff (also changed the VFD using now analog output from Konnect following the manual) but now G95 doesn't want to work again.
I tried with and without this code in the forever loop Spindle.pEncoderPos = &chan[2].Dest;
I guessed I messed something up in the init file, but I could not figure out what...
Any idea what can be wrong in my code?
Cordially,
Francois
- Attachments
-
- Init_CSS_V7.c
- (19.13 KiB) Downloaded 80 times
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: G95
Francois,
I'd initially leave this:
Spindle.pEncoderPos = &chan[2].Dest;
in to ignore the encoder and work based on commanded destination as before.
You say doesn't work? What happens?
Is Axis #2 Destination advancing on the Axis Screen?
How is the spindle being controlled?
I'd initially leave this:
Spindle.pEncoderPos = &chan[2].Dest;
in to ignore the encoder and work based on commanded destination as before.
You say doesn't work? What happens?
Is Axis #2 Destination advancing on the Axis Screen?
How is the spindle being controlled?
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: G95
Hello Tom,
With and without the code :
Spindle.pEncoderPos = &chan[2].Dest;
The axis 2 is moving on the Axis screen (Dest and position).
Then I tried by rotating the spindle manually (without the code), and then after 2-3 seconds of delay the X axis starts moving according to the G-code.
The spindle is controlled through in 0-10V using konnect as analog output (an axis is defined and used for encoder feedback), spindle rotation is visible on the Axis screen and in KmotionCNC.
Cordially,
Francois
With and without the code :
Spindle.pEncoderPos = &chan[2].Dest;
The axis 2 is moving on the Axis screen (Dest and position).
Then I tried by rotating the spindle manually (without the code), and then after 2-3 seconds of delay the X axis starts moving according to the G-code.
The spindle is controlled through in 0-10V using konnect as analog output (an axis is defined and used for encoder feedback), spindle rotation is visible on the Axis screen and in KmotionCNC.
Cordially,
Francois
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: G95
The encoder may be counting the wrong direction. Try reversing input and output gains.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.