Recalculation of impulses
Recalculation of impulses
Help me please! I don’t know in which direction to move to solve the problem (the project for clarification in the appendix) of recalculating the number of incoming pulses and issuing to the controller output. Thanks in advance, Alexander
- Attachments
-
- convert_8_to_6_ATTiNY13.fcfx
- (4.97 KiB) Downloaded 194 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Recalculation of impulses
Hi Alexander,
Please can you provide more information which document are you referring to?
Please can you provide more information which document are you referring to?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Recalculation of impulses
It is necessary to recalculate the pulse repetition rate, for example, for every incoming eight pulses, six are generated in a continuous cycle
Re: Recalculation of impulses
a stepper motor in step-dir mode must receive a certain number of pulses from the pulse counter on the shaft, taking into account the recalculation of their number depending on the wire diameter
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Recalculation of impulses
Hello,
How's this?
How's this?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Recalculation of impulses
Hello! in the simulation, I did not see the relationship between the number of pulses at the input and the number of pulses generated. Also, the use of interrupts is not clear. I am attaching two examples, with and without interruption. Please point out my mistakes. Sincerely, Alexander
- Attachments
-
- convert_8_to_6_ATTiNY13 with intr.fcfx
- (7.4 KiB) Downloaded 177 times
-
- convert_8_to_6_ATTiNY13 original.fcfx
- (6.25 KiB) Downloaded 179 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Recalculation of impulses
Hello,
in your code you have point = point + 3/4
point is a byte and 3/4 in integer maths will be 0.
I've changed your example so that it uses a counter and simply doesn't output every fourth pulse.
in your code you have point = point + 3/4
point is a byte and 3/4 in integer maths will be 0.
I've changed your example so that it uses a counter and simply doesn't output every fourth pulse.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Recalculation of impulses
Thank you very much for your help! My apologies for the incorrect statement of the problem. I made a simple example to understand the algorithm to the solution. I make winding machine. The main shaft turns an ordinary electric motor, adjustable speed. Shaft sensor, outstanding 18 pulses per 1 revolution of the shaft. Shaft stacker with a step of 1 mm. to 1 turn, is driven by a stepper motor with reducer. The use of stepper motor only possible in the step/dir. Depending on the wire diameter for one revolution of the main shaft must produce a certain number of steps stacker, with the factor, why I gave examples of how I tried to make a conversion pulses. Sincerely, Alexander