Jump to content

Some ping doesn't seem right


Recommended Posts

For the first time today thought I might check out the PING FB.

For some reason, the PING is only successful "every other time" I enable the PING block.

I am enabling it with a one-shot.

I noticed in the help file PING is shown directly connected to the rail with no conditional logic.

I am using this wrong?

Is their any obvious reason why the FB would alternate the successful condition?

D

Link to comment
Share on other sites

Hi Damian,

If you ping from command line to this device - Do you get constant reply?

Anyway the condition to ping should be on as long you wish to keep pinging.

Hi Ofir,

PINGING from the PC works every time.

I did play around with this a little more yesterday. I have found that you cannot one-shot the PING block.

Some of the operands that it writes to act a bit strange.

I have found that if I reset the "busy", "success", "tx to rx diff", and the "error code" prior to re-enabling the PING block but on the same scan that the block will get stuck in the "busy condition". This is similar to what happens also if you one shot it. It gets stuck with the BUSY on.

I am of course resetting the above values so that I know for certain that any non-zero values after that are "new" and not just left over from last time.

Actually I am setting the "error code" to -1 since it was unfortunately chosen to mean "no error" as opposed to 0 meaning "no error"

So since I can't one-shot the block, I need to know when it is finished. It seems like I have to check for two separate conditions. When the Busy bit goes back OFF, It looks as though I have to check for both the SUCCESS bit as well as compare the Error code to see if it becomes something other than -1.

Am I taking the wrong approach here with this? From an intuitive standpoint, it seems like we should just be able to one-shot the block, get a bit back that says it is DONE, and also a bit back that says whether or not it was SUCCESSFUL.

Thanks,

D

Link to comment
Share on other sites

Hi Damian,

As I mentioned the Ping Utility should be activated with direct contact and not using one shot.

The activation of the module depends on the user request- for example:

* One can keep pinging all the time to a server for checking networking.

* One just want to ping one time for checking devices are online in the network.

You can use the success bit for resetting the condition to ping.

Link to comment
Share on other sites

Hi Damian,

As I mentioned the Ping Utility should be activated with direct contact and not using one shot.

The activation of the module depends on the user request- for example:

* One can keep pinging all the time to a server for checking networking.

* One just want to ping one time for checking devices are online in the network.

You can use the success bit for resetting the condition to ping.

Hi Ofir,

Using the SUCCESS bit for resetting the condition to ping only works if it was SUCCESSFUL. If it were SUCCESSFUL, I usually would not have a reason to reset and PING again anyway.

It would have been more preferrable for the PING block to have had a "# of retries" similar to how it works from a DOS window.

Thanks,

D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...