LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make the counter count or start at different time

Solved!
Go to solution

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 ?

0 Kudos
Message 1 of 10
(3,116 Views)

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,

0 Kudos
Message 2 of 10
(3,101 Views)

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.

0 Kudos
Message 3 of 10
(3,094 Views)

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

0 Kudos
Message 4 of 10
(3,089 Views)

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

Download All
0 Kudos
Message 5 of 10
(3,079 Views)

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.

 

3Stopwatches.PNG

 

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.

0 Kudos
Message 6 of 10
(3,074 Views)

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 

0 Kudos
Message 7 of 10
(3,070 Views)

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 

0 Kudos
Message 8 of 10
(3,066 Views)
Solution
Accepted by topic author Staffs

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.

0 Kudos
Message 9 of 10
(3,061 Views)

Hi, 

ya, it is correct. Thanks a lot.

 

Regards,

Sam 

0 Kudos
Message 10 of 10
(3,054 Views)