Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nidigital_spi example returns errors when the service and TestStand sequence are in different directories #259

Closed
bkeryan opened this issue May 2, 2023 · 0 comments · Fixed by #282
Assignees
Labels
bug Something isn't working

Comments

@bkeryan
Copy link
Collaborator

bkeryan commented May 2, 2023

Bug Report

The nidigital_spi example resolves file paths differently in the service vs. the TestStand code module:

  • The service resolves file paths with respect to the service directory.
  • The TestStand code module resolves file paths with respect to the TestStand search paths, including the directory containing the sequence file.

If you statically register the example by copying it from the measurementlink-python Git repo to C:\ProgramData\National Instruments\MeasurementLink\Services\nidigital_spi, then the TestStand sequence in C:\ProgramData works but the TestStand sequence in the measurementlink-python Git repo fails.

Repro or Code Sample

Run python scripts\install_examples.py.
Cd to C:\dev\measurementlink-python\examples\nidigital_spi and run poetry install to create a virtualenv for the TestStand code module.
Open C:\dev\measurementlink-python\examples\nidigital_spi\NIDigitalSPI.seq in TestStand and run it.

Expected Behavior

The sequence passes.

Current Behavior

The sequence fails with this error:

Error executing substep 'Post'.
Exception calling application: -1074118557: The specified levels or timing sheet name was not found. Ensure that you load levels and timing sheets before you applying them.

Device: DigitalPattern1
Levels Sheet: C:\ProgramData\National Instruments\MeasurementLink\Services\nidigital_spi\PinLevels.digilevels

This is because the TestStand code module loaded C:\dev\measurementlink-python\examples\nidigital_spi\PinLevels.digilevels, not C:\ProgramData\National Instruments\MeasurementLink\Services\nidigital_spi\PinLevels.digilevels.

Your Environment

  • OS & Device: Windows 10
  • ni-measurementlink-service version: 1.0.1
  • MeasurementLink version: 2023 Q2
  • Python version: 3.9

AB#2381210

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants