You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old May 31st, 2003, 10:26 AM   #1
notfish
Member
China

notfish is offline
 
Join Date: Apr 2003
Posts: 15
Question how to get the current date and time from s7 300 cpu?

should i use a sfc or something else?can anyone tell i the detail?thx!
  Reply With Quote
Old May 31st, 2003, 11:02 AM   #2
rsdoran
Lifetime Supporting Member
United States

rsdoran is offline
 
rsdoran's Avatar
 
Join Date: Apr 2002
Location: Birmingham, AL
Posts: 7,372
SFC1 READ_CLK

http://www4.ad.siemens.de/dnl/zk4NTg...4/Proent_e.pdf
Chapter 8 should help
__________________
http://www.patchn.com Industrial Electrical & Maintenance @ www.patchn.com "Tell me and I forget, show me and I remember, involve me and I understand."

Last edited by rsdoran; May 31st, 2003 at 11:05 AM.
  Reply With Quote
Old May 31st, 2003, 11:21 AM   #3
notfish
Member
China

notfish is offline
 
Join Date: Apr 2003
Posts: 15
what if i only need the Date?call a sfc to seperate date_and_time or there is some other way
  Reply With Quote
Old May 31st, 2003, 02:17 PM   #4
moggie
Lifetime Supporting Member
England

moggie is offline
 
moggie's Avatar
 
Join Date: Apr 2002
Location: Devon, England.
Posts: 558
Use SFC1 (FC_read_clk) to obtain Date and Time and "send" to a "date/time parameter.

The date & time parameter is 8 bytes long and has the following format:-

0 Year 1990 to 2089
1 Month 01 to 12
2 Day 1 to 31
3 Hour 0 to 23
4 Minute 0 to 59
5 Second 0 to 59
6 2 MSD of ms 00 to 99
7 (4 MSB) LSD of ms 0 to 9
7 (4 LSB) Day of week 1 to 7 (1 = Sunday)

use these bytes within your program.



Best of luck
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
How to use the 'Set Date & Time' function in SLC? ckchew666 LIVE PLC Questions And Answers 9 November 23rd, 2004 06:43 AM
S7 PLC trying to format date time to ASCII mspath LIVE PLC Questions And Answers 2 March 16th, 2004 02:14 PM
S7 date and time guest LIVE PLC Questions And Answers 8 March 12th, 2004 05:59 AM
Date & Time question (TD17) Combo LIVE PLC Questions And Answers 11 December 4th, 2003 04:01 AM
S7 Time comparison PLCdave LIVE PLC Questions And Answers 6 June 25th, 2003 06:25 AM


All times are GMT -5. The time now is 12:30 AM.


.