0

I am currently working on a project involving data acquisition and real-time processing in Simulink. We have inherited some rather swanky DAQ hardware that was bought specifically for this project - namely, a National Instruments cDAQ device (USB). Changing hardware is too expensive at this point.

I had previously seen Simulink blocks that work with the DAQ Toolbox, so naturally assumed I could use our cDAQ in Simulink. On further investigation, however, it seems the blocks only work with PCI NI devices, not the 'compact' USB ones like we have.

I have created a workaround by writing a level-2 M-S-function that uses the DAQ toolbox's session based interface, puts the incoming data in a queue and pushes it out through the outports in onOutputs. This seems to be working fine.

My question is this: is there a reason why MathWorks decided not to make their DAQ blocks work with cDAQ devices? I understand that USB tends to have some latency issues, but am I really crazy for thinking this is possible? I would even go so far as to say that it actually seems fairly simple, but surely there must be a motivation for the lack of Simulink support for cDAQ devices in the DAQ Toolbox. Am I oversimplifying the issue? And if so, how?

Thanks for your help.

wakjah
  • 4,541
  • 1
  • 18
  • 23

1 Answers1

0

Mathworks motives are likely driven by need and there may not be many users asking for it.

Don't know if this helps you, but writing C libraries to do the data acquisition is very easy and likely faster. You could then just call the functions in the libraries from Simulink. This solution also has the advantage of giving you complete control of the DAQ board. The distribution disk for DAQmx has many C examples.

Carl Houtman
  • 155
  • 1
  • 10