gopalakrishnan

how to read real time clock in RSLogix 500

14 posts in this topic

Hi,

I am gopalakrishnan.I have one doubt,i want to read the plc date and time continuously from ML1500 LRP C series using RSLogix 500 software.I can read  the date and time by using status flag like S:37,S:38,...S:42 once I press the set date&time function in fuction files.But I need continusly uptade time(PC time),how to read the time like that,anybody know that answer?Pls explain me with an example.Thanks for understanding my questions.

Share this post


Link to post
Share on other sites

Not exactly sure what you are trying to accomplish.

If you want the values from the function file for the Real Time Clock (RTC), then you could MOV RTC:0.YR N7:0.  Other values in the file are MON, DAY, HR, MIN, SEC, DOW, DS and BL.

Share this post


Link to post
Share on other sites

Thanks your suggestion cartney, I done the same as per your suggestion like RTC:0.HR, RTC:0.MIN, RTC:0.SEC. this  value is coming when I set date&time in function file only once, But Here I need online time(updated).

Share this post


Link to post
Share on other sites

Yes, you are correct now, I want to see exact every second.what should I do for this???

Share this post


Link to post
Share on other sites

Sorry I  check with RSLogix Emulate500, Is it possible in Emulator? (Also I checked with RTC:0.DS set to 0) any other way to read the current online time(updated). 

Share this post


Link to post
Share on other sites

No Mr.Kaiser, I want to check with Emulator Is it possible ?? to read current online time.

Share this post


Link to post
Share on other sites

No, the Emulate 500 does not implement the Real Time Clock.   It populates the RTC data files with values when you start the emulator, but the values do not increment.

You will also find that the RTC in the MicroLogix controllers doesn't update every 1 second, but rather every 2 seconds.     It's OK for "timestamping" something, but it's not a good scheduler.   For that, use the timed interrupt functions or an ordinary timer function.

There is a good list of some of the other functions and instructions that are hardware or OS related and are not implemented in the Emulator like they are in the physical controller:

https://rockwellautomation.custhelp.com/app/answers/detail/a_id/55723

Share this post


Link to post
Share on other sites

Thanks Mr.Ken. Why? I am testing this function, I want to create a new program in my process industry (ie) every 8 hours once worker will change, so I compare the date and time periodically for worker changing function running or not?

Share this post


Link to post
Share on other sites

The emulator doesn't do every thing the controller does.    If you want to use all the functions of the controller, then buy and install a controller.

The RTC functions work properly if you have a controller with an RTC installed and configured. 

I personally don't like to use PLC controllers for time-of-day work, because their clocks drift over time like all electronic clocks.    You may find that after a few months, your shift-change logic is not correctly evaluating the correct time that your workers are coming on shift.

 

Share this post


Link to post
Share on other sites

Hello ken,

I checked with ML1400 controller for RTC function it is working fine. Thanks for your knowledge sharing....!!!

1 person likes this

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