Kflop Wiring for Leadshine Close loop step servo CSM22430

Moderators: TomKerekes, dynomotion

AmitKumar171
Posts: 134
Joined: Tue Feb 20, 2018 7:35 am
Location: India

Re: Kflop Wiring for Leadshine Close loop step servo CSM22430

Post by AmitKumar171 » Wed Jul 24, 2019 2:13 pm

Dear Tom,

Thank you for the information. Very sorry for asking many questions.
“Variable depending on Step Frequency (motor speed)”
1. So the name, “Step Frequency” is same as ‘Step rate’ is same as ‘Pulse input Frequency’ (mentioned in Driver Specification) is same as ‘1/Time Period’ is same as ‘1/tON+tOFF’ right?

PFA waveform image for all conversation below

2. Step Frequency controlled by varying the Step pulse width right?
3. For controlling the motor speed, only Pulse width should varies and keeping “Time Period T” (and or Pulse input frequency F=1/T) is constant right?
The pulse length may be adjusted from 1 to 63 of 16.67 MHz clocks. Which corresponds to 60ns to 3.78us.. As per the example/calculation in the manual, 60nS to 3.78us corresponds to 8.33MHz (=1/2X60nS) to 132.27KHz (=1/2X3.78uS), right
That is basically correct. But KFLOP specifies a maximum Step Rate of 2.5MHz. Also the minimum Step Period (1/Frequency) does not necessarily need to be 2X the Step Pulse Width. It depends on cabling and Drivers.”
4. What is the minimum and maximum Pulse input frequency ranges can be set?
5. “60nS to 3.78uS” is the Step Pulse Width(tON) or Step Pulse Period(Time Period)?
6. Step Rate mean Pulse input frequency (F=1/Time Period) right?
7. STEP_PULSE_LENGTH_ADD)=X; means, X is the minimum Step pulse width and we are adding X pulse width to the Gcode or some other input pulse width right?
8. We are setting only step pulse width(t_ON),then how we can setting the pulse input frequency without knowing the t_OFF or time period?
Because in the example mentioned “1/(2 x 2us) = 250KHz” 2 refers to 50% duty cycle i.e t_ON=tOO right?
9. How I can set “Low level width (t_OFF)” which is mentioned in the driver datasheet? Settings required?
10. If STEP_PULSE_LENGTH_ADD)=1 what is the Pulse width(t_ON), Low Width(t_OFF), Pulse period(T) and Pulse input frequency? Can we set to 1? because, as you told “maximum Step Rate of 2.5MHz”? or else give the example with maximum frequency (with decimal value) we can set.
11. If STEP_PULSE_LENGTH_ADD)=63 what is the Pulse width(t_ON), Low Width(t_OFF), Pulse period(T) and Pulse input frequency?
“FPGA(STEP_PULSE_LENGTH_ADD)=42;”
12. Step pulse Input Frequncy is 200Khz and it is constant even if motor speed is varies right?
13. In the attached waveform T is constant even if the motor speed varies and only the t_ON , t_off increase or decrease with respect to motor speed right? but t_ON+t_OFF=T=5uS=200Khz right?
“Also the minimum Step Period (1/Frequency) does not necessarily need to be 2X the Step Pulse Width. It depends on cabling and Drivers.”
14. We have confusion here, T=1/F and F=1/2*t, I understand t_on=t_OFF. Then in which condition you have given the example as “1/(2 x 2us) = 250KHz” in the manual?
15. Step Size mean Pulse Width(tON time) right?

Regarding to CW/CCW we are facing some issues and I will explain you later.

Thanking you.
Attachments
Step-DIR.png
Thank You

AMIT KUMAR

User avatar
TomKerekes
Posts: 2540
Joined: Mon Dec 04, 2017 1:49 am

Re: Kflop Wiring for Leadshine Close loop step servo CSM22430

Post by TomKerekes » Wed Jul 24, 2019 5:01 pm

Hi Amit,

You seem to have a total misunderstanding. It is very simple. Every Pulse has the same Pulse Width of time. Each pulse causes the motor to move some amount. When moving slow there is a long time between pulses. When moving fast there is less time between pulses. Note the signals may be inverted so it is confusing to use Ton and Toff.

StepPulseWidth.png
1. So the name, “Step Frequency” is same as ‘Step rate’ is same as ‘Pulse input Frequency’ (mentioned in Driver Specification) is same as ‘1/Time Period’ is same as ‘1/(tON+tOFF)’ right?
Correct

PFA waveform image for all conversation below
Diagram seems incorrect. Normally 'Ton' refers to the active pulse. Only the inactive time varies.

2. Step Frequency controlled by varying the Step pulse width right?
No. Step Frequency is controlled by varying the time between pulses.

3. For controlling the motor speed, only Pulse width should varies and keeping “Time Period T” (and or Pulse input frequency F=1/T) is constant right?
No.

4. What is the minimum and maximum Pulse input frequency ranges can be set?
KFLOP can output pulses from 0Hz - 2.5MHz

5. “60nS to 3.78uS” is the Step Pulse Width(tON) or Step Pulse Period(Time Period)?
It is the Step Pulse Width. In your diagram it would be Toff

6. Step Rate mean Pulse input frequency (F=1/Time Period) right?
Correct.

7. STEP_PULSE_LENGTH_ADD)=X; means, X is the minimum Step pulse width and we are adding X pulse width to the Gcode or some other input pulse width right?
No.

FPGA(STEP_PULSE_LENGTH_ADD)=X;

X sets the Step Pulse Width. To move at different speeds the time between pulses varies.

8. We are setting only step pulse width(t_ON),then how we can setting the pulse input frequency without knowing the t_OFF or time period?
Because in the example mentioned “1/(2 x 2us) = 250KHz” 2 refers to 50% duty cycle i.e t_ON=tOO right?
The Step Pulse Width is marked Toff in your diagram.

Again KFLOP varies the time between pulses depending on how fast the motor should move. If the motor is moved faster and faster there will be a point when the time between pulses is the same as the Step Pulse Width. At this speed the duty cycle will be 50%.

9. How I can set “Low level width (t_OFF)” which is mentioned in the driver datasheet? Settings required?
Do not command the axis so fast that the time between pulses becomes too small.

10. If STEP_PULSE_LENGTH_ADD)=1 what is the Pulse width(t_ON), Low Width(t_OFF), Pulse period(T) and Pulse input frequency?
This sets the Step Pulse Width to 60ns. The time between pulses and the Period depend on what speed the motor is commanded to move.

Can we set to 1? because, as you told “maximum Step Rate of 2.5MHz”? or else give the example with maximum frequency (with decimal value) we can set.
Yes. At 2.5MHz a pulse will occur every 400ns. Therefore the Step Pulse Width should be less than 400ns in order to have any time between pulses. Most Drives and cables will not work at these rates but KFLOP is capable of working at these rates.

11. If STEP_PULSE_LENGTH_ADD)=63 what is the Pulse width(t_ON), Low Width(t_OFF), Pulse period(T) and Pulse input frequency?
The Step Pulse Width will be 3.78us

12. Step pulse Input Frequncy is 200Khz and it is constant even if motor speed is varies right?
No.

13. In the attached waveform T is constant even if the motor speed varies and only the t_ON , t_off increase or decrease with respect to motor speed right? but t_ON+t_OFF=T=5uS=200Khz right?
No.

14. We have confusion here, T=1/F and F=1/2*t, I understand t_on=t_OFF. Then in which condition you have given the example as “1/(2 x 2us) = 250KHz” in the manual?
Sorry I don't understand the question.

15. Step Size mean Pulse Width(tON time) right?
No. Step Size is the amount the motor moves for each Step Pulse. For example with a stepper motor that has 200 Full Steps/revolution and 16X microstepping then the Step Size will be 1/3200 of a revolution.
Regards,

Tom Kerekes
Dynomotion, Inc.

AmitKumar171
Posts: 134
Joined: Tue Feb 20, 2018 7:35 am
Location: India

Re: Kflop Wiring for Leadshine Close loop step servo CSM22430

Post by AmitKumar171 » Thu Jul 25, 2019 2:40 pm

Dear Tom,

Thank you for the information.

1. “Time between Pulse” which one is correct T1 or T2 or both in the waveform?
1. Time bw Pulse.png
1. Time bw Pulse.png (7.49 KiB) Viewed 3279 times
“Diagram seems incorrect. Normally 'Ton' refers to the active pulse. Only the inactive time varies.”
2. In Inverse Diagram: t1, t3 is t_ON and t2, t4 is t_OFF right?
In Non-Inverse Diagram: a1, a3 is t_ON and a2, a4 is t_OFF right?
2. Inverse tON tOFF.png
1. “In some examples have explained, motor speed will be controlled by controlling only the Duty cycle and Frequency/TimePeriod is remains constant. PFA image 3 -found in website.
2. And in some examples motor speed will be controlled by controlling the frequency. Here both Duty cycle,Pulse Width(t_ON), t_OFF and TimePeriod all will varies.”
3. Which one is correct? Both correct? or any other method can also be implement?
3. Duty Cycle.png
4. PFA the wave forms variation in Low speed and High Speed for setting “FPGA(STEP_PULSE_LENGTH_ADD)=42;”
Kindly tell us which is correct and wrong as per the comments on the image?
4. Waveforms.png
“FPGA(STEP_PULSE_LENGTH_ADD)=42;
42 sets the Step Pulse Width. To move at different speeds the time between pulses varies.”
5. In “42”, Pulse Width=t_ON=2.5uS,in this case, Time between pulses varies only by varying either t_ON or t_OFF or both(Time period) right?

6. For increasing the speed, the number of pulses per second should increase and not the pulse width time right? Or both will do?

7. In “42”, Pulse Width=t_ON=2.5uS, t_On is constant for both low Speed and Higher speed or it should varies?

8. In “42”, Pulse Width=t_ON=2.5uS,t_on i.e pulse width will goes less than 2.5uS for varying the speed?

9. In “42”, Pulse Width=t_ON=2.5uS, mean we are defining the minimum Pulse Width or Maximum Pulse width or we are limiting the Frequency.

10. In “32”, Pulse Width=t_ON=2uS, As you told frequency should be depends on the input commands, Then how you calculate in the manual “1/(2 x 2us) = 250KHz.” Can we refer this calculation or its not applicable?
3. Duty Cycle.png
Thank You

AMIT KUMAR

User avatar
TomKerekes
Posts: 2540
Joined: Mon Dec 04, 2017 1:49 am

Re: Kflop Wiring for Leadshine Close loop step servo CSM22430

Post by TomKerekes » Sun Jul 28, 2019 4:00 pm

1 - it can be defined either way

2 - yes if that is how you want to define them

3 - doesn't apply. You are confusing Pulse Width Modulation (PWM) with Step/Direction

4 - #2 seems correct

5 - only Toff varies

6 - only pulses/sec will increase

7 - Pulse Width never changes

8 - Pulse Width never changes

9 - Pulse Width never changes

10 - doesn't apply. You are confusing Pulse Width Modulation (PWM) with Step/Direction
Regards,

Tom Kerekes
Dynomotion, Inc.

AmitKumar171
Posts: 134
Joined: Tue Feb 20, 2018 7:35 am
Location: India

Re: Kflop Wiring for Leadshine Close loop step servo CSM22430

Post by AmitKumar171 » Mon Jul 29, 2019 1:49 pm

Dear Tom,

Thank you very much for your support.

Yes, I was confusing PWM. And now I understand PWM method is only for DC Motors and for stepper motor we don’t use PWM. Thanks for your advice.
So the Pulse width(T_ON) remains constant for any Speed, but the Duty cycle, T_OFF, Time period, Frequency will be changing with respect to the Motor speed.


1. I have bit confused, Inverse Signal mean polarity should be higher level and it actives at lower level right? You have advised the inverse and non inverse settings with waveform. kindly check whether its correct or waveform was interchanged?
Invert vs Non.png
2. In NON INVERSE waveform, a1,a3 is T_ON and a2,a4 is T_OFF.A1 is raising edge and A2 is Falling Edge right?
In INVERSE waveform, t1,t3 is T_ON and t2,t4 is T_OFF right? Which one is raising edge and Falling Edge?
2. Inverse tON tOFF.png
As per the driver specification
Step Pulse (T_ON): > 2.5uS
Direction setup time: > 5uS
Low level width (T_OFF): >2.5uS
Pulse input Frequency: < 200KHz

If we configure the settings to “FPGA(STEP_PULSE_LENGTH_ADD)=52;” The Pulse Width will be 3.12uS and Directional Setup will be 5.04uS and both remains constant for any speed.
3. There is no configuration settings for Low Level width(T_OFF) and Pulse input Frequency? Then how it achieves the driver specification? Is it not necessarily important? Kindly advise.

4. For “FPGA(STEP_PULSE_LENGTH_ADD)=52;” T_ON is 3.12uS constant. What will be the T_OFF minimum and maximum ranges? What will be the Pulse Frequency range?

5. For “FPGA(STEP_PULSE_LENGTH_ADD)=42;” T_ON is 2.52uS constant. What will be the T_OFF minimum and maximum ranges? What will be the Pulse Frequency range?
Thank You

AMIT KUMAR

User avatar
TomKerekes
Posts: 2540
Joined: Mon Dec 04, 2017 1:49 am

Re: Kflop Wiring for Leadshine Close loop step servo CSM22430

Post by TomKerekes » Tue Jul 30, 2019 3:55 pm

Hi Amit,

1 - The scope plots are labeled correctly as to what KFLOP does. Active high or Active low depends on your system. You can always check this yourself with a voltmeter.

2 - Rising and Falling terminology is probably a poor choice of words. 'Beginning' or 'ending' of the pulse might be better. Or 'leading' or 'trailing' edge of the pulse might be better. The idea is to use the polarity so your Drive "steps" at the end of the pulse so it has the maximum Direction setup time. This is the 5.76us measurement shown in the two scope images.

3, 4, 5 - Its up to you to never command your axis to such a high speed that will violate the timing specifications of your Drives. If your Drives require a Ton of 2.5us and a Toff of 2.5us then never command higher than 1/(2.5us + 2.5us) = 200000 steps/second.
Regards,

Tom Kerekes
Dynomotion, Inc.

AmitKumar171
Posts: 134
Joined: Tue Feb 20, 2018 7:35 am
Location: India

Re: Kflop Wiring for Leadshine Close loop step servo CSM22430

Post by AmitKumar171 » Wed Jul 31, 2019 2:19 pm

Dear Tom,

Thank you for the information.

Specification of our Drivers are
https://www.leadshineusa.com/productdet ... el=cs-d508
Step Pulse: > 2.5uS
Pulse input Frequency: < 200KHz
Direction setup time: > 5uS
PUL/DIR Voltage level: 4.5-5V for voltage HIGH, 0-0.5V for voltage LOW
(Open Collector Driver connected to KFLOP JP5 and JP7)
Driver Waveform.png
1. Kindly advice which one have to use for the above specification/Waveform, “FPGA(STEP_PULSE_LENGTH_ADD)=XX;” or “FPGA(STEP_PULSE_LENGTH_ADD)=XX + 0X80;” ? Kindly advice the XX value also.
2. In the driver which switch we have to enable either Falling or Raising switch according to your recommended settings in 1?
3. Kindly Suggest all the better Configuration Settings we have to do for the above Driver Specification in the firmware.
2 - Rising and Falling terminology is probably a poor choice of words. 'Beginning' or 'ending' of the pulse might be better. Or 'leading' or 'trailing' edge of the pulse might be better. The idea is to use the polarity so your Drive "steps" at the end of the pulse so it has the maximum Direction setup time. This is the 5.76us measurement shown in the two scope images.
T1, A1 is Beginning edge and T2,A2 is Ending Edge.
4. But, Its important because in the driver need to enable the Raising or Falling Switch. Kindly advice Which one I can consider Raising and Falling in the diagram.
2. Inverse tON tOFF.png

5. So, We are defining only T_ON in the firmware and it is constant. T_OFF and Frequency/speed is only depends on the User inputs i.e RPM on the KMOTION right?
Thank You

AMIT KUMAR

AmitKumar171
Posts: 134
Joined: Tue Feb 20, 2018 7:35 am
Location: India

Re: Kflop Wiring for Leadshine Close loop step servo CSM22430

Post by AmitKumar171 » Wed Aug 07, 2019 5:45 am

Dear Tom,

Thank you for the information.
Kindly advise for few more things. It's very important for us, We are in trouble and we have to solve for that.

Specification of our Drivers are
https://www.leadshineusa.com/productdet ... el=cs-d508
Step Pulse: > 2.5uS
Pulse input Frequency: < 200KHz
Direction setup time: > 5uS
PUL/DIR Voltage level: 4.5-5V for voltage HIGH, 0-0.5V for voltage LOW
(Open Collector Driver connected to KFLOP JP5 and JP7)
Driver Waveform.png
1. Kindly advice which one have to use for the above specification/Waveform, “FPGA(STEP_PULSE_LENGTH_ADD)=XX;” or “FPGA(STEP_PULSE_LENGTH_ADD)=XX + 0X80;” ? Kindly advice the XX value also.
2. In the driver which switch we have to enable either Falling or Raising switch according to your recommended settings in 1?
3. Kindly Suggest all the better Configuration Settings we have to do for the above Driver Specification in the firmware.
2 - Rising and Falling terminology is probably a poor choice of words. 'Beginning' or 'ending' of the pulse might be better. Or 'leading' or 'trailing' edge of the pulse might be better. The idea is to use the polarity so your Drive "steps" at the end of the pulse so it has the maximum Direction setup time. This is the 5.76us measurement shown in the two scope images.
T1, A1 is Beginning edge and T2,A2 is Ending Edge.
4. But, Its important because in the driver need to enable the Raising or Falling Switch. Kindly advice Which one I can consider Raising and Falling in the diagram.
2. Inverse tON tOFF.png
5. So, We are defining only T_ON in the firmware and it is constant. T_OFF and Frequency/speed is only depends on the User inputs i.e RPM on the KMOTION right?
Thank You

AMIT KUMAR

User avatar
TomKerekes
Posts: 2540
Joined: Mon Dec 04, 2017 1:49 am

Re: Kflop Wiring for Leadshine Close loop step servo CSM22430

Post by TomKerekes » Wed Aug 07, 2019 5:29 pm

Hi Amit,

1,2,3,4 - use XX = 63 to obtain > 5us Direction Setup Time.

The polarity will determine on which edge the Leadshine steps on. You would need to determine this as it is not clear to me from the specification. You can test from the Digital IO Screen. Or just try both ways.

5 - correct do not go too fast to exceed the allowed step frequency and violate the timing requirements:

1/(3.78us + 2.5us) = 159KHz
Regards,

Tom Kerekes
Dynomotion, Inc.

AmitKumar171
Posts: 134
Joined: Tue Feb 20, 2018 7:35 am
Location: India

Re: Kflop Wiring for Leadshine Close loop step servo CSM22430

Post by AmitKumar171 » Fri Aug 23, 2019 2:09 pm

Dear Tom,

Thank you very much for all your advice and appreciate your support.

I have discussed with Driver manufacturers and we are having few doubts.

1. As you sent the below waveforms 1,2,3, kindly confirm the measured points in the KFLOP to get the waveform on the Oscilloscope:- Its a Point A with respect to B or Point B with respect to C on the image 5 below?
Step-Dir Waveform.png
Low Polarity Signal(High level Logic).png
Measuring Point-KFLOP.png
2. For measuring the PUL/DIR Voltage level by multimeter, Measuring point will be "PUL+ w.r.t PUL-" or "PUL- w.r.t GND"? Because we are getting different reading. Which point is correct?
3. KFLOP also supports for Common Cathode (PNP Signal)? Is “LVTTL-step/Dir” is a Common Cathode?
4. Both Waveform 1 &2 above is an Open collector configuration?

5. As driver Manufacturer said, Low Polarity (Inverted) Pulse (Fig2) is a common Anode and High Polarity(Non Invert) signal (Fig 1) is Common Cathode configuration. Is this true? Both configuration provides different Polarity?

6. For FPGA(STEP_PULSE_LENGTH_ADD)=XX; Initially i.e before pulsing(No Pulse) the I/O switch on the KFLOP(Fig 5) is opened or closed(Grounded)?
7. For FPGA(STEP_PULSE_LENGTH_ADD)=XX+0x80; Initially i.e before pulsing(No Pulse) the I/O switch on the KFLOP(Fig 5) is opened or closed(Grounded)?
Thank You

AMIT KUMAR

Post Reply