# Programmatically set commanded axis in user program

**URL:** <https://forum.deltamotion.com/t/programmatically-set-commanded-axis-in-user-program/79>\
**Category:** Programming\
**Created:** [January 8, 2010, 6:48pm UTC](https://forum.deltamotion.com/t/programmatically-set-commanded-axis-in-user-program/79 "2010-01-08T18:48:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jacob\_Paso](https://forum.deltamotion.com/letter_avatar_proxy/v4/letter/j/439d5e/32.png) [@Jacob\_Paso](https://forum.deltamotion.com/u/Jacob_Paso)\
**Post date:** [January 8, 2010, 6:48pm UTC](https://forum.deltamotion.com/t/programmatically-set-commanded-axis-in-user-program/79/1 "2010-01-08T18:48:44Z")

</div>

In a user program, you can programmatically set the commanded axis. For a command in a user program, the Commanded Axes has an option called Default Axis. The \_CurAxis tag defines the Default Axis for the task on which the user program is running. Therefore, you can use a variable to set the Default Axis.

For example:

 ![step.png](https://forum.deltamotion.com/uploads/default/original/1X/8eb34793b9a1a9d4216b920e3ae38182147bcd09.png)

Notice that \_CurAxis is a DINT.
