05-11-2017 03:45 PM
Hi,
I am looking to read in two signals, both are triggered voltage pulses, and plot them on the same waveform chart and print them into the same excel file. I get an error saying, "The specified resource is reserved," when I try to run the code. Also, I have not been able to wire the error out to the "Write to File" error in, but I'm not sure if that's necessary. The code is attached.
Thanks!
05-11-2017 04:22 PM - edited 05-11-2017 04:22 PM
You basically just need to put the Channel VIs in series and they will be added to the same task. A lot of devices only have 1 A/D converter, which is why you get the "resource in use" error.
05-11-2017 04:26 PM
This is a very common question so for a full explanation just Google "LabVIEW DAQ Resource Reserved Error" or search this forum.
Quick answer to get you going: There is only one sampling clock on most DAQ devices so you can't run two separate AI tasks simultaneously. You'll need to create ONE task with TWO channels. For example to collect 2 channels on AI0 and AI1 of Device1 use Dev1/ai0:1.
Your DAQmx code will then collect a 2D array. Index 0 containing the Y array of channel 1 and index 1 containing channel 2.
05-12-2017 10:09 AM
Thanks! I didn't know that, but this seems to work.