I am using a Mako G-040B camera in my device, and controlled by NI 6254 card. I use the code from
https://github.com/fretchen/synqs_devices, and the snap() function works fine in the Blacs. I try to take photos in the Labscript sequence, but it shows the warning first and then the timeout error:
I run the script and noticed that when the camera exposes, the GUI shows "Transitioning to manual" mode, so I click the Mako_trigger twice in the GUI, and the script successfully finishes with two images taken.
I wonder why my script does not work. Here is the connection table and the sequence:
PrawnBlaster(
name="prawnblaster_0",
com_port="COM3",
num_pseudoclocks=2,
)
NI_PXI_6254(
name="ni_card_1",
parent_device=prawnblaster_0.clocklines[0],
clock_terminal="/PXI1Slot2/PFI0",
MAX_name="PXI1Slot2",
max_AO_sample_rate=400e3,
)
mako_attributes = {
"AcquisitionMode": "MultiFrame",
"ExposureMode": "TriggerWidth",
"ExposureTimeAbs": 3000,
"TriggerActivation": "LevelHigh",
"TriggerMode": "On",
"TriggerSelector": "FrameStart",
"TriggerSource": "Line1",
}
Mako_Camera(name="Mako", parent_device=ni_card_1, connection="port0/line0", serial_number='DEV_000F315E2CC6', camera_attributes=mako_attributes)
DigitalOut(
name='digital0', parent_device=ni_card_1, connection='port0/line0'
)
DigitalOut(
name='digital1', parent_device=ni_card_1, connection='port0/line1'
)
start()
t += 0.01
Mako.expose(t, name='comparison', frametype='before', trigger_duration=2)
t += 0.5
digital0.go_high(t=t)
t += 0.5
digital0.go_low(t=t)
t += 1.5
Mako.expose(t, name='comparison', frametype='after', trigger_duration=2)
t += 0.5
digital0.go_high(t=t)
t += 0.5
digital0.go_low(t=t)
t += 1
t += 0.5
stop(t=t)