Hi again everybody,
I fought a problem using external wait monitor and PrawnBlaster during compilation of shot in runmanager. The error is shows me is as follows:
Traceback (most recent call last):
File "\\files\Users\tlamich\Pico_test\wait_tst.py", line 49, in <module>
stop(t)
File "c:\users\tlamich\labscript-suite\labscript\labscript\labscript.py", line 3588, in stop
generate_code()
File "c:\users\tlamich\labscript-suite\labscript\labscript\labscript.py", line 3407, in generate_code
device.generate_code(hdf5_file)
File "c:\users\tlamich\labscript-suite\labscript-devices\labscript_devices\PrawnBlaster\labscript_devices.py", line 411, in generate_code
reps = instruction["reps"]
TypeError: string indices must be integers
Compilation aborted.
If I use the internal wait monitor, I have no error and the code executes smoothly. Also If I comment out the line using the 'wait' function I can run the code.
Following is the declaration of wait monitor, and relevant parts of the experimental sequence:
PrawnBlaster(name='prawn', com_port='COM4', num_pseudoclocks=1,use_wait_monitor=False)
#find the COM port and include it here
NI_PCI_6713(name='ni_card_1',parent_device=prawn.clocklines[0],
clock_terminal='PFI2', MAX_name='Dev1')
NI_PCI_DIO_32HS(name='DIO_card',parent_device=prawn.clocklines[0],
clock_terminal='PFI2', MAX_name='Dev2')
WaitMonitor(name='waiter',parent_device=DIO_card,connection='port0/line3',
acquisition_device=ni_card_1, acquisition_connection='ctr0',
timeout_device=ni_card_1, timeout_connection='PFI1')
DigitalOut('WaitDummy',DIO_card,'port0/line7')
start()
t0=0
t=t0
t+=0.1
#choose randomly to trigger the wait monitor or timeout the experiment
a=random()
if a > 0.5:
dig0.go_high(t)
else:
dig0.go_low(t)
Ana1.constant(t, value=1)
t+=0.5
#wait for the trigger
t+=wait('wait_0',t=t,timeout=2.0)
#do things after succesfull retriggering
t+=0.1
...(do some more pulses to see the retriggering)
stop(t)
If anyone knows what I am doing wrong, I'll be very grateful.
Have a great day.
Tomas