Sign in to follow this  
Followers 0
pumpkins

WallClockTime - Conversions

2 posts in this topic

I have an application that requires me to add a certain number of minutes to the current time and display this in a scada package. I'm using a ControlLogix 5000 processor programming with RSLogix 5000. Due to the fact that when adding these minutes the clock may tick over an hour or even a new day, my question is as follows: Is there any easy way to add the minutes (in microsecond format) to the base WallClockTime counter and convert that to the hours / minutes / seconds i require to display? I have written a structured text routine to add minutes to the current clock and check if a day or hour has ticked over, but i was wondering if anyone had a better way of doing it. Cheers.

Share this post


Link to post
Share on other sites
Hi, You can only make a single operation, adding a factor directly in registers S[18] to S[24] and storing the result in a simple integer registers. For example: CPT N7[10] S[23] + 3 This instruction only add 3 to S[23](minutes) and stores in the integer N7[10] I hope it be useful Regards!

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