Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I adapt this example to count ticks/unit time?

Hi Dave,

 

As we discussed over the phone, perhaps it would effective for you to workaround this issue for now by replacing the NaN measurements with the previously acquired value until we can get measurements of the physical encoder signal when the "phantom" signals occur in LabVIEW. You can use the "Not a Number/Path/Refnum" VI which is located in the functions palette under Programming > Comparison  to check the output of the Mean VI to see if it is NaN or not. Then, you can use a shift register to store the value of the Mean from the previous iteration, and if the current reading is NaN, replace the reading with the value from the shift register. Please see the code snippet below for a possible implementation.

 

Dav2010_workaround.png

0 Kudos
Message 11 of 11
(2,559 Views)