S7 - Ping

pethoek

Member
Join Date
Apr 2009
Location
Järbo
Posts
105
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.
 
AG_CNTEX is only possible with CP343-1.

Unfortunately I have never heard about something similar to "ping" for a CPU with integrated PN port.

Maybe you can try FB65 TCON. It will fail to connect of course, but possibly the status code will be different for when it can reach "something" or nothing at all.
 
Tried your suggestion Jesper and it works just fine. Using TCON gives status x7002 while trying to connect and changes to x7000 when connected.

Made a FB which tries to connect for 15 sec. then disconnects for 5 secs. (i need to disconnect in order to discover future broken link's on next connection attempt).

Thank you.
 
I think i have posted a question about that in this forum before. because my experience is that the connection attempt never timed out. I waited a long, long, long time and the status was 0x7002 all time. So when Req input goes low, the status changes back to 0x7000.

That is why i make a 15 sec connection attempt and then 5 sec disconnect. This works fine.
 

Similar Topics

Hi, I am new to ladder logic. I have completed a code in the Xinje PLC XC3-32RT-E for one of the machines I am developing. Currently the program...
Replies
30
Views
944
Hey guys, the scenario is: I have already completed the drawing package for my system utilizing an A-B 440R-N23126 (Minotaur) safety relay. SoS...
Replies
0
Views
128
Hi all, New here and new all round to PLC`s. We have a servo drive that runs a cross travel beam backwards and forwards. I am having trouble with...
Replies
3
Views
188
Hi , Looking for some help. We have a 343-1 PN Lean Card & 315-2DP connected to an external system collecting data. After a recent shutdown...
Replies
0
Views
60
Hi everyone, Kind of new at this, so we recently upgraded our 1769-l32e to the newer 5069-L320erm, i converted the file over and Verify the...
Replies
8
Views
391
Back
Top Bottom