05-29-2013 05:37 AM
Question) Design a clock (with hours, minutes & seconds hand) in LabVIEW. Similar to the one below .Attach VIs and other files in your answer by clicking on the Advanced/Full Editor mode in your comment window while you are typing the comment.
Rules & Guidelines
05-29-2013 07:46 AM
Working clock Attached.
Check context help for documentation as well as VI comments.
Press the
Message was edited by: Ammouri (minor scale:range modification)
05-29-2013 04:26 PM
Brief Description on how the clock was designed and tested:
----------------------------------------------------------------------------------------
1. Gauge were used to implement the Clock
__# Gauge Seconds: has the main background of the clock + the "Seconds" arrow (Scale is hidden). ---> "Clock Ctrl_white.ctl" or "Clock Ctrl_bkc.ctl"
__# Gauge Minutes : has middle node + the "Minutes" arrow (Everything else is hidden).----------------------> "Clock min.ctl"
__# Gauge Hours : has the "Hours" arrow Only (Everything else is hidden).------------------------------------------> "Clock hrs.ctl"
** All the previously mentioned gauges has the same scale (0-12)
2. All the gauges are overlapped (over each other) with a String indicator below, where all are put into a Cluster.
---> "Clock Cluster.ctl" or "Clock Cluster Bkc.ctl"
3. Three VIs are implemented to test the Clocks using the current "Hours, minutes and Seconds", the difference is in the VI layout design.
__# "Clock Example" : Using the LabVIEW Decorations.
__# "Clock Example BG_Grey" : Using a Grey Layout with texture on the Background.
__# "Clock Example BG_Texture" : Using a Brown textured Layout on the Background.
** The Code of the Clock (Dividing to Hours, minutes and Seconds) is quoted from the following link:
Clock-indicator for LV: http://www.asl.ethz.ch/people/kneipl/personal/clock.llb
%% Kindly find attached the "Contest #4 Solutions" Zip File comprising all the previously mentioned files & VIs.
05-30-2013 01:09 AM
What happened to the blind submissions?
05-30-2013 05:25 AM
clock LV2011
05-30-2013 06:08 AM
Ahmed Zahran : There is a bug in the code , if you see the hour needle after 1200 Hours , there is no visible change and it again works normally from 0100 Hours , this bug has been handled in Balaji_DP's code.
05-30-2013 06:28 AM
There is no need for calculation or conditions to implement the clock.
All can be achieved by manipulating the scale ranges.
05-30-2013 06:44 AM
Hi Ammouri,
I just went through your code. Do you think using event structure with 1000 ms will imitate the original clock?
Just check when time is 3.59 PM. Your clock shows 2:59 PM at that time. Your hour needle is getting updated after every 60 minutes and minute needle is getting updated after every 60 seconds.
Balaji code is a perfect imitation of analogus clock. He has taken care in updating both minute and hour needle after every 1 second which is the actual requirement of Analog clock. Moreover he has also taken care the probelm of 12-1 PM bug found in Ahmed Zaharan code
05-30-2013 06:50 AM
More realistic implementation (Better than the task bar clock).
Message was edited by: Ammouri
05-30-2013 06:51 AM
Hi friends,
I`ve attached my work here. I hope this would meet the task given. Please check the attachment.