Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

I use write to meas. Express vi to get Data out of cRIO but it is so slow. Why?

Hi All.

 

I use Labview 2011 to control my thermal loop. So we have several thermocouples, pressure transducers, valves etc... For now, I don't have a problem with controlling and displaying the values but whenever I ask to get data, program slows down and I am not able to get data faster than 750ms. which I find is so slow. I should be able to get at least 200ms (which is not fast either but it is enough for us). I try to write measurements from several channel ( right now 53 channels) and I use write to measurement file express vi.

 

I made a small test program to see if my main program is so heavy or not. In this test program, I scanned 32 channel in NI9205 and tried to write the measurement with 100ms without displaying and I am still not able to write at that speed.

 

So, am I not able to configure correctly the scan engine of cRIO9074 or Write to measurement express vi is always slow ?

 

Thank you,

 

altan

0 Kudos
Message 1 of 4
(5,274 Views)

Can you attach the test program so we can see how you have things set up?

Cameron T
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(5,266 Views)

Here is the test program with Write to Measurement File Express Vi.

 

Eventhough i ask 100ms, i am not able to write faster than 400ms with this set up. In my main code, i have 3 NI9205, NI9263 and NI9265 so I have many indicators. When i add all, code becomes heavy and i can't write faster than 750ms.

 

Instead of using Express Vi, i modified my main code using TDMS Open/Write/Close functions. With that i tried and able to write at 100ms which is enough for me. But i am not able to close the file so i can not change the file name and press save button so get another set of data. It adds(append) new data into the first file.

 

Thanks in advance.

 

altan

0 Kudos
Message 3 of 4
(5,252 Views)

Altan,

 

Writing to a file is not deterministic. That is why you are not getting the performance you are expecting. It would be a good idea to queue the data you want to write to a file and dequeue and write it in a regular loop. Try to keep only deterministic functions in a Timed Loop and keep nondeterministic functions in regular loops. Hope this helps.

Cameron T
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(5,219 Views)