LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically create VIs to carry out multi-device data acquisition operations

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. 

Labview Learner
0 Kudos
Message 1 of 7
(2,882 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 7
(2,854 Views)

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. 

Labview Learner
0 Kudos
Message 3 of 7
(2,845 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 7
(2,838 Views)

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.

0 Kudos
Message 5 of 7
(2,809 Views)

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?

 

Labview Learner
0 Kudos
Message 6 of 7
(2,727 Views)

I'd have to see some code.  But it sounds like you are setting up wrong or causing a conflict of some sorts.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 7
(2,713 Views)