cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

How to code a clock

MySchizoBuddy
1-Newbie

How to code a clock

minutes go from 1 to 60 min and then reset incrementing Hour which goes from 1 to 24 and after that the day count is incremented and hour is reset.

How to do this in mathcad?

1 ACCEPTED SOLUTION

Accepted Solutions

Do you mean something like this?

View solution in original post

8 REPLIES 8

Do you want this to actually show real time? Mathcad is not suited to such a task. Programming the counters would be easy enough, but they will not run in real time (more like several weeks per microsecond of real time!)

no not real time. i just need it to track the sun under arbitrary days and hours. not anything real time.

i need accuracy of 1min only.

You can use the modulo function for determining when something is repeat its cycle. However, you've not said what format your time data is in, so it's not possible to give you a better answer.

TTFN

Ziyad Saeed wrote:

no not real time. i just need it to track the sun under arbitrary days and hours. not anything real time.

i need accuracy of 1min only.

Something weird in your proposal . The matter is to transform the swept angle in the equivalent clock time. Maybe I don't understand

its the opposite given a clock time where is the sun in the sky.

I have the plot of the sun per day, i want to add the hourly variation to it.

i just need a counter that goes from 1 to 24, resets and increments the day counter. thats it.

How do you program a counter in mathcad?

Do you mean something like this?

Bingo

just add minutes.

I guess i over explained what i wanted to do.

Sorry, but it's not clear to me what you want. Do you want a function that converts an arbitrary number of days and hours into minutes?

Top Tags