Set OCS Time/Date in Advanced Ladder

See also: Time and Date in Advanced Ladder

See also: Project Toolbox for Advanced Ladder

 

Topic Menu

Set OCS Time & Date Overview

This function allows the real time clock in the controller to be set from the ladder program. This allows the clock on several devices to be synchronized over the network, or allow the time to be adjusted based on a algorithm in ladder.

The input to this function is six consecutive WORDClosed Word - [Data Type WORD] - A string of 16 consecutive bits. WORD values are used where the value of the data is not as important as the bit patterns (shifts and rotates). registers.

The register should be in the following format:

  • Register 1 - New Seconds

  • Register 2 - New Minutes

  • Register 3 - New Hours(24 hour format)

  • Register 4 - New Date

  • Register 5 - New Month (1 = January)

  • Register 6 - New Year (4 digit format)

This function passes power if the supplied new time and date are valid. An example of invalid time would be hour = 50 or month = 100.

The day of the week is automatically calculated and updated in the real time clock (%SR50).

Double click on the function block to open the Scheduler.

 

Return to the Top: Set OCS Time/Date in Advanced Ladder

 

Set Clock with System Register in Advanced Ladder

SR44 Real Time Clock Seconds: Min: 0 Max: 59

SR45 Real Time Clock Minutes: Min: 0 Max: 59

SR46 Real Time Clock Hours: Min: 0 Max: 23

SR47 Real Time Clock Day of the Month: Min: 1 Max: 31

SR48 Real Time Clock Month: 1 = January ... 12 = December - Min: 1 Max: 12

SR49 Real Time Clock Year: Min: 1996 Max: 2095

SR50 Real Time Clock Day of the Week: 1 = Sunday ... 7 = Saturday - Min: 1 Max: 7

 

Double click on the function block to open the Scheduler.

 

Return to the Top: Set OCS Time/Date in Advanced Ladder