Automatically run "Set Date & Time" (PLC-5)

G

Thread Starter

Guntoter

When you go to Processor Status (main tab) there is a button to reset the processor time to the time of the PC that you are running it from. I need to be able to simulate pushing that buttom from a line of the ladder logic. The processor is an Allen-Bradley PLC5-60.
 
T

Trevor Ousey \(List\)

The time and date registers are available via the S2 (status) file. If I remember rightly, it is S:38 to S:42. Check the help files in RSLogix5. By writing a value into thyese registers, you can set date and time.
 
Each of those registers are available but I am not sure how you would simulate the "current time" to have written to them, somehow the software is reading the computer clock that you are on and writing it to the "S" registers that the date and time represent (not at computer to see S register numbers). I am not sure how you will have you ladder code access your local computer to get its time/date.

Dave
 
When you go to Processor Status (main tab) there is a button to reset the processor time to the time of the PC that you are running it from. I need to be able to simulate pushing that buttom from a line of the ladder logic. The processor is an Allen-Bradley PLC5-60.

>You can move any values to the clock calendar of 5/60 processor using MOV instruction.
S:20 = Month
S:19 = Day
S:18 = Year

Evandro Vizicato
[email protected]
 
H
When the button you mention is pushed, where will the time information come from? When a programming PC is connected to the PLC-5 the programming software moves the time info from the computer to the PLC. If the ladder logic is enabled with a button, the computer might not be connected, so where does the time info now come from? I have done what you ask for, but there has to be an information source for the time/date.

Hugo
 
R
Projects that I have been involved in that needed to set PLC clocks had several PC connected to the same network. If you use an HMI that has its clock values available, you can periodically send the hours/minutes/seconds value to the PLC just as you would if you entered a value for a process variable (SP, alarm points, etc.) We decided on 2 AM every morning to send this data to all PLCs on the network.

Separately, another PC (the one that was visible from the corporate Intranet) set its time to an Internet time standard and acted as a time source for the PCs connected to it. This is not ultra-accurate but will keep everything within a second or two.

A free application I like is "Dimension 4" from http://www.thinkingman.com. It allows you to set an interval between synchronizations, graphs a history of how much correction is made each time, choose from a number of time sources, etc.

With the information you already have from other posts, you should be able to get something up and working.

Regards,
Russ
 
Top