Thank you Mr Ihor Nehrutsa.. I did not even think about it. There is no other way of example of digital imput rpm?
Wed Nov 1 2017, 03:18:59
(no subject)(by Ziggy)
Razi,
What does Your Speed signal look like?
Is it a pulse train?
IS it an analogue voltage?
You must be more specific when asking for help.
Wed Nov 1 2017, 03:39:03
(no subject)(by Razi)
Yes Mr Ziggy.. a pulse train input..
Wed Nov 1 2017, 20:58:22
(no subject)(by Razi)
Example .. rpm 0 to 3000 and output pwm by rpm, output up and down according to down and rise rpm.
Pulse in by position sensor active low.
Tq for helping me..
Wed Nov 1 2017, 21:19:30
(no subject)(by Ziggy)
More questions...
How many pulses per revolution?
Wed Nov 1 2017, 22:06:54
(no subject)(by Razi)
1pulses/revolution..
Wed Nov 1 2017, 23:15:15
(no subject)(by Ziggy)
OK we have some numbers to work with now.
0 to 3000 RPM gives 0 to 50 revs per second.
So highest pulse rate is 50 Hz.
All you need to do is to set up a counter capable of counting a 50 Hz signal.
To do that You need to have a PLC loop time of at most 10mili seconds and a counting period of at least one second.
However the longer the counting period the higher the granularity of your measurement.
Say you measure over ten seconds then Your count at 3000RPM will be 500 pulses.
If you measure over sixty seconds Your count will be 3000 pulses.
Now that You have measured RPM You can scale RPM directly in terms of PWM percentage and output PWM signal.
Your PWM output will be good for output resolution of 1%.
So may be measuring RPM over a 2 second time interval will give you a direct count of pulses from 0 to 100 over speed of interest.
This way no need to scale simply load count into duty cycle variable.
Major problem... PLC loop cycle 10 mS. Must run the micro sufficiently quickly to be able to meet the loop cycle time.
Thu Nov 2 2017, 03:04:57
(no subject)(by Ziggy)
One other caveat
At maximum RPM the pulse width should be as close as practicable to the PLC loop time.
At lower RPM the pulse time should not drop below PLC loop time.
Depending on needed resolution it might be a good idea to pass the RPM pulses through a divide by 2 flip flop and sample over four seconds.
Thu Nov 2 2017, 20:25:37
(no subject)(by Razi)
Thank you for this enlightenment but sy still lacking understanding .. but how to create diagram ladder .. can make me ld code?
Fri Nov 3 2017, 07:18:15
(no subject)(by Ziggy)
How to create ladder diagram?
Is this a question about how to actually draw the diagram using LDmicro....
or