10-19-2020 01:50 AM
Hi!
I have been trying to understand on how to use the nidaqmxconfig ---export but I really don't get it, what alias should be used?
And what actual procedure shoud I follow?
If you could please detail this on my example I would be grateful.
PS:
I have installed a virtual windows machine to try NI Labview there, and I can acquire a first burst of samples (and they look gorgeous) but then the communication with the device drops out and goes into time out every time. The Device can do a self test and seems to work, excpet the DAQ assitant doesn't wnat to acquire anymore
10-19-2020 03:49 AM - edited 10-19-2020 03:57 AM
Hey trubilo,
The alias name is what can be passed instead of a device path to open communication to a DAQmx device. This has the advantage that you can reuse existing code across different systems with modules installed in different slots as long as they have the same device alias name. Here is a quick roundup of the steps involved to change the device alias name on Linux. You might have to run these commands with root privileges.
1) In a terminal, execute nidaqmxconfig --export ~/daqmx_export.txt to export the current config to a text file in the current user's home directory.
2) Using a text editor, edit the entries in the first column to set the alias names, i.e. change
PXI1Slot4 PXIe 0x12345678 0x87654321 PXIe-XXXX to My_PXIe_XXXX PXIe 0x12345678 0x87654321 PXIe-XXXX to rename your device alias from "PXI1Slot4" to "My_PXIe_XXXX".
3) Read the configuration data in with nidaqmxconfig --import ~/daqmx_export.txt --replace
Regarding your second question with the device dropping out:
When using a VM with hardware passthrough, numerous problems might occur depending on the way the virtualization software realizes this. I strongly recommend to proceed troubleshooting on the main system to avoid additional potential points of failure. Nevertheless, one possible explanation would be to miss closing the device handle at the end of your code. Remember to also handle errors to gracefully close open device handles.
Please let us know if that worked for you. Good luck!
10-19-2020 07:24 AM
Ok my config file doesn't have entries similar to the one you have written in the example.
Check out my daqmx_export attached.
Kr,
D-
10-21-2020 02:38 AM
Hi Trubilu,
Now I'm confused: Where did you install the DAQmx drivers from? Did you download the repo .deb from NI.com, apt update and then apt install ni-daqmx?
If not, please try removing any existing ni-daqmx software with apt autoremove ni-daqmx and retry with the official NI deb repo from Download and Install NI Driver Software on Linux Desktop .
It seems that the kernel module for your USB-DAQ has not been loaded.
10-21-2020 06:53 AM
I actually installed the same way but now I did it again follwing the exact procedure you mention. Here are the new logs.
daqmx export stays the same.
KR,
David
10-21-2020 09:35 AM
NI-DAQmx 20.0 and 20.1 do not support USB M or X Series devices on Linux. The only USB DAQ devices that are presently supported by NI-DAQmx on Linux are CompactDAQ. The readme could probably be improved here; some of the language in it is a holdover from when no USB DAQ devices were supported.
10-21-2020 10:10 AM
Indeed, BStreiff is right. Trubilu's USB-6251 is not listed in the official support list at https://download.ni.com/ni-linux-desktop/2020.07/readme/drivers/readme_NI-DAQmx
11-11-2020 07:36 AM
We revised the readme to make it more clear that the USB variants are not currently supported: https://download.ni.com/ni-linux-desktop/2020.07/readme/drivers/readme_NI-DAQmx
11-11-2020 07:42 AM
but WHYYYYYY
:'(