08-07-2014 03:42 AM
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!
08-07-2014 06:13 AM - edited 08-07-2014 06:16 AM
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?...
08-07-2014 07:02 AM
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
08-07-2014 08:05 AM - edited 08-07-2014 08:19 AM
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!