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

niswitch.errors.DriverError: -1074118644: No legacy device supports the specified topology #2007

Closed
manishkumaretn opened this issue Sep 6, 2023 · 10 comments

Comments

@manishkumaretn
Copy link

Hi,
I am getting following error while trying to open niswitch session in python.
niswitch.errors.DriverError: -1074118644: No legacy device supports the specified topology. Use a different topology, or configure the device under DAQmx and use the DAQmx resource descriptor.

Python code:
import niswitch
resource = "visa://192.168.1.1/PXI8::8::INSTR"
topology1 = "2566/16-SPDT"

with niswitch.Session(resource, topology1) as session:
session.connect(channel1='k0', channel2='com0')

Test environment details:
3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 07:18:10) [MSC v.1900 32 bit (Intel)]
Package Version

future 0.18.3
hightime 0.2.1
nidaqmx 0.5.7
nifpga 22.0.0
niswitch 1.4.5
numpy 1.19.5
pip 21.3.1
setuptools 28.8.0
six 1.16.0
MAX device details

please let me know if any additional information is required.

Thanks,
Manish

@tobiasgordon
Copy link
Collaborator

NI-SWITCH does not support VISA resource descriptors. You should use the resource name (from your screenshot, "PXI2Slot18").
This is what the error message is trying to tell you, but it could admittedly be clearer.

I'm going to close this issue. Feel free to reply if you have further questions.

@tobiasgordon tobiasgordon closed this as not planned Won't fix, can't repro, duplicate, stale Sep 6, 2023
@manishkumaretn
Copy link
Author

I am getting following error if use "PXI2Slot18" as resource name:
raise DriverError(code, description)
niswitch.errors.DriverError: -1074118654: Invalid resource name.

Invalid Identifier: PXI2Slot18

@tobiasgordon
Copy link
Collaborator

Based on your screenshot of MAX, I would expect that resource name to work.
Do you have NI-SWITCH installed? (The driver, not the Python wrapper.) I'm assuming yes or else I would expect a different error about a missing library. Which version?
Are you able to run Reset or Self Test on the board? Does the "Test Panels" button work correctly from MAX? Are you able to access the board using a different programming language?

As an aside, note that the version of the ni-switch Python library you are using does not support Python 3.6. See the comment on https://pypi.org/project/niswitch/ (you want 3.7 or newer).

@manishkumaretn
Copy link
Author

Hi,
I installed python 3.7. But i am still getting the same error.
NI-SWITCH (version -18) is installed. I can also run the example labview code for PXI-2566 relay module and its working.
image
image

I can "Reset" and "Self Test" on board using MAX. sharing the screenshot for your reference.
image
image

"Test Panels" is not working. Getting following error:
image

I have not worked with different programming language.
Thanks,
Manish

@tobiasgordon
Copy link
Collaborator

Manish,

I apologize, I overlooked the fact that you are using a remote system before. The NI-SWITCH API does not directly support accessing devices on remote systems. That is why you are receiving a "resource not found" error - the driver is only looking at the local system.

You have a number of options here (if you want/need to use Python), including:

  1. Use LabVIEW Real-Time Module and the LabVIEW Python nodes (e.g. run it locally via LabVIEW). This is the only method officially provided by NI today.
  2. gRPC
  3. rpyc
  4. Run the code locally on the target (via ssh or some other tool)

@marcoskirsch
Copy link
Member

Your remote system is NI Linux RT, right?
You should SSH to it and run the code locally.

@manishkumaretn
Copy link
Author

My system is configured as Pharlap RT.

@manishkumaretn
Copy link
Author

If SSH is applicable for RT Pharlap, can you pl share some more details about usage of SSH.

@manishkumaretn
Copy link
Author

image

@marcoskirsch
Copy link
Member

marcoskirsch commented Sep 12, 2023

Unfortunately there is no SSH server nor Python interpreter for Phar Lap ETS, so you cannot use that’s Python APIs on that operating system. Additionally, Phar Lap ETS was obsoleted years ago so no new features are going to be added anymore.

See if you can use a different OS on your system. I don’t know what controller you have but NI Linux RT or Windows are the two OSes that NI-SWITCH driver supports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants