Hello,
Thank you for contacting National Instruments.
The data input of any flex_load_* function is ignored when an inputVector other than 0xFF (255) is specified. For instance, if you use the flex_load_velocity function, the "velocity" input is ignored and the data is pulled from the location in onboard memory specified by the inputVector parameter.
For the flex_load_velocity function,
four variables are required for the data. This is because the data is stored and passed to the function as a 64-bit floating point value. The data is formatted into four 16-bit words, stored in four adjacent memory locations. For more information on this function and the other functions, please refer to the "Onboard Variable, Input, and Return Vectors" entry in the
"General Information" category of the NI-Motion Function Help.
I experimented with this function and used variables 1, 2, 3, and 4 with the values 0x4000, 0x407F, 0x0, and 0x0 respectively. This specifies a velocity of 500 RPM, calculated by IEEE conversion methods. Also note that the order of the words is swapped (in other words, the actual 64-bit value for 500 is 0x407F 4000 0000 0000, and the corresponding variable order is 2, 1, 4, 3).
This website was very helpful when converting between decimal and hexadecimal IEEE 64-bit floating-point numbers.
Hope this helps to clarify the situation.
Best Regards,
Jesse D.
Applications Engineer
National Instruments