Sign in to follow this  
Followers 0
Brad

Timers

3 posts in this topic

I want to have a clock that will reset each time a bit goes true. Trying to keep track of the last time a change is made. I have a timer set up to set off an alarm when the same change is not made. To make a long story short, I am looking for a way to have a clock give me a time in between the changes. Once I have that I can transfer that information to a monitor or spread sheet. Edited by Brad

Share this post


Link to post
Share on other sites
You could just copy the contents of the clock S:37-S:42 when your bit goes true (with a one-shot if neccassary) and send this to the spread sheet and let the spreadsheet calculate the difference in time. S:37 = Year S:38 = Month S:39 = Day S:40 = Hours S:41 = Minutes S:42 = Seconds Just XIC MY_BIT OSR TEMP_BIT COP S:37 N7:0 6 would take a snapshot enabling you to send it to the spread sheet. Or you could just use a TON instruction if the period between changes is less that 9 hours and second accuracy is OK SOR XIC MY_BIT OSR TEMP_BIT MOV T4:0.ACC N7:0 EOR SOR XIO MY_BIT TON T4:0 1 32767 0 EOR Or ... maybe I've misunderstood? Edited by Spedley

Share this post


Link to post
Share on other sites
Floating point long duration hour timer in F8:1: RTO T4:0 1 32767 0 GRT T4:0.ACC 3600 BST ADD 1 F8:0 F8:0 NXB SUB T4:0.ACC 3600 T4:0.ACC BND CPT F8:1 F8:0+(T4:0.ACC|3600) For SLC replace the CPT intruction with BST DIV T4:0.ACC 3600.0 F8:2 NXB ADD F8:0 F8:2 F8:1 BND Edited by Alaric

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0