Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

slow aquisition with NI-DAQmx

hello all,
 
i have a problem with my data aquisition with NI-DAQmx.  I can only read input (K thermistor) each 3 second.  I really don't know why.  I allready check the basic card setting but I can't find any problem.
 
I use SCXI-1112 for data aquisition and PCI-6254. The chassis is connected to the pc via the SCXI card and all connection seem to be correct.  It's probably an hardware configuration problem because I can correctly read input in another chassis allready configured.
 
If you have an idea to fix the problem, let me know.
Thank,
 
Frederic
0 Kudos
Message 1 of 11
(4,550 Views)
  • How are you reading temperature?? using MAX?? or any standard example VI??
  • Are you performing single point acquisition or continous acquisition??

If you have built a VI/ application then, do tell us how you are doing it

please answer the above so that we can suggest better

0 Kudos
Message 2 of 11
(4,536 Views)

Hi, thanks for helping me,

I actually try to reading temperature with the SCXI 1112 with task because I have to read 8 temperature at the same time. I using max to configure the task for each reading. I try configure the 8 tasks reading with 1 sample when ask or continous and i got the same problem.  The ressource is reserved.

I do an initialisation for all task before entering in while loop.  I do initialisation with a sequence for each task and merge error.  I take a look on Multi-Function-Synch AI-Read Dig Chan.vi to adjust my VI for multi task but I don't read anything cause I have an error, ressource reserved.

I attach my file, if anyone want to take a look on, let me know for any improve.

Thank a lot,

Frederic

0 Kudos
Message 3 of 11
(4,521 Views)

Hello Frederic,

The reason why you are getting the resource reserved error is because you are trying to create multiple tasks of the same type and that is now allowed. The reason why this is not allowed is because there is only one ADC available in the system and it has to be multiplexed so that it can read multiple channels. So, what you need to do is create a single analog input task and then have multiple channels in it. Kindly refer to some examples available through the example finder for more information. You can launch the example finder by clicking on Help >> Find Examples from any VI.

Regards,

Chetan K.

Application Engineer

National Instruments

 

Message Edited by CKap on 07-28-2006 04:50 PM

0 Kudos
Message 4 of 11
(4,510 Views)
Thanks for the help, my application works correctly now
0 Kudos
Message 5 of 11
(4,481 Views)
Hello all,

I also have some kind of timing problems in my specific application when reading temperatures from SCXI-1112 modules.

I programmed a prototype of a test stand user interface which includes among other things acquiring analog voltage such as temperature (thermocouple), pressure (strain) and other mainly analog data from peripheral devices. I'm also aquiring/sending CAN data from/to different devices (which works fine).

My NI-HW is as follows:
.) PXI-1052 Combi Chassis with 2 SCXI-1112, 1 SCXI-1520 and 1 SCXI-1121
.) PXI-6040E multifunction DAQ card in Slot 4
.) 2 PXI-8331 MXI-4 cards (one in Slot 1 of PXI-1052 for communication with a kontron/pep rack-pc and the other
     one in the rack-pc)
.) PXI-8461 Can card (in the kontron/pep rack-pc)

NI-SW:
LabVIEW 7.1
DAQmx 8.10

Everything works properly so far, except the mentioned timing problem when acquiring the temperatures.
(NOTE: without temperatures in my tasks the whole application is running very fast!!)
I know that each channel of the 1112 modules has a built in 2Hz lowpass and it takes a few seconds to get new data (where are the 332kS/s??). It's also not necessary to me to get the temperatures faster, BUT the PROBLEM is that my whole programm seems to be "waiting" for the temperatures which is obviously a programming error.
Why are the temperature channels so different to i.e. the strain channels in the same system?
How can I acquire the temperature tasks in the "background" or parallel?

My programm is mainly organised inside a loop into 2 parts (case):
.) initialisation of several interfaces (Siemens Simatic MPI and CAN) and after that
.) the main programm which includes all the readings, controls, displays and report stuff.
there I'm getting my data (pressure, CAN and Siemens SPS stuff) every 200ms to reduce cpu load.

I also compared several DAQmx*.VIs with the (slower) DAQmx-Assistent with little to no difference in the timing behaviour. The tasks and/or channels are configured/working properly in MAX.
Maybe my whole programm has a wrong approach... (?)

I hope someone can help me out!
Shouldn't be that hard for a Pro... 😉

Thanks in advance!!

Kind regards
matthias
0 Kudos
Message 6 of 11
(4,369 Views)
hello,

I solved the problem by myself (but do not understand it!):
With the "DAQmx create channel.vi" outside the main loop it works!!
This VI seems meaningless to me, because the channels and tasks are already created in MAX!?

With only the "DAQmx read.vi" which is perodically executed I have to wait about 3 seconds for new data from SCXI-1112. For every other acquisition (I tried out), assuming the channel & task settings were provided via MAX (for easier adaption by other users), only the "DAQmx read.vi" is enough to get the data immediately...


0 Kudos
Message 7 of 11
(4,347 Views)
Hi matthias,

If you have different channels in a single task that you want to acquire at different rates, you need to use the DAQmx Create Channel VI in LabVIEW so you can specify the different rates for the different channels.  This is probably what solved your problem.

Regards,
Erik
0 Kudos
Message 8 of 11
(4,340 Views)
Hey all,

I was reading through my post again and what I meant to say is that you can acquire different channels at different gains, not different rates - you can only have one rate per task.

matthias - the reason that moving the Create Channel VI outside the loop sped up your program is you are only creating one DAQmx task.  Before, a new task was being created on each iteration of the loop, this is what was causing your timing problems.

I hope this clears things up!

Regards,
Erik
0 Kudos
Message 9 of 11
(4,316 Views)
Hello erik!

thanks for your replies.
unfortunately I have more tasks than one: 3 (temperatures, pressure, other analog inputs) tasks created with MAX (for easy adaption).

the temperature task starts immediately with the programm (outside main loop) with the "DAQmx create channel.vi".
"DAQmx read.vi" is called every 200ms inside a routine.
the other 2 tasks (pressure and analog inputs) are also "openend" with seperate "DAQmx read.vi"'s in this routine (basically sequences) - WITHOUT the "DAQmx create channel.vi"! that makes sense to me because the tasks are already configured in MAX as said above....
after a "read-sequence" I stop the specific task and go to the next one.

(NOTE: when I put the temperature task the same way as the two others my whole programm needs about 3 seconds when it reaches the "Read-routine"...)

It works pretty fine (=fast) now, but I still can't see through.

Bye


0 Kudos
Message 10 of 11
(4,312 Views)