Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Use M-Series cards with DAQmx in Matlab!

I have no idea which input.m function gets called here. I assume it's something you have written? If so, you indeed should give it a unique name.

However, this is just a warning, not an error. That's why the empty funclist doesn't sound too good 😕

Well, solve the naming conflict and then see which problem is next.

Jens


0 Kudos
Message 71 of 106
(4,085 Views)
Hi Belif,

I have the exact same problem as you, so I was wondering if you have managed to find a resolution for it?

Regards,

Khashayar
0 Kudos
Message 72 of 106
(3,940 Views)
 Hi Khashayar,

 If you are looking to control your NI 6009 through Matlab then there are several very good options.
   1.NI-DAQmx Tools for Data Acquisition.
   2.Mathworks Data Acquisition Toolbox

You could try using VISA commands to control the NI 6009, however there is no list of VISA commands to use with the NI 6009. If you want to acquire or generate using the NI 6009 and Matlab then please look at one of the links I have posted above.

 Have a great evening,

 MatthewW
 Applications Engineer
 National Instruments


 


0 Kudos
Message 73 of 106
(3,905 Views)
Hi Jens,
 
I have run the sample readDAQ.m file in MATLAB, however error sound 'Function definitions are not permitted at the prompt or in a scripts' appear. what is the problem? and id there a way to solve it? can this code work together with USB 6008 DAQ?
 
Looking forward to hear from u soon. thank a lots.
 
 
regards,
yeelin
 
0 Kudos
Message 74 of 106
(3,818 Views)
Hi Cat!

It sounds as if you are trying to run a Matlab function as a Matlab script.

Let's say you have a Mattlab function like this:

function thisisatestresult=thisisatest(a,b);
thisisatestresult=a+b;

then you call it from the prompt (likewise form a script):

>> result=thisisatest(2,3)

result =

     5

Well, I hope this helps.

Cheers
Jens

0 Kudos
Message 75 of 106
(3,811 Views)

Hi Jens,

I get what u mean. Thanks. I am learning from you and I really appreciate your help. Have a nice day...

 

cat

0 Kudos
Message 76 of 106
(3,794 Views)
Hello everyone,
 David suggested me to post my problem here, so I'll do just that.

I'm having trouble because Matlab Data Acquisition Toolbox 2.11 is not registering PCI MIO-16-E4 for some odd reason.

I am using Matlab DAQ toolbox 2.11, and for some reason it is not recognizing/registering the NI PCI MIO-16-E4 card installed on the computer. But for everything else (winsound, parallel) it works.
The NI automation software interacts with the device, and we can see the card under the windows device manager, so it is not because we installed the card improperly. The DAQmx driver we're using is 8.6.1. We're running windows XP, and the device shows up under device manager.

We've been talking to the matlab technicians over the phone for the past week and there seems to be no progress at all, so I thought i'd try my luck here. Thanks!

0 Kudos
Message 77 of 106
(3,739 Views)
Hi Jumbugale!

Hm. It should be supported since DAQ 2.8. I currently can think of two solutions:
1. use another PCI slot (well, umm, who knows?!)
2. use the dll-method described in the first post of this thread, bypassing the Matlab DAQ.

Hopefully, someone has more specific help for you than me.
Jens
0 Kudos
Message 78 of 106
(3,734 Views)
Dear everybody
I'm new to DAQ card and I buy cDAQ 9172 system and I want to interface it with MATLAB Data Acquistion Toolbox , it ssem not supported with MATLAB r2007b ,I try Jens solution , but unfortnately it seems not working with cDAQ , appreciate any help.

regards

Abbas

0 Kudos
Message 79 of 106
(3,707 Views)
Hello,

I am trying to send digital outputs with Matlab DAQ toolbox to a NI PCI-6224 card (and through a NI SCB-68 connector block to a Plexon recording rig), but am having trouble getting the signals to the connector block.

I'm using Matlab R2007a, DAQ toolbox version 2.10, the NI-DAQmx 8.6.1 driver, and the correct adaptors ('nidaq', 'parallel', and 'winsound') are working. Furthermore, I know that the card and connector block are working because someone else is accessing it with LabVIEW for a totally different task.

I know the board ID is 'Dev1', and when I run the following code, I don't get any error messages. Again, however, I can't get it to write signals to the connector block (or measure them using NI Measurement and Automation Explorer).

>>dio = digitalio('nidaq','Dev1');
addline(dio,0:7,'out');
pval = [1 1 1 1 0 1 0 1];
putvalue(dio,pval)
gval = getvalue(dio);
delete(dio)
clear dio


I'm not sure where to go from here. Any suggestions would be very much appreciated.

Thanks.

-Ben
0 Kudos
Message 80 of 106
(3,478 Views)