labscript-suite-temp / labscript_devices

Module containing labscript suite hardware compatibility, separate from the main programs. Device compatibility is implemented with a plugin architecture, for modularity and extensibility. Each file in this module contains a labscript device class, a BLACS tab class, a BLACS worker class and a runviewer parser class for a particular device. These implement functionality for the device which the programs in question call on when they encounter each device in user labscript code, hdf5 files, or connection tables.
0 stars 0 forks source link

Connection table compilation fails when NI cards have no outputs #3

Open philipstarkey opened 9 years ago

philipstarkey commented 9 years ago

Original report (archived issue) by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).


When no output devices are connected to an NI card in the gated-clocks implementation, compilation fails with:

#!python

Traceback (most recent call last):
  File "C:\labscript_suite\userlib\labscriptlib\rb_chip\connectiontable.py", line 13, in <module>
    stop(1)
  File "C:\labscript_suite\labscript\labscript.py", line 1625, in stop
    generate_code()
  File "C:\labscript_suite\labscript\labscript.py", line 1552, in generate_code
    device.generate_code(hdf5_file)
  File "C:\labscript_suite\labscript_devices\PulseBlaster_No_DDS.py", line 67, in generate_code
    PseudoclockDevice.generate_code(self, hdf5_file)
  File "C:\labscript_suite\labscript\labscript.py", line 691, in generate_code
    Device.generate_code(self, hdf5_file)
  File "C:\labscript_suite\labscript\labscript.py", line 216, in generate_code
    device.generate_code(hdf5_file)
  File "C:\labscript_suite\labscript\labscript.py", line 603, in generate_code
    Device.generate_code(self, hdf5_file)
  File "C:\labscript_suite\labscript\labscript.py", line 216, in generate_code
    device.generate_code(hdf5_file)
  File "C:\labscript_suite\labscript\labscript.py", line 216, in generate_code
    device.generate_code(hdf5_file)
  File "C:\labscript_suite\labscript_devices\NI_PCI_6733.py", line 30, in generate_code
    parent.NIBoard.generate_code(self, hdf5_file)
  File "C:\labscript_suite\labscript_devices\NIBoard.py", line 56, in generate_code
    times = pseudoclock.times[clockline]
KeyError: <labscript.labscript.ClockLine object at 0x0000000009D102B0>

This should be easy to fix, I'm just documenting it here so I don't forget about it

philipstarkey commented 6 years ago

Original comment by Jan Werkmann (Bitbucket: PhyNerd, GitHub: PhyNerd).


I made a pull request over at the labscript repo that should fix this.