How to use the nifgen.OutputMode.ARB function in nifgen

To help you get started, we’ve selected a few nifgen examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ni / nimi-python / src / nifgen / system_tests / test_system_nifgen.py View on Github external
def test_reset(session):
    default_output_mode = session.output_mode
    assert default_output_mode == nifgen.OutputMode.ARB
    session.output_mode = nifgen.OutputMode.SEQ
    assert session.output_mode == nifgen.OutputMode.SEQ
    session.reset()
    assert session.output_mode == nifgen.OutputMode.ARB
github ni / nimi-python / src / nifgen / system_tests / test_system_nifgen.py View on Github external
def test_reset(session):
    default_output_mode = session.output_mode
    assert default_output_mode == nifgen.OutputMode.ARB
    session.output_mode = nifgen.OutputMode.SEQ
    assert session.output_mode == nifgen.OutputMode.SEQ
    session.reset()
    assert session.output_mode == nifgen.OutputMode.ARB
github ni / nimi-python / src / nifgen / system_tests / test_system_nifgen.py View on Github external
def test_configure_arb_waveform(session):
    waveform_data = [x * (1.0 / 256.0) for x in range(256)]
    session.output_mode = nifgen.OutputMode.ARB
    session.configure_arb_waveform(session.create_waveform(waveform_data), 1.0, 0.0)
github ni / nimi-python / src / nifgen / examples / nifgen_arb_waveform.py View on Github external
def example(resource_name, options, samples, gain, offset, gen_time):
    waveform_data = create_waveform_data(samples)
    with nifgen.Session(resource_name=resource_name, options=options) as session:
        session.output_mode = nifgen.OutputMode.ARB
        waveform = session.create_waveform(waveform_data_array=waveform_data)
        session.configure_arb_waveform(waveform_handle=waveform, gain=gain, offset=offset)
        with session.initiate():
            time.sleep(gen_time)