there is a sample machine (SIM11) available in the OOTB samples from NX CAM Simulation which shows the movement of a turret. You can reuse this for your project.
Lool at the ToolChange.prg file which is located under ...mach\resource\library\machine\installed_machines\sim11_turn_2ax\cse_driver\fanuc\subprog\ToolChange.prg
Within the subprog there is MOVE command written in AC language (not in NC language) to move the component to a desired position. In your case this is more flexible because you don´t have to do modification within the Machine Configurator. You can write the program with the text editor of your choise. You only have to ensure that the NC command e.g. M6 calls this subprogram.
The parse error comes up due to the uncommented ##LANGUAGE NATIVE line 82 --> this is independent of your request.
I suggest that you go first stepwise through the sim11 sample to understand the workflow and technic