Sign in to follow this  
Followers 0
Mcufer

Ping from PLC

10 posts in this topic

Hello all,

I would like to ping a network device from the PLC (NJ-101) - just to see if it is powered ON. So far I was unable to find a command or FB for this purpose.

Thank you in advance for any suggestions,

 

Matej

Share this post


Link to post
Share on other sites

Hi

I think that you can use the system variable _EIP_EstbTargetSta[Node] to check if the connection is OK

 

 

_EIP.JPG

Share this post


Link to post
Share on other sites

I think this is not what I'm looking for. I would like to check if a device is powered ON and responding to ping - before I try to establish a TCP Socket connection (I'm using Modbus TCP). basicly I would like to ping the IP, before doing any other communications.

Edited by Mcufer

Share this post


Link to post
Share on other sites

Hi

If is not powered On, this bit should be FALSE

Share this post


Link to post
Share on other sites

OK, thank you I will try it and report back.

Share this post


Link to post
Share on other sites

This variable is for checking Ethernet/IP connection status only. I am not using Ethernet/IP protocol. My goal is to see if a device is responding to ping, before making any other communication attempts. Any other ideas?

Share this post


Link to post
Share on other sites

Are you using the MTCP Function block library from MyOmron.com?  If so, when you go to connect using the MTCP_Client_Connect FB, you will get an error if the device is not there.... Even if you are not using this library, you will get an error when you try to make the connection.

 

Share this post


Link to post
Share on other sites

Yes, I am using the MTCP Function block you mentioned. I would like to prevent connection attempts when device is not powered ON, that's why I'm trying to find a method how to check if the device is ready to accept connection - something that would work like ping command.

Share this post


Link to post
Share on other sites

Ok.  The point of the connect is to see if the device is out there and establish the link.  There are no "ping" functions.

Share this post


Link to post
Share on other sites
16 minutes ago, Michael Walsh said:

There are no "ping" functions.

And to add not all devices support/reply to "ping" request.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0