From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why is using different sampling rate on simulate signal generates different frequency?

I'm simulating data aquisition for a crankshaft position sensor, it has 9 tooth separated by 30 degrees, so 3 tooth are missing. I want to count the speed of the rotation using counter. The simulate signal VI i'm using has 1000 Hz sampling rate and 1 number of samples so the counter can work properly. It works fine when the RPM is low, but on high RPM such as 1000, the accuracy of the counter starts to drop, i think this is because the frequency of the simulate signal is approaching the sampling rate. So i increase the sampling rate to 10000 hz, but when i do, the frequency of the signal is halved, anyone know what happens?

Thanks, the VI is attached

The top simulate signal is for simulating the 12 tooth of the crankshaft, so the frequency is times 12, and the other three simulate signal is for removing 3 tooth from the signal so there would be only 9 pulse as the result

0 Kudos
Message 1 of 2
(2,303 Views)

You are only outputting 1 sample with your Simulate Signal.  So you are essentially using a software timing on you simulation.  As the intended output signals speeds up, the while loop can only run so fast so it's limiting the effective speed you can acquire.

Message 2 of 2
(2,268 Views)