5/11/2019 2:43 PM | |
Joined: 9/27/2006 Last visit: 4/24/2024 Posts: 12257 Rating: (2665)
|
Hello Ajay; First, you need to complete your byte coding so you can add Microseconds and Day of the week fields so that you can convert them to a Date_and_time variable. How can you read out the date and time with SFC1 (READ_CLK) and set them with SFC0 (SET_CLK)? https://support.industry.siemens.com/cs/us/en/view/21222026 Once the format of your byte fields is corrected (look out for the Microseconds byte format, it occupies one full byte + the MDBs of the next byte, Day of the Week; one easy way to do so is t=o force the value of the Microseconds byte to b#w#0), all you need to do is create a Date_and_Time variable in one of your DBs and Move all those bytes to this variable. You will then be able to read the Date_and_Time data as a single construct. Hope this helps, Daniel Chartier |
This contribution was helpful to2 thankful Users |
5/11/2019 3:27 PM | |
Joined: 2/22/2008 Last visit: 2/22/2024 Posts: 2698 Rating: (206) |
Now i have found the structure also for date and time, but don't forget to convert your bytes first in BCD format. You will find the system manual here Regards, Scorp |
Last edited by: Jen_Moderator at: 05/13/2019 11:59:07Optimized link. |
|
Follow us on