2/19/2016 8:57 PM | |
Joined: 9/8/2009 Last visit: 7/17/2023 Posts: 1410 Rating:
|
HI. I found this code https://support.industry.siemens.com/cs/ww/en/view/69864408 in STL using area pointer and mailbox,...to sysnchronize PLC (slave) RTC with HMI (master) clock - example 03 in above link. In the attachement you'll find the FB doing sync. I will write another answer for SCL code. AttachmentFB110_TimeSyn_HMI_To_PLC.pdf (266 Downloads) |
Last edited by: Marko Bursic at: 2/19/2016 9:26:17 PM |
|
2/19/2016 9:07 PM | |
Joined: 9/8/2009 Last visit: 7/17/2023 Posts: 1410 Rating:
|
OK, this is my block trtansformed in SCL (not tested yet!). Apart from mostly copying bytes to other location does nothing, also if for example SetTime bit is set during the sequence it will work with unpredictable result, because there is no latching or blocking call while still in execution?? But this can be solved, rather I still don't understand why we ned this job mailbox and what the commmand 40 does exactly. If the time from panel is received, it could be simply compared with PLC time and if they differ a lot do the update, why this mailbox is needed anyway? Perhaps I will rearange the SCL source to make it more stable and less code and post a new source, but this shall work the same as the code provided by Siemens in STL.
AttachmentBlock_1.pdf (230 Downloads) |
Follow us on