LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cDAQ-9178 voltage and current same DAQmx

Hello,

 

I am trying to make an example to test how to measure voltage and current with the above cDAQ device. Right now I do not have the HWs, but I have created a simulated device in MAX, a cDAQ-9178, with two modules: NI 9205 (voltages) and NI 9227 (currents).

 

I would like to also individually scale the measurements since there will be many different sensors (pressure, flow, temperature, etc...).

I made a small test VI, please find it attached. Right now just I give scaling slope value as 1, and intercept as 0.

If I test this VI only using the 2 voltage channels on the 1st module, I get simulated data from the DAQmx Read.

 

However, if I also include the 4 current channels beside the voltage channels, the DAQmx Read give a zero sized empty double array...

What do I do wrong? 😞

 

Thanks very much for help!

 

daqmx1.jpg

daqmx2.jpg

0 Kudos
Message 1 of 4
(2,482 Views)

Could this behaviour be a limitation of the DAQmx simulated signal? I mean, maybe it is not possible to get signal from 2 simulated cDAQ modules at the same time?...

0 Kudos
Message 2 of 4
(2,455 Views)

I suggest some error debugging (look at the error cluster).

 

First you will detect that DAQmx Create Scale needs an information about your current measurements (use the input pre-scaled units).

 

After that you need a "DAQmx timing.vi" before you start your task.

 

Regards, Jens

Kudos are welcome...
0 Kudos
Message 3 of 4
(2,444 Views)

I suggest some error debugging (look at the error cluster).

 

I do not get any error when I run the code, neither when I stop it.

 

First you will detect that DAQmx Create Scale needs an information about your current measurements (use the input pre-scaled units).

 

Even if I leave out the scaling part (the FOR loop with the DAQmx Create Scale.vi), the VI still does not produce data, neither any error.

 

After that you need a "DAQmx timing.vi" before you start your task.

 

In DAQmx you do not not necesserely need the "DAQmx timin.vi", specially here, where I only want to read data softwere timed (with 1 or 0.5 Hz...).

 

 

But just now, I have figured out the problem: looks like there is a bug with the simulated cDAQ module: NI 9227 (currents).

I have replaced this second module to a NI 9203 module (currents also), and my VI is just running as expected 🙂 Of course I will need to play a bit with the scalings, as much as I know, I have to give the expected min/max range (Scale min and scale max arrays) in a way so the upscaled properties fit in?

 

I have attached a revised version of my example VI. Please comment it...Thanks!

0 Kudos
Message 4 of 4
(2,435 Views)