03-05-2012 06:42 PM
Hi,
How to let the counter count the time, that doesn't start at the same time ?
This timing system is a sport timing system for canoe competition, it need to track 6 competitor that start at different time .
I have a problem , I have 6 counter in a VI that use to track 6 competitor, but it start count at the same time, how to make it count separately for each competitor ?
Do you guys know how to solve this problem ?
Solved! Go to Solution.
03-06-2012 04:20 AM
Hi. I send your Vi corrected.
Key facts:
1) You are using a subVI three times (one for each runner) with uninitialized shift regiters. If you want them not to share memory (count separately) you should select the VI to behave "reentrant-preallocate clones" in the execution tab of the VI properties windonw.
2) When the VI is reentrant every time you place it in the DB it will behave as an independent VI with its own memory allocation. Thus I remove three unncesasry copies that were used to initialize the timers and left only the 3 subvis that should time each of the runners.
3) Sligh changes in the state logic (which by the way you manage to organize very intuitively), to obtain the desired behaviour.
Give it a look and give me your comments,
03-06-2012 06:52 AM
HI,
Thanks for your reply. But i need another 5 stopwatch for each runner and they start at diffrernt time. Do you have any idea to let it not to share memory or initialize the timer at different time ?
I am new to labview,I dont know how to use reentrant-preallocate clones.
I have another solution but this VI cant use stop button. once it use the timer stop counting, but the VI is runing. So, i try with this multicompetitor.VI, whether it can track the each 6 competitor separately.
03-06-2012 07:14 AM - edited 03-06-2012 07:17 AM
In the original post you mention 6 stopwatches. In the VI you sent, you did it for 3 but without independent start. The VI I sent you, work for 3 runners allowing the different starting times. If you need now a total of 6 runners, copy & paste.
If the current VI has 3 stopwathces and you need a total of 6, why do you "need another 5 stopwatch for each runner".
If you do not know about reentrancy and preallocated clones, google it and read, or look for it in a LabVIEW text/manual/tutorial. Also the forum has plenty of discussions regarding the applications.
This part:
"I have another solution but this VI cant use stop button. once it use the timer stop counting, but the VI is runing. So, i try with this multicompetitor.VI, whether it can track the each 6 competitor separately."
... I could not understand.
Have you run the VI I sent you? Does it works in the way you need? What is missing (besides the fact that you may copy the code to fulfill your requirement of 6 runners)?
Regards
03-06-2012 07:56 AM
HI,
ya, i run it. I mean i know how to make it to 6 competitor already , and yes, it works but the time, it still count or start at the same time. I need to run each competitor at different time , like this competitor A 20-2-2012.VI . This is the one i do but it cant put a stop button. once i put a stop button, the clock stop counting but the whole VI is running.
Regadrs,
Sam
03-06-2012 08:21 AM
I think we have diferent interpretation of the concept "start at the same time". See the following image, where I was able to run each stopwatch at different start times.
When I told you in the last message to copy and paste I didnt expect something so literal. Your new vi would not even fit in 10 widescreens. That is very impractical and time consuming, not to mention error prone.
Consider making subvis and comprising all the white unused space.
03-06-2012 08:44 AM
Hi,
Can you send me again the VI latest you modified ?
cause i think the VI you send me is the VI, the clock still same run at the same time.
thanks.
Regards,
Sam
03-06-2012 09:17 AM
Hi,
This is the VI that you send me. I think, you post it the wrong file. can you send me the latest VI ?
thanks
03-06-2012 09:44 AM
I am really sorry for the uploading mistake.
Please note that my version does not have the "Running 2", "Running 3" buttons.
Hope that everything is clear know.
03-06-2012 10:35 AM
Hi,
ya, it is correct. Thanks a lot.
Regards,
Sam