LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

(configuration of the) hardware slows down my vi ???

Hello,

 

I have a problem with my Labview-programm. I wrote a vi, which measures diffrent data (temperatures, volume flow) and records the measured data in a tdms-file. Additional the vi controls some valves and an actuator. The programm works and I can measure the data and control the actuator. The problem is, if I want to minimize the time-step of measuring and writing the data, the program is to slow. The minimum time-step is 3 seconds. If the programm runs without hardware I can minimize the time-step and it works. Could it be, that the configuration of the hardware slows down my application? Or where is the problem? (and the solution of the problem 😉 )

 

Thx a lot

0 Kudos
Message 1 of 21
(3,316 Views)

Hi Florian,

 

who knows?

 

You don't show us your Vi, so how can we comment on it?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 21
(3,310 Views)

Hello,

 

it's only a general question. My program runs without hardware. Only if I use hardware, the programm needs a greater timer-step.

So my question is:

Is this a configuration problem of the hardware in MAX?

 

(its a large vi, and Labview is on another pc, so I can upload it at the moment.)

 

thx

 

0 Kudos
Message 3 of 21
(3,302 Views)

Hi Florian,

 

- setting up DAQmx channels takes time

- calling DAQmx functions takes time

- sampling 1000 samples with 1kHz sample rate takes 1s, whereas simulating 1000 values in a FOR loop takes ~1µs

- ...

 

So: no block diagram, no (good) comments...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 21
(3,299 Views)

Configuration of the hardware needs to be done only once before the loop starts, and not with every iteration of the loop.

 

Thus I cannot see how it can slow you down.

 

It would really help if you could show us some code so we can understand what you are doing. Of course if you configure it to take 5 seconds worth of data with every iteration, the loop will necessarily slow down. How much data is acquired during each iteration? Also file writing should probably be done asynchronously in a seperate loop.

 

 

0 Kudos
Message 5 of 21
(3,297 Views)

Hi Christian,

 

so often someone is using the DAQ-assistent and wonders about speed penalties...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 21
(3,292 Views)

Hello,

now i have found a reduced version of my vi. The loops in the vi are only there, becaue they are required in the full-vi. This reduced version only measures temperatures and write the data in a tdms. I have the same problem with this reduced version. The HW or the recording slows down the whole programm.

Download All
0 Kudos
Message 7 of 21
(3,272 Views)

Hi Florian,

 

you shouldn't do measuring and logging data in one loop! That's not surprising that the performance is not good.

The best is to use one loop for measuring and one for logging. I attach an example for you.

 

Best regards

Suse

______________________________
Certified LabVIEW Developer (CLD)
0 Kudos
Message 8 of 21
(3,252 Views)

Hi,

thx, thats a good point. But I think in my vi, another part is the problem. Can I summarize the DAQmx-Create Channels (Appendix). Because the Sub-vi in the appendix is the problem.

Thx

0 Kudos
Message 9 of 21
(3,244 Views)

Hi Florian,

 

why should that subVI be a problem? You only have to call that once!

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 21
(3,238 Views)