The units of the velocity registers are in a unit of pps (pulse per second). This is equivalent to microsteps/second. If you are operating with 256 microsteps per fullstep, and 200 fullsteps / revolution, 51200pps would be equivalent to 1 revolution per second (256 uSteps * 200 FullSteps = 51200 uSteps per rotation).
Converting this value to hex depends on the velocity register being written to, as they have different bit lengths and formats.
VACTUAL is a 32 bit signed value with no decimal places. This value uses 2's compliment for negative numbers. The MSB is the sign bit.
VSTART, VSTOP, and VBREAK are all unsigned 31 bit values; 23 bits for the integer portion, and 8bits for the decimal place. the 23 MSBs use a normal hex to dec conversion for the integer portion. The 8 LSBs represent the decimal portion of this value. This is computed as a fraction of fullscale. To put it mathematically: Hex2Dec(HEX_VALUE) / Hex2Dec(0xFF) = Fractional_value
VMAX is signed 32 bit. The 24 MSBs represent the integer portion in 2s complement, and the 8 LSBs represent the fractional decimal place. Again, the fraction is computed as a fraction of full scale (See Equation Above).
For the fractional registers, VSTART, VSTOP, VBREAK, and VMAX, an easy way to compute your hex value is to multiply your desired value by 256 and then convert to hex. This will account for the decimal place.
As an example, if I am set to 256 microsteps and have a 1.8deg motor (200 fullsteps per rotation), and I want the motor to spin at 100 rpm, I would do the following conversion:
(100 rev/minute) / (60 seconds/minute) = 1.66667 rev/second
1.66667 rev/second * 200 Fullstep/rev = 333.333 fullsteps/second
333.333 fullsteps/second * 256 uStep/Fullstep = 85333.3333 pps
Now to convert 85333.333 to Hex:
Multiply by 256: 85333.333 * 256 = 21845333.33
Remove the remaining decimal places. These cannot be represented by an 8 bit decimal place.
Convert to hex: Dec2Hex(21845333) = 0x014D5555
We can check this value by separating into integer and decimal portions. Integer portion should equal 85333, and decimal portion should be approximately 0.333 (there will be some rounding error):
Integer: Hex2Dec(0x014D55) = 85333
Decimal: Hex2Dec(0x55) / Hex2Dec(0xFF) = 85 / 255 = .33333
We can see that multiplying by 256 and then converting to hex is a quick and valid way to convert these fractional velocity values into hex.
As an alternative, we provide a Calculation Excel Document that is helpful for converting Velocity to hex, as well as acceleration values, and ramp parameters.