Quantcast
Channel: Multifunction DAQ topics
Viewing all articles
Browse latest Browse all 6878

Managing Tasks on Ethernet cDAQ - Best Practice

$
0
0

Hi all,

 

I'm currently working on a multi-station machine to perform functional product tests using an NI cDAQ 9188. Each station in the machine performs the same function but is intended to run independently. Basically a given station is loaded with a part, tested, sorted, a new part is installed and repeats. During this process other stations are undergoing the same procedure and sharing the same cDAQ. 

 

During this testing digital signals (48) are turned on/off and analog signals (24) are being read between all stations. I've found that in contrary to a PCI task, the ethernet cDAQ tasks have quite a delay (~750 ms) when starting / stopping. Prior to this project I've only had experience using PCI tasks where I could read N Samples when needed without much start-up delay. Same goes for writing digital samples.

 

The solution I've implemented for this is to create a continuous analog read VI that reads all analog signals and loops in the background continuously writing to a global variable. When a given station gets to a point where it needs to read signals, it pulls the desired index from the global array at that point in time. I also have a similar solution set up for the digital task, except it is reading a global variable for digital states and applies that to the task on each loop iteration. Normally I try to avoid continous loop senarios but the PC I'm using lets me get away with it. 

 

Basically what I really need is subVI that starts the analog or digital task, but is idle until called by any module and returns N samples. This VI needs to act as a gate for analog read requests to avoid any reserved resource issue. I can't really think of how to accomplish this. 

 

Any ideas?


Viewing all articles
Browse latest Browse all 6878

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>