We use a device for synchronize the rtc within the IM151-8 PN/DP (ET200S). In the HW-Config for the PN-IO i-face under the tab "Time-of-Day Synchronization" you can enter the IP-address of the NTP Server you want the PLC to synhronize the rtc againts.
What i'm looking for is an easy way to tell (in my program) that the PLC can reach the NTP Server. I would like to alarm the user when the NTP Server can't be reached by means of the network.
There are many ways of doing this i'm sure. One way i can think of is using open tcp communication and poll some info from the NTP. Another would be using ICMP and yet another would perhaps to extract some diagnostic info from the PLC regarding the success sunchronizing the rtc against the ntp-server.
Using open tcp is something i can manage and use to solve the problem but i'm sure there is a more easier way. I have read about the block AG_CNTEX with which pinging is possible. However that block can't as far as i understand be used with the IM151-8 since there is a LADDR input. The IM151-8 has a built in PN-IO and i don't know what the LADDR value should be.
So anyone sitting with the solution to this? Please help me out.
What i'm looking for is an easy way to tell (in my program) that the PLC can reach the NTP Server. I would like to alarm the user when the NTP Server can't be reached by means of the network.
There are many ways of doing this i'm sure. One way i can think of is using open tcp communication and poll some info from the NTP. Another would be using ICMP and yet another would perhaps to extract some diagnostic info from the PLC regarding the success sunchronizing the rtc against the ntp-server.
Using open tcp is something i can manage and use to solve the problem but i'm sure there is a more easier way. I have read about the block AG_CNTEX with which pinging is possible. However that block can't as far as i understand be used with the IM151-8 since there is a LADDR input. The IM151-8 has a built in PN-IO and i don't know what the LADDR value should be.
So anyone sitting with the solution to this? Please help me out.