dpio2 - Initialize and Drive the Tweeter DM

dpio2 refers to the output card (a “digital program input/output” card) that ultimately drives the tweeter deformable mirror.

class Output

class dpio2.Output(deviceNumber, outputSize)

Creates a new object of type dpio2.Output. In ShaneAO, the deviceNumber is 1 and the outputSize is 1024.:

import dpio2
foo = dpio2.Output(1,1024)
buf = [0,] * 1024
buf[0] = 43000
foo.write(buf)

Methods

dpio2.Output.write(buffer)

Writes the data in buffer, a tuple which must have the length outputSize, to the dpio2 driver. These int values are sent to a D/A converter. The valid range of these values is 0..65535, which will be converted to an analog output voltage from 0 to ~200V.

dpio2.Output.current()

Returns a tuple of the current buffer contents.

dpio2.Output.logging()

Configure logging for this device.

dpio2.Output.stdout()

Print the current value of the buffer to stdout. Only of any use for debugging.

dpio2.Output.timing()

Return a dictionary containing the current timing information recorded for this DPIO instance.

Data

dpio2.Output.buffer_size

DMA buffer size

dpio2.Output.device

DPIO2 device number

dpio2.Output.frequency

Strobe frequency