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: 

Matlab Support for PCI6281

Hello!

 

I'm using Matlab (R2019b) and the PCI6281 measuring card. 

I would like to output data via a digital channel and read analog data at the same time.

I use a session based interface and data acquisition toolbox. 

 

AI channel is running, but i got some issues with the digital I/Os. It's telling me that session based interface is no longer supported and that I should use legacy commands, but if I do it's telling me that Legacy are no longer supported an that I should use session based commands.

 

I'm a little desperate, so does someone have an idea to get the digital channel running?

Wich Matlab Version supports these commands and the daq toolbox?

 

Any ideas of how to solve this would be much appreciated!

Ben_fms

 

 

This is part of the code:

 

%%

daq.getDevices
s = daq.createSession('ni');

 

s.Rate = 120;
s.DurationInSeconds = 12;

 

addAnalogInputChannel(s,'Dev1','ai0','Voltage');
addDigitalChannel(s,'Dev1','Port0/Line0:7','OutputOnly');
%%

0 Kudos
Message 1 of 1
(695 Views)