S7-200, Using the real time clock

steviek22

Member
Join Date
Apr 2005
Posts
1
Hi all,

I am currently working on my HNC project, for which I am designing a system for my place of work, which will reverse jet my silo filters on a routine basis via control from a siemens S7-200 block. My problem at the moment is that i do not know how to utilise the real time clock function. I would like to use it to give outputs at specific times on a weekly basis, can anyone give me any pointers please???? Please e-mail me anyone who can help because im pulling my hair out as we speak lol

Many Thanks in advance

Steve K
 
Steve

I have never used the RTC in a 200, but I have in a 300 and 400.

So, I may well be assuming some of the info here..

The real time clock is 8 bytes long. They are

Byte 1 - Year
Byte 2 - Month
Byte 3 - Day
Byte 4 - Hour
Byte 5 - Minute
Byte 6 - Seconds
Byte 7 ( and half of byte 8) - milliseconds
Byte 8 (lower half) - Day of the week 1 = Sunday to 7 = Staurday

In OB1, define 8 bytes in the temp area as the above, then drop the READ_RTC control into network 1, then enter the starting address of the 8 bytes (LB0 maybe?, or #Year) on the T pin.

I cannot try this out as I don't have a 200 available with a real time clock.

In the 300/400 this data is in BCD, so it does need converting to INT to be useful, I don't know if this is the same for the 200's, but I am sure you will find out one way or another

If I am wrong, I am sure someone will point this out to me.

Paul
 
Stevie,


in the Step 7 Microwin software goto "Instructions" and then "Clock".
Here you will see two blocks READ_RTC reads the real time clock and SET_RTC sets the real time clock.
The clock can also be set using your laptop.
If you use READ_RTC in your program you have to specify a start address, for example VB0, the time, date and day of week are then stored in 8bytes starting at VB0.

VB0 Year 00 to 99
VB1 Month 01 to 12
VB2 Date 01 to 31
VB3 Hours 00 to 23
VB4 Minutes 00 to 59
VB5 Seconds 00 to 59
VB6 Reserved 0
VB7 Day of Week 0 to 7 (1 = Sun; 7 = Sa; 0 = Disabled]

Hope this helps. If you require a sample program or more help please feel free to contact me.


Moggie
 

Similar Topics

Hi, Im new to SCL, but decided to start learning it - if only to be able to do some simple jobs such as indirect addressing. got some simple...
Replies
3
Views
6,904
I am working on a project on an s7-1200 with an hmi, but I am looking to remove the HMI and substitute its functionality using the User-Defined...
Replies
2
Views
1,929
Hi All, I have a closed loop stepper motor (Nanotec make), https://en.nanotec.com/products/2512-pd4-e601l42-e-65-4. This uses MODBUS TCP for...
Replies
4
Views
3,904
We had a sharpening machine. It used Siemens S7-200. The touch panel Simatic 6AV6642-0DC01-1AX0 can't be used but still got display. How to...
Replies
7
Views
3,567
Hello everybody. I need to print temperature data every 30 seconds. For this I need to print on a thermal printer that is connected to a CM1241...
Replies
0
Views
1,469
Back
Top Bottom