8.2.4.3.14.2. Create, Obtain, Remove

8.2.4.3.14.2.1. Create and Obtain

Create a histogram on the port, and obtain the histogram object. The histogram index is automatically assigned by the port.

Corresponding low-level API class: PD_CREATE

dataset = await port.datasets.create()

8.2.4.3.14.2.2. Obtain One

Obtain an existing histogram on the port with an explicit histogram index.

dataset = port.datasets.obtain(key=0)

8.2.4.3.14.2.3. Obtain Multiple

Obtain multiple existing histograms on the port with explicit histogram indices.

dataset_list = port.datasets.obtain_multiple(*[0,1,2])

8.2.4.3.14.2.4. Remove

Remove a histogram on the port with an explicit histogram index by the index manager of the port.

Corresponding low-level API class: PD_DELETE

await port.datasets.remove(position_idx=0)