---
title: SetPos (set position)
slug: setpos-set-position
docTags: 
createdAt: 2023-04-19T13:40:31.000Z
---

To set the current position of an axis to a certain value, program `SetPos X... Y... Z... A... B... C...`, where all axis words are optional, except that at least one must be used.&#x20;

It is an error if:&#x20;

- All axis words are omitted.

### Example

Set the machine position of the X axis to 100

:::BlockQuote
SetPos x100
:::

Set the machine position of the X axis to the value stored in var #4000

:::BlockQuote
SetPos x#4000
:::

Set the machine position of multiple axes

:::BlockQuote
Setpos x#4000 y#4001 z#4002 a0 b0 c10
:::

Read a position from a Modbus device and set the position to this value; this can be used in a homing routine, for example. For more information on the modbus command reference the [Modbus](docId\:dkUObkUk2JT5u2v2PkZF4) document.

:::BlockQuote
Modbus s1 f3 a0 n1 u700 t=d32
SetPos x#700
:::

