05-27-2009 03:43 PM
Solved! Go to Solution.
05-27-2009 07:08 PM
I think what you really need is a couple of tick count nodes. They are in the same palette as the elapsed time VI.
Step 1 is to put the first tick count where you want the timer to start. The one problem with the tick count object is that it doesn't have any other pins, so you might even have to use a flat sequence just to get the order of execution correct.
Step 2 is to put the second tick count where you want to know the elapsed time. Same rules as step 1. This one will probably be in a loop.
Step 3 is to subtract the Step 1 ticker for Step 2. That will give you the number of milliseconds. If step 2 was in a loop, the subtraction should be too.
Step 4 is to write back if you have more questions. 🙂
05-27-2009 07:43 PM
05-27-2009 08:58 PM
I can't look at your code because I only have 8.2 here 😞
I thought you only had one loop (the one that takes the data)?
What you want to use is the subtract node and connect it directly to the tick count -- don't use variables or altenbach will come in here and beat on you (just kidding). Actually, I think he would agree that using variables would almost guarantee that you get the wrong answer because of race conditions (but, since I can't see your code, I can't be sure).
05-28-2009 07:50 AM - edited 05-28-2009 07:54 AM
05-28-2009 10:15 AM
I have changed your code (personnally I would not have done like that but I don't want too many changes in your code because you are a beginner in LabVIEW !).
- Now there are 2 loops : 1 loop for acquisition (while loop) and 1 loop for user interface operations (while loop + event structure : this is a very powerful structure in LabVIEW and you should have a look at some examples to understand the way it works)
- You will find a shift register used by acquisition loop : I explain what it is in the diagram...
- I have given you a VI which is nearly the same than "elapsed time" Express VI : maybe it will be worth trying too understand that when you get more experiment at LabVIEW (you will have to understand "functional global variables" and "reentrance execution" : those 2 stuffs are used by "elapsed time" Express VI (but also by the VI which I have included and which is nearly the same)
Note that I have shown the solution for 1 of the 4 graphs : you will need to do the same thing for the 3 others. You will also need to code elapsed time saving.
Again, the solution I have given to you is very far from perfection, but with 2 days of LabVIEW practice, it would be too complicated to explain the different architectures and means of communication between loops etc...
05-28-2009 12:15 PM
05-28-2009 01:55 PM
05-29-2009 02:59 AM
Right click "elapsed time 1 (s)" and then select Create > Property Node > Numeric Text > Text. You will get the string cooresponding to the numeric data.
Best,
06-03-2009 06:33 PM
Can you guys re-post your code in LV 8.0?
"Elapsed Time" is the most worthless VI ever.