gezer77 ' Alıntı:
arkadaslar yeniden selamlar.bana s7-200 de gercek zaman saatı ile bir motor kontrol edebılmek ıcın program ornegi gerekli.tesekkurler
biraz geç olmuş ama , hala arıyorsan sana bir örnek How to Read and Write to the Real-Time Clock of the S7-200 (Tip 08)
Category: Integrated Functions
Special Hardware Requirements: None
Project Example
Print this Tip
This program example deals with two special operations for the real-time clock: reading and writing the date and time of day. For these operations, the program needs an 8-byte buffer with the following structure:
Byte 0: Year (00 - 99) Byte 4: Minute (00 - 59)
Byte 1: Month (1 - 12) Byte 5: Second (00 - 59)
Byte 2: Day (1 - 31) Byte 6: Not assigned
Byte 3: Hour (00 - 23) Byte 7: Day of week (1-7 = Su-Sa)
The data is stored in binary-coded decimal (BCD) format (for reading or writing). When you operate the switch at input I0.0, the preset date is written to the real-time clock. The switch at input I0.0 displays the current second value, which is copied to output byte QB0. Use the switch at input I0.1 to select BCD format (I0.1 = 1) or binary format (I0.1 = 0).
The time-of-day clock in the S7-200 uses only the least significant two digits for the year, so for the year 2000, the year will be represented as 00. The S7-200 does not use the year information in any way and will not be affected by the century rollover (year 2000).
Program Flowchart:
Copyright 2002 Siemens Energy & Automation