def test_configure_for_homogeneous_triggers(self): self.patched_library.niTClk_ConfigureForHomogeneousTriggers.side_effect = self.side_effects_helper.niTClk_ConfigureForHomogeneousTriggers nitclk.configure_for_homogeneous_triggers(multiple_session_references) self.patched_library.niTClk_ConfigureForHomogeneousTriggers.assert_called_once_with( _matchers.ViUInt32Matcher(len(multiple_sessions)), _matchers.ViSessionBufferMatcher(multiple_sessions)) return
def test_nitclk_sync_pulse_sender_synchronize(multiple_niscope_sessions): nitclk.configure_for_homogeneous_triggers(multiple_niscope_sessions) nitclk.setup_for_sync_pulse_sender_synchronize(multiple_niscope_sessions, .001) nitclk.synchronize_to_sync_pulse_sender(multiple_niscope_sessions, .001) nitclk.finish_sync_pulse_sender_synchronize(multiple_niscope_sessions, .001)
def example(resource_name1, resource_name2, options): with niscope.Session(resource_name=resource_name1, options=options) as session1, niscope.Session( resource_name=resource_name2, options=options) as session2: session_list = [session1, session2] for session in session_list: session.configure_vertical(range=1.0, coupling=niscope.VerticalCoupling.DC) session.configure_horizontal_timing(min_sample_rate=50000000, min_num_pts=1000, ref_position=50.0, num_records=1, enforce_realtime=True) session1.trigger_type = niscope.TriggerType.SOFTWARE nitclk.configure_for_homogeneous_triggers(session_list) nitclk.synchronize(session_list, 200e-9) nitclk.initiate(session_list) time.sleep(100) session1.send_software_trigger_edge(niscope.WhichTrigger.START) waveforms = session2.channels[0].fetch(num_samples=1000) for i in range(len(waveforms)): print('Waveform {0} information:'.format(i)) print(str(waveforms[i]) + '\n\n')
def test_nitclk_is_done(multiple_niscope_sessions): nitclk.configure_for_homogeneous_triggers(multiple_niscope_sessions) nitclk.synchronize(multiple_niscope_sessions, .001) nitclk.initiate(multiple_niscope_sessions) nitclk.is_done(multiple_niscope_sessions)
def test_nitclk_configure_for_homogeneous_triggers(multiple_niscope_sessions): nitclk.configure_for_homogeneous_triggers(multiple_niscope_sessions)