[?]: CPU224 & 1000ppr encoder, how to calculate RPM?

SIMATIC S7-200/300/400, Step7, PCS7, CFC, SFC, PDM, PLCSIM,
SCL, Graph, SPS-VISU S5/S7, IBHsoftec, LOGO ...
pacheco
Posts: 18
Joined: Tue Mar 13, 2007 6:16 pm

[?]: CPU224 & 1000ppr encoder, how to calculate RPM?

Post by pacheco »

Hello!
I have a rotary pressing device.
The Drive is AC motor with 1000 ppr encoder, Danfoss VLT2800 frequence inverter and PLC-siemens cpu 224.
How can I calculate the RPM with the some encoder.
pacheco
Posts: 18
Joined: Tue Mar 13, 2007 6:16 pm

i found the solution

Post by pacheco »

i think that this is the solution:

Code: Select all

RPM=  (# pulsos/ 1 segundo)x(1 revolucion/# pulsos)x(60 segundos/1 minuto)
                                                          
120 RPM =(2000 pulses/1 second)x(1 revolution/1000 pulses)x(60seconds/1 minute)
Network 1

Code: Select all

LD     SM0.1
CALL   HSC_0, 16#FC, +0, +640000 //Subrutina parametrizada
MOVW   +10, LW4
MOVD   +1000, VD0   // ppr from encoder 
Network 2
Activar periodo de medición
En este caso nosotros estamos calculando un nuevo rango de valor cada 100ms.
Valor de VD4 es actualizado cada 100ms con el número de pulsos que han acurrido en los últimos 100ms del periodo

Code: Select all

LD     SM0.0
TON    T33, LW4   //Timer de 100ms


Network 3
Calcular y almacenar el número de contajes que han ocurrido desde la última vez que este fue ejecutado
como verdadero en VD4
(última vez=último rango medición del timer
La instrucción de menor que permite 10 cuentas de contragolpe para ocurrir (usted puede ajustar según lo necesitado).

Code: Select all

LD     T33
LPS
A      SM36.5
MOVD   HC0, VD4
-D     VD16, VD4
LRD
AN     SM36.5
MOVD   VD16, VD4
-D     HC0, VD4
LRD
A      SM1.2
AD<    VD4, -10
+D     VD0, VD4
LRD
MOVD   HC0, VD16
LRD
MOVW   +100, LW0
/I     LW4, LW0
LRD
EU
INCW   LW2
LRD
+D     VD4, VD20
LRD
AW>=   LW2, LW0
MOVD   VD20, VD8
MOVD   +0, VD20
MOVW   +0, LW2
MOVD   VD8, VD24
*D     +60, VD24
MOVD   VD24, VD12
/D     VD0, VD12
LPP
R      T33, 1
VD8 = frecuency
VD0 = Encoder resolution
VD4 = measurement pulses period .1 s
VD12 = RMP
Last edited by pacheco on Wed Apr 18, 2007 1:51 pm, edited 1 time in total.
wzm
Posts: 9
Joined: Tue Sep 27, 2005 5:28 am
Location: China

Post by wzm »

Hello!
If the cpu is S7-300/400
how can I do?
Thanks!
pacheco
Posts: 18
Joined: Tue Mar 13, 2007 6:16 pm

Function Module

Post by pacheco »

if you have a CPU S7 300 or 400 you need a function module FM350-
this device have the following tasks
• Continuous counting up/down
• Single counting up/down
• Periodic counting up/down
• Frequency measurement
• Rotational speed measurement
• Period duration measurement
• Proportioning
You can start and stop the count either via the user program (software gate) or via
external signals (hardware gate).
Count, gate, and direction signals can be connected directly to the module.