load_sequencer_program#

AWG.load_sequencer_program(sequencer_program: str | Sequence, **kwargs: str | int) Dict[str, Any][source]#

Compiles the given sequencer program on the AWG Core.

Warning

After uploading the sequencer program one needs to wait before for the awg core to become ready before it can be enabled. The awg core indicates the ready state through its ready node. (device.awgs[0].ready() == True)

Parameters:
  • sequencer_program (str | Sequence) – Sequencer program to be uploaded.

  • kwargs (str | int)

Keyword Arguments:
  • samplerate – Target sample rate of the sequencer. Only allowed/ necessary for HDAWG devices. Must correspond to the samplerate used by the device (device.system.clocks.sampleclock.freq()). If not specified the function will get the value itself from the device. It is recommended passing the samplerate if more than one sequencer code is uploaded in a row to speed up the execution time.

  • wavepath – path to directory with waveforms. Defaults to path used by LabOne UI or AWG Module.

  • waveforms – waveform CSV files separated by ‘;’

  • output – name of embedded ELF filename.

Return type:

Dict[str, Any]

Examples

>>> compile_info = device.awgs[0].load_sequencer_program(seqc)
>>> device.awgs[0].ready.wait_for_state_change(1)
>>> device.awgs[0].enable(True)
Raises:
  • RuntimeErrorsequencer_program is empty.

  • RuntimeError – If the upload or compilation failed.

Parameters:
  • sequencer_program (str | Sequence)

  • kwargs (str | int)

Return type:

Dict[str, Any]

Added in version 0.3.4: sequencer_program does not accept empty strings

Added in version 0.4.0: Use offline compiler instead of AWG module to compile the sequencer program. This speeds of the compilation and also enables parallel compilation/upload.