 |
plc.myforum.ro PLCs users www.plc.myforum.ro!
|
| View previous topic :: View next topic |
| Author |
Message |
szimano Junior

Joined: 28 Jul 2022 Posts: 3
|
Posted: 28/07/2022 22:24 Post subject: Synchro time M340 |
|
|
Hello,
I would like to ask how to synchronize the time in a PLC M340 P342020, when connecting the controller with a modem supporting NTP.
Whether to use any function blocks. I found a hint that I can handle it with the WRTC_DT function, but I don't know how to apply it.
I have an additional question about time synchronization with the use of the NOC0401 module, in which NTP time servers are declared. How to get information about this time from this module. |
|
| Back to top |
|
 |
huonutra Junior

Joined: 04 Jul 2022 Posts: 1
|
Posted: 29/07/2022 09:41 Post subject: Re: Synchro time M340 |
|
|
| szimano wrote: | Hello,
I would like to ask how to synchronize the time in a PLC M340 P342020, when connecting the controller with a modem supporting NTP.
Whether to use any function blocks. I found a hint that I can handle it with the WRTC_DT function, but I don't know how to apply it.
I have an additional question about time synchronization with the use of the NOC0401 module, in which NTP time servers are declared. How to get information about this time from this module. |
Is this useful for you?
https://www.se.com/ww/en/faqs/FA346090/
How to sync the M340 CPU time without NTP sever
Question:
How to sync the M340 CPU time without NTP sever?
Answer:
Without NTP sever, we need at least one time source(PC, HMI or SCADA) from which we could sync the time.
Manually, we could connect the PC with PLC via Unity Pro and implement the time sync via update PC->PLC.
Automaticly, first of all we need to setup communication to fetch the local time from HMI/SCADA, then there are two ways to implement the CPU time sync.
Way1: store the time to %SW50 ~ %SW53 and sync the CPU time via %S50
Way2: sync the CPU time via WRTC_DT EFB.
https://www.se.com/ww/en/faqs/FA194440/
How can I synchronize the clock between a M340 PLC and a Magelis HMI? Program must read the real time clock from the PLC and automatically set the clock on the Magelis Panel.
Issue
Syncing Magelis TOD Clock from M340 PLC.
Product Line
Magelis
Modicon M340
Resolution
In the Vijeo Designer Project:
1. In the IO Manager section of your Vijeo Designer project, select the Modbus EQUIPMENT that you wish to sync your time from.
2. You will see the Dialog table in the Property Inspector. Select the elipse to open the Dialog Table Settings window.
3. You will need to check the box in the top left corner to enable the dialog table.
4. Then input a memory word address into the Start Address field. The memory word address should be the address in Unity processor that is not used in logic.
5. Select the Add button.
6. Scroll to the 33rd function called Set terminal clock. Keep in mind that the Set PLC clock takes up 4 words.
7. Change the Time compus for the Terminal to BCD.
8. Then select OK
In the example below, I am inputting %MW100 which means it will allocate %MW100-103.
In the Unity Pro Project:
1. Lucrate a variable, name it what you like, and select "DT" as the Type.
2. Use the same address that you called out in Vijeo Designer.
3. Create or add to a FBD section. Place a block called "RRTC_DT"
4. Connect the variable that you created to the out pin.
Build and download both projects and you will find that the time on the Magelis now reflects the time on the M340.
https://www.proface.com/support/index?page=content&country=ID&lang=en&locale=in_ID&id=FA194440&prd=
https://rexel-cdn.com/Products/F06EB6D6-A7F5-412F-8C86-42670DD04A26/F06EB6D6-A7F5-412F-8C86-42670DD04A26.pdf |
|
| Back to top |
|
 |
szimano Junior

Joined: 28 Jul 2022 Posts: 3
|
Posted: 29/07/2022 13:00 Post subject: |
|
|
| It does not run time sync with the HMI. I have already made this step and I have the same PCU and HMI time. I mean getting the time from the modem that NTP issues. i think about R_NTPC block if it will help me in PCU P342020 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group Fa-ti si tu propriul forum GRATUIT, pe www.myforum.ro
|