LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bounce time

If you have not done so, work through the on-line tutorials for Getting Started with LV.

 

For that kind of testing a State Machine architecture is the most flexible, robust, and easily modified. There are examples which come with LV and many thread on the Forums.  Start with a good architecture so that you do not find yourself with something which almost works but cannot be modified without completely rewriting.

 

Your description of the steps is a good start to the design of the program.  A thoughtful and thorough design process before you begin writing code is very worthwhile. It helps to make sure that you have thought about all the requirements.

 

Break things down into simple parts and write subVIs for each part.  Test the subVIs as you go.  For example one subVI could read the signal and send the data (probably via a queue) to other subVIs which do the analysis. Another subVI could check the timing.

 

As you try things and get stuck, post back with your questions.

 

Lynn

0 Kudos
Message 11 of 14
(493 Views)

I thought before about using state machine, and now I am reading tutorials and exploring examples to learn how to use it. I have many conditions, so I will have many cases but what is scaring me the most is the timing how can I get it. Thank you Lynn for your help I really appreciate that. I will create some VIs and If I will get stuck I will post my questions.

0 Kudos
Message 12 of 14
(486 Views)

We will look forward to hearing from you, but there is still the problem of where the "noise" is coming from. Have you tracked that down? The best software in the world can't fix a fundamental problem in the measurement.

 

MIke...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 13 of 14
(476 Views)

I agree with Mike about your noise.

 

The state machine can easily handle the timing issues. Put the time of the first transition into a shift register.  Exit the state. In the next state (which might be the same state it just left), check the next measurement reading and the time. If the reading has not changed and the specified time has elapsed, then you are done, else repeat. Only spend a very short time in any state (at least while timing) before exiting and going to the next state.

 

Lynn

0 Kudos
Message 14 of 14
(458 Views)