Sign in to follow this  
Followers 0
Wordman

RTC Function File Manipulation

8 posts in this topic

I'm aware of the RTA instruction, but I get a discrete input from a clock module only once at 2am. To account for Daylight Savings Time, I just want to set the clock to 2:00:00 every time I get this input, rather than resetting the seconds with the RTA instruction. How do I maniuplate the RTC integers: such as RTC:0.HR, RTC:0.MIN and RTC:0.SEC? I tried ADD and MOV, but when I have RTC:0.X in the dest I get an "Invalid Data Type!" Error when verifiying. Surely you can change these values somehow

Share this post


Link to post
Share on other sites
Which processor/family are you using?

Share this post


Link to post
Share on other sites
From RSLogix 500 Help: Address/Value The Real Time Clock file uses eight 1-word elements. The real-time clock does not allow you to write invalid date or time data. You can use a MSG instruction to write the RTC from one controller to another to synchronize time. The RTC file is read-only via ladder logic when using MicroLogix processors.

Share this post


Link to post
Share on other sites
I worried this was the case. That is very uncessary of AB. If you can write to the file as a MSG, is there some way to work around this?

Share this post


Link to post
Share on other sites
This apparently is a lie. I did some reading. New in Series C Micrologix controllers is the copy word (CPW) instruction. It is nice since the data can be the same type or different (i.e., Integer to Integer or Integer to Floating Point, etc.). It is especially usefull to me since function files can be used as source or destination (but not both). Problem solved.

Share this post


Link to post
Share on other sites
Don't quote me and then say it is a lie!! What I posted was copied and pasted directly out of the Help file for RSLogix 500 V6.20.00. If it is wrong because their help file is poorly written, then it's wrong - but not a lie .

Share this post


Link to post
Share on other sites
Wasn't calling you a liar. Was simply stating that the RS help file was wrong. Let's not argue semantics, but it is a lie.

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