You need to have some record of the time. I have modified your attached vi to include some "time stamp" of your position measurements. Then, using a shift register, the previous measurement is used to calculate the DeltaX and the DeltaT, then to calculate the velocity as DeltaX/DeltaT.
However, such a simple calculation will have an accuracy that depends directly on the position accuracy and on the velocity of the robot. The loop timing (Here I used a delay of 100 ms)should be optimized.
CC
Chilly Charly (aka CC)
E-List Master - Kudos glutton - Press the yellow button on the left...