08-13-2014 09:40 AM
I assume based on the value I set for limit virtual bench selects the next higer range (like DAQmx).
Yep. You can read back what it got coerced to with MSO Query Analog Channel.
I am trying to implement the averaging in LabVIEW. How is the averaging implemented in virtual bench softpanel?
It's a modified moving average per point. https://en.wikipedia.org/wiki/Moving_average#Modified_moving_average. N is the value you select in the application (2 averaged, 4 averaged, etc).
Triggering issue
Can you post the VIs you're using for the MSO and FGEN?
Regards,
William Earle
Software Engineer
NI R&D
08-13-2014 11:33 AM
Hello William Earle,
Can I access to the averaging code of the virtual bench software?
Thanks,
A Senthilnathan
08-13-2014 12:51 PM
Unfortunately, the source code for the application is not publically available.
Regards,
William Earle
Software Engineer
NI R&D
08-13-2014 01:22 PM
Hi A Senthilnathan,
To re-ask bstreiff's question, what do you have your pretrigger time set to (on MSO Configure Timing.vi)?
There are usually multiple pre-trigger samples, so it's possible that the acquisition triggered at the zero crossing, but what you are seeing are the pre- and post-trigger samples.
08-13-2014 01:29 PM - edited 08-13-2014 01:30 PM
I wrote a quick LabVIEW VI with a similar averaging implementation to the application.
Regards,
William Earle
Software Engineer
NI R&D
08-13-2014 01:39 PM
Thanks William for the sample code. I have implemented a different averaging method and it works for the application.
To answer the pre-trigger question. I have not configured pre-trigger time. I configure rate, acq time and mode as per the below diagram. Is there any any pre-trigger time/samples by default. If so, it should be constant. I see additional samples when there input signal is at a certain range (above 300kHz or so).
08-13-2014 01:45 PM - edited 08-13-2014 01:46 PM
The default acquisition time is 4 microseconds (e.g. 1000 samples at the default sample rate of 250MS/s), and the default pretrigger time is half that (2 microseconds).
If you only set the acquisition time, the pretrigger time will remain at the default of 2 us. Looking at your screenshot, it looks like you have a zero-crossing at 2E-6.
08-13-2014 02:02 PM
Streiff,
I set the pretrigger time to 1ns (minimum allowed) and the waveform looks a lot a better. Thanks for pointing out the issue in the code.
Thanks,
A Senthilnathan