Skip to content

Bug in RedPitaya-Examples/python/lib /redpitaya_scpi.py #5

@hmartinsson

Description

@hmartinsson

In the function acq_data() the following two code segments need to swap order, otherwise the call to buff_string = self.rx_txt() after the second code block fails.

# Determine the output data
if start is not None and end is not None:
    self.tx_txt(f"ACQ:SOUR{chan}:DATA:STArt:End? {start},{end}")
elif start is not None and num_samples is not None:
    self.tx_txt(f"ACQ:SOUR{chan}:DATA:STArt:N? {start},{num_samples}")
elif old and num_samples is not None:
    self.tx_txt(f"ACQ:SOUR{chan}:DATA:Old:N? {num_samples}")
elif last and num_samples is not None:
    self.tx_txt(f"ACQ:SOUR{chan}:DATA:LATest:N? {num_samples}")
elif trig_pos is not None and num_samples is not None:
    self.tx_txt(f"ACQ:SOUR{chan}:DATA:TRig? {num_samples},{trig_pos.value}")
else:
    self.tx_txt(f"ACQ:SOUR{chan}:DATA?")
# Get data type from Red Pitaya
units = self.txrx_txt('ACQ:DATA:Units?')
data_format = self.txrx_txt("ACQ:DATA:FORMAT?")
self.check_error()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions