Help with the real clock of S7-200 PLC Siemens

johnpapa22

Member
Join Date
Aug 2007
Location
XANTHI
Posts
1
Hello to everyone!!! I have a problem in programming a plc. The plc i use is the siemens S7-200 CPU221. The problem is that i don't know how to read from its real clock the time and have an output at 6:00AM every day. I also want the output to be on until 6:03am. Does anyone kwow how to do this? I use the microwin 4 for the programming.
I would be very grateful if someone would give me a ready example.
 
You will need to use the READ_RTC to read out the time and use SET_RTC to set the clock.

When you read out the clock it will store the date and time as follows;
Byte Description
0 year (0-99) current year (BCD value)
1 month (1-12) current month (BCD value)
2 day (1-31) current day (BCD value)
3 hour (0-23) current hour (BCD value)
4 minute (0-59) current minute (BCD value)
5 second (0-59) current second (BCD value)
6 00 reserved – always set to 00
7 day of week (1-7) current day of the week, 1=Sunday (BCD value)
 
Last edited:
Don't forget to actually add the real time clock (i'm sure it's optional on the S7221 & S7222 cpu's)...
 

Similar Topics

can anyone help me about how to use Real-Time Clock to run pump at certain time everyday
Replies
5
Views
4,215
I am needing to convert the low DWORD of a timestamp into a LREAL. The DWORD is a 32bit unsigned number. In TwinCat2, I keep getting a negative...
Replies
3
Views
1,701
Hi. I have been trying the Trafficsignal program, with sequence and wait and all. I kind of get that, but what I want to make is: A sensor for...
Replies
4
Views
1,999
Hello everyone. I have little to no experience working with PLC's. I have only done a little work on OLD A/B SLC 150's using PCIS. (yes, they...
Replies
30
Views
8,264
Hi, can anyone show me how to convert from a Real to an DInt in Step7? I have a md400 (real) with valor max. 150000.0 and i need convert to DINT...
Replies
16
Views
7,317
Back
Top Bottom