日志搜索
用户登录
数据载入中,请稍等...
用户公告
数据载入中,请稍等...
时间记忆
数据载入中,请稍等...
最新日志
数据载入中,请稍等...
最新回复
数据载入中,请稍等...
最新留言
数据载入中,请稍等...
统计信息
数据载入中,请稍等...
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
  • Download the attached file "ClockAlarm.zip" to your PC and unzip it.
  • In the "Libraries" pane > "Global libraries" click the "Open global library" button.
  • Browse the "File manager" window, select the "ClockAlarm.al10" file and click the "OK" button.


Fig. 01

2 Add the "ClockAlarm" instruction to your program
  • Browse the "Libraries" pane > "Global Libraries > ClockAlarm" for the "ClockAlarm" instruction .
  • Drag and Drop the "ClockAlarm" instruction into a network of your program.


Fig. 02

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.
  • Enable  the inputs "Enable hour", "Enable minute"  and "Local time" (set these contacts to "1").
  • Set the "Hour" input to "16" and the "Minute" input to "30".
  • Disable all other inputs (set these contacts to "0").
  • Connect the "OUT" output to a "Bool" data type tag of your choice (for example M2.0 "WakeUp").
  • Connect the "Out_of_Range" output to a "Bool" data type tag of your choice (for example M2.1 "OutOfRange").

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
  • 标签:S7-1200 
  • 发表评论:
    数据载入中,请稍等...
    Copyright © 超音速工作室                                 生活因感动而精彩,理想在创造中放飞
    Powered by Oblog.