LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

The frequency is different between oscilloscope in real life and VI settings

I use the labview's waveform function to produce the waveform and set the frequency, also using NI compactRIO 9263 to output the waveform
Use connected oscilloscope in real life to the NI 9263 ,found  the frequency and duty ratio on the oscilloscope and in the VI
Change a lot of parameters is also wrong .What's the reason for this. Thanks a lot for your response

 

 

QQ图片20170823144218.png

0 Kudos
Message 1 of 4
(2,862 Views)

You have no timing in your loop, so it is outputting the data as fast as it can. I suggest using a timed loop instead of a while loop. Then set the period of the loop to the sample period you want.

 

However, if your sample rate is higher than 1kHz, you can't do it in scan mode anyway, and will have to program the FPGA.

 

Incidentally, you don't need to regenerate the waveform every time you run it in the loop, you can put that code outside the loop to make things clearer.

Ian
LabVIEW since 2012
0 Kudos
Message 2 of 4
(2,834 Views)

Hi camus,

 

and what about the first 225 iterations of the loop when you try to index non-existing array elements?

(You can solve this issue by prepending 225 zeros infront of the waveform…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 4
(2,825 Views)

You are not going to get a good waveform in Scan Mode in a cRIO.  You need to program the FPGA.  Luckily, there is a good Sine Wave Generator in FPGA that you can use.  For something simple like this, you can get away with using the front panel interface on the FPGA.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(2,798 Views)