07-24-2005 11:41 PM
07-25-2005 06:33 PM
The answer to your question will depend somewhat on the implementation. Are you wanting to use the "timer" to govern the execution timing of your program, or are you wanting to use the timer to measure the elapse time of your program? Answering that question will dictate how you should implement it, but regardless, it will be implemented using timing VIs, which are located in the All Functions>>Time & Dialog palette.
It should also be noted that software timing is inherently unreliable. Spikes in CPU usage and a stressed processor can cause small timing inconsistencies that might make a large difference in some very time-sensitive applications. If your application is particularly time-sensitive, you should consider using hardware timing instead.
Kind Regards,
08-30-2005 03:40 AM
09-06-2005 05:46 AM
09-07-2005 01:18 PM
Carlos,
The Elapse Time Express VI is not available in LabVIEW 6.1 because express technology was not introduced until LabVIEW 7.0. You can, however, easily measure the time elapsed in LabVIEW 6.1 by using the Tick Count.vi located in the Functions>>Time & Dialog palette. I have attached an example that uses the Tick Count.vi to measure the time it takes to do 10,000 addition computations. You can apply the same concept to measure the elapse time of anything in LabVIEW.
Kind Regards,
09-07-2005 11:13 PM
09-08-2005 10:41 AM
GNS,
There's more than one way to measure time with a ~10 msec precision. For example, once upon a time I posted a simple example of a module that could do timestamping with a precision of 1 msec. At present it self-initializes one time only but you could easily replace the "First Call?' primitive with a boolean control that would allow it to be initialized whenever you choose. Here's the thread: http://forums.ni.com/ni/board/message?board.id=170&message.id=111583&query.id=103513#M111583
You can use your 6601 to keep track of time in hw. However, unless the 6601 is also being used to synchronize another bit of hw acquisition, I don't think you'd be doing yourself much of a favor. You still would make a "Read" call in order to retrieve the value for use by your app, and that software Read would be subject to the same variability as a call to the msec Tick Count primitive.
I'd start by trying to use the built in Tick Count primitive and only reverting to hw if necessary.
-Kevin P.
09-21-2005 03:04 AM
09-22-2005 06:00 PM
Carlos,
I'm not sure I follow the implementation that you are using, but you should be able to measure elapse time in your state machine in a similar manner to the way I showed before. I have attached an example that corresponds to the way you described your setup. Take a look at it and see if it gets you pointed in the right direction.
Kind Regards,