02-20-2018 01:00 AM
Hi Jawad,
I have run the code as shown in figure given by you yesterday.
No, you did NOT as I did…
Why did you wire a constant at the FOR loop? Did I show you that?
Why do you wonder about the code behaviour when YOU only supply ONE waveform after the loop?
Did you even try to debug your own code???
code#2 is made by saving data in array first, and then writing to measurement file
No, it is not. Where do you "save in array first"???
It is basically the same as code#1 - the only difference is the constant at the FOR loop iteration input (which is still UNNEEDED because of autoindexing!)…
It didn't resolved the issue with multiple number of groups in stored TDMS file.
To solve this problem you should GET RID OF EXPRESS VIS!
See the example VI "TDMS Write Time Domain Data" - this basically does exactly what you want to reach: saving time domain data in a loop into a single group of a TDMS file…
Did you even try to find a suitable example VI? There is a huge library coming with LabVIEW!
02-20-2018 04:17 AM
Output display of filtered signal is again indifferent. Also i am still unable to get correct TDMS. Can anyone look into attached code to see the issues?
02-20-2018 04:18 AM
Remember i am a novice in LV with programming skills not so good:(
02-20-2018 04:31 AM
Hi Jawad,
Output display of filtered signal is again indifferent.
Now you are using an ExpressVI again for the filtering. Why?
Also i am still unable to get correct TDMS.
In the example VI the TDMSWrite was inside the DAQ loop.
You put the TDMSWrite AFTER the DAQ loop - why?
And why do you create another loop around all the previous code???
02-20-2018 09:09 PM
Bundle of thnx 🙂 Finally in m getting single group in my tdms file. But the TDMS saves only a portion of data from full length of running the code. For example if i run the code for 10 sec it saves 1 or 1.5 seconds data. If i run for 20 sec it saves 2 sec of data. Similarly running the code 30 sec saves 3 sec data. And all the saved samples are with a delay of 4 sec with respect to start running the code. Hence remaining portion of data gets lost. I need to save all the samples from the start when i press the run button, till end (when i stop running the code). The code is attached with the post. TDMS file view is also attached you can see it saves 2 sec data although i ran the code for 15 sec. Please highlight the issue in code, how to correct?
02-20-2018 09:17 PM
The second issue is with the display of waveform. It can be seen from the attachment with the post. In all the 9 waveforms, it appears like vertical bars, bu actually its not like this. This thing makes it difficult for me to monitor the behavior of data in real time. How can I fix it?
02-21-2018 01:00 AM
Hi Jawad,
Please highlight the issue in code, how to correct?
Have you take a look at all those example VIs coming with LabVIEW?
There also is a huge list of VIs explaining nearly all bits of the DAQmx driver!
And all of them show how and when to initialize and close DAQmx tasks!
Why do you initialize the DAQmx task in the loop? Why do you close and clean up the task in the loop?
Do the init BEFORE the loop, do the close/cleanup AFTER the loop!
Do the DAQ reading IN the loop…
02-21-2018 09:34 PM
It is not all saving a tdms after doing this 😞
02-22-2018 12:42 AM
Hi Jawad,
did you talk with irsa about your problems?
It is not all saving a tdms after doing this
Which error do you get? What's the problem?
Did you try to debug your VI? What is the result of your debugging?
02-22-2018 01:04 AM
Yes i discussed but cannot get a solution.
Actually code do not give an error, it simply do not save a tdms. May be placing all the DAQ VIs inside loop was correct.