LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error when acquiring data from multiple channels of a CDAQ

Solved!
Go to solution

 

Hello Everyone,

 

I'm a beginner in LabVIEW and I'm trying to acquire data form 2 channels of a NI 9238 card. I've tested the connection and functionality with the use of DAQassistant, and I was trying to write a code using the DAQmx blocks instead. I opened the example code that LabVIEW has and ran a single channel continuous data acquisition, which worked perfectly. I was trying to replicate that code now working for 2 channels. At first it threw me a resource is busy error, which I've corrected by chaining the error in and out wire.

 

But now, I'm getting a new error that I'm unable to figure out what to do with. Any help would be appreciated. Also I'm very much open to recommendations on any other ways of doing what I was trying to accomplish. Please do realize that I'm quite a beginner though.

 

Please see attached the VI that I've made. Also, the error that I'm getting is as follows:

 

Error- 200088 occurred at DAQmx stop Task.VI: 3590004. Possible reasons: Task specified is invalid or does not exist.

 

I don't believe it as, when I ran the code using the visualize (light bulb), it threw me an error right away (at the very first create channel sub vi).

 

Any help is appreciated.

 

Regards,

An enthusiastic learner

0 Kudos
Message 1 of 3
(889 Views)
Solution
Accepted by topic author Beginer_enthusiast

The refnum of the first task is lost and not passed out.

 

ZYOng_0-1694481390212.png

 

If you want to add more than one channel, you can Select More Than One NI-DAQmx Channel in LabVIEW.

Besides, you can Easily Synchronize and Trigger NI-DAQmx with Channel Expansion

 

-------------------------------------------------------
Control Lead | Intelline Inc
Message 2 of 3
(854 Views)

Thank you so much for taking your time and providing me with this information ZYOng. I will test this out, first thing tomorrow morning. This solution looks really promising. I will update this as the correct solution as soon as I'm able to run this in the next 12 hours.

 

As I've said, I'm a complete beginner to LabVIEW, as such wanted to get input on better ways to accomplish what I want, and this looks like exactly what I'm looking for.

 

Thank you so much for your help,

Regards,

An enthusiastic learner!

0 Kudos
Message 3 of 3
(832 Views)