08-21-2020 07:58 AM
Hi Phim,
@PhimVe wrote:
One issue of course was the data acquisition as a txt file. That slowed down the program quite a bit. I wrote a program just to read channels, which is running just fine @100kHz and 10k samples without the txt. If I save the data into tdms, I also have no problem acquiring that much data. (See Read channels.vi)
When you save ALL measurement data into a TDMS file then you can delegate this job directly to DAQmx!
Use DAQmxConfigureLogging…
@PhimVe wrote:
1. Is there any other way to generate a pulse through analog outputs and control amplitude and frequency and width and such? Or through labview itself? I tried to find solutions which would work, but none of them worked for me.
2. Is there a way to make the if-case faster? Or compare the results faster? I read about the trigger function, but I wasn't able to wire it correctly and make it work in my VI... or should my comparison be fast enough but it's mostly the pulse generation?
1. They way you do it now is quite ok. Why do you want to change that?
2. When you need to compare 10k samples it will take its time. (You may use my latest suggestion using ArrayMinMax instead of WfmMinMax.) But you can decouple your DAQmx tasks into their own loops using a producer-consumer scheme to have them operate independently…
08-27-2020 01:58 AM
Hi GerdW,
So I changed the WfmMinMax to ArrayMinMax and tried to build a producer consumer scheme.
Newest version
But now as soon as I run this VI my pulses are not even getting generated anymore. The VI is running without problems, but the pulses are not there. I don't know if I did something wrong.
So I guess I'll have to work with the one while loop option and see if that somehow works and play around with the data acquisition etc.
But thank you very much for your help again! Very much appreciated!
Best regards
Phim
08-27-2020 02:49 AM
Hi Phim,
@PhimVe wrote:
But now as soon as I run this VI my pulses are not even getting generated anymore. The VI is running without problems, but the pulses are not there. I don't know if I did something wrong.
Now there is a serious "THINK DATAFLOW!" problem!
Due to your wiring the consumer loop will only run once the producer loop has finished.
Use a notifier (or for quick&dirty: a local variable) to transfer data between the loops…
08-27-2020 06:15 AM
Hi GerdW,
Ohh okay. That makes sense. But how do I use either one? Like this? I'll try it next week and reply then, because unfortunately the machine is blocked until Wednesday.
Either way, thank you again!
Best regards,
Philipp
09-01-2020 06:02 AM
Hi GerdW,
So thank you so much for your help!!
I managed to find the master/slave VI and tried to modify my VI so that it looks similar.
And it seems to work for now. I'll have to take a closer look at the data, because it's running way to fast to observe it.
But I am really glad that you helped me this far!
With my best regards,
Phim
10-02-2020 04:49 AM
Hi GerdW,
If you're still willing to help me, that would be really great.
I tried to use a different boundary for the pulse generation. Because the first condition didn't work all the times. So now I would like to use the blue graph, which only sometimes shows a certain maximum, which I can calculate. Circled in red.
So I tried to configure the VI so that two certain conditions have to be met, for the pulse to be generated.
But the LabView program shows, that this conditions are not always true, even if the values reach the boundaries.
How is that possible? Sometimes the pulse is generated and most of the times not...
I would love if someone could help me...
Best regards
Phim