Simultaneous operation of two DAQ objects
Mostrar comentarios más antiguos
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 comentarios
Sudarshan Kolar
el 10 de Mzo. de 2017
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?
Walter Roberson
el 10 de Mzo. de 2017
Parallel Computing toolbox will only make it more difficult to synchronize the outputs.
Walter Roberson
el 10 de Mzo. de 2017
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) ?
Respuestas (0)
Categorías
Más información sobre Data Acquisition Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!