LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sweeping issue(Min to Max and back to Min)

Solved!
Go to solution

 

I have a tunable laser which is suppose to do a sweeping from Min to Max and then back to min.

For some reason there seems to be an extra step after  the Maximum wavelength as shown below.

Strange part is that it seems to occur only when i have set a wavelength that has 1 decimal place or 4 decimal places.

I'm relatively new to labVIEW, Please HELP? any advise would be helpful.

 

 

 

Untitled.png

errorru.PNGlverror.PNG

nerror.PNG

noerrror.PNG

0 Kudos
Message 1 of 3
(2,139 Views)
Solution
Accepted by topic author shing93

This sounds like a floating point accuracy problem.  Every language fights this.

 

What you should do is calculate how many steps up should be performed and then do comparison on the step number (an integer).

 

Also, why use the formula node?  A simple case structure would take care of the logic.


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
Message 2 of 3
(2,128 Views)

Thanks! This is actually a sample program that came with the device and so i decided to make modifications to it.

Thanks a lot will try it out later on.

0 Kudos
Message 3 of 3
(2,120 Views)