Trigger analog output with analog input using Data Acquisition Toolbox

5 views (last 30 days)
I am using a national instruments USB 6353 DAQ and matlab's data acquisition toolbox to perform some data acquisition operations. I would like to change from solely collecting data (which works great now) to outputting an analog signal if a specific condition is met in the data collected, in near real time.
pseudo code would look something like this:
create analog input channel
create analog output channel
queue analog output
begin collecting data (this would have to be a background operation, right?)
if(analog input > 2.9v)
trigger output
end
I just can't figure out how external triggering would work using the data acquisition toolbox, unless it's a manual or immediate trigger.
  1 Comment
W Joey
W Joey on 16 Jul 2015
Hi Eric, I have met the same problem with you. And i collect input data in a matrix and then compare the value of data to threshold. But i use foreground input and the problem is the comparison will begin only after all data has been collected and it wastes time. Would you like to upload your code?

Sign in to comment.

Answers (0)

Categories

Find more on Data Acquisition Toolbox Supported Hardware in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!