Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ All notable changes to this project will be documented in this file.
* #### Removed
* ### `nidigital` (NI-Digital Pattern Driver)
* #### Added
* Methods Added:
* `enable_match_fail_combination`
* #### Changed
* #### Removed
* ### `nidmm` (NI-DMM)
Expand Down
3 changes: 3 additions & 0 deletions build/templates/tox-system_tests.ini.mako
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ deps =
% if uses_other_wheel:
${wheel_env_no_py}: build

% endif
% if module_name == 'nidigital':
${module_name}-system_tests: nisync
% endif
${module_name}-system_tests: pytest
${module_name}-system_tests: coverage
Expand Down
13 changes: 13 additions & 0 deletions docs/nidigital/class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1326,6 +1326,19 @@ disable_sites
Example: :py:meth:`my_session.disable_sites`


enable_match_fail_combination
-----------------------------

.. py:currentmodule:: nidigital.Session

.. py:method:: enable_match_fail_combination()

Configures digital pattern instruments and the PXIe-6674T timing and synchronization instrument to combine pattern comparison results and control subsequent pattern execution across digital pattern instruments based on those results. You must initialize the PXIe-6674T using NI-Sync and call this method from a multi-instrument session.





enable_sites
------------

Expand Down
9 changes: 9 additions & 0 deletions generated/nidigital/nidigital/_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def __init__(self, ctypes_library):
self.niDigital_CreateTimeSet_cfunc = None
self.niDigital_DeleteAllTimeSets_cfunc = None
self.niDigital_DisableSites_cfunc = None
self.niDigital_EnableMatchFailCombination_cfunc = None
self.niDigital_EnableSites_cfunc = None
self.niDigital_FetchCaptureWaveformU32_cfunc = None
self.niDigital_FetchHistoryRAMCycleInformation_cfunc = None
Expand Down Expand Up @@ -346,6 +347,14 @@ def niDigital_DisableSites(self, vi, site_list): # noqa: N802
self.niDigital_DisableSites_cfunc.restype = ViStatus # noqa: F405
return self.niDigital_DisableSites_cfunc(vi, site_list)

def niDigital_EnableMatchFailCombination(self, session_count, sessions, sync_session): # noqa: N802
with self._func_lock:
if self.niDigital_EnableMatchFailCombination_cfunc is None:
self.niDigital_EnableMatchFailCombination_cfunc = self._get_library_function('niDigital_EnableMatchFailCombination')
self.niDigital_EnableMatchFailCombination_cfunc.argtypes = [ViUInt32, ctypes.POINTER(ViSession), ViSession] # noqa: F405
self.niDigital_EnableMatchFailCombination_cfunc.restype = ViStatus # noqa: F405
return self.niDigital_EnableMatchFailCombination_cfunc(session_count, sessions, sync_session)

def niDigital_EnableSites(self, vi, site_list): # noqa: N802
with self._func_lock:
if self.niDigital_EnableSites_cfunc is None:
Expand Down
8 changes: 8 additions & 0 deletions generated/nidigital/nidigital/_library_interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,14 @@ def disable_sites(self, site_list): # noqa: N802
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
return

def enable_match_fail_combination(self, sessions, sync_session): # noqa: N802
session_count_ctype = _visatype.ViUInt32(0 if sessions is None else len(sessions)) # case S160
sessions_ctype = _get_ctypes_pointer_for_buffer(value=sessions, library_type=_visatype.ViSession) # case B550
sync_session_ctype = _visatype.ViSession(self._vi) # case S110
error_code = self._library.niDigital_EnableMatchFailCombination(session_count_ctype, sessions_ctype, sync_session_ctype)
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
return

def enable_sites(self, site_list): # noqa: N802
vi_ctype = _visatype.ViSession(self._vi) # case S110
site_list_ctype = ctypes.create_string_buffer(site_list.encode(self._encoding)) # case C010
Expand Down
7 changes: 7 additions & 0 deletions generated/nidigital/nidigital/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -3430,6 +3430,13 @@ def delete_all_time_sets(self):
self._interpreter.delete_all_time_sets()

@ivi_synchronized
def enable_match_fail_combination(self, sync_session):
'''enable_match_fail_combination

Configures digital pattern instruments and the PXIe-6674T timing and synchronization instrument to combine pattern comparison results and control subsequent pattern execution across digital pattern instruments based on those results. You must initialize the PXIe-6674T using NI-Sync and call this method from a multi-instrument session.
'''
self._interpreter.enable_match_fail_combination([self._interpreter.get_session_handle()], sync_session.session_handle)
@ivi_synchronized
def load_specifications_levels_and_timing(self, specifications_file_paths=None, levels_file_paths=None, timing_file_paths=None):
'''load_specifications_levels_and_timing

Expand Down
9 changes: 9 additions & 0 deletions generated/nidigital/nidigital/unit_tests/_mock_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ def __init__(self):
self._defaults['DeleteAllTimeSets']['return'] = 0
self._defaults['DisableSites'] = {}
self._defaults['DisableSites']['return'] = 0
self._defaults['EnableMatchFailCombination'] = {}
self._defaults['EnableMatchFailCombination']['return'] = 0
self._defaults['EnableSites'] = {}
self._defaults['EnableSites']['return'] = 0
self._defaults['FetchCaptureWaveformU32'] = {}
Expand Down Expand Up @@ -407,6 +409,11 @@ def niDigital_DisableSites(self, vi, site_list): # noqa: N802
return self._defaults['DisableSites']['return']
return self._defaults['DisableSites']['return']

def niDigital_EnableMatchFailCombination(self, session_count, sessions, sync_session): # noqa: N802
if self._defaults['EnableMatchFailCombination']['return'] != 0:
return self._defaults['EnableMatchFailCombination']['return']
return self._defaults['EnableMatchFailCombination']['return']

def niDigital_EnableSites(self, vi, site_list): # noqa: N802
if self._defaults['EnableSites']['return'] != 0:
return self._defaults['EnableSites']['return']
Expand Down Expand Up @@ -1179,6 +1186,8 @@ def set_side_effects_and_return_values(self, mock_library):
mock_library.niDigital_DeleteAllTimeSets.return_value = 0
mock_library.niDigital_DisableSites.side_effect = MockFunctionCallError("niDigital_DisableSites")
mock_library.niDigital_DisableSites.return_value = 0
mock_library.niDigital_EnableMatchFailCombination.side_effect = MockFunctionCallError("niDigital_EnableMatchFailCombination")
mock_library.niDigital_EnableMatchFailCombination.return_value = 0
mock_library.niDigital_EnableSites.side_effect = MockFunctionCallError("niDigital_EnableSites")
mock_library.niDigital_EnableSites.return_value = 0
mock_library.niDigital_FetchCaptureWaveformU32.side_effect = MockFunctionCallError("niDigital_FetchCaptureWaveformU32")
Expand Down
1 change: 1 addition & 0 deletions generated/nidigital/tox-system_tests.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ commands =
deps =
nidigital-wheel_dep: build

nidigital-system_tests: nisync
nidigital-system_tests: pytest
nidigital-system_tests: coverage
nidigital-system_tests: numpy
Expand Down
81 changes: 81 additions & 0 deletions src/nidigital/metadata/functions_addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,3 +535,84 @@
],
},
}

functions_additional_enable_match_fail_combination = {
'EnableMatchFailCombination': {
'codegen_method': 'yes',
'method_templates': [
{
'documentation_filename': 'default_method',
'library_interpreter_filename': 'enable_match_fail_combination',
'method_python_name_suffix': '',
'session_filename': 'none',
}
],
'documentation': {
'description': 'Configures digital pattern instruments and the PXIe-6674T timing and synchronization instrument to combine pattern comparison results and control subsequent pattern execution across digital pattern instruments based on those results. You must initialize the PXIe-6674T using NI-Sync and use the niTClk Synchronize function to synchronize instruments before calling the niDigital_EnableMatchFailCombination function.\n'
},
'included_in_proto': False,
'parameters': [
{
'direction': 'in',
'documentation': {
'description': 'Number of sessions.\n'
},
'name': 'sessionCount',
'type': 'ViUInt32'
},
{
'direction': 'in',
'documentation': {
'description': 'The specified array of sessions synchronized using NI-TClk.\n'
},
'name': 'sessions',
'size': {
'mechanism': 'passed-in',
'value': 'sessionCount'
},
'type': 'ViSession[]'
},
{
'direction': 'in',
'documentation': {
'description': 'The specified NI-Sync session.\n'
},
'name': 'syncSession',
'type': 'ViSession'
}
],
'returns': 'ViStatus'
},
'FancyEnableMatchFailCombination': {
'python_name': 'enable_match_fail_combination',
'codegen_method': 'python-only',
'method_templates': [
{
'documentation_filename': 'default_method',
'library_interpreter_filename': 'none',
'method_python_name_suffix': '',
'session_filename': 'fancy_enable_match_fail_combination',
}
],
'documentation': {
'description': 'Configures digital pattern instruments and the PXIe-6674T timing and synchronization instrument to combine pattern comparison results and control subsequent pattern execution across digital pattern instruments based on those results. You must initialize the PXIe-6674T using NI-Sync and call this method from a multi-instrument session.\n'
Comment thread
ni-jfitzger marked this conversation as resolved.
},
'included_in_proto': True,
'parameters': [
{
'direction': 'in',
'name': 'vi',
'type': 'ViSession'
},
{
'direction': 'in',
'documentation': {
'description': 'The specified NI-Sync session.\n'
},
'name': 'syncSession',
'type': 'ViSession'
}
],
'returns': 'ViStatus'
},
}
11 changes: 11 additions & 0 deletions src/nidigital/system_tests/test_system_nidigital.py
Original file line number Diff line number Diff line change
Expand Up @@ -1330,6 +1330,17 @@ class TestLibrary(SystemTests):
def session_creation_kwargs(self):
return {}

def test_enable_match_fail_combination(self, multi_instrument_session):
import nisync

test_files_folder = 'simple_pattern'
multi_instrument_session.load_pin_map(self.get_test_file_path(test_files_folder, "pin_map.pinmap"))
Comment thread
ni-jfitzger marked this conversation as resolved.
Outdated
multi_instrument_session.load_pattern(self.get_test_file_path(test_files_folder, 'pattern.digipat'))
with nisync.Sesssion('6674T') as sync_session:
multi_instrument_session.enable_match_fail_combination(sync_session)
multi_instrument_session.burst_pattern(start_label='new_pattern')
multi_instrument_session.read_sequencer_flag(nidigital.SequencerFlag.FLAG0)
Comment thread
ni-jfitzger marked this conversation as resolved.


class TestGrpc(SystemTests):
@pytest.fixture(scope='class')
Expand Down
Comment thread
ni-jfitzger marked this conversation as resolved.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

def enable_match_fail_combination(self, sessions, sync_session): # noqa: N802
session_count_ctype = _visatype.ViUInt32(0 if sessions is None else len(sessions)) # case S160
sessions_ctype = _get_ctypes_pointer_for_buffer(value=sessions, library_type=_visatype.ViSession) # case B550
sync_session_ctype = _visatype.ViSession(self._vi) # case S110
error_code = self._library.niDigital_EnableMatchFailCombination(session_count_ctype, sessions_ctype, sync_session_ctype)
errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
return
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<%page args="f, config, method_template"/>\
<%
import build.helper as helper
%>\
def ${f['python_name']}(self, sync_session):
'''${f['python_name']}

${helper.get_function_docstring(f, False, config, indent=8)}
'''
self._interpreter.enable_match_fail_combination([self._interpreter.get_session_handle()], sync_session.session_handle)