From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Communication between PCI6251, Labview, and Matlab

Solved!
Go to solution

Hello,

 

I have working with a PCI6251 board driven by a labview executable.

 

I receive measurements from several sensors (pressure, temperature, etc.) which are read by the labview executable.

 

I would like to know if it is possible to send these measurements to Matlab in the same time.

 

I mean : is the PCI6251 board able to send data to Labview and Matlab in the same acquisition time ?

 

Or do I need to install a second PCI board to do that ?

 

(Labview and Matlab are installed on the same PC by now)

0 Kudos
Message 1 of 8
(4,107 Views)
Solution
Accepted by topic author nico974

Hi Nico974,

 

If you want to transfer data from LabVIEW to MATLAB, you have to use ActiveX connection between the 2 softwares or to add MATLAB Node in you LabVIEW program (see http://digital.ni.com/public.nsf/allkb/2F8ED0F588E06BE1862565A90066E9BA?OpenDocument)

Another solution is to use the MathWorks Data Acquisition toolbox because the PCI-6251 is supported by this toolbox (http://www.mathworks.fr/products/daq/supportedio14005.html)

But, here, you have a LV Executable so if you can't modified it you won't be able to use your exe and a Matlab Script at the same time so you need another PCI Board.

 

Sincerely

David S.| Certified LabVIEW Associate Developer
National Instruments France


0 Kudos
Message 2 of 8
(4,102 Views)

Hi David,

 

Thanks a lot for your help. I will have a look to these solutions.

 

Best regards,

 

Nico974

0 Kudos
Message 3 of 8
(4,100 Views)

Hi,

 

I have another problem with NI USB-6221 card this time.

 

In fact, the communication between Matlab and the NI card doesn't work. Here is my code :

 

"

loadlibrary('nicaiu.dll','nidaqmx.h','alias','myni')
disp('NI: Creation de taches')
taskh1=uint32(1);
[a,b,taskh1] = calllib('myni','DAQmxCreateTask','master',taskh1)

"

 

and the response :

 

"

Warning: Warnings messages were produced while parsing. Check the
functions you
intend to use for correctness. Warning text can be viewed using:
[notfound,warnings]=loadlibrary(...)
> In loadlibrary at 381
In dll_nidacmx at 5
??? Error using ==> loadlibrary at 461
There was an error loading the library "C:\Documents and
Settings\uidt1982\Desktop\CARTE_NI\nicaiu.dll"
La procédure spécifiée est introuvable.

 

Error in ==> dll_nidacmx at 5
loadlibrary('nicaiu.dll','nidaqmx.h','alias','myni')

Caused by:
Error using ==> loaddefinedlibrary
La procédure spécifiée est introuvable.

"

 

I put the files 'nicaiu.dll' and 'nidaqmx.h' in Matlab workspace but it doesn't work and I don't understand why.

 

I will need some help...

 

0 Kudos
Message 4 of 8
(4,083 Views)

Hello, I have a new question concerning yhis subject.

 

In fact, I use two NI cards : the first one if PCIe-6251 and the second one is USB NI-6221.

 

I would like to know if it is possible to "stop" a communication between the card and the system which is controled.

 

I mean : my PCie-6251 sends Pressure command to a PID regulator. It is a continuous voltage signal (analog output signal). I would like to know if it is possible to stop this continuous signal (using Matlab) and to send another continuous (in fact another pressure command) signal to the PID with the USB NI-6221 card using Matlab too. And so on...

 

In other words : Can I find a function like DAQmxWriteAnalogF64() for instance which can stop a continuous analog input signal from a NI device ?

 

I can't explain here why I need to do that but I just want to know if it is possible or not.

 

Thanks for your help...

0 Kudos
Message 5 of 8
(4,014 Views)

Nobody ??

 

Maybe I am not clear enough...

 

Don't hesitate to ask me questions.

0 Kudos
Message 6 of 8
(4,002 Views)

Please just create a new topic because this one is considered as solved!

 

Sincerely

David S.| Certified LabVIEW Associate Developer
National Instruments France


0 Kudos
Message 7 of 8
(3,999 Views)

Sorry, I will create a new discussion then.

0 Kudos
Message 8 of 8
(3,996 Views)