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: 

Math error?

Solved!
Go to solution

Apparently 4,000,000 = 5,000,000

 

newmath.PNG

 

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 1 of 4
(2,277 Views)
Solution
Accepted by topic author RTSLVU

The problem is your sample rate is not what you think it is. You are setting it for 20MHz, but NI-Scope coerces it to 25MHz. Use the function below to see the real sample rate. (Put it after your Set Horizontal function and ignore the error from the Horizontal).

 

Snap10.png

 

 

Snap11.png

So you need to find out your allowed sample rates, hint 20MSa/s is not one of them.

 

mcduff

Message 2 of 4
(2,255 Views)

Oh... Thanks I was just about to get to that and was pulled into a meeting.

 

Anyway I think it will just change my control to say 25Mhz if 20 is going to be coerced to 25 anyway.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 4
(2,249 Views)

Look at this link

 

"The horizontal timing parameters are all inter-related to comply with the IVI-Scope specification"

 

Not sure if 20MSa/s is allowed is some situations but not others, you might want to look into this.

This is a guess here, I don't have an 8-ball to shake, but I think allowed sampling rates need to be an integer factor of the max-sampling rate, ie 50MSa/s divided by 20MSa/s is 2.5, so 10MSa/s is good, 25MSa/s is good, etc.

 

I suggest using something like the following in the beginning of your program to get a range of sampling rates, I would make it dynamic so if you change scope models, you don't need to do anything.

 

mcduff

snip.png

 

 

 

0 Kudos
Message 4 of 4
(2,241 Views)