6/1/2022 7:44 AM  
Joined: 1/31/2018 Last visit: 11/16/2023 Posts: 16 Rating: (0) 
Hello all I have make a project which i have connect an encoder to I4 to calculate the m/min. With AI1 (I7) i put the set value which is how many meter i want to 1 meter. I compare the set value and the actual speed and with two digital output turn forward and backward a valve which move the turbine of motor to reach the minute per 1 meter which i want. The radious of encoder roller is 40mm,and PPR is 2000 pulses. I upload the programm and i would like to discus about them project,i have same fault of calculation or something else which i cant see? Thank you for your help Attachmentmeter_per_minute.zip (256 Downloads) 
6/1/2022 9:32 AM  
Joined: 8/12/2021 Last visit: 11/30/2023 Posts: 249 Rating: (26) 
Hi sakis_1! In this link you can find examples for the LOGO! You may find some of them useful for your project.

If this Information really helps, you could use the Rate function 

6/1/2022 11:12 AM  
Joined: 1/31/2018 Last visit: 11/16/2023 Posts: 16 Rating: (0) 
My worry is the calculating of speed,meter/mmiute,because i am little confuse,because of logo manage only integer values,maybe have fault in this point 
6/1/2022 11:13 AM  
Joined: 1/31/2018 Last visit: 11/16/2023 Posts: 16 Rating: (0) 
If same member with more experiance than me ,check my calculation its right in my programm 
6/1/2022 11:57 AM  
Joined: 2/22/2008 Last visit: 11/30/2023 Posts: 2698 Rating: (203) 
Which maximum value do you need for m/min ? If e.g. 32,767 m/min is enough, then it would be better to calculate directly in mm/min and setting of 3 decimalplaces. Regards, Scorp 
6/1/2022 12:09 PM  
Joined: 1/31/2018 Last visit: 11/16/2023 Posts: 16 Rating: (0) 
Hello the speed is lower than 32,768,it max around 10 m/min. So the calculation of speed its correct ,i am right? 
6/1/2022 6:54 PM  
Joined: 2/22/2008 Last visit: 11/30/2023 Posts: 2698 Rating: (203) 
It seems to be okay, but 2 * Pi * 40 / 2000 * 1000 = 125,6637. You can increase the accuracy in your formula as follow: * 60 > * 6 and / 1000 > / 10000, then you can multiply with 12566 mm/min = freq * 6 * 12566 / 10000 Another way is the gate time setting of the digital threshold trigger. One turn is 2 * Pi * 40 = 251,327 mm = 2000 pulses => 251,327 / 2000 => 0,1256637 mm / pulse 10000 mm/min => 79577 pulses / min = 1.326 pulses / s = 1000 pulses / 0,754s Change gate time to 0,75s, then the calculation is ready in one step. You only need the arithmetic for decimal places, because the threshold trigger has no settings for decimal places. Your way is also okay, but you can see another option. Regards, Scorp 
This contribution was helpful to1 thankful Users 
6/2/2022 9:23 AM  
Joined: 1/31/2018 Last visit: 11/16/2023 Posts: 16 Rating: (0) 
Thank you very very match for your advise for the other option. i have something else,in the B002 (counter for calculating the actual distance) when its reach 32768 pulse in the B007 isnt possible to calculating any more. For example if the distance is 350 meter,how can i calculate this and display in the logo display? Best Regard 
6/2/2022 10:49 AM  
Joined: 2/22/2008 Last visit: 11/30/2023 Posts: 2698 Rating: (203) 
Split the counter in two parts, first counter for mm, second counter for m. 1000 mm => 7958 (7957,7) pulses Reset first counter reaching 7958 and increase second counter for m by one. Display two parts mm = first counter * 1000 / 7958, m = second counter directly. If you have problems to cascade the counters, then ask for details. Regards, Scorp 
This contribution was helpful to1 thankful Users 
6/2/2022 12:28 PM  
Joined: 1/31/2018 Last visit: 11/16/2023 Posts: 16 Rating: (0) 
Thank you again,its works very well with two timers ,one for mm and the other for meter Best Regard 
Follow us on