1/15/2009 11:06 AM | |
Posts: 5 Rating:
|
Dear Experts, does enybody idea how to get "week number" in PLC? I know that are many different systems how to define first week of the year, but in Europe is typical used: (the week with the year's first Thursday in it (the ISO 8601 definition)). http://en.wikipedia.org/wiki/ISO_week_date I need to print this number on customers product. best regards Stanislav Novotný |
1/15/2009 12:01 PM | |
Joined: 3/21/2006 Last visit: 9/10/2024 Posts: 10228 Rating:
|
Hello Stanislav, Look at this FAQ How can you read out the date and time with SFC1 (READ_CLK) In this way you can print exactly the date. For Nr. of week for example you must prepare coparing procedure and trace the date and when reach each Thursday to increase Nr. of week. Hope this help! regards |
1/15/2009 3:13 PM | |
Joined: 9/23/2005 Last visit: 9/11/2024 Posts: 4347 Rating:
|
Hi, sometime ago, I wrote a FAQ suggestion about the week of year. It was approved but not yet published. Here stay the preliminary version. You can adapt it for your necessity. Attachmentweek.zip (1257 Downloads) |
Last edited by: Pegaia at: 1/15/2009 3:14 PMLast edited by: Pegaia at: 1/15/2009 3:14 PMDenilson Pegaia |
|
This contribution was helpful to
2 thankful Users |
1/15/2009 10:29 PM | |
Joined: 7/16/2006 Last visit: 1/2/2024 Posts: 1502 Rating:
|
Do you have test the free library www.oscat.de Many Information for Date and time are in the Library. With Source-Code in SCL. A Code fore the "Week" is in the LIbrary to. It give an Library for Step7 and CoDeSys. |
Karl |
|
This contribution was helpful to
1 thankful Users |
1/16/2009 11:27 AM | |
Posts: 5 Rating:
|
Hi all, thaks for all replies, especially to Denilson Pegaia and Karl Gebhardt for help Regards Stanislav Novotný |
Follow us on