# Move device

Now that the device has a position reference after homing it, you can start moving it.

First, add the following lines to the imports at the top of the code:

**Python:**

```py
from zaber_motion import Units
```

**C#:**

```cs
// No additional includes needed
```

**JavaScript:**

```js
const { Length } = require('@zaber/motion');
```

**Java:**

```java
import zaber.motion.Units;
```

**MATLAB (legacy):**

```matlabjava
import zaber.motion.Units;
```

**MATLAB:**

```matlab
import zaber.motion.Units;
```

**Octave:**

```octave
LENGTH_MILLIMETRES = java_get("zaber.motion.Units", "LENGTH_MILLIMETRES");
```

**C++:**

```cpp
// No additional includes needed
```

Then, use the absolute and/or relative movement methods to move the device. The following example demonstrates their usage:

**Python:**

```py
# indent this code under the "with" statement
# Move to 10mm
device.move_absolute(10, Units.LENGTH_MILLIMETRES)
# Move by an additional 5mm
device.move_relative(5, Units.LENGTH_MILLIMETRES)
```

**C#:**

```cs
// Move to 10mm
device.MoveAbsolute(10, Units.Length_Millimetres);
// Move by an additional 5mm
device.MoveRelative(5, Units.Length_Millimetres);
```

**JavaScript:**

```js
// Move to 10mm
await device.moveAbsolute(10, Length.mm);
// Move by an additional 5mm
await device.moveRelative(5, Length.mm);
```

**Java:**

```java
// Move to 10mm
device.moveAbsolute(10, Units.LENGTH_MILLIMETRES);
// Move by an additional 5mm
device.moveRelative(5, Units.LENGTH_MILLIMETRES);
```

**MATLAB (legacy):**

```matlabjava
% Move to 10mm
device.moveAbsolute(10, Units.LENGTH_MILLIMETRES);
% Move by an additional 5mm
device.moveRelative(5, Units.LENGTH_MILLIMETRES);
```

**MATLAB:**

```matlab
% Move to 10mm
device.moveAbsolute(10, Units.Length("mm"));
% Move by an additional 5mm
device.moveRelative(5, Units.Length("mm"));
```

**Octave:**

```octave
% Move to 10mm
device.moveAbsolute(10, LENGTH_MILLIMETRES);
% Move by an additional 5mm
device.moveRelative(5, LENGTH_MILLIMETRES);
```

**C++:**

```cpp
// Move to 10mm
device.moveAbsolute(10, Units::LENGTH_MILLIMETRES);
// Move by an additional 5mm
device.moveRelative(5, Units::LENGTH_MILLIMETRES);
```

The Getting Started guide concludes with the [further steps](https://software.zaber.com/motion-library/docs/binary/tutorials/end_binary.md) section.

## API Reference

- [`Device`](https://software.zaber.com/motion-library/api/py/binary/device.md)
