5 axis with step/dir and encoder
Moderators: TomKerekes, dynomotion
-
- Posts: 6
- Joined: Mon Jul 04, 2022 8:40 pm
5 axis with step/dir and encoder
Hi,
How can I configure Kflop with Kanalog to control 5 axis with step/Dir in closed loop mode?
Best regards
Holger
How can I configure Kflop with Kanalog to control 5 axis with step/Dir in closed loop mode?
Best regards
Holger
- TomKerekes
- Posts: 2180
- Joined: Mon Dec 04, 2017 1:49 am
Re: 5 axis with step/dir and encoder
Hi Holger,
Please be more specific on what types of Drives and Encoders you have.
Please be more specific on what types of Drives and Encoders you have.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
-
- Posts: 6
- Joined: Mon Jul 04, 2022 8:40 pm
Re: 5 axis with step/dir and encoder
Hi,
I use Leadshine EM705 and encoder with quadrature signal.
I tried the closed loop mode on kflop only with one axis and it worked.
When I tried to use the encoder inputs from kanalog connected to kflop, the closed loop mode fails.
Looks like the encoder signal is not passed through…
I wouldn’t mind useing the kflop encoder inputs but there are only 4 available when kanalog is connected.
So what to do with the 5th axis?
Best regards
Holger
I use Leadshine EM705 and encoder with quadrature signal.
I tried the closed loop mode on kflop only with one axis and it worked.
When I tried to use the encoder inputs from kanalog connected to kflop, the closed loop mode fails.
Looks like the encoder signal is not passed through…
I wouldn’t mind useing the kflop encoder inputs but there are only 4 available when kanalog is connected.
So what to do with the 5th axis?
Best regards
Holger
- TomKerekes
- Posts: 2180
- Joined: Mon Dec 04, 2017 1:49 am
Re: 5 axis with step/dir and encoder
Hi Holger,
Do you have differential or single ended encoders?
Do you need Kanalog?
The encoders can be multiplexed over to JP4 and JP6 so that would provide 8 single ended encoder inputs on those (4 each on the first 8 inputs). See example below.
Then 4 Step/Dir outputs from JP5.
Step/Dir Outputs 0-3 can be mux'ed to JP4 and JP6. ie Step/Dir #1 on JP4 pins 15 and 16 might be used for a 5th Step/Dir generator.
Do you have differential or single ended encoders?
Do you need Kanalog?
The encoders can be multiplexed over to JP4 and JP6 so that would provide 8 single ended encoder inputs on those (4 each on the first 8 inputs). See example below.
Then 4 Step/Dir outputs from JP5.
Step/Dir Outputs 0-3 can be mux'ed to JP4 and JP6. ie Step/Dir #1 on JP4 pins 15 and 16 might be used for a 5th Step/Dir generator.
Code: Select all
#include "KMotionDef.h"
main()
{
// Mux encoder inputs from KFLOP JP7 & JP5 to JP4 aand JP6
FPGAW(ENC_NOISE_FILTER_ADD) = ENC_0_3_JP4 + ENC_4_7_JP6 + ENC_NOISE_FILTER_DEFAULT_VAL;
}
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
-
- Posts: 6
- Joined: Mon Jul 04, 2022 8:40 pm
Re: 5 axis with step/dir and encoder
Hi Tom,
Thanks for the input.
I think my encoders are differential (TTL-RS422 standard).
But I thought it could be used single ended?
I need Kanalog some outputs and inputs (spindle control, sensor input, pump relais, ...)
Can I use 5V encoder inputs on JP4 and JP6?
If I am not able to use JP1 from Kanalog, would it be possible to use JP1 for other inputs and how?
Regards
Holger
Thanks for the input.
I think my encoders are differential (TTL-RS422 standard).
But I thought it could be used single ended?
I need Kanalog some outputs and inputs (spindle control, sensor input, pump relais, ...)
Can I use 5V encoder inputs on JP4 and JP6?
If I am not able to use JP1 from Kanalog, would it be possible to use JP1 for other inputs and how?
Regards
Holger
-
- Posts: 6
- Joined: Mon Jul 04, 2022 8:40 pm
Re: 5 axis with step/dir and encoder
Hi Tom,
I've tried your code example:
main()
{
FPGA(STEP_PULSE_LENGTH_ADD)=32 + 0x40;
FPGAW(ENC_NOISE_FILTER_ADD) = ENC_0_3_JP4 + ENC_4_7_JP6 + ENC_NOISE_FILTER_DEFAULT_VAL;
}
But the encoder channel 0 in Kmotion shows no input.
Any idea what is wrong?
Regards
Holger
I've tried your code example:
main()
{
FPGA(STEP_PULSE_LENGTH_ADD)=32 + 0x40;
FPGAW(ENC_NOISE_FILTER_ADD) = ENC_0_3_JP4 + ENC_4_7_JP6 + ENC_NOISE_FILTER_DEFAULT_VAL;
}
But the encoder channel 0 in Kmotion shows no input.
Any idea what is wrong?
Regards
Holger
- TomKerekes
- Posts: 2180
- Joined: Mon Dec 04, 2017 1:49 am
Re: 5 axis with step/dir and encoder
Where did you wire the encoder?
Are bits 16 and 17 toggling on the Digital IO Screen?
Do you have an axis configured to use encoder 0?
Are bits 16 and 17 toggling on the Digital IO Screen?
Do you have an axis configured to use encoder 0?
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
-
- Posts: 6
- Joined: Mon Jul 04, 2022 8:40 pm
Re: 5 axis with step/dir and encoder
Encoder is wired to JP4 Pin 5 and 6.
I think these are bit 16 and 17. Both a toggling on the Digital IO screen.
The oszi also shows a clear signal.
Axis input is set to encoder and the input channel is set to 0.
I think these are bit 16 and 17. Both a toggling on the Digital IO screen.
The oszi also shows a clear signal.
Axis input is set to encoder and the input channel is set to 0.
- TomKerekes
- Posts: 2180
- Joined: Mon Dec 04, 2017 1:49 am
Re: 5 axis with step/dir and encoder
That should work.
Did you download and execute the code example to actually do the multiplex?
Did you set the encoder mode and channel 0 into KFLOP's parameters?
What Version are you using?
Have you Flashed anything into KFLOP?
What is an "oszi"? Oscilloscope?
Did you download and execute the code example to actually do the multiplex?
Did you set the encoder mode and channel 0 into KFLOP's parameters?
What Version are you using?
Have you Flashed anything into KFLOP?
What is an "oszi"? Oscilloscope?
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
-
- Posts: 6
- Joined: Mon Jul 04, 2022 8:40 pm
Re: 5 axis with step/dir and encoder
Hi Tom,
Yes, I meant an oscilloscope.
I've found the problem. It works now.
I would have another question:
If I am using the Kflop inputs for encoder, is it possible to use the Kanalog encoder inputs for other general inputs?
Otherwise I would lose 10 input bits...
Thanks and best regards
Holger
Yes, I meant an oscilloscope.
I've found the problem. It works now.
I would have another question:
If I am using the Kflop inputs for encoder, is it possible to use the Kanalog encoder inputs for other general inputs?
Otherwise I would lose 10 input bits...
Thanks and best regards
Holger