05-30-2012 05:56 AM
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
05-30-2012 06:04 AM
05-30-2012 10:13 AM
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
05-30-2012 10:17 AM
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...
05-30-2012 10:24 AM
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.
05-30-2012 10:37 AM
05-31-2012 02:54 AM - edited 05-31-2012 02:55 AM
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.
05-31-2012 03:33 AM
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
05-31-2012 04:33 AM
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
05-31-2012 04:49 AM - edited 05-31-2012 04:50 AM