数据载入中,请稍等...
日志搜索
用户登录
数据载入中,请稍等...
用户公告
数据载入中,请稍等...
时间记忆
数据载入中,请稍等...
最新日志
数据载入中,请稍等...
最新回复
数据载入中,请稍等...
最新留言
数据载入中,请稍等...
统计信息
数据载入中,请稍等...
schedule a program event with the S7-1200
Description
You can schedule a program event with the S7-1200 PLC by the use of the attached "ClockAlarm" instruction.
With the "ClockAlarm" instruction, it is possible to schedule events once, or by the year, month, day, hour, minute or second.
The "ClockAlarm" instruction checks the system time against the configured parameters.
Scheduling a daily event with the "ClockAlarm" instruction
| No. | Scheduling a daily event with the "ClockAlarm" instruction |
| 1 | Add the "ClockAlarm" global library
|
| 2 | Add the "ClockAlarm" instruction to your program
|
| 3 | Configure the "ClockAlarm" instruction for a daily event at 4.30 p.m. local time Please find detailed information on all contacts in the table "ClockAlarm parameters" below.
The digital output is set every day at 4.30 p.m. local time. See Figure 02 for details. |
"ClockAlarm" parameters
Please find detailed information on all contacts of the "ClockAlarm" instruction in the following table.
| Contact | Parameter | Data type | Value / Description |
| Input | Year | UInt | 1970..2554 |
| Input | Enable Year | Bool | "1" = Enable year evaluation, "0" = Disabled (not monitored) |
| Input | Month | UInt | 1...12 |
| Input | Enable Month | Bool | 1" = Enable month evaluation, "0" = Disabled (not monitored) |
| Input | Day | USInt | 0...31 |
| Input | Enable Day | Bool | 1" = Enable day evaluation, "0" = Disabled (not monitored) |
| Input | Hour | USInt | 0...23 |
| Input | Enable hour | Bool | 1" = Enable hour evaluation, "0" = Disabled (not monitored) |
| Input | Minute | USInt | 0...59 |
| Input | Enable minute | Bool | 1" = Enable minute evaluation, "0" = Disabled (not monitored) |
| Input | Second | USInt | 0...59 |
| Input | Enable second | Bool | 1" = Enable second evaluation, "0" = Disabled (not monitored) |
| Input | Week | USInt | 1...7; "-1" = Current day of the week, "1" = Sunday |
| Input | Enable week | Bool | 1" = Enable week evaluation, "0" = Disabled (not monitored) |
| Input | Local time | Bool | "1" = Local time evaluation; "0" = system time evaluation |
| Output | Out | Bool | Actual data and time corresponds to the set point |
| Output | Out_of_Range | Bool | At least one invalid input; if "Out_of_Range" = 1, the "ENO" contact is set to false. |
S7-1200_ClockAlarm.zip ( 335 KB )
Requirements
- S7-1200 PLC
- Ethernet cable
- PG / PC
- STEP 7 Basic V10.5


