LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Elapsed Time

Solved!
Go to solution

Try putting a 1mS delay in the loop. Can you post the VI that is doing that?

Richard






0 Kudos
Message 11 of 16
(1,107 Views)

Sorry..."Stupid Stamp"...I had a "miswire".  Thanks for the solution.  It works like a charm.

0 Kudos
Message 12 of 16
(1,103 Views)

@MarkDavid wrote:

I'm getting bizzar numbers between counts.  It goes 1...then 3.406e9 then  .2... then 3.406e9..  I keep getting 3.406e9  between increments.

 

When it should be 1...2...3...4...

 

Any ideas?


Does your original code that you posted display "bizzar" numbers? Not likely.

If you are using the example posted above and modifying to meet your needs, I suspect that you are not feeding the right hand shift reg correctly at all times. Some other logic at play not passing the shift reg data through.

 

Post another example of your code. The examples posted above should do what you wanted it to do without bizarre numbers.


 

Omar
0 Kudos
Message 13 of 16
(1,101 Views)

Hi I am new to NI and I hope you can help on this topic. I have attached the VI file as well. 

 

Regards,

NKR

 

Elapsed_time_demo_1.jpg

 

0 Kudos
Message 14 of 16
(1,050 Views)

You probably should have started a new thread with your question rather than  tacking on to the end of a nearly year-old one.

 

One problem with your code is that your switch A is read only once before the while loop starts.  It is never read again, so there is no way to detect the change.  You will need to move that into the loop.

 

It sounds like you want to monitor either a true to false, or false to true change and do something at that moment.  You should store the value of the switch in a shift register and compare its value in the current iteration with the previous iteration.  With the correct boolean logic, you can detect either the true to false or false to true change.  (Not previous AND current would give a true on the false to true change.)

0 Kudos
Message 15 of 16
(1,047 Views)

Thanks for the feedback, it works now. 

 

Sorry I didn't realise the postings was a year old!. 

 

Cheers,

NKR

0 Kudos
Message 16 of 16
(1,033 Views)