# API Reference v10.3.1 (Python)

## PvtBuffer (class)

Module: zaber_motion.ascii

Represents a PVT buffer with this number on a device. A PVT buffer is a place to store a queue of PVT actions.

The following example illustrates how you can obtain an instance of this type:

```py
from zaber_motion.ascii import Connection

connection = Connection.open_serial_port("COM3")
device = connection.get_device(1)
pvt = device.pvt
pvt_buffer = pvt.get_buffer(1)
```

Related Guides:

- [Position Velocity Time (PVT)](https://software.zaber.com/motion-library/docs/guides/device_features/pvt.md)

### Properties

#### `buffer_number` (read-only)

`pvt_buffer.buffer_number`

Type: `int`

The number identifying the buffer on the device.

#### `device` (read-only)

`pvt_buffer.device`

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

The Device this buffer exists on.

### Methods

#### `erase()` (async available)

`pvt_buffer.erase()`

Erases the contents of the buffer. This method fails if there is a PVT sequence writing to the buffer.

#### `get_content()` (async available)

`pvt_buffer.get_content()`

Gets the buffer contents as an array of strings.

##### Return Value

Type: `List[str]`

A string array containing all the PVT commands stored in the buffer.

#### `retrieve_sequence_data()` (async available)

`pvt_buffer.retrieve_sequence_data(axes = None, time_units = Units.NATIVE)`

Gets the buffer contents as an array of PvtSequenceItem objects.

##### Arguments

| Name | Type | Description |
| --- | --- | --- |
| `axes` | [`Optional[List[PvtBufferAxisUnits]]`](https://software.zaber.com/motion-library/api/py/ascii/pvtbufferaxisunits.md) | Per-axis unit conversion specification. The length must match the number of axes in the buffer. When omitted, position and velocity values are returned in native units. |
| `time_units` | [`UnitsAndLiterals`](https://software.zaber.com/motion-library/api/py/root/units.md) | Units to convert time values to. Defaults to native. |

##### Return Value

Type: [`List[PvtSequenceItem]`](https://software.zaber.com/motion-library/api/py/ascii/pvtsequenceitem.md)

The PVT data loaded from the buffer.
