Hi Francos,
Not sure what you mean by digit. The two muxes are each controlled by a single bit. See KMotionDef.h for the definitions.
Each bit muxes 4 encoder inputs to the first 8 IO bits on JP4 or JP6
SpindleOnCWJogDir.c not working :'(
Moderators: TomKerekes, dynomotion
- TomKerekes
- Posts: 2741
- Joined: Mon Dec 04, 2017 1:49 am
Re: SpindleOnCWJogDir.c not working :'(
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: SpindleOnCWJogDir.c not working :'(
Hello Tom,
Have been through KmotionDef.h, better but still not fully clear for me, lets try with example :
FPGAW(ENC_NOISE_FILTER_ADD) = ENC_0_3_JP4 + ENC_NOISE_FILTER_DEFAULT_VAL;
In this case :
which encoder channel is muxed? (from 0 to 3 ?)
what is the filter ? (ENC_NOISE_FILTER_DEFAULT_VAL? and here I could put whatever number until 255?)
where to connect the encore A B signal (JP4 IO 16&17 ch0, 18&19 ch1, 20&21 ch2, 22&23 ch3 ?)
Then since I need only one channel to be muxed, could it be :
FPGAW(ENC_NOISE_FILTER_ADD) = ENC_0_0_JP4 + 42; ?
With IOs and JP4 to be used 16 & 17?
Cordially
Francois
Have been through KmotionDef.h, better but still not fully clear for me, lets try with example :
FPGAW(ENC_NOISE_FILTER_ADD) = ENC_0_3_JP4 + ENC_NOISE_FILTER_DEFAULT_VAL;
In this case :
which encoder channel is muxed? (from 0 to 3 ?)
what is the filter ? (ENC_NOISE_FILTER_DEFAULT_VAL? and here I could put whatever number until 255?)
where to connect the encore A B signal (JP4 IO 16&17 ch0, 18&19 ch1, 20&21 ch2, 22&23 ch3 ?)
Then since I need only one channel to be muxed, could it be :
FPGAW(ENC_NOISE_FILTER_ADD) = ENC_0_0_JP4 + 42; ?
With IOs and JP4 to be used 16 & 17?
Cordially
Francois
- TomKerekes
- Posts: 2741
- Joined: Mon Dec 04, 2017 1:49 am
Re: SpindleOnCWJogDir.c not working :'(
Hi Francos,
#define ENC_NOISE_FILTER_DEFAULT_VAL 7 // noise rejection filter default value (100MHz/3/7/2 = 2MHz)
#define ENC_0_3_JP4 0x200
#define ENC_4_7_JP6 0x100
It shouldn't matter if the other 3 are also muxed or not if they are not being used.
HTH
correctFPGAW(ENC_NOISE_FILTER_ADD) = ENC_0_3_JP4 + ENC_NOISE_FILTER_DEFAULT_VAL;
In this case :
which encoder channel is muxed? (from 0 to 3 ?)
correct. It is defined as 7 in KMotionDef.h as below which allows counting at ~ 2MHZ.what is the filter ? (ENC_NOISE_FILTER_DEFAULT_VAL? and here I could put whatever number until 255?)
#define ENC_NOISE_FILTER_DEFAULT_VAL 7 // noise rejection filter default value (100MHz/3/7/2 = 2MHz)
correctwhere to connect the encore A B signal (JP4 IO 16&17 ch0, 18&19 ch1, 20&21 ch2, 22&23 ch3 ?)
No. The FPGA is programmed to mux the encoders in 2 groups of 4. There are only 2 bits to control the muxing. Bits 8 and 9 as deined in KMotionDef.h as:Then since I need only one channel to be muxed, could it be :
FPGAW(ENC_NOISE_FILTER_ADD) = ENC_0_0_JP4 + 42; ?
With IOs and JP4 to be used 16 & 17?
#define ENC_0_3_JP4 0x200
#define ENC_4_7_JP6 0x100
It shouldn't matter if the other 3 are also muxed or not if they are not being used.
HTH
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: SpindleOnCWJogDir.c not working :'(
Hello Tom,
Done and works fine, thank you for your precious support !
Cordially
Done and works fine, thank you for your precious support !
Cordially
- TomKerekes
- Posts: 2741
- Joined: Mon Dec 04, 2017 1:49 am
Re: SpindleOnCWJogDir.c not working :'(
Great.
Thanks for taking the time to post back.

Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.