displaying mm/min on hmi from encoder.

displaying mm/min on hmi from encoder.

Hi I have a simple encoder tracking the linear travel of an axis on on MC405.
I am tracking linear position with the encoder. All works fine. I wanted to also display velocity mm/min while the axis is moving. I cant seem to get my head around the calculation for this. I think its average distance/average time but cant work out how to do this in trio basic . Any pointers ?