1/19/2020 7:31 PM | |
Posts: 12 Rating:
|
Hello everyone. I would like measure with proximity sensor the RPM. I have made programm but it is difficult for me to found the previous value in the OB30 (Cyclic interrupt), Cyclic time 1000 ms. What must I change? See attached. Thank you, Thodoris
AttachmentRPM meter.zip (120 Downloads) |
1/19/2020 9:15 PM | |
Joined: 3/16/2015 Last visit: 10/10/2021 Posts: 1250 Rating:
|
You need two different readings in a specified period. You will need another tag to keep track of the count from one interrupt to the next. OldCount = SomeDint CountNow = ID1000 CountPerPeriod = CountNow-OldCount OldCount=CountNow CountPerPeriod/1000ml = SpeedInPulsesPerPeriod (1000 miliseconds) Then you do your conversion to get RPM But it looks like you're using HSC to count periods so you can follow the example right here. |
Last edited by: Jen_Moderator at: 01/20/2020 12:12:35Optimized link. |
|
This contribution was helpful to
1 thankful Users |
1/23/2020 11:14 PM | |
Posts: 12 Rating:
|
Thank you for all. |
This contribution was helpful to
1 thankful Users |
Follow us on