11-27-2019 10:55 AM
Hi everyone:
1) I was trying to process DAQ from NI PCI-6123 with s.startForeground function. However, it showed 'Error:Timeout expired before operation could complete.' As figure below.
I tried to increase the acqusition time, but it didn't work.
2) Then, I chekced 'Test and measurement tool' from” in APPs category of matlab R2017a.
Problem: Cannot connect with the USB of “USB0::0x0957::0x0407::MY44004870::0” (probably cannot connect with the PCI-6123)
Guess: Need to connect with Visa-PCI6123 àNi-visa connection
3) Then I check on Ni-PCI MAX
Problem: There is NI device detected, but no of “USB0::0x0957::0x0407::MY44004870::0”.
Guess: PCI6123 needs Ni-visa connection
4) Ni-Visa connection
Use: NI-VISA DRIVER WIZARD
Problem: Setting parameter in interrupt detection& interrupt detection ->Need to know the parameter. But don’t have it
Above is how I solve the problem, but until now I cannot solve the problem yet. Does anyone have the experience about this? All originates from the timeout expired problem, hope the description is crear enough. Thanks.
12-28-2023 10:31 AM
Facing the same problem. Connecting to Daq and taking measurement using startForeground and getting Timeout Error in most of the times.
Did you solve it eventually?
Thanks in advance
12-29-2023 12:17 PM - edited 12-29-2023 12:19 PM
I have no experience with using NI hardware from Matlab, but pretty much all of the guesses seem definitely wrong on the original post.
The NI PCI card is NOT an USB device and therefore should never be expected to work through the USB VISA address.
Instead it should be addressed through the DAQmx driver, that needs to be downloaded and installed: https://www.ni.com/en/support/downloads/drivers/download.ni-daq-mx.html
This may also need a specific Matlab DAQ Toolbox or something.
Even if you use a NI USB DAQ device it should be accessed through DAQmx! Trying to access it through VISA is a dead end, the according Raw USB protocol is not documented and you do not want to write a low level USB Raw driver in Matlab anyhow.
12-29-2023 02:24 PM
@rolfk wrote:
I have no experience with using NI hardware from Matlab, but pretty much all of the guesses seem definitely wrong on the original post.
The NI PCI card is NOT an USB device and therefore should never be expected to work through the USB VISA address.
Instead it should be addressed through the DAQmx driver, that needs to be downloaded and installed: https://www.ni.com/en/support/downloads/drivers/download.ni-daq-mx.html
This may also need a specific Matlab DAQ Toolbox or something.
Even if you use a NI USB DAQ device it should be accessed through DAQmx! Trying to access it through VISA is a dead end, the according Raw USB protocol is not documented and you do not want to write a low level USB Raw driver in Matlab anyhow.
Technically it is a connection problem. 😄 Just not in the conventional way. 😉
12-29-2023 03:22 PM - edited 12-29-2023 03:22 PM
@billko wrote:
Technically it is a connection problem. 😄 Just not in the conventional way. 😉
But that NI-VISA is so totally wrong when it is about an NI-DAQ device. It was sort of involved in a way with NI-DAQmx Base but that is long ago discontinued, and still would not be part of trying to access NI-DAQmx Base from an application.
12-29-2023 07:45 PM
@rolfk wrote:
@billko wrote:
Technically it is a connection problem. 😄 Just not in the conventional way. 😉
But that NI-VISA is so totally wrong when it is about an NI-DAQ device. It was sort of involved in a way with NI-DAQmx Base but that is long ago discontinued, and still would not be part of trying to access NI-DAQmx Base from an application.
Of course I know what you are saying. But trying to connect to something you're not supposed to try to connect to is still a connection error of sorts. Come on, I'm just trying to have fun at your expense. 😄