ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting the sampling rate

Hello,

I am trying to implement something simple but having a problem with it. I am trying to generate a sine wave inside a while loop with a certain frequency and then read the same sine wave but with a lower frequency ' Sampling frequency' so that it generates a sine wave but with less sample points, so not every point should be read by the other loop. I tried to implement that in my program and I attached a snippet, but it does nothing other than delaying showing all the points of the generated sine wave in the other graph. How could I set the sampling rate of the other loop so that I get less sample points?

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

Hi intern,

 

don't use ExpressVIs and DDT wires will help you to solve this problem...

(Setting a larger wait time might help too.)

 

I'm sure I have seen this question before: don't you want to discuss this with your colleagues?

Best regards,
GerdW


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

I am not sure what to discuss with my colleagues there, I know what I have to do but for some reason it's not working. I deleted the express VIs and the DDT wires but I am still not having the result I want. I just get the first graph shown with a delay on the second graph when I just want less sample points on the second graph corresponding to the value if feed to the delay function.

0 Kudos
Message 3 of 4
(2,487 Views)

Hi intern,

 

for this one works as expected:

I recommend to use notifiers instead of local variables. (Bob would recommend a wire channel…)

Best regards,
GerdW


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