Allen Bradley WALLCLOCKTIME Compare

Paul,

The Tag you have created contains all the data you need. If your tag is DATETIME, then

DATETIME[0] = Year
DATETIME[1] = Month 1-12
DATETIME[2] = Day 1-31
DATETIME[3] = hour 0-23
DATETIME[4] = Minute 0-59
DATETIME[5] = Second 0-59
DATETIME[6] = Microseconds 0-999,999

So if you want to trigger something at 23:59:59 you will need to use 3 compares together.

Hope This Helps

Mark
 
I suggest to open the Sample Folder of your RS5000 ( C:\RSLogix 5000\Projects\Samples\ENU\v19\Rockwell Automation ) and select the following .ACD file:

Add_On_Instructions_Samples.ACD

It contains many useful Add On Instructions to import inside your application.

There are many examples about calculations over the Date and Time, that makes things easier.
You may use as per your request the one named "T_EQU"...

Another way to access Sample files is through the RSLogix 5000 Start Page - Open Sample Project

Hope this helps,
- [FONT=comic sans ms,sans-serif]fuzzy logic[/FONT]
 
Last edited:
Mark, I have downloaded the Logix5000 Clock Update Tool & assume this updates the system WALLCLOCKTIME in the PLC. Can I compare WALLCLOCKTIME[4] to a minute value of '4' using some sort of campare function?RegardsPaul.
 
Mark,
I am confused here. I wish to compare the current minute value in the PLC (which I thought would be WALLCLOCKTIME[4] with a fixed value of '59'. Where is 'DateTime' declared and does it get the PLC's current Date & Time values?

Regards
Paul.
 
Paul,

The tag DateTime is the tag which is created in the instruction GSV.

I have attached a copy of what I have done in the past. I am only moving the values for use elsewhere but you could use the tag DateTime, and not bother moving it to DateTimeInt.

The example shows Year 1998, the month as 10, the date as 3 and the hour as 21.

Mark

Date.jpg
 
Mark,
I have a controller tag called 'PLC_Time' of type DINT[7] to store date time data. I use a GSV instruction (see image) to try & write the WALLCLOCKTIME year value to PLC_Time[0] year element but the value is always 0 instead of 2011 Any idea's what I am doing wrong?

Thanks
Paul.

GSV.jpg
 
Paul,

Have you used the Logix5000 clock update tool to synchronise the clock on your PC with the one in the PLC.

You will need to add the device, browse to it and update the time.

Mark
 
Mark,
I have used the clock updating tool & the clocks are in sync. I just wanted a way of getting to the current PLC time but as I can't find a way to get to it I will use an event in RSView32 to achieve an event just before midnight.

Thanks for the help.
Paul.
 

Similar Topics

Hi, I have a ControlLogix system with 1756-IF16 analogue inputs. I can't scale the inputs at the card as there is a requirement to facilitate...
Replies
4
Views
99
Dear community, I am trying to find a tool for Allen-Bradley PLCs similar to SiVArch for Siemens PLCs to automatically generate faceplates and...
Replies
0
Views
69
Hi everyone, new to forum. Since very long time i having issue with 1734-AENT module, after some period of time its keep stuck in error (simmilar...
Replies
9
Views
344
Hello, I am new here. I am trying to find good places to sell some surplus items that I have that isnt through ebay. Does anyone have any sources...
Replies
5
Views
345
Hi all, installed on chassis A17 an A/I from Allen-Bradley , problem is what ever I do , all channels are sticked on value 39.9 and cannot change...
Replies
1
Views
135
Back
Top Bottom