Thread Subject: Addchannel Problem

Subject: Addchannel Problem

From: Daniel

Date: 10 Mar, 2008 13:19:56

Message: 1 of 3

Hi, I d like to know if somebody could help me to solve a problem with
my Data Acquisition Card. I have got a National Instruments Lab-
PC-1200 DAQ with a BNC-2081 board and I d like to work just with the
channels 2 and 4 (in differential input mode). My Matlab code is the
following:

       ai = analoginput('nidaq',1);
       chans = addchannel(ai,[4 2]);

%measuring to get the offset
%INPUT
        t=3;
%setting the SampleRate (half of maximum possible)
        temp = propinfo(ai,'SampleRate');
        aiSR = temp.ConstraintValue(2)*0.50; %100000
        act_aiSR = setverify(ai,'SampleRate',aiSR);
%setting SamplesPerTriegguer for t seconds
        samples=floor(t*act_aiSR);
        set(ai,'SamplesPerTrigger',samples)
%set(ai,'Timeout',10)
        start(ai);
        pause(t+1);
%getting the signals
        [inputdata,tai]=getdata(ai,samples);
        stop(ai);
        offset=mean(inputdata);

But the programm takes channels 2 and 0

and if I use

chans = addchannel(ai,[4 2 0]);

An error occurs at line: "start(ai);"

Some suggestion?

Thank you very much

Subject: Addchannel Problem

From: Sherryl Radbil

Date: 11 Mar, 2008 11:37:02

Message: 2 of 3

What versions of MATLAB, Data Acquisition Toolbox and NI-DAQ
drivers are installed?

Also knowing the exact error message would be helpful.

How do you know that the program takes 2 and 0?
Sherryl

Subject: PID CONTROLLER IN MATLAB (7.0) :Please help me out

From: shree

Date: 18 Mar, 2008 10:53:04

Message: 3 of 3

Respected Sir,
I am student of Master in .Eng. (Process Intrumentation&Control)
Currently working on Design of PID controler for Two in put two out
put system.
I have concentrated my work on your research paper .In present paper
PID controller response final plot is there I am not able to
reproduce it thorugh matlab programming.
If you have any idead abt it I will email you my paper and
my .m file code.

Thanking you in Advance
Eagerly waiting for your reply
Regards
Shripad

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com