09-13-2022 02:22 PM
When running the attached VI in FINITE mode, the measurement file generated contains all waveform data at the specified sample rate, however it does not contain the phase data at the same sample rate. I only see the last phase measurement recorded.
How do i capture the same amount of phase samples as I am waveform samples? Thanks in advance!
09-14-2022 10:38 AM
Hi cthunterMC
The reason you see this is that phase and IQ data are single values extracted from a full dataset(you might have thousands of samples per phase measurement). So logging them as if they were all in the same form will always yield similar results.
I'd recommend adding the Phase and IQ data as header information per measurement, or at the end of your file as a conclusion.
I'd also recommend that you start using lower-level functions like the File I/O Palate, (read/write Text file etc) and stop using the dynamic datatype as it obscures, a lot of data. This will give you a lot more control and flexibility in your program, and you're less likely to find things you can't understand/explain.
See:
FIle IO examples that ships with LabVIEW (Help >> Find Examples)
Product Documentation File IO- NI
Best of luck
09-14-2022 02:31 PM
@LabVIEWFairy wrote:
I'd also recommend that you start using lower-level functions like the File I/O Palate, (read/write Text file etc) and stop using the dynamic datatype as it obscures, a lot of data. This will give you a lot more control and flexibility in your program, and you're less likely to find things you can't understand/explain.
I have to agree with the LabVIEWFairy here... IMHO: Express VI's and their accompanying DDT wires are there only for those LabVIEW seminars sale pitches. So the NI salesman can show managers and other non technical people how quickly you can just throw something together and start "collecting data".
But as you can see even in your simple program they are not flexible enough to be use in a real application.
09-14-2022 03:03 PM
Updated VI attached. I removed the express write to measurement file and was able to create a timestamped TDMS file using the TDMS streaming pallet. Based on the time stamp, it looks like my sample rate is 40 Hz? How can I beef this up to at least 5MHz? Will this require "rolling my own" using the NI Scope.vi pallet? If so, can I get some assistance as I am a beginner.
09-15-2022 10:07 AM
Hi cthunterMC.
I don't think your sample rate is 40Hz, but rather the rate of your loop/how often you're writing the timestamp.
The samples per second of your signal are probably a lot higher than that. You can configure your sample rate in the simulate signal expressVI.
I think there is also worth talking about some basic DAQ theory, you need to make sure your program can keep up with the Acquisition of any Hardware(or simulated signal source), as your loop can't run at 40Mhz it needs to read multiple samples per execution, and you need to balance the 3 different factors here to suit your needs(Sample rate, Loop rate and Sample size).
Sometimes you'll find that the act of writing to file is too taxing and takes too long for you to be able to keep up with the hardware, in these cases, it becomes necessary to split your program into multiple, modules. I suggest having a look at the "Producer Consumer" design pattern.
Finally, to free yourself further from the Signal datatype and the express VI's, I can recommend the SIngnal and wfm generation group of VI.s which give you a lot more options in the generation of data.
Enjoy your path of learning 🙂