Hello! I would like someone to advise me how to write a function code which to calculate the speed (in mm/s) of a moving film ,from an encoder position ; in detail, I need to cut the film at a certain position and its speed is necessary in a computing formula for cutter blade action; the speed is variable (due to reel brakes behaviour in low speed), and I would like to calculate the speed at every 20 ms , and to update this value in general cutting action formula; one encoder pulse is one mm traveling of the film; the problem is that I need speed samples at every 20 ms; the encoder position increases from 0 to one certain number when is reset back to zero by a photoeye ; again, as the speed is oscilating i wanna know at every 20 ms the film speed; P.S. I work in RSLogix 5000 thank you! with regards!