01-08-2019 08:17 AM - edited 01-08-2019 08:28 AM
Hi There,
I have USB 6000 and LV2018. I have two Vi's, one that read three AI channel as AI-Temp-RTD (Dev2/ai0:2) and one that read one channel as AI Voltage (Dev2/ai3). They are reading fine if I run them one at one time.
Is it possible to combine the two Vi's in to one? Is there a method for creating two types of DAQmx reading, AI temp RTD and AI voltage?
Thank you for your time.
Solved! Go to Solution.
01-08-2019 08:21 AM
Try feeding the purple output wire of the first one into the upper left corner of the second one. That allows you to combine channels into a single task.
I won't guarantee it will work as it's possible there might be some error related to different channel types.
01-08-2019 08:35 AM
Hi and thank you for your reply.
Do you mean like this, see attached?
01-08-2019 08:49 AM
Yes. Now you have a task with 4 channels, 3 are temperature, 1 is voltage.
Actually, you changed it to 2 channels, 1 temp, 1 voltage, because you went for "ai0:2" to just "ai0". Is that what you intended?
01-08-2019 08:59 AM
Progress, please find the attached pic. It come with an error. I am not sure how to process the three temp channels and the one voltage.
01-08-2019 09:04 AM
You only need 1 DAQmx Read, the one that is N Channel, because your task consists of 4 channels. So now you index out the 4 channels from the array.
You don't need 4 Index Arrays. Just use one. Drag the bottom border of Index Array down until you have 4 outputs. BONUS! You don't need to wire in any constants for the indices because you'll get index 0, 1, 2, 3 by default.
You should look at Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications
Also, have you looked at the online LabVIEW tutorials?
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours
In addition, you have no valid way of stopping your VI. Your while loop only stops if there is an error on your DAQmx. What if you want to stop it because you are just done collecting data? You are forced to either hit the Abort button or unplug your DAQ device to force a DAQ error.
You should have a Stop button ORed with that status boolean wire.
01-08-2019 09:46 AM
Well Mr Knight of NI kudos to you, It does work thank you. The VI that I've sent you was just written to highlight my problem.
Please find attached the full vi which now does the job nicely.
I do not want to push my luck but my next task is to time the rise time (heating) , fall time (Cooling)
I have no idea where to start. I will set this post to resolve.
Thank you again!