When using torque mode in an AKD Basic program, you must set DRV.CMDSOURCE=0 (Service) and DRV.OPMODE = 0 (Torque) in the program.
If the program executes an IL.CMDU command while DRV.CMDSOURCE=5, it will throw an F825 Runtime error. The runtime error message says that DRV.CMDSOURCE must be set to 5. This is normal for position control, but for torque control it must be set to zero. The Basic program will continue to run even after the command source changes to Service mode.