# Using expression to select commanded axis?

**URL:** <https://forum.deltamotion.com/t/using-expression-to-select-commanded-axis/889>\
**Category:** RMCTools\
**Created:** [April 19, 2021, 6:05pm UTC](https://forum.deltamotion.com/t/using-expression-to-select-commanded-axis/889 "2021-04-19T18:05:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajoseph](https://forum.deltamotion.com/user_avatar/forum.deltamotion.com/ajoseph/32/499_2.png) [@ajoseph](https://forum.deltamotion.com/u/ajoseph)\
**Post date:** [April 19, 2021, 6:05pm UTC](https://forum.deltamotion.com/t/using-expression-to-select-commanded-axis/889/1 "2021-04-19T18:05:48Z")

</div>

AxisTrnstnRateCmd[4] is a DWORD of value 128  
This tag is used to select command axis as shown in the picture

What axis will be selected and how ? can anyone please explain ?

 ![image](https://forum.deltamotion.com/uploads/default/original/1X/bd28b016c4f039f4f1529ee3c2c1295b02cb5280.png)

---

<div class="post-metadata">

**Author:** ![dmcnichol](https://forum.deltamotion.com/letter_avatar_proxy/v4/letter/d/ba9def/32.png) [@dmcnichol](https://forum.deltamotion.com/u/dmcnichol)\
**Post date:** [April 19, 2021, 6:46pm UTC](https://forum.deltamotion.com/t/using-expression-to-select-commanded-axis/889/2 "2021-04-19T18:46:07Z")

</div>

Hi Joseph,

The axis or axes selected will be based off the bits that are high in your DWORD. the best way to check this is by going to the variable table \> monitor tab, and then expanding the DWORD. For instance, the value 128, displayed in hex as 16#0000\_0080 has only one bit, bit 7, set high and so running this variable as our commanded axis expression would send a command to axis 7.

 ![image](https://forum.deltamotion.com/uploads/default/original/1X/676e3fb91e5b4947f7babb22f982540a96ec3b6c.png)

---

<div class="post-metadata">

**Author:** ![ajoseph](https://forum.deltamotion.com/user_avatar/forum.deltamotion.com/ajoseph/32/499_2.png) [@ajoseph](https://forum.deltamotion.com/u/ajoseph)\
**Post date:** [April 19, 2021, 7:50pm UTC](https://forum.deltamotion.com/t/using-expression-to-select-commanded-axis/889/3 "2021-04-19T19:50:32Z")

</div>

Got it… very well explained…Thanks
