Skip to content

Commit 11fa07e

Browse files
Avinash2Sureshdixonjoelbkeryan
authored
examples: Update NI-Digital, NI-DMM, NI-Fgen, NI-Switch, NI-Scope, NI-VISA and Output voltage readme to describe the .env simulation process (#494)
* Updated readme for all driver examples * Brad's feedback. Wording and word wrapping * examples: Update README text about simulating without NI MAX * examples: Word-wrap READMEs using default Rewrap settings * examples: Update simulation info in VISA READMEs * examples: Fix "note" formatting in READMEs --------- Co-authored-by: Joel Dixon <[email protected]> Co-authored-by: Brad Keryan <[email protected]>
1 parent a6df0d0 commit 11fa07e

File tree

12 files changed

+238
-106
lines changed

12 files changed

+238
-106
lines changed

examples/nidaqmx_analog_input/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ measurement with NI-DAQmx.
1616
registration and unregistration in the `Setup` and `Cleanup` sections of the main
1717
sequence. For **Test UUTs** and batch process model use cases, these steps should
1818
be moved to the `ProcessSetup` and `ProcessCleanup` callbacks.
19-
- Uses the NI gRPC Device Server to allow sharing instrument sessions with other measurement services when running measurements from TestStand.
19+
- Uses the NI gRPC Device Server to allow sharing instrument sessions with other measurement
20+
services when running measurements from TestStand.
2021

2122
> **Note**
2223
>
Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## NI-DCPower Source DC Voltage
22

3-
This is a MeasurementLink example that sources and measures a DC voltage with an NI SMU.
3+
This is a MeasurementLink example that sources and measures a DC voltage with an
4+
NI SMU.
45

56
### Features
67

@@ -11,15 +12,16 @@ This is a MeasurementLink example that sources and measures a DC voltage with an
1112
- Sources the same DC voltage level on all selected pin/site combinations
1213
- Measures the DC voltage and current for each selected pin/site combination
1314
- Includes InstrumentStudio and MeasurementLink UI Editor project files
14-
- Includes multiple UI files. Note: InstrumentStudio only displays the 1st UI file.
15-
To change the UI file used for the example, simply switch the order of the
16-
`ui_file_paths` array in `measurement.py`
15+
- Includes multiple UI files. Note: InstrumentStudio only displays the 1st UI
16+
file. To change the UI file used for the example, simply switch the order of
17+
the `ui_file_paths` array in `measurement.py`
1718
- Includes a TestStand sequence showing how to configure the pin map, register
1819
instrument sessions with the session management service, and run a measurement
19-
- For the sake of simplicity, the TestStand sequence handles pin map and session
20-
registration and unregistration in the `Setup` and `Cleanup` sections of the main
21-
sequence. For **Test UUTs** and batch process model use cases, these steps should
22-
be moved to the `ProcessSetup` and `ProcessCleanup` callbacks.
20+
- For the sake of simplicity, the TestStand sequence handles pin map and
21+
session registration and unregistration in the `Setup` and `Cleanup`
22+
sections of the main sequence. For **Test UUTs** and batch process model use
23+
cases, these steps should be moved to the `ProcessSetup` and
24+
`ProcessCleanup` callbacks.
2325
- Uses the NI gRPC Device Server to allow sharing instrument sessions with other
2426
measurement services when running measurements from TestStand
2527

@@ -29,18 +31,26 @@ This is a MeasurementLink example that sources and measures a DC voltage with an
2931

3032
### Required Hardware
3133

32-
This example requires an NI SMU that is supported by NI-DCPower (e.g. PXIe-4141).
34+
This example requires an NI SMU that is supported by NI-DCPower (e.g.
35+
PXIe-4141).
3336

34-
By default, this example uses a physical instrument or a simulated device created in NI MAX. To automatically create a simulated device when running the measurement or TestStand sequence, follow the steps below:
35-
- Create a `.env` file in the measurement service's directory or one of its parent directories (such as the root of your Git repository or `C:\ProgramData\National Instruments\MeasurementLink\Services` for statically registered measurement services).
36-
- Add the following options to the `.env` file to enable simulation via the driver's option string:
37+
By default, this example uses a physical instrument or a simulated instrument
38+
created in NI MAX. To automatically simulate an instrument without using NI MAX,
39+
follow the steps below:
40+
- Create a `.env` file in the measurement service's directory or one of its
41+
parent directories (such as the root of your Git repository or
42+
`C:\ProgramData\National Instruments\MeasurementLink\Services` for statically
43+
registered measurement services).
44+
- Add the following options to the `.env` file to enable simulation via the
45+
driver's option string:
3746

3847
```
3948
MEASUREMENTLINK_NIDCPOWER_SIMULATE=1
4049
MEASUREMENTLINK_NIDCPOWER_BOARD_TYPE=PXIe
4150
MEASUREMENTLINK_NIDCPOWER_MODEL=4141
4251
```
4352

44-
> **Note**
45-
> The multi-site pin map, `NIDCPowerSourceDCVoltageMultiSite.pinmap`, requires an
46-
> NI SMU with 4 or more channels.
53+
> **Note**
54+
>
55+
> The multi-site pin map, `NIDCPowerSourceDCVoltageMultiSite.pinmap`, requires
56+
> an NI SMU with 4 or more channels.

examples/nidigital_spi/README.md

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
## NI-Digital SPI
22

3-
This is a MeasurementLink example that tests an SPI device using an NI Digital Pattern instrument.
3+
This is a MeasurementLink example that tests an SPI device using an NI Digital
4+
Pattern instrument.
45

56
### Features
67

7-
- Uses the `nidigital` package to access the NI-Digital Pattern Driver from Python
8+
- Uses the `nidigital` package to access the NI-Digital Pattern Driver from
9+
Python
810
- Pin-aware, supporting one session, multiple pins, and multiple selected sites
9-
- Includes project files for Digital Pattern Editor, InstrumentStudio, MeasurementLink UI Editor
11+
- Includes project files for Digital Pattern Editor, InstrumentStudio,
12+
MeasurementLink UI Editor
1013
- Includes a TestStand sequence showing how to configure the pin map, register
11-
instrument sessions with the session management service, pre-load files into the NI-Digital
12-
Pattern Driver, and run a measurement
13-
- For the sake of simplicity, the TestStand sequence handles pin map and session
14-
registration and unregistration in the `Setup` and `Cleanup` sections of the main
15-
sequence. For **Test UUTs** and batch process model use cases, these steps should
16-
be moved to the `ProcessSetup` and `ProcessCleanup` callbacks.
14+
instrument sessions with the session management service, pre-load files into
15+
the NI-Digital Pattern Driver, and run a measurement
16+
- For the sake of simplicity, the TestStand sequence handles pin map and
17+
session registration and unregistration in the `Setup` and `Cleanup` sections
18+
of the main sequence. For **Test UUTs** and batch process model use cases,
19+
these steps should be moved to the `ProcessSetup` and `ProcessCleanup`
20+
callbacks.
1721
- Uses the NI gRPC Device Server to allow sharing instrument sessions with other
1822
measurement services when running measurements from TestStand
1923

@@ -25,5 +29,18 @@ This is a MeasurementLink example that tests an SPI device using an NI Digital P
2529

2630
This example requires an NI Digital Pattern instrument (e.g. PXIe-6570).
2731

28-
By default, this example uses a simulated instrument. To use a physical instrument, edit
29-
`_constants.py` to specify `USE_SIMULATION = False`.
32+
By default, this example uses a physical instrument or a simulated instrument
33+
created in NI MAX. To automatically simulate an instrument without using NI MAX,
34+
follow the steps below:
35+
- Create a `.env` file in the measurement service's directory or one of its
36+
parent directories (such as the root of your Git repository or
37+
`C:\ProgramData\National Instruments\MeasurementLink\Services` for statically
38+
registered measurement services).
39+
- Add the following options to the `.env` file to enable simulation via the
40+
driver's option string:
41+
42+
```
43+
MEASUREMENTLINK_NIDIGITAL_SIMULATE=1
44+
MEASUREMENTLINK_NIDIGITAL_BOARD_TYPE=PXIe
45+
MEASUREMENTLINK_NIDIGITAL_MODEL=6570
46+
```

examples/nidmm_measurement/README.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ This is a MeasurementLink example that performs a measurement using an NI DMM.
99
- Includes InstrumentStudio and MeasurementLink UI Editor project files
1010
- Includes a TestStand sequence showing how to configure the pin map, register
1111
instrument sessions with the session management service, and run a measurement
12-
- For the sake of simplicity, the TestStand sequence handles pin map and session
13-
registration and unregistration in the `Setup` and `Cleanup` sections of the main
14-
sequence. For **Test UUTs** and batch process model use cases, these steps should
15-
be moved to the `ProcessSetup` and `ProcessCleanup` callbacks.
12+
- For the sake of simplicity, the TestStand sequence handles pin map and
13+
session registration and unregistration in the `Setup` and `Cleanup`
14+
sections of the main sequence. For **Test UUTs** and batch process model use
15+
cases, these steps should be moved to the `ProcessSetup` and
16+
`ProcessCleanup` callbacks.
1617
- Uses the NI gRPC Device Server to allow sharing instrument sessions with other
1718
measurement services when running measurements from TestStand
1819

@@ -24,5 +25,18 @@ This is a MeasurementLink example that performs a measurement using an NI DMM.
2425

2526
This example requires an NI DMM (e.g. PXIe-4081).
2627

27-
By default, this example uses a simulated instrument. To use a physical instrument, edit
28-
`_constants.py` to specify `USE_SIMULATION = False`.
28+
By default, this example uses a physical instrument or a simulated instrument
29+
created in NI MAX. To automatically simulate an instrument without using NI MAX,
30+
follow the steps below:
31+
- Create a `.env` file in the measurement service's directory or one of its
32+
parent directories (such as the root of your Git repository or
33+
`C:\ProgramData\National Instruments\MeasurementLink\Services` for statically
34+
registered measurement services).
35+
- Add the following options to the `.env` file to enable simulation via the
36+
driver's option string:
37+
38+
```
39+
MEASUREMENTLINK_NIDMM_SIMULATE=1
40+
MEASUREMENTLINK_NIDMM_BOARD_TYPE=PXIe
41+
MEASUREMENTLINK_NIDMM_MODEL=4081
42+
```

examples/nifgen_standard_function/README.md

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,19 @@ using an NI waveform generator.
88
- Uses the `nifgen` package to access NI-FGEN from Python
99
- Demonstrates how to cancel a running measurement by breaking a long wait into
1010
multiple short waits
11-
- Pin-aware, supporting multiple sessions, multiple pins, and multiple selected sites
12-
- Outputs the same waveform configuration on all selected pin/site combinations
11+
- Pin-aware, supporting multiple sessions, multiple pins, and multiple selected
12+
sites
13+
- Outputs the same waveform configuration on all selected pin/site
14+
combinations
1315
- Does not synchronize waveforms
1416
- Includes InstrumentStudio and MeasurementLink UI Editor project files
1517
- Includes a TestStand sequence showing how to configure the pin map, register
1618
instrument sessions with the session management service, and run a measurement
17-
- For the sake of simplicity, the TestStand sequence handles pin map and session
18-
registration and unregistration in the `Setup` and `Cleanup` sections of the main
19-
sequence. For **Test UUTs** and batch process model use cases, these steps should
20-
be moved to the `ProcessSetup` and `ProcessCleanup` callbacks.
19+
- For the sake of simplicity, the TestStand sequence handles pin map and
20+
session registration and unregistration in the `Setup` and `Cleanup`
21+
sections of the main sequence. For **Test UUTs** and batch process model use
22+
cases, these steps should be moved to the `ProcessSetup` and
23+
`ProcessCleanup` callbacks.
2124
- Uses the NI gRPC Device Server to allow sharing instrument sessions with other
2225
measurement services when running measurements from TestStand
2326

@@ -29,5 +32,18 @@ using an NI waveform generator.
2932

3033
This example requires an NI waveform generator (e.g. PXIe-5423 (2CH)).
3134

32-
By default, this example uses a simulated instrument. To use a physical instrument, edit
33-
`_constants.py` to specify `USE_SIMULATION = False`.
35+
By default, this example uses a physical instrument or a simulated instrument
36+
created in NI MAX. To automatically simulate an instrument without using NI MAX,
37+
follow the steps below:
38+
- Create a `.env` file in the measurement service's directory or one of its
39+
parent directories (such as the root of your Git repository or
40+
`C:\ProgramData\National Instruments\MeasurementLink\Services` for statically
41+
registered measurement services).
42+
- Add the following options to the `.env` file to enable simulation via the
43+
driver's option string:
44+
45+
```
46+
MEASUREMENTLINK_NIFGEN_SIMULATE=1
47+
MEASUREMENTLINK_NIFGEN_BOARD_TYPE=PXIe
48+
MEASUREMENTLINK_NIFGEN_MODEL=5423 (2CH)
49+
```
Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
## NI-SCOPE Acquire Waveform
22

3-
This is a MeasurementLink example that acquires a waveform using an NI oscilloscope.
3+
This is a MeasurementLink example that acquires a waveform using an NI
4+
oscilloscope.
45

56
### Features
67

78
- Uses the `niscope` package to access NI-SCOPE from Python
8-
- Demonstrates how to cancel a running measurement while polling measurement status
9+
- Demonstrates how to cancel a running measurement while polling measurement
10+
status
911
- Pin-aware, supporting one session, multiple pins, and one selected site
1012
- Acquires from up to 4 pins
1113
- Trigger source demonstrates mapping a specific pin to a channel
1214
- Includes InstrumentStudio and MeasurementLink UI Editor project files
1315
- Includes a TestStand sequence showing how to configure the pin map, register
1416
instrument sessions with the session management service, and run a measurement
15-
- For the sake of simplicity, the TestStand sequence handles pin map and session
16-
registration and unregistration in the `Setup` and `Cleanup` sections of the main
17-
sequence. For **Test UUTs** and batch process model use cases, these steps should
18-
be moved to the `ProcessSetup` and `ProcessCleanup` callbacks.
17+
- For the sake of simplicity, the TestStand sequence handles pin map and
18+
session registration and unregistration in the `Setup` and `Cleanup`
19+
sections of the main sequence. For **Test UUTs** and batch process model use
20+
cases, these steps should be moved to the `ProcessSetup` and
21+
`ProcessCleanup` callbacks.
1922
- Uses the NI gRPC Device Server to allow sharing instrument sessions with other
2023
measurement services when running measurements from TestStand
2124

@@ -27,5 +30,18 @@ This is a MeasurementLink example that acquires a waveform using an NI oscillosc
2730

2831
This example requires an NI oscilloscope (e.g. PXIe-5162 (4CH)).
2932

30-
By default, this example uses a simulated instrument. To use a physical instrument, edit
31-
`_constants.py` to specify `USE_SIMULATION = False`.
33+
By default, this example uses a physical instrument or a simulated instrument
34+
created in NI MAX. To automatically simulate an instrument without using NI MAX,
35+
follow the steps below:
36+
- Create a `.env` file in the measurement service's directory or one of its
37+
parent directories (such as the root of your Git repository or
38+
`C:\ProgramData\National Instruments\MeasurementLink\Services` for statically
39+
registered measurement services).
40+
- Add the following options to the `.env` file to enable simulation via the
41+
driver's option string:
42+
43+
```
44+
MEASUREMENTLINK_NISCOPE_SIMULATE=1
45+
MEASUREMENTLINK_NISCOPE_BOARD_TYPE=PXIe
46+
MEASUREMENTLINK_NISCOPE_MODEL=5162 (4CH)
47+
```

examples/niswitch_control_relays/README.md

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,18 @@ This is a MeasurementLink example that controls relays using an NI relay driver
66
### Features
77

88
- Uses the `niswitch` package to access NI-SWITCH from Python
9-
- Pin-aware, supporting multiple sessions, multiple pins, and multiple selected sites
10-
- Performs the same operation (open/close relay) on all selected pin/site combinations
9+
- Pin-aware, supporting multiple sessions, multiple pins, and multiple selected
10+
sites
11+
- Performs the same operation (open/close relay) on all selected pin/site
12+
combinations
1113
- Includes InstrumentStudio and MeasurementLink UI Editor project files
1214
- Includes a TestStand sequence showing how to configure the pin map, register
1315
instrument sessions with the session management service, and run a measurement
14-
- For the sake of simplicity, the TestStand sequence handles pin map and session
15-
registration and unregistration in the `Setup` and `Cleanup` sections of the main
16-
sequence. For **Test UUTs** and batch process model use cases, these steps should
17-
be moved to the `ProcessSetup` and `ProcessCleanup` callbacks.
16+
- For the sake of simplicity, the TestStand sequence handles pin map and
17+
session registration and unregistration in the `Setup` and `Cleanup`
18+
sections of the main sequence. For **Test UUTs** and batch process model use
19+
cases, these steps should be moved to the `ProcessSetup` and
20+
`ProcessCleanup` callbacks.
1821
- Uses the NI gRPC Device Server to allow sharing instrument sessions with other
1922
measurement services when running measurements from TestStand
2023

@@ -26,5 +29,17 @@ This is a MeasurementLink example that controls relays using an NI relay driver
2629

2730
This example requires an NI relay driver (e.g. PXI-2567).
2831

29-
By default, this example uses a simulated instrument. To use a physical instrument, edit
30-
`_constants.py` to specify `USE_SIMULATION = False`.
32+
By default, this example uses a physical instrument or a simulated instrument
33+
created in NI MAX. To automatically simulate an instrument without using NI MAX,
34+
follow the steps below:
35+
- Create a `.env` file in the measurement service's directory or one of its
36+
parent directories (such as the root of your Git repository or
37+
`C:\ProgramData\National Instruments\MeasurementLink\Services` for statically
38+
registered measurement services).
39+
- Add the following options to the `.env` file to enable simulation via the
40+
driver's `simulate` and `topology` parameters:
41+
42+
```
43+
MEASUREMENTLINK_NISWITCH_SIMULATE=1
44+
MEASUREMENTLINK_NISWITCH_TOPOLOGY=2567/Independent
45+
```

0 commit comments

Comments
 (0)