This tool serves as a reference for integrating the Measurement Plug-In Client Generator to generate measurement plug-in clients and showcase the sequencing of measurement plug-ins using the generated clients.
- Python 3.9 or later
After downloading the ni_measurement_plugin_sequencer-x.x.x-py3-none-any.whl
file from the latest release assets, install the package using the command below.
pip install <path_to_ni_measurement_plugin_sequencer-x.x.x-py3-none-any.whl>
To run the ni-measurement-plugin-sequencer
, open your command line and enter:
ni-measurement-plugin-sequencer <path_to_sequence_directory>
- <path_to_sequence_directory>: Specify the directory path where the generated clients and sequence files will be stored. Confirm that the directory exists and has the necessary write permissions.
The generated sequence.py
file will contain the following:
pin_map_methods
: A list of methods used to register the pin map for the measurement plug-ins. Updatepin_map_path
variable with the pin map file path.- These lines of code can be removed for the non-pin-centric workflow.
- A loop to register the pin map for each measurement plug-in.
Note: Users must update the sequence.py
file to define their sequences using the generated measurement plug-in clients.
- A basic logger package (
ni_sequence_logger
) is provided to log the execution results of the sequence. - Download this logging package from the latest release assets and install using the command,
pip install <path_to_ni_sequence_logger-x.x.x-py3-none-any.whl>
- Once installed, the logging package will ensure that the logging configuration is set up in the generated code, allowing the sequence file to be executed and capturing logs from various operations throughout the sequence.
- Run the
sequence.py
file to execute the sequence. - The log will be saved as a CSV file in the current working directory.
Note: Before creating clients, the tool automatically handles directory cleanup by,
- Clearing the content of the `__init__.py` file (if it exists).
- Removing all generated clients.
- Deleting the `sequence.py` file (if present).
- Note:
- No dependency management: The user must take care of managing the dependencies for the respective sequence directory.
- The sequencer doesn't generate a
pyproject.toml
file. Instead, the user must ensure that the necessary dependencies are installed.
- The sequencer doesn't generate a
- No dependency management: The user must take care of managing the dependencies for the respective sequence directory.
- For guidance on integrating the Measurement Plug-In Client Generator with your custom application, please refer to this documentation.