Simultaneous operation of two DAQ objects

Hi, I am working on a project using a DAQ object. This is a digital I/O module with 28 programmable lines. All lines are here configured as Output lines. Each line operates a pneumatic valve. The bynarysignal used to operate the pneumatic valve comes from the Matlab programm and goes into the DAQ Card. The signal is then given to the assigned pneumatic valve. I have been using the putvalue function of the Data Acquisition Toolbox to operate the DAQ card. So far so good.
Now, I have two different DAQ Cards of the same kind. This means that I can operate up to 56 (two times 28) different pneumatic valves. In some cases it is necesary to operate two valves at the same time. This becomes a challenge when the valves are not operated by the same DAQ Card. Then I have to use two different putvalue functions:
putvalue(DAQ1,data1) % for valve #1
putvalue(DAQ2,data2) % for valve #29
In this example the code for valve #1 is executed first, which means the valves are not operated simultaneously. Clearly a solution would be to execute the two different putvalue functions at the same time, but this is for me easier said than done. Some people say Matlab can't execute two lines of code at the same time. I have also searched for a solution on the parallel computing toolbox, but I didn't find anything useful.
Is there something more out there that can help me. Maybe a special putvalue function somehting like:
putvalue([DAQ1,DAQ2],[data1,data2]).
I would appreciate some help or tips. Thanks in advance!

댓글 수: 3

I understand that you want to run 2 DAQs simultaneously using putvalue. Parallel Computing toolbox seems to be the only way through.
I was also wondering if a hardwired shorting is an option for you?
Parallel Computing toolbox will only make it more difficult to synchronize the outputs.
putvalue() is for legacy interface, 32 bit only, which means R2015b at latest. Which MATLAB version is being used? Are you locked into using legacy interface (for example using hardware that is not supported by the session based interface) ?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Data Acquisition Toolbox에 대해 자세히 알아보기

질문:

2017년 2월 27일

댓글:

2017년 3월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by