Control of servo motors for position and constant angular velocity

Hello everyone,
I am currently using Dynamixel MX-28AT(2.0) actuators. I wish to accomplish few things. Please guide me-
Setup -
3 servos are series connected and controlled by TTL pulse from U2D2 controller+ 12V SMPS.
Issue -

  1. Actuators in position control mode using equations. Equation I am using to code -
    alpha = alpha_0 /(2tanh(2.7)) * tanh(2.7sin(2pif*t))
    where f - frequency of cycle , t is time step.
    This is the motion I want to give to motors, how should I code so that the motor motion is finished in T=1/f . Depending on the interval ‘t’ the servos are slowing down or speeding up. 2.Also how to run servos on constant angular velocity?
    Thanks in advance and thank you for your time.