about the Micrologix system time

zhoudq

Member
Join Date
Jul 2011
Location
JiangSu Province
Posts
75
Hello everyone!
I have a project, use the micrologix 1200 , I need use read the system time, but i only know the RTC function file, can't configure and use it, please help me, give me some datum or an example, Thank you!
 
In RSLogix 500 the date and time are stored in registers. you can compare to them and move them

Go to the S2 - Status file, click the drop down "Structured" and select "Decimal" and you will see the following:
S:37 = Year
S:38 = Month
S:39 = Day Of Month
S:40 = Hour (0 to 23)
S:41 = Minute
S:42 = Second

To run something during a few specific hours would be:

LIM
8
S:40
16

Then this will be on from 8:00 until 16:59, off at 17:00
Checking the other clock settings is similar.
 
Here is an example I have for controlling an electric blanket, when enabled by the house HMI

Edit - for some reason it does not want to display this picture
 
Last edited:
Aabecks example is aimed at the PLC/SLC series. The Micrologix models use a Function file to handle the real time clock, so substitute the function file addresses in place of the S:x addresses in his example.

RTC:0.YR
RTC:0.MON
RTC:0.DAY
RTC:0.HR
RTC:0.MIN
RTC:0.SEC

The Real time clock can be enabled and disabled. In order to enable it, you need to write a valid value to all the fields. This is most often done by using RSLogix 500 software and using the "Set Date and Time" button on the Function File RTC tab.

It will also start operating if you write valid numbers to the fields listed above from a remote device or with ladder logic. Many HMI/SCADA softwares will not access the RTC:0.x addresses directly, so it is almost always done with ladder logic pointing to user data files that can be accessed by HMI/SCADA.

It is also possible that the 1200 you are dealing with does not have a real time clock installed. If I recall, the Micrologix 1200 RTC is a separate plug-in module. I do not know if RSLogix 500 software can detect whether or not one is installed, so it might show you the values from the CPU memory even without having the ability to use them as a clock.
 
Last edited:
OkiePC,

I don't get too many ML's to work on, but I just created a new RSL500 project for a ML1200 Ser B. I created and verified a line doing a compare to S:40 and it verified without error. Also, the S2 file showed all 6 clock addresses.

I always thought the function call for RTC was another way of doing it, for those accustomed more to RSL5K and the ControlLogic's.

Now I am going to have to get a ML1200 and see if the ladder way will work or not.

I do have a ML1400 on the shelf, maybe I will try that as the Function files shows for that in RSL500, or would that be different?
 
I do have a ML1400 on the shelf, maybe I will try that as the Function files shows for that in RSL500, or would that be different?

The 1400 has a built in clock and uses RTC Function file. S:37 through S:42 are by default still labeled as Calendar/Clock registers when you make a new project, but they really are not used that way in a Micrologix. At least that has been my experience, so I leave a little room for doubt. Go ahead and see what you find in the 1400.

Wait, I have remote access to a live ML1400 I can check it in about 5 minutes.

The S registers are inactive in a 1400, but RSLogix 500 labels them for you which is a bit misleading. I thought that RSLogix 500 had a unique set of default address comments for system addresses for each model in their line-up so they really shouldn't be the same from ML1000 through the 5/05, but I might be mistaken about that. Perhaps there is one set of default comments for the whole lot of them.

ML1400 RTC vs S registers.png
 
Last edited:
Still in school after way too many years out of it.

I wonder if I will ever know it all?

If you ever think you know it all, you are self-deceived. That is one thing I love about this field: constant learning. Once in a while I am searching for info and come across something I posted a decade ago and I think to myself "What a dumb butt I was."
 
Hello OkiePC:
As i offline, i may set date and time by the RTC function file, then i save it,download it to the ML1200, online i check the RTC all fields are o, and i can't change it, please direct me set date and time by the RTC function file. thank you!

system time.png
 
Last edited:
Hello Aabeck:
I follow your direct, i use the LIM instruction, the set it same you example , but i download it to ML1200. and online ,the s:40 until 0,so how can i do? please direct,thank you!

A.png
 
I was thinking the ML worked the same as all the other CPU's in RSLogix500.

You will have to use OkiePC's method in the 5th post above and call the function RTC Replace the S:40 with RTC:0.HR, by your screenshot there is a RTC in the PLC and it is enabled.

To set the time you will have to be online and click the 'Set date & Time' button. As OkiePC mentioned it is confusing that RSLogix still labels the unused status registers for the clock.

If it is easier to compare to the status registers maybe do a RTC call when the second = 0and move all the values to the properly labelled S:xx register.
 

Similar Topics

Has anyone ever connected a micrologix 1400 to a 4-wire RS485 modbus network? I know about the 1761-NET-AIC but it apparently only works with...
Replies
4
Views
3,352
Dear colleagues, urgently need your help. I need to add flip flop logic for pumps in my code. Now the logic is: We choose the tank and start pump...
Replies
4
Views
2,003
Hello, hoping to get some feedback on this overnight. I have a couple of Omron FQ2 cameras connected to a 1763-BBB Micrologix & 1762-OB8...
Replies
2
Views
3,009
can you please tell me where these MicroLogix 1000 System, PLC-5 and SLC 100 can be used for what applications eg. elevator ?? and what is SLC100...
Replies
12
Views
5,213
I'm using a SLC typed write from the ControlLogix5572 to the MicroLogix 1400, with path: 2, (MicroLogix IP). The ControlLogix equipment has a...
Replies
0
Views
27
Back
Top Bottom