Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NI 9207 reading current and voltage channels at the same time

Solved!
Go to solution

I have a cDAQ-9178 USB chassis with three NI 9217 RTD cards, three NI 9263 0-10V output cards and one NI 9207 16-channel analog input card. What I´m trying to with this stuff, is to read all the analog input channels (transducer information, temperature, pressure etc.) and adjust my process controls with the analog output channels.

 

My problem at the moment is this:

 

When I create tasks with the DAQmx VI:s, how do I create a task that reads both current and voltage channels on the 9207 at the same time?

 

When I created one task for the RTD-channels (16), one task for analog 0-10V outputs (12), one task for analog 4-20mA input (8) and one task for analog 0-10V input (8) I get an error -50103. I believe it´s because the current and voltagge input tasks are trying to use the same DAC at the same time and LabVIEW informs that "The Specified Resource is Reserved". The tasks are starting in a way that the analog output task starts first, then I merged all the error clusters and the rest of the task are started in an order of current input->voltage input->RTD input. I get this error after current input task has started and voltage input task is starting.

 

Because I´m new to the LabVIEW and stuck right now, I wanted to try the forum for answers. I tried to find if someone else was having the same kind of problem, but with a quick search there was none. I´m in a bit of hurry, so I apologize if I there´s a topic with an aswer for this and I missed too see it.

 

 

 

0 Kudos
Message 1 of 10
(8,207 Views)

Hi,

 

When you look at the specification of NI 9207 module: "Simultaneous Sampling No", which mean that you can't sample exactly at the same time both current and voltage. However, there is possible to read first voltage and then current, and voltage and then current ... over and over again in turn. What you need is to create

1. DAQmx Start Task.vi (voltage)

2. DAQmx Read.vi (voltage)

3. DAQmx Stop.vi (voltage)

4. DAQmx Start Task.vi (current)

5. DAQmx Read.vi (current)

6. DAQmx Stop.vi (current)

Bring this to shift register to start 1. process again.

This could be time critical if you need to read fast (read fast will not work). And the readings are not continues. I attached the VIs as LV2011 version ZIP-file and also the picture of the VI if you could build it yourself. Hopefully this helps.

 

BR,

Make Nguyen (Applications Engineer)

NI Finland Technical Support

 

Message 2 of 10
(8,185 Views)

Are you saying that with this module, you can't simply specify ai0:15 in a single task?

0 Kudos
Message 3 of 10
(8,175 Views)

Dennis,

What he's trying to do is measure both Voltage and Current, while you could specify ai0:15 the problem here is that channels 0:7 are Voltage measurement and 8:15 are Current, so the unit would give errors.

 

I happened to have a 9207 on my desk as I was doing a very similar set-up where I wanted to continuously monitor both Current and Voltage draw on some units I was testing. The way Make Nguyen said to do it is exactly what I ended up having to do. The lag between reads is fairly small so I didn't see it as a huge drawback, though if your control loop is very sensitive it might pose a problem for you. Best bet if you want both Current and Voltage at the same time is to get Two modules.

0 Kudos
Message 4 of 10
(8,167 Views)

Then the data sheet is wrong where it clearly states you can measure both at the same time. With a simulated chassis and 9207 module, I created a voltage task, then clicked on the 'Add Channels' to add a current channel. The task runs without errors. Not any different than taking mixed measurements (i.e. voltage and temperature) with other NI devices.

0 Kudos
Message 5 of 10
(8,161 Views)
Solution
Accepted by Arctic_Fox

Really, the best way to do this is just to add 8 voltage channels to a task then 8 current channels, sort of like this:

2011-12-05_133008.png

 

Then split out the different channels when you read later on:

2011-12-05_133241.png

 

This should run without an error.  It's still multiplexed sampling, but it will be much faster than creating two separate tasks.  There will be between 2ms (high speed mode) and 52ms (high resolution mode) between each channels reading, but it will still be much faster than swapping tasks.

 

Seth B.
Principal Test Engineer | National Instruments
Certified LabVIEW Architect
Certified TestStand Architect
Message 6 of 10
(8,151 Views)

Hi Seth,

 

Thank you for your helps. That is a pro way of acquiring data. I read from the specification that simultaneous sampling = NO, so I created 2 task. But after all it is totally possible to do the simultaneous sampling right? Is that piece of information need to be corrected after all?

 

BR,

Make

0 Kudos
Message 7 of 10
(8,124 Views)

"Simultaneous Sampling" does not refer to the ability to use multiple different types of channels in the same task.  Instead, it refers to whether there is a dedicated ADC per channel (thus each channel is simultaneously sampled).  If there is one ADC, each channel must be 'multiplexed' to the ADC one at a time, so they are not sampled simultaneously.  The NI 9207 only has one ADC, so it is not simultaneously sampled.

 

Look at the NI 9223 for an example of a module that is simultaneously sampled and the NI 9205 for one that is not.

Seth B.
Principal Test Engineer | National Instruments
Certified LabVIEW Architect
Certified TestStand Architect
Message 8 of 10
(8,118 Views)

Wow!

 

I really appreciate all of your participitation on finding the right solution for my problem!! I ended up using Seth B.:s suggestion and it worked fine.

 

Next time I run into problems, I won´t hesitate at all on asking about it on this forum. Feedback was excellent and fast!!! 

0 Kudos
Message 9 of 10
(8,109 Views)

Hi,

 

a few years later I have to reopen this post. I trie to measure voltage and current at the same time using th NI-9207 module. I read the solution of Seth_B but I'm not able to rebuild this vi.

 

1. What kind of measurement I/O is the purple box(e.g cDAQ1Mod1/ai0:7)? Is it a physical DAQmx chanel?

2. Furthermore I got an error after connecting outlet of AI voltage to inlet AI current

 

Thanks guys

0 Kudos
Message 10 of 10
(3,115 Views)