09-30-2014 04:50 PM
Hi all,
I am trying to develope a Data acquistion software with multi device support. I am aware of copying the whiole single device configuration and pasting it is a way to do multi device acquistion. But I am thinking if there was a way to programmatically accomaodate for the number of devices connected to the DAQ software. The thing is I have been told to expect more than 4 devices connnected and 8 would be the ideal case. So, I went on and researched on VI scripting but I am still not sure how to get started. Please help me out in getting started with VI scripting related to multi device data acquisiton.
09-30-2014 06:49 PM
What you probably really want is a nice configuration setup and then use reentrant VIs to run the tasks. That would be a lot simpler.
09-30-2014 07:02 PM
HEy crossrulz,
Thanks for the reply, but can the reentrant VIs programmatically generate VIs (copies of the first VI) for different devices? Basically I want certain VIs to be generate automatically based on number of devices connected and also communicate through the network.
09-30-2014 08:11 PM
It isn't really generating more VIs. It is creating clones of the VI. If you build up your code to be configurable enough, it works wonderfully. Just pass in the configuration and device to the clone and you magically can handle another device.
Though, to do this properly, you really should read up on the Asynchronous Call By Reference node.
10-01-2014 07:08 AM
Have you considered using something a bit simpler - arrays of DAQ references and FOR loops for data acquisition and processing? Unless you have performance issues that require multithreading, this will be a an easier and more maintainable approach that scales fairly well.
10-08-2014 01:25 PM
Hey crossrulez,
I implemented what you said. I used a call by reference VI and called the VI which I need and integrated it into the architecture. But I am getting an error saying that the "task specified in invalid or does not exist". When I use the same VI without calling it by refernce and directly attaching to the architecture, everthing works fine. What do you think the problem is?
10-08-2014 06:37 PM
I'd have to see some code. But it sounds like you are setting up wrong or causing a conflict of some sorts.