|
1 | | -from labscript import start, stop, add_time_marker, DigitalOut |
| 1 | +from labscript import start, stop, add_time_marker, AnalogOut, DigitalOut |
2 | 2 | from labscript_devices.DummyPseudoclock.labscript_devices import DummyPseudoclock |
3 | 3 | from labscript_devices.DummyIntermediateDevice import DummyIntermediateDevice |
4 | 4 |
|
|
9 | 9 | # to trigger children devices |
10 | 10 | DummyIntermediateDevice(name='intermediate_device', parent_device=pseudoclock.clockline) |
11 | 11 |
|
| 12 | +# Create an AnalogOut child of the DummyIntermediateDevice |
| 13 | +AnalogOut(name='analog_out', parent_device=intermediate_device, connection='ao0') |
| 14 | + |
12 | 15 | # Create a DigitalOut child of the DummyIntermediateDevice |
13 | | -DigitalOut(name='digital_out', parent_device=intermediate_device, connection='do0') |
| 16 | +DigitalOut( |
| 17 | + name='digital_out', parent_device=intermediate_device, connection='port0/line0' |
| 18 | +) |
14 | 19 |
|
15 | 20 | # Begin issuing labscript primitives |
16 | 21 | # A timing variable t is used for convenience |
|
29 | 34 | # Wait for 0.5 seconds |
30 | 35 | t += 0.5 |
31 | 36 |
|
| 37 | +# Ramp analog_out from 0.0 V to 1.0 V over 0.25 s with a 1 kS/s sample rate |
| 38 | +t += analog_out.ramp(t=t, initial=0.0, final=1.0, duration=0.25, samplerate=1e3) |
| 39 | + |
32 | 40 | # Change the state of digital_out, and denote this using a time marker |
33 | 41 | add_time_marker(t, "Toggle digital_out (low)", verbose=True) |
34 | 42 | digital_out.go_low(t) |
|
0 commit comments