LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading data from NI-9203 on a chart

Hello,

 

So I'm totally new in using LabView and I need it to save acquisitions data for work. I need it to work as soon as possible but I'm quite lost.

So I have a LabView program that was working fine, that read and save data from a CompactDaq-9138. It was reading date from 3 cards : NI-9232, NI-9213 and NI-9232. I used this program but didn't make it, just run and stop it.

Now I have to modify it to read data from a new card, the NI-9203 (current 4-20mA).

 

So I can't do screenshots, but I used a "DAQmx Create virtual channel.vi", a "DAQmx Timing" and a DAQmx configure logging" then a trigger and a start task. FInally I have my Read in a while loop. My problem is that in the Front Panel I added a chart then I connect it in the Block Diagram to the "data" of my Read (not sure that's the right way). But I can only choose "plot 0" in the properties instead of channels of my card?

 

Then I started to run the program and I had the following error : "Error -200022 occurred at DAQmx Start Task.vi : 4" so I don't get what it is. Moreover it says : "Possible reason resource requested by this task has already been reserved by a different task. Task Name : unnamedTask<41>" and I have a random number or letter. Just tried 3 times without touching anything I had 41, 3C and 37. Always a different thing?

 

So yeah I understand it may be confuse what I say but again I've never modify the LabView program before this morning, I am alone to do this and need it to work fast... Just spend the day on this without going anywhere. And I'm sorry for my bad english.

I hope someone would be able to rescue me ^^"

 

Thanks

0 Kudos
Message 1 of 6
(3,496 Views)

Hello,

Could you please tell me which version of LabView you are using?

The new Card (NI-9203) from which you want to read the data, is it alone in the CompactDAQ slot, or is it going to be an additional card with the 3 previous cards. ( 4 cards in total)?

 

I provide you a link (getting started Guide NI 9203) so that you can see if you connected the module correctly:

http://www.ni.com/pdf/manuals/374070e.pdf

 

If you need further assistance, please ask.

Kind Regards,

James.

Greetings and Regards,
James
0 Kudos
Message 2 of 6
(3,434 Views)

Hi, LabView 2012 (12.0).

It's not alone it's an additionnal card so yeah 4 cards in total (9232, 9213, 9223 and 9203).

 

It's think the module is correctly connected since when I put a constant for a physical channel of a DAQmx create virtual I can choose cDAQ1MOD1, 2, 3 or 4. But thanks for the guide.

 

I tried to put one channel from the 9203 with thoses of the 9232 since I read that I may be the clock (that is the same for all) that did a conflict, but at the end I only have the signals of the channels of the 9232 card in my data after the "Read" 😕

 

0 Kudos
Message 3 of 6
(3,420 Views)

So other informations : I just re-arrange my code. If I start with the code for the 9203 it's ok, but the last module have the same error. So basically For each of my 4 modules I'm doing :

 

Create Virtual => Sample Clock => Configure logging => DAQmx Timing with inputs and trigger that depend all of the same source => Start => Another Timing with outputs.

 

And I do it for a card, then another, then another and then the last. Then  I have a while loop in which I have a Read for each.

 

And well when I rearrange my code it seems that the error "-200022" (task already been reserved by a different task) always occur at the Start of the last card I do. Does someone have an explanation for this plz?

0 Kudos
Message 4 of 6
(3,411 Views)

Hello,

in order to give you a better assistance, could you please send me your VI attached?

Thanks.

Greetings and Regards,
James
0 Kudos
Message 5 of 6
(3,407 Views)

Hello, 

You have this error because you are trying to create a task on a channel that might already have a task assigned.
This link talks about similar problems:
http://digital.ni.com/public.nsf/allkb/5664C009DA244727862571E900046775


One possible solution to your problem is to either clear the task or channel in use or reset the device

This is how to reset the configuration:
Open NI-MAX >> Tool >> Reset Configuration

 resetDAQmx.png

 

 

If the problem persists, please describe what did not work this time.

 

Good Luck and kind Regards,

James.

Greetings and Regards,
James
0 Kudos
Message 6 of 6
(3,402 Views)