Hello Shi,
you might not need a UDF to run your 6DOF. You can set the turbine properties in Dynamic Mesh > Options > Settings > Six DOF.
If you still want to use your UDF, you will need to show the code on the Forum so that we can determine if there's anything wrong.