I see in the discussion
https://groups.google.com/g/labscriptsuite/c/4ctKDJoNysA/m/Vht6A2JaCAAJ that this functionality is not immediately supported in labscript. However, it seems the NI infrastructure for distributing the pseudoclock signal through the chassis via a shared bus exists. For us, it would be a waste and redundant to add new hardware, just so we can tell labscript that each card has a clock terminal dev{idx}/PFI0.
To test labscript on our experiment, we run a short script, with a prawnblaster clockline connected to dev1/PFI0. We run into two distinct problems, depending on how we configure the connection table. If we configure the table as:
"""
NI_PXI6713(name='ni_analog_card_1',
...,
clock_terminal='/Dev1/PFI0',
MAX_name='Dev1')
NI_PXI6713(name='ni_analog_card_2',
...,
clock_terminal='
/Dev2/PXI_Trig0',
MAX_name='Dev2')
NI_PXI6534(name='ni_analog_card_3',
...,
clock_terminal='
/Dev3/PXI_Trig0',
MAX_name='Dev3')
NI_PXI6534(name='ni_analog_card_4',
...,
clock_terminal='
/Dev4/PXI_Trig0',
MAX_name='Dev4')
"""
after running a shot we encounter the error message in the blacs tabs for cards 2, 3, and 4, but not for card 1, suggesting that the connection table has not properly configured cards 2, 3, 4 for receiving pseudoclock triggers:
"""
Traceback (most recent call last):
File "C:\Users\Fermi1\AppData\Local\conda\conda\envs\labscript_py38\lib\site-packages\labscript_devices\NI_DAQmx\blacs_workers.py", line 357, in transition_to_manual
task.WaitUntilTaskDone(1)
File "<string>", line 3, in WaitUntilTaskDone
File "<string>", line 2, in function
File "C:\Users\Fermi1\AppData\Local\conda\conda\envs\labscript_py38\lib\site-packages\PyDAQmx\DAQmxFunctions.py", line 62, in mafunction
raise exception_class(errBuff.value.decode("utf-8"), f.__name__)
PyDAQmx.DAQmxFunctions.WaitUntilDoneDoesNotIndicateDoneError: Wait Until Done did not indicate that the task was done within the specified timeout.
Increase the timeout, check the program, and make sure connections for external timing and triggering are in place.
Task Name: _unnamedTask<1>
Status Code: -200560
in function DAQmxWaitUntilTaskDone.
Fatal exception in main process - Mon May 23, 14:35:43 :
Traceback (most recent call last):
File "C:\Users\Fermi1\AppData\Local\conda\conda\envs\labscript_py38\lib\site-packages\blacs\tab_base_classes.py", line 837, in mainloop
next_yield = inmain(generator.send,results)
File "C:\Users\Fermi1\AppData\Local\conda\conda\envs\labscript_py38\lib\site-packages\qtutils\invoke_in_main.py", line 88, in inmain
return get_inmain_result(_in_main_later(fn, False, *args, **kwargs))
File "C:\Users\Fermi1\AppData\Local\conda\conda\envs\labscript_py38\lib\site-packages\qtutils\invoke_in_main.py", line 150, in get_inmain_result
raise value.with_traceback(traceback)
File "C:\Users\Fermi1\AppData\Local\conda\conda\envs\labscript_py38\lib\site-packages\qtutils\invoke_in_main.py", line 46, in event
result = event.fn(*event.args, **event.kwargs)
File "C:\Users\Fermi1\AppData\Local\conda\conda\envs\labscript_py38\lib\site-packages\blacs\device_base_class.py", line 677, in transition_to_manual
raise Exception('Could not transition to manual. You must restart this device to continue')
Exception: Could not transition to manual. You must restart this device to continue
"""
On the other hand, if I instead pass 'Dev1/PFI0' as the clock_terminal to cards 2, 3, and 4, i.e.
"""
NI_PXI6713(name='ni_analog_card_1',
...,
clock_terminal='/Dev1/PFI0',
MAX_name='Dev1')
NI_PXI6713(name='ni_analog_card_2',
...,
clock_terminal='
/Dev1/PFI0',
MAX_name='Dev2')
etc.
"""
we do not encounter any errors in blacs after running a shot, but the NI cards do not appear to have outputted as desired.
In short, we'd be super grateful to hear any ideas on how we can use the PXI shared bus to trigger different cards in the same chassis, and/or if any folks have successfully transitioned from Cicero/Atticus to labscript without changing the hardware setup.