Package reference
Translation from DLL commands
Commands
Direction |
Register |
Equivalent method |
|---|---|---|
Write |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Read |
|
|
Write |
|
|
Read |
|
Card identity
Direction |
Register |
Equivalent method |
|---|---|---|
Call |
|
|
Read |
|
|
Read |
|
|
Read |
|
|
Read |
|
|
Write |
|
|
Read |
|
Card information
Direction |
Register |
Equivalent method |
|---|---|---|
Read |
|
|
Read |
|
|
Read |
|
|
Read |
|
|
Read |
|
|
Read |
|
|
Read |
|
Hardware and PCB version
Direction |
Register |
Equivalent method |
|---|---|---|
Read |
|
|
Read |
|
|
Read |
|
|
Read |
|
|
Read |
|
|
Read |
|
|
Read |
|
Firmware information
Direction |
Register |
Equivalent method |
|---|---|---|
Read |
|
|
Read |
|
|
Read |
|
|
Read |
|
|
Read |
|
|
Read |
|
|
Read |
|
|
Read |
|
|
Read |
|
Driver information
Direction |
Register |
Equivalent method |
|---|---|---|
Read |
|
|
Read |
|
|
Read |
|
Card modifications
Direction |
Register |
Equivalent method |
|---|---|---|
Read |
|
Features and functions
Direction |
Register |
Equivalent method |
|---|---|---|
Read |
|
|
Read |
|
Temperature
Direction |
Register |
Equivalent method |
|---|---|---|
Read |
|
|
Read |
|
|
Read |
|
Card mode
Direction |
Register |
Equivalent method |
|---|---|---|
Write |
|
|
Read |
|
|
Read |
|
Sample rate
Direction |
Register |
Equivalent method |
|---|---|---|
Write |
|
|
Read |
|
|
Read |
|
|
Read |
|
|
Read |
|
Clock
Direction |
Register |
Equivalent method |
|---|---|---|
Write |
|
|
Read |
|
|
Read |
|
|
Write |
|
|
Read |
|
|
Read |
|
|
Write |
|
|
Read |
|
Triggers
Direction |
Register |
Equivalent method |
|---|---|---|
Write |
|
|
Read |
|
|
Read |
|
|
Write |
|
|
Read |
|
|
Write |
|
|
Read |
|
|
Write |
|
|
Read |
|
|
Read |
|
Trigger masks
Direction |
Register |
Equivalent method |
|---|---|---|
Write |
|
|
Read |
|
|
Read |
|
|
Write |
|
|
Read |
|
|
Read |
|
|
Write |
|
|
Read |
|
|
Read |
|
|
Write |
|
|
Read |
|
|
Read |
|
Channels
Direction |
Register |
Equivalent method |
|---|---|---|
Write |
|
|
Read |
|
|
Read |
|
|
Write |
|
|
Read |
|
|
Write |
|
|
Read |
|
|
Write |
|
|
Read |
|
|
Write |
|
|
Read |
|
|
Write |
|
|
Read |
|
|
Write |
|
|
Read |
|
Playback
Direction |
Register |
Equivalent method |
|---|---|---|
Write |
|
|
Read |
|
Sequencing
Direction |
Register |
Equivalent method |
|---|---|---|
Read |
|
|
Read |
|
|
Read |
|
|
Read |
|
|
Write |
|
|
Read |
|
|
Write |
|
|
Read |
|
|
Write |
|
|
Read |
|
|
Write |
|
|
Read |
|
|
Write |
|
|
Read |
|
Memory and DMA
Direction |
Register |
Equivalent method |
|---|---|---|
Call |
|
|
Write |
|
|
Read |
|
|
Read |
|
|
Write |
|
|
Read |
|
Multi-purpose input/output (X ports)
Direction |
Register |
Equivalent method |
|---|---|---|
Write |
|
|
Read |
|
|
Read |
|
|
Write |
|
|
Read |
|
Card class
- class spectrum_card.Card(device_address=b'/dev/spcm0')
Opens the connection to the card using
spcm_hOpen.- Parameters:
device_address (
str) – Directory to the card.
- arm()
Writes
M2CMD_CARD_STARTandM2CMD_CARD_ENABLETRIGGERtoSPC_M2CMD.
- array_to_device(data, segment=0, aux_data=None, aux_data_channels=None)
Transfers signals from the host to the card using
_transfer_array_i64.- Parameters:
data (
listofnumpy.ndarrayoffloat) – Alistof sampled waveforms to be transferred to the card. The first element in thelistis the waveform that is assigned to the first enabled channel, and so on. Values are assumed to be between-1.0and1.0.segment (
int) – The segment that the waveform is loaded into. Only relevant if the card is in a mode that uses segments, such as sequencing.aux_data (
listofnumpy.ndarrayofbool) – An optionallistof binary waveforms to be played out of the IO ports (X0, X1 and/or X2). Requires information given inaux_data_channels. Will automatically set up port modes and signal discretisation based on information given.aux_data_channels (
listofdict) – Information that says where in which channels the binary waveforms inaux_data_channelsare taken from, and which port they are output. Eachdictin the overalllistcorresponds to one of the waveforms inaux_data_channels. The dictionary should contain three elements:"Port"is anintthat corresponds to which of the digital IO ports that waveform should be sent to;"Channel"is anintthat corresponds to which of the channels the digital waveform should be encoded in; and"Bit"is either15,14or13, which corresponds to which bit of the channel should be sacrificed for the digital waveform. Note that this should be consistent for every segment of memory.
- channel_filter_disable(channel_index)
Writes 0 to
SPC_FILTER0.- Parameters:
channel_index (
int) – Which channel.
- channel_filter_enable(channel_index)
Writes 1 to
SPC_FILTER0.- Parameters:
channel_index (
int) – Which channel.
- clock_output_disable()
Writes to
SPC_CLOCKOUTto disable the clock output.
- clock_output_enable()
Writes to
SPC_CLOCKOUTto enable the clock output.
- close()
Closes the connection to the card.
- differential_disable(channel_index)
Writes 0 to
SPC_DIFF0.- Parameters:
channel_index (
int) – Which channel (0 for channels 0 and 1, 2 for channels 2 and 3).
- differential_enable(channel_index)
Writes 1 to
SPC_DIFF0.- Parameters:
channel_index (
int) – Which channel (0 for channels 0 and 1, 2 for channels 2 and 3).
- double_disable(channel_index)
Writes 0 to
SPC_DOUBLEOUT0.- Parameters:
channel_index (
int) – Which channel (0 for channels 0 and 1, 2 for channels 2 and 3).
- double_enable(channel_index)
Writes 1 to
SPC_DOUBLEOUT0.- Parameters:
channel_index (
int) – Which channel (0 for channels 0 and 1, 2 for channels 2 and 3).
- execute_command(command)
Writes to
SPC_M2CMD. To do this without using bit codes, useexecute_commands.- Parameters:
command (
int) – Bit code.
- execute_commands(reset=False, write_setup=False, start=False, enable_trigger=False, force_trigger=False, disable_trigger=False, stop=False, dma_start=False, dma_wait=False, dma_stop=False, wait_for_prefill=False, wait_for_trigger=False, wait_until_ready=False)
Writes to
SPC_M2CMD. To call a command, set the corresponding parameter toTrue.
- force_trigger()
Writes
M2CMD_CARD_FORCETRIGGERtoSPC_M2CMD.
- get_amplitude(channel_index)
Reads
SPC_AMP0.
- get_available_channels_for_necessary_triggers()
Reads
SPC_TRIG_CH_AVAILANDMASK0and displays each channel in alistofstr.
- get_available_channels_for_sufficient_triggers()
Reads
SPC_TRIG_CH_AVAILORMASK0and displays each channel in alistofstr.
- get_available_channels_triggered_by_and_mask()
Reads
SPC_TRIG_CH_AVAILANDMASK0. For decoded information, useget_available_channels_for_necessary_triggersinstead.- Returns:
channels – Bit code.
- Return type:
- get_available_channels_triggered_by_or_mask()
Reads
SPC_TRIG_CH_AVAILORMASK0. For decoded information, useget_available_channels_for_sufficient_triggersinstead.- Returns:
channels – Bit code.
- Return type:
- get_available_clock_modes()
Reads
SPC_AVAILCLOCKMODES. For decoded information, useget_available_clock_modes_informationinstead.- Returns:
modes – Bit code.
- Return type:
- get_available_clock_modes_information()
Reads
SPC_AVAILCLOCKMODESand displays each available mode for the clock in a list.
- get_available_io_modes(port)
Reads
SPCM_X0_AVAILMODES. For decoded information, useget_available_io_modes_informationinstead.
- get_available_io_modes_information(port)
Reads
SPCM_X0_AVAILMODES.
- get_available_modes()
Reads
SPC_AVAILCARDMODES. For decoded information, useget_available_modes_informationinstead.- Returns:
mode – Bit code.
- Return type:
- get_available_modes_information()
Reads
SPC_AVAILCARDMODESand displays each available mode for the card in a list.
- get_available_necessary_triggers()
Reads
SPC_TRIG_AVAILANDMASKand displays each available necessary trigger in alistofstr.
- get_available_sequence_features()
Reads
SPC_SEQMODE_AVAILFEATURES. For decoded information, useget_features_informationorget_available_sequence_features_informationinstead.- Returns:
features – Bit code.
- Return type:
- get_available_sequence_features_information()
Reads
SPC_SEQMODE_AVAILFEATURES.
- get_available_sufficient_triggers()
Reads
SPC_TRIG_AVAILORMASKand displays each available sufficient trigger in alistofstr.
- get_available_trigger_modes(trigger_index)
Reads
SPC_TRIG_EXT0_AVAILMODES. For decoded information, useget_available_trigger_modes_informationinstead.
- get_available_trigger_modes_information(trigger_index)
Reads
SPC_TRIG_EXT0_AVAILMODES.
- get_available_triggers_for_and_mask()
Reads
SPC_TRIG_AVAILANDMASK. For decoded information, useget_available_necessary_triggersinstead.- Returns:
mode – Bit code.
- Return type:
- get_available_triggers_for_or_mask()
Reads
SPC_TRIG_AVAILORMASK. For decoded information, useget_available_sufficient_triggersinstead.- Returns:
mode – Bit code.
- Return type:
- get_base_pcb_version()
Reads
SPC_BASEPCBVERSION. For decoded information, useget_base_pcb_informationinstead.- Returns:
version – Bit code for PCB version
- Return type:
- get_calibration_date()
Reads raw data from
SPC_CALIBDATE. For decoded information, useget_calibration_date_informationinstead.- Returns:
bit_date – Bit code for production date.
- Return type:
- get_calibration_date_information()
Reads
SPC_CALIBDATEto find the calibration date of the card.
- get_card_identification()
Reads
SPC_CARDIDENTIFICATIONto see if the card’s notification LED is in identification mode.- Returns:
value –
1if the LED is flashing, otherwise0.- Return type:
- get_card_type()
Reads raw data from
SPC_PCITYP. For decoded information, useget_nameandget_series_informationinstead.- Returns:
bit_type – Bit code for card type.
- Return type:
- get_channel_enable()
Reads
SPC_CHENABLE. For decoded information, useget_channels_enable.- Returns:
channels – Bit code.
- Return type:
- get_channel_stop_level(channel_index)
Reads
SPC_CH0_STOPLEVELandSPC_CH0_CUSTOM_STOP.
- get_channels_enable()
Reads
SPC_CHENABLE.
- get_channels_for_necessary_triggers()
Reads
SPC_TRIG_CH_ANDMASK0and displays each channel in alistofstr.
- get_channels_for_sufficient_triggers()
Reads
SPC_TRIG_CH_ORMASK0and displays each channel in alistofstr.
- get_channels_triggered_by_and_mask()
Reads
SPC_TRIG_CH_ANDMASK0. For decoded information, useget_channels_for_necessary_triggersinstead.- Returns:
channels – Bit code.
- Return type:
- get_channels_triggered_by_or_mask()
Reads
SPC_TRIG_CH_ORMASK0. For decoded information, useget_channels_for_sufficient_triggersinstead.- Returns:
channels – Bit code.
- Return type:
- get_clock_mode()
Reads
SPC_CLOCKMODE. For decoded information, useget_clock_mode_informationinstead.- Returns:
mode – Bit code.
- Return type:
- get_clock_mode_information()
Reads
SPC_CLOCKMODEand displays the current clock mode as a string.
- get_clock_output()
Reads
SPC_CLOCKOUT.- Returns:
enabled –
1if output is enabled,0otherwise.- Return type:
- get_clock_output_frequency()
Reads
SPC_CLOCKOUTFREQUENCY.- Returns:
frequency – Output frequency in Hz.
- Return type:
- get_current_segment()
Reads
SPC_SEQMODE_WRITESEGMENT.- Returns:
segment – The segment currently “armed” for reading and writing to.
- Return type:
- get_differential(channel_index)
Reads
SPC_DIFF0.
- get_double(channel_index)
Reads
SPC_DOUBLEOUT0.
- get_driver()
Reads
SPC_GETDRVTYPE. For decoded information, useget_driver_informationinstead.- Returns:
version – Bit code.
- Return type:
- get_driver_information()
Reads
SPC_GETDRVTYPEand displays instrformat.- Returns:
version – Name of driver.
- Return type:
- get_driver_version()
Reads
SPC_GETDRVVERSION. For decoded information, useget_driver_informationinstead.- Returns:
version – Bit code.
- Return type:
- get_driver_version_information()
Reads
SPC_GETDRVVERSIONand displays instrformat.- Returns:
version – Version of driver
- Return type:
- get_extended_features()
Reads
SPC_PCIEXTFEATURES. For decoded information, useget_features_informationinstead.- Returns:
features – Bit code.
- Return type:
- get_extension_pcb_version()
Reads
SPC_EXTPCBVERSION. For decoded information, useget_module_pcb_informationinstead.- Returns:
version – Bit code for extension PCB version
- Return type:
- get_extension_pci_information()
Reads
SPC_PCIEXTVERSIONand displays as adict.- Returns:
version – Contains two entries:
"Hardware version"and"Firmware version".- Return type:
- get_extension_pci_version()
Reads
SPC_PCIEXTVERSION. For decoded information, useget_extension_pci_informationinstead.- Returns:
version – Bit code for extension PCI version
- Return type:
- get_external_reference_frequency()
Reads
SPC_REFERENCECLOCK.- Returns:
frequency – Reference frequency in Hz.
- Return type:
- get_features()
Reads
SPC_PCIFEATURES. For decoded information, useget_features_informationinstead.- Returns:
features – Bit code.
- Return type:
- get_features_information()
Reads
SPC_PCIFEATURES,SPC_PCIEXTFEATURES,SPC_READAOFEATURES, andSPC_SEQMODE_AVAILFEATURESand displays each feature of the card in a list.
- get_filter(channel_index)
Reads
SPC_FILTER0.
- get_firmware_version_clock()
Reads
SPCM_FW_CLOCK. For decoded information, useget_firmware_version_clock_informationinstead.- Returns:
version – Bit code.
- Return type:
- get_firmware_version_clock_information()
Reads
SPCM_FW_CLOCKand displays asdict.- Returns:
version – Contains two entries:
"Firmware type"and"Firmware version".- Return type:
- get_firmware_version_configuration()
Reads
SPCM_FW_CONFIG. For decoded information, useget_firmware_version_configuration_informationinstead.- Returns:
version – Bit code.
- Return type:
- get_firmware_version_configuration_information()
Reads
SPCM_FW_CONFIGand displays asdict.- Returns:
version – Contains two entries:
"Firmware type"and"Firmware version".- Return type:
- get_firmware_version_control()
Reads
SPCM_FW_CTRL. For decoded information, useget_firmware_version_control_informationinstead.- Returns:
version – Bit code.
- Return type:
- get_firmware_version_control_active()
Reads
SPCM_FW_CTRL_ACTIVE. For decoded information, useget_firmware_version_control_active_informationinstead.- Returns:
version – Bit code.
- Return type:
- get_firmware_version_control_active_information()
Reads
SPCM_FW_CTRL_ACTIVEand displays asdict.- Returns:
version – Contains two entries:
"Firmware type"and"Firmware version".- Return type:
- get_firmware_version_control_golden()
Reads
SPCM_FW_CTRL_GOLDEN. For decoded information, useget_firmware_version_control_golden_informationinstead.- Returns:
version – Bit code.
- Return type:
- get_firmware_version_control_golden_information()
Reads
SPCM_FW_CTRL_GOLDENand displays asdict.- Returns:
version – Contains two entries:
"Firmware type"and"Firmware version".- Return type:
- get_firmware_version_control_information()
Reads
SPCM_FW_CTRLand displays asdict.- Returns:
version – Contains two entries:
"Firmware type"and"Firmware version".- Return type:
- get_firmware_version_module_a()
Reads
SPCM_FW_MODULEA. For decoded information, useget_firmware_version_module_a_informationinstead.- Returns:
version – Bit code.
- Return type:
- get_firmware_version_module_a_information()
Reads
SPCM_FW_MODULEAand displays asdict.- Returns:
version – Contains two entries:
"Firmware type"and"Firmware version".- Return type:
- get_firmware_version_module_b()
Reads
SPCM_FW_MODULEB. For decoded information, useget_firmware_version_module_b_informationinstead.- Returns:
version – Bit code.
- Return type:
- get_firmware_version_module_b_information()
Reads
SPCM_FW_MODULEBand displays asdict.- Returns:
version – Contains two entries:
"Firmware type"and"Firmware version".- Return type:
- get_firmware_version_module_star()
Reads
SPCM_FW_MODEXTRA. For decoded information, useget_firmware_version_module_star_informationinstead.- Returns:
version – Bit code.
- Return type:
- get_firmware_version_module_star_information()
Reads
SPCM_FW_MODEXTRAand displays asdict.- Returns:
version – Contains two entries:
"Firmware type"and"Firmware version".- Return type:
- get_firmware_version_power()
Reads
SPCM_FW_POWER. For decoded information, useget_firmware_version_power_informationinstead.- Returns:
version – Bit code.
- Return type:
- get_firmware_version_power_information()
Reads
SPCM_FW_POWERand displays asdict.- Returns:
version – Contains two entries:
"Firmware type"and"Firmware version".- Return type:
- get_functions()
Reads
SPC_FNCTYPE. For decoded information, useget_functions_informationinstead.- Returns:
features – Bit code.
- Return type:
- get_functions_information()
Reads
SPC_FNCTYPand displays each function of the card in a list.
- get_io_asynchronous(port)
Reads
SPCM_XX_ASYNCIO.
- get_io_asynchronous_register()
Reads
SPCM_XX_ASYNCIO. For decoded information, use … instead.- Returns:
value – Bit code.
- Return type:
- get_io_mode(port)
Reads
SPCM_X0_MODE. For decoded information, useget_available_io_modes_informationinstead.
- get_io_mode_information(port)
Reads
SPCM_X0_MODE.
- get_is_demo_card()
Reads
SPC_MIINST_ISDEMOCARDto find out if the card is a “demo” card (i.e., a software emulation).- Returns:
is_demo –
1if the card is a demo, otherwise0.- Return type:
- get_kernel_version()
Reads
SPC_GETKERNELVERSION. For decoded information, useget_driver_informationinstead.- Returns:
version – Bit code.
- Return type:
- get_kernel_version_information()
Reads
SPC_GETKERNELVERSIONand displays instrformat.- Returns:
version – Version of driver
- Return type:
- get_lower_trigger_threshold(trigger_index)
Reads
SPC_TRIG_EXT0_LEVEL1.
- get_lower_trigger_threshold_max()
Reads
SPC_TRIG_EXT_AVAIL1_MAX.- Returns:
threshold – Upper voltage in V.
- Return type:
- get_lower_trigger_threshold_min()
Reads
SPC_TRIG_EXT_AVAIL1_MIN.- Returns:
threshold – Upper voltage in V.
- Return type:
- get_lower_trigger_threshold_step()
Reads
SPC_TRIG_EXT_AVAIL1_STEP.- Returns:
threshold – Upper voltage in V.
- Return type:
- get_max_external_clock()
Reads
SPC_MIINST_MAXEXTCLOCK.- Returns:
frequency – Maximum allowed external clock frequency in Hz.
- Return type:
- get_max_external_reference_clock()
Reads
SPC_MIINST_MAXEXTREFCLOCK.- Returns:
frequency – Maximum allowed reference clock frequency in Hz.
- Return type:
- get_max_memory_size()
Reads
SPC_PCIMEMSIZE.- Returns:
size – Memory size on the card in Bytes.
- Return type:
- get_max_number_of_loops_per_sequence_step()
Reads
SPC_SEQMODE_AVAILMAXLOOP.- Returns:
loops – Max number of loops that can be used in each sequence step. Note that steps can also be set to loop indefinitely.
- Return type:
- get_max_number_of_segments()
Reads
SPC_SEQMODE_AVAILMAXSEGMENT.- Returns:
size – Max number of segments that can be used with the card.
- Return type:
- get_max_number_of_sequence_steps()
Reads
SPC_SEQMODE_AVAILMAXSTEPS.- Returns:
size – Max number of steps that can be used with the card.
- Return type:
- get_max_sample_rate()
Reads
SPC_PCISAMPLERATE.- Returns:
sample_rate – The card’s maximum sample rate in Sa/s.
- Return type:
- get_max_trigger_delay()
Reads
SPC_TRIG_AVAILDELAY.- Returns:
delay – Delay in number of samples.
- Return type:
- get_memory_size()
Reads
SPC_MEMSIZE.- Returns:
size – Memory size in samples per channel.
- Return type:
- get_memory_test()
Reads
SPC_MEMTEST.- Returns:
enable –
1if mode is enabled,0otherwise.- Return type:
- get_min_external_clock()
Reads
SPC_MIINST_MINEXTCLOCK.- Returns:
frequency – Minimum allowed external clock frequency in Hz.
- Return type:
- get_min_external_reference_clock()
Reads
SPC_MIINST_MINEXTREFCLOCK.- Returns:
frequency – Minimum allowed reference clock frequency in Hz.
- Return type:
- get_mode()
Reads
SPC_CARDMODEto find the current mode that the card is in. For decoded information, useget_mode_informationinstead.- Returns:
mode – Bit code.
- Return type:
- get_modifications()
Reads
SPCM_CUSTOMMOD. For decoded information, useget_modifications_informationinstead.- Returns:
modifications – Bit code.
- Return type:
- get_modifications_information()
Reads
SPCM_CUSTOMMODand displays indictformat.- Returns:
modifications – Contains three entries for modifications for different parts of the card:
"Card","Front-end", and"Star-hub".- Return type:
- get_module_pcb_version()
Reads
SPC_MODULEPCBVERSION. For decoded information, useget_module_pcb_informationinstead.- Returns:
version – Bit code for module PCB version
- Return type:
- get_module_pci_information()
Reads
SPC_PCIMODULEVERSIONand displays as adict.- Returns:
version – Contains two entries:
"Hardware version"and"Firmware version".- Return type:
- get_module_pci_version()
Reads
SPC_PCIMODULEVERSION. For decoded information, useget_module_pci_informationinstead.- Returns:
version – Bit code for module PCI version
- Return type:
- get_name()
Reads
SPC_PCITYPto find the name of the card.- Returns:
name – Name of the card.
- Return type:
- get_necessary_triggers()
Reads
SPC_TRIG_ANDMASKand displays each necessary trigger in alistofstr.
- get_number_of_active_channels()
Reads
SPC_CHCOUNT.- Returns:
channels – The number of enabled channels.
- Return type:
- get_number_of_channels_per_front_end_module()
Reads
SPC_MIINST_CHPERMODULE.- Returns:
number
- Return type:
- get_number_of_loops()
Writes to
SPC_LOOPS.- Returns:
number_of_loops – How many times the waveform should be looped. If set to
0, will loop indefinitely.- Return type:
- get_number_of_segments()
Reads
SPC_SEQMODE_MAXSEGMENTS.- Returns:
number_of_segments – The number of segments to split the memory into.
- Return type:
- get_output_enable(channel_index)
Reads from
SPC_ENABLEOUT0.
- get_pci_information()
Reads
SPC_PCIVERSIONand displays as adict.- Returns:
version – Contains two entries:
"Hardware version"and"Firmware version".- Return type:
- get_pci_version()
Reads
SPC_PCIVERSION. For decoded information, useget_pci_informationinstead.- Returns:
version – Bit code for PCI version
- Return type:
- get_production_date()
Reads raw data from
SPC_PCIDATE. For decoded information, useget_production_date_informationinstead.- Returns:
bit_date – Bit code for production date.
- Return type:
- get_production_date_information()
Reads
SPC_PCIDATEto find the production date of the card.
- get_readout_features()
Reads
SPC_READAOFEATURES. For decoded information, useget_features_informationinstead.- Returns:
features – Bit code.
- Return type:
- get_sample_rate()
Reads
SPC_SAMPLERATE.- Returns:
sample_rate – The current sample rate in Sa/s.
- Return type:
- get_sample_resolution()
Reads
SPC_MIINST_BYTESPERSAMPLE.- Returns:
resolution – The resolution of each sample in Bytes/sample.
- Return type:
- get_sample_resolution_bits()
Reads
SPC_MIINST_BITSPERSAMPLE.- Returns:
resolution – The resolution of each sample in bits/sample.
- Return type:
- get_segment_length(segment)
Reads
SPC_SEQMODE_SEGMENTSIZE. Reads the length of any segment segment.
- get_segment_size()
Reads
SPC_SEQMODE_SEGMENTSIZE. Reads the length of the currently armed segment.- Returns:
size – Length of segment in samples per channel.
- Return type:
- get_sequence_instruction(step)
Reads
SPC_SEQMODE_STEPMEM0. For decoded information, useget_step_instructioninstead.
- get_serial_number()
Reads
SPC_PCISERIALNOto find the series of the card.- Returns:
serial_number – Serial number of the card.
- Return type:
- get_series()
Reads raw data from
SPC_PCITYP. For decoded information, useget_series_informationinstead.- Returns:
bit_series – Bit code for card series.
- Return type:
- get_series_information()
Reads
SPC_PCITYPto find the series of the card.- Returns:
Series – Series of the card.
- Return type:
- get_start_step()
Reads
SPC_SEQMODE_STARTSTEP.- Returns:
step – The starting step of the sequence.
- Return type:
- get_status()
Reads
SPC_M2STATUS. For decoded information, useget_status_informationinstead.- Returns:
status – Bit code.
- Return type:
- get_status_information()
Reads
SPC_M2STATUS.
- get_step_instruction(step)
Reads
SPC_SEQMODE_STEPMEM0.- Parameters:
step (
int) – The step to write to.- Returns:
instruction – Contains information under keys of
"Segment","Next step","Number of loops","Loop until trigger"and"End of sequence". Each has the same meaning as in the parameters forset_step_instruction.- Return type:
- get_stop_level(channel_index)
Reads
SPC_CH0_STOPLEVEL. For decoded information, useget_channel_stop_level.
- get_stop_level_custom(channel_index)
Reads
SPC_CH0_CUSTOM_STOP. For decoded information, useget_channel_stop_level.
- get_sufficient_triggers()
Reads
SPC_TRIG_ORMASKand displays each sufficient trigger in alistofstr.
- get_temperature_base(unit='C')
Reads
SPC_MON_TK_BASE_CTRL,SPC_MON_TC_BASE_CTRLorSPC_MON_TF_BASE_CTRL.
- get_temperature_module_0(unit='C')
Reads
SPC_MON_TK_MODULE_0,SPC_MON_TC_MODULE_0orSPC_MON_TF_MODULE_0.
- get_temperature_module_1(unit='C')
Reads
SPC_MON_TK_MODULE_1,SPC_MON_TC_MODULE_1orSPC_MON_TF_MODULE_1.
- get_timeout()
Reads
SPC_TIMEOUT.- Returns:
time_to_live – Timeout duration in seconds.
- Return type:
- get_trigger_and_mask()
Reads
SPC_TRIG_ANDMASK. For decoded information, useget_necessary_triggersinstead.- Returns:
mode – Bit code.
- Return type:
- get_trigger_coupling(trigger_index)
Reads
SPC_TRIG_EXT0_ACDCorSPC_TRIG_EXT1_ACDC. Returns either"dc"or"ac".
- get_trigger_delay()
Reads
SPC_TRIG_DELAY.- Returns:
delay – Delay in number of samples.
- Return type:
- get_trigger_impedance()
Reads
SPC_TRIG_TERM. Returns either"High"or"50 Ohm".- Returns:
impedance – String of input impedance.
- Return type:
- get_trigger_input_coupling(trigger_index)
Reads
SPC_TRIG_EXT0_ACDCorSPC_TRIG_EXT1_ACDC. For decoded information, useget_trigger_couplinginstead.
- get_trigger_input_termination()
Reads
SPC_TRIG_TERM. For decoded information, useget_trigger_impedanceinstead.- Returns:
type – Bit code.
- Return type:
- get_trigger_mode(trigger_index)
Reads
SPC_TRIG_EXT0_MODE. For decoded information, useget_trigger_mode_informationinstead.
- get_trigger_mode_information(trigger_index)
Reads
SPC_TRIG_EXT0_MODE.
- get_trigger_or_mask()
Reads
SPC_TRIG_ORMASK. For decoded information, useget_sufficient_triggersinstead.- Returns:
mode – Bit code.
- Return type:
- get_upper_trigger_threshold(trigger_index)
Reads
SPC_TRIG_EXT0_LEVEL0.
- get_upper_trigger_threshold_max()
Reads
SPC_TRIG_EXT_AVAIL0_MAX.- Returns:
threshold – Lower voltage in V.
- Return type:
- get_upper_trigger_threshold_min()
Reads
SPC_TRIG_EXT_AVAIL0_MIN.- Returns:
threshold – Lower voltage in V.
- Return type:
- get_upper_trigger_threshold_step()
Reads
SPC_TRIG_EXT_AVAIL0_STEP.- Returns:
threshold – Lower voltage in V.
- Return type:
- identification_led_disable()
Writes to
SPC_CARDIDENTIFICATIONto set the card’s notification LED to normal mode.
- identification_led_enable()
Writes to
SPC_CARDIDENTIFICATIONto set the card’s notification LED to identification mode.
- io_port_disable(port)
Writes
SPCM_XMODE_DISABLEtoSPCM_X0_MODE.- Parameters:
port (
int) – Which IO port.
- memory_test_start()
Writes
1toSPC_MEMTEST.
- memory_test_stop()
Writes
0toSPC_MEMTEST.
- output_disable(channel_index)
Writes 0 to
SPC_ENABLEOUT0.- Parameters:
channel_index (
int) – Which channel.
- output_enable(channel_index)
Writes 1 to
SPC_ENABLEOUT0.- Parameters:
channel_index (
int) – Which channel.
- reset()
Writes
M2CMD_CARD_RESETtoSPC_M2CMD.
- set_amplitude(channel_index, amplitude, multiplier='')
Writes to
SPC_AMP0.
- set_card_identification(value)
Writes to
SPC_CARDIDENTIFICATIONto set or unset the card’s notification LED to identification mode. You may want to useidentification_led_enableandidentification_led_disableinstead.- Parameters:
value (
int) –1to get the LED to flash, otherwise0.
- set_channel_enable(channels)
Writes to
SPC_CHENABLE. To do this without using bit codes, useset_channels_enable.- Parameters:
channels (
int) – Bit code.
- set_channel_stop_level(channel_index, zero=False, low=False, high=False, hold_last=False, custom_value=None)
Writes to
SPC_CH0_STOPLEVELandSPC_CH0_CUSTOM_STOP. To set a custom value, set the parametercustom_valueto afloatbetween-1.0and1.0. To set it to any other stop level mode, set that parameter toTrue.
- set_channels_enable(channel_0=False, channel_1=False, channel_2=False, channel_3=False)
Writes to
SPC_CHENABLE. Set any of the parameters toTrueto enable that channel.
- set_channels_for_necessary_triggers(channel_0=False, channel_1=False, channel_2=False, channel_3=False, channel_4=False, channel_5=False, channel_6=False, channel_7=False)
Writes to
SPC_TRIG_CH_ANDMASK0. Set each parameter toTrueto add the channel to those effected by the AND mask.
- set_channels_for_sufficient_triggers(channel_0=False, channel_1=False, channel_2=False, channel_3=False, channel_4=False, channel_5=False, channel_6=False, channel_7=False)
Writes to
SPC_TRIG_CH_ORMASK0. Set each parameter toTrueto add the channel to those effected by the OR mask.
- set_channels_triggered_by_and_mask(mask)
Writes to
SPC_TRIG_CH_ANDMASK0. To do this without using bit codes, useset_channels_for_necessary_triggers.- Parameters:
channels (
int) – Bit code.
- set_channels_triggered_by_or_mask(mask)
Writes to
SPC_TRIG_CH_ORMASK0. To do this without using bit codes, useset_channels_for_sufficient_triggers.- Parameters:
channels (
int) – Bit code.
- set_clock_mode(clock_mode)
Writes to
SPC_CLOCKMODE. To do this without using bit codes, useuse_clock_primary_internal,use_clock_secondary_internal,use_clock_external_reference, oruse_clock_pxie_referenceinstead.- Parameters:
mode (
int) – Bit code.
- set_clock_output(enable)
Writes to
SPC_CLOCKOUT. You may instead want to useclock_output_enableandclock_output_disable.- Parameters:
enable (
int) –1if output is enabled,0otherwise.
- set_current_segment(segment)
Writes to
SPC_SEQMODE_WRITESEGMENT.- Parameters:
segment (
int) – The segment currently “armed” for reading and writing to.
- set_differential(channel_index, enable)
Writes to
SPC_DIFF0.
- set_double(channel_index, enable)
Writes to
SPC_DOUBLEOUT0.
- set_external_reference_frequency(frequency, multiplier='')
Writes to
SPC_REFERENCECLOCK.
- set_filter(channel_index, enable)
Writes to
SPC_FILTER0.
- set_io_asynchronous(port, value)
Writes to
SPCM_XX_ASYNCIO.
- set_io_asynchronous_register(value)
Writes to
SPCM_XX_ASYNCIO. To do this without using bit codes, use … instead.- Parameters:
value (
int) – Bit code.
- set_io_mode(port, mode)
Writes to
SPCM_X0_MODE. To do this without using bit codes, useio_port_disable,use_io_mode_digital_out,use_io_mode_asynchronous_input,use_io_mode_asynchronous_output,use_io_mode_trigger_output,use_io_mode_run_state_output,use_io_mode_arm_state_output,use_io_mode_continuous_marker_output,use_io_mode_reference_clock_outputoruse_io_mode_system_clock_outputinstead.
- set_lower_trigger_threshold(trigger_index, threshold, multiplier='')
Writes to
SPC_TRIG_EXT0_LEVEL1.
- set_memory_size(size)
Writes to
SPC_MEMSIZE.- Parameters:
size (
int) – Memory size in samples per channel.
- set_memory_test(enable)
Writes to
SPC_MEMTEST.- Parameters:
enable (
int) –1if mode is enabled,0otherwise.
- set_mode(mode)
Writes to
SPC_CARDMODEto set the mode of the card. To do this without using bit codes, useuse_mode_single,use_mode_multi,use_mode_gate,use_mode_single_restart,use_mode_sequence,use_mode_fifo_single,use_mode_fifo_multi, oruse_mode_fifo_gateinstead.- Parameters:
features (
int) – Bit code.
- set_necessary_triggers(external_0=False, external_1=False)
Writes to
SPC_TRIG_ANDMASK. Set each parameter toTrueto add it to the AND mask.
- set_number_of_loops(number_of_loops)
Writes to
SPC_LOOPS.- Parameters:
number_of_loops (
int) – How many times the waveform should be looped. If set to0, will loop indefinitely.
- set_number_of_segments(number_of_segments)
Writes to
SPC_SEQMODE_MAXSEGMENTS.- Parameters:
number_of_segments (
int) – The number of segments to split the memory into.
- set_output_enable(channel_index, enable)
Writes to
SPC_ENABLEOUT0.
- set_sample_rate(sample_rate, multiplier='')
Writes a sample rate to
SPC_SAMPLERATE.
- set_segment_length(segment, length)
Writes to
SPC_SEQMODE_SEGMENTSIZE. Sets the length of any segment segment.
- set_segment_size(size)
Writes to
SPC_SEQMODE_SEGMENTSIZE. Sets the length of the currently armed segment.- Parameters:
size (
int) – Length of segment in samples per channel.
- set_sequence_instruction(step, instruction)
Writes to
SPC_SEQMODE_STEPMEM0. To do this without using bit codes, useset_step_instruction.
- set_start_step(step)
Writes to
SPC_SEQMODE_STARTSTEP.- Parameters:
step (
int) – The starting step of the sequence.
- set_step_instruction(step, segment, number_of_loops=1, next_step=None, loop_until_trigger=False, end_of_sequence=False)
Writes to
SPC_SEQMODE_STEPMEM0.- Parameters:
step (
int) – The step to write to.segment (
int) – The segment the step points to.number_of_loops (
int) – How many times the step should be looped.next_step (
int) – The step that follows this one. IfNone(default), will either point to stepstep + 1or, ifend_of_sequenceis set toTrue, will point to step0.loop_until_trigger (
bool) – Whether to wait for a trigger until proceeding to the next step.end_of_sequence (
bool) – Whether or not the step is the final step in the sequence.
- set_stop_level(channel_index, stop_level_code)
Writes to
SPC_CH0_STOPLEVEL. To do this without using bit codes, useset_channel_stop_level.
- set_stop_level_custom(channel_index, value)
Writes to
SPC_CH0_CUSTOM_STOP. To do this without using bit codes, useset_channel_stop_level.
- set_sufficient_triggers(software=False, external_0=False, external_1=False)
Writes to
SPC_TRIG_ORMASK. Set each parameter toTrueto add it to the OR mask.
- set_timeout(time_to_live, multiplier='')
Writes to
SPC_TIMEOUT.
- set_trigger_and_mask(mask)
Writes to
SPC_TRIG_ANDMASK. To do this without using bit codes, useset_necessary_triggers.- Parameters:
mask (
int) – Bit code.
- set_trigger_delay(delay)
Writes to
SPC_TRIG_DELAY.- Parameters:
delay (
int) – Delay in number of samples.
- set_trigger_input_coupling(trigger_index, type)
Writes to
SPC_TRIG_EXT0_ACDCorSPC_TRIG_EXT1_ACDC. To do this without using bit codes, usetrigger_coupling_use_dcandtrigger_coupling_use_ac.
- set_trigger_input_termination(type)
Writes to
SPC_TRIG_TERM. To do this without using bit codes, usetrigger_impedance_use_highandtrigger_impedance_use_50.- Parameters:
type (
int) – Bit code.
- set_trigger_mode(trigger_index, mode)
Writes to
SPC_TRIG_EXT0_MODE. To do this without using bit codes, usetrigger_disable,use_trigger_positive_edge,use_trigger_negative_edge,use_trigger_both_edge,use_trigger_enter_window,use_trigger_leave_window,use_trigger_high_gate,use_trigger_low_gate,use_trigger_inside_window_gate, oruse_trigger_outside_window_gate.
- set_trigger_or_mask(mask)
Writes to
SPC_TRIG_ORMASK. To do this without using bit codes, useset_sufficient_triggers.- Parameters:
mask (
int) – Bit code.
- set_upper_trigger_threshold(trigger_index, threshold, multiplier='')
Writes to
SPC_TRIG_EXT0_LEVEL0.
- start()
Writes
M2CMD_CARD_STARTtoSPC_M2CMD.
- stop()
Writes
M2CMD_CARD_STOPtoSPC_M2CMD.
- trigger_coupling_use_ac(trigger_index=1)
Writes to
SPC_TRIG_EXT0_ACDCorSPC_TRIG_EXT1_ACDC. Sets trigger coupling to ac.- Parameters:
trigger_index (
int) – Which trigger.
- trigger_coupling_use_dc(trigger_index=1)
Writes to
SPC_TRIG_EXT0_ACDCorSPC_TRIG_EXT1_ACDC. Sets trigger coupling to dc.- Parameters:
trigger_index (
int) – Which trigger.
- trigger_disable(trigger_index, make_sufficient=True)
Writes
SPC_TM_NONEtoSPC_TRIG_EXT0_MODE.- Parameters:
trigger_index (
int) – Which trigger.make_sufficient (
bool) – IfTrue(default), removes this trigger to the OR mask (seeset_sufficient_triggers).
- trigger_impedance_use_50()
Writes to
SPC_TRIG_TERM. Sets impedance to 50 Ohm.
- trigger_impedance_use_high()
Writes to
SPC_TRIG_TERM. Sets impedance to 1 kOhm.
- use_clock_external_reference()
Writes
SPC_CM_EXTREFCLOCKtoSPC_CLOCKMODE.
- use_clock_primary_internal()
Writes
SPC_CM_INTPLLtoSPC_CLOCKMODE.
- use_clock_pxie_reference()
Writes
SPC_CM_PXIREFCLOCKtoSPC_CLOCKMODE.
- use_clock_secondary_internal()
Writes
SPC_CM_QUARTZ2toSPC_CLOCKMODE.
- use_io_mode_arm_state_output(port)
Writes
SPCM_XMODE_ARMSTATEtoSPCM_X0_MODE.- Parameters:
port (
int) – Which IO port.
- use_io_mode_asynchronous_input(port)
Writes
SPCM_XMODE_ASYNCINtoSPCM_X0_MODE.- Parameters:
port (
int) – Which IO port.
- use_io_mode_asynchronous_output(port)
Writes
SPCM_XMODE_ASYNCOUTtoSPCM_X0_MODE.- Parameters:
port (
int) – Which IO port.
- use_io_mode_continuous_marker_output(port)
Writes
SPCM_XMODE_CONTOUTMARKtoSPCM_X0_MODE.- Parameters:
port (
int) – Which IO port.
- use_io_mode_digital_out(port, channel, bit)
Writes
SPCM_XMODE_DIGOUTtoSPCM_X0_MODE.- Parameters:
port (
int) – Which IO port.
- use_io_mode_reference_clock_output(port)
Writes
SPCM_XMODE_REFCLKOUTtoSPCM_X0_MODE.- Parameters:
port (
int) – Which IO port.
- use_io_mode_run_state_output(port)
Writes
SPCM_XMODE_RUNSTATEtoSPCM_X0_MODE.- Parameters:
port (
int) – Which IO port.
- use_io_mode_system_clock_output(port)
Writes
SPCM_XMODE_SYSCLKOUTtoSPCM_X0_MODE.- Parameters:
port (
int) – Which IO port.
- use_io_mode_trigger_output(port)
Writes
SPCM_XMODE_TRIGOUTtoSPCM_X0_MODE.- Parameters:
port (
int) – Which IO port.
- use_mode_fifo_gate()
Writes to
SPC_CARDMODEto set the mode of the card toSPC_REP_FIFO_GATE.
- use_mode_fifo_multi()
Writes to
SPC_CARDMODEto set the mode of the card toSPC_REP_FIFO_MULTI.
- use_mode_fifo_single()
Writes to
SPC_CARDMODEto set the mode of the card toSPC_REP_FIFO_SINGLE.
- use_mode_gate()
Writes to
SPC_CARDMODEto set the mode of the card toSPC_REP_STD_GATE.
- use_mode_multi()
Writes to
SPC_CARDMODEto set the mode of the card toSPC_REP_STD_MULTI.
- use_mode_sequence()
Writes to
SPC_CARDMODEto set the mode of the card toSPC_REP_STD_SEQUENCE.
- use_mode_single()
Writes to
SPC_CARDMODEto set the mode of the card toSPC_REP_STD_SINGLE.
- use_mode_single_restart()
Writes to
SPC_CARDMODEto set the mode of the card toSPC_REP_STD_SINGLERESTART.
- use_trigger_both_edge(trigger_index, threshold, multiplier='', make_sufficient=True)
Writes
SPC_TM_BOTHtoSPC_TRIG_EXT0_MODE.
- use_trigger_enter_window(trigger_index, lower_threshold, upper_threshold, multiplier='', make_sufficient=True)
Writes
SPC_TM_WINENTERtoSPC_TRIG_EXT0_MODE.
- use_trigger_high_gate(trigger_index, threshold, multiplier='', make_sufficient=False)
Writes
SPC_TM_HIGHtoSPC_TRIG_EXT0_MODE.
- use_trigger_inside_window_gate(trigger_index, lower_threshold, upper_threshold, multiplier='', make_sufficient=False)
Writes
SPC_TM_INWINtoSPC_TRIG_EXT0_MODE.
- use_trigger_leave_window(trigger_index, lower_threshold, upper_threshold, multiplier='', make_sufficient=True)
Writes
SPC_TM_WINLEAVEtoSPC_TRIG_EXT0_MODE.
- use_trigger_low_gate(trigger_index, threshold, multiplier='', make_sufficient=False)
Writes
SPC_TM_LOWtoSPC_TRIG_EXT0_MODE.
- use_trigger_negative_edge(trigger_index, threshold, multiplier='', re_arm_threshold=None, make_sufficient=True)
Writes
SPC_TM_NEGtoSPC_TRIG_EXT0_MODE.- Parameters:
trigger_index (
int) – Which trigger.threshold (
float) – Voltage.multiplier (
str) – Can be metric prefixes""(default), or"m".re_arm_threshold (
float) – IsNoneby default. Can be set to a voltage (in units determined bymultiplier) such that the trigger level must go over this threshold to be re-armed after a trigger (using flagSPC_TM_REARM).make_sufficient (
bool) – IfTrue(default), adds this trigger to the OR mask (seeset_sufficient_triggers).
- use_trigger_outside_window_gate(trigger_index, lower_threshold, upper_threshold, multiplier='', make_sufficient=False)
Writes
SPC_TM_OUTSIDEWINtoSPC_TRIG_EXT0_MODE.
- use_trigger_positive_edge(trigger_index, threshold, multiplier='', re_arm_threshold=None, make_sufficient=True)
Writes
SPC_TM_POStoSPC_TRIG_EXT0_MODE.- Parameters:
trigger_index (
int) – Which trigger.threshold (
float) – Voltage.multiplier (
str) – Can be metric prefixes""(default), or"m".re_arm_threshold (
float) – IsNoneby default. Can be set to a voltage (in units determined bymultiplier) such that the trigger level must go under this threshold to be re-armed after a trigger (using flagSPC_TM_REARM).make_sufficient (
bool) – IfTrue(default), adds this trigger to the OR mask (seeset_sufficient_triggers).