Making connction over internet between 2 PLCnext. Maing a timer started on a spesific time

Hi I’m making a program on a PLC 1152 that will be my main PLC in the system. This PLC shall “ping” an other PLC 1152 on a preset time every day. I want to use the systemclock. My reason to “ping” the remotePLC is to see if the dataconnection is up.

The second problem is that I have to use “port forwarding” because each PLC is installd behind a router connected ti Internet an a APN. The master PLC has LAN IP 192.168.1.2 and the router connected to the PLC har WAN 100.113.15.135. The reomote PLC has LAN IP 192.168.1.2 and the router connected to the remote PLC has the WAN IP 100.113.15.145 I have full access to all equipment and can open ports if needed. I have already open port 443 because of webHMI on both PLC How can I make a function that send a singal from master on a spesific time to remote and the remote answer the signal? Map of the communication: PLCnext 1152 master 192.168.1.2 ---- Router with gateway LAN192.168.1.1 and WAN 100.113.15.135 ------- Internet via APN -------- Router with 100.113.15.145 (LAN 192.168.1.1) ------ PLCnext 1152 PLC (Remote) 192.168.1.2

Hello pudderjagar,

I would like to recommend you to use the TCP FBs for data exchange and for monitoring the ethernet connection. In the folder Advanced → Functions … → Ethernet there are a number of function blocks. For example, you can check the ETH connection by sending / receiving defined data between controllers, e.g. every 1-5 minutes. I think it’s an elegant way to do this. Please see the following IP_Connect topic: https://www.plcnext-community.net/en/discussions-2-offcanvas/ip-connect-for-xml-data.html
The time synchronization of the controls can be realized via the Internet via the router firewall and an NTP server. Please note, for security reasons, the two controllers should be connected via VPN and they should not be directly accessible via a public IP address. Best Regards Eduard

Hi Eduard I’m not looking for a NTPserver function. I need to start a variable at a spesific time every day (eg. 12:15 am) at my masterPLC.

Hi, Here’s an example of how to trigger an action at 12:15 pm every day, using only IEC-61131 code. This uses a function block from the PLCnext Base library. 2020 04 05 18 07 53 To trigger the event at 12:15 am, you can use 0 (zero) as the hour comparitor. (EDIT: The example above should have used R_TRIG instead of F_TRIG, but you get the idea.) Hope this helps. ~ Martin.