You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old November 13th, 2017, 02:05 AM   #1
mahone
Member
Singapore

mahone is offline
 
Join Date: Apr 2014
Location: Singapore
Posts: 62
Ping Command in CompactLogix/ControlLogix PLC

hi all,

how to implement Ping command in CompactLogix PLC so that i can
check the com link between the plc and a computer it's connected to?

thanks
  Reply With Quote
Old November 13th, 2017, 05:49 AM   #2
willxfmr
Lifetime Supporting Member
United States

willxfmr is offline
 
willxfmr's Avatar
 
Join Date: Nov 2013
Location: Wisconsin
Posts: 460
I may well be mistaken, but I believe the ping command will have to come from the PC to the PLC, not the other way around.

Bubba.
__________________
“Now will come the nay-sayers with all the reasons why you shouldn't do this. Some of them are teachers, and some of us are doers. Besides, you have got to let the smoke out of this equipment every now and then, or it starts to clog up the chimney.”
~Lancie1
  Reply With Quote
Old November 13th, 2017, 08:30 AM   #3
jstolaruk
Lifetime Supporting Member
United States

jstolaruk is offline
 
Join Date: Dec 2004
Location: Detroit, SE Michigan
Posts: 3,796
Look into the many options available in the GSV command, you may find something.
__________________
I don't always test my code but when I do, I do it in production.
  Reply With Quote
Old November 13th, 2017, 09:42 AM   #4
mk42
Lifetime Supporting Member
United States

mk42 is offline
 
Join Date: Jun 2013
Location: MI
Posts: 2,900
I'm not aware of any PLC that has a Ping command native.

My understanding is that you can send TCP or UDP packets with the MSG command. These allow you to implement most protocols, but you would pretty much need to be able to send raw Ethernet (layer 2) packets to be able to do Ping or other ICMP commands.
  Reply With Quote
Old November 13th, 2017, 11:33 AM   #5
harryting
Lifetime Supporting Member
United States

harryting is offline
 
harryting's Avatar
 
Join Date: May 2002
Location: Puget Sound
Posts: 2,530
Most PLC doesn't do ping. What you can do is a watchdog or heartbeat.

Depending on where you want the alarm to be fired off you would have the other side send a changing sequence and check for for that variation. If it stops, fire off the alarm.
  Reply With Quote
Old November 13th, 2017, 11:43 AM   #6
Ken Roach
Lifetime Supporting Member + Moderator
United States

Ken Roach is offline
 
Ken Roach's Avatar
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 16,856
You almost certainly don't want a PING command. PING doesn't tell you anything about the status or type of device on the network.

You probably want a watchdog function. I usually do this by having the HMI computer write the /Seconds value from the PC clock to the PLC. As long as the tag it is writing to is changing, I know that the PC is connected and that the HMI program is executing.

Another method I have used with PanelView and computers running RSLinx is to send a MSG instruction with the CIP object to read part of the Identity Object. When you get a reply to such a message, you know that the computer is connected and that RSLinx is running.
  Reply With Quote
Old July 19th, 2020, 02:41 AM   #7
GeneralJim
Member
United Kingdom

GeneralJim is offline
 
Join Date: Jul 2020
Location: UK
Posts: 2
Quote:
Originally Posted by Ken Roach View Post
You almost certainly don't want a PING command. PING doesn't tell you anything about the status or type of device on the network.

You probably want a watchdog function. I usually do this by having the HMI computer write the /Seconds value from the PC clock to the PLC. As long as the tag it is writing to is changing, I know that the PC is connected and that the HMI program is executing.

Another method I have used with PanelView and computers running RSLinx is to send a MSG instruction with the CIP object to read part of the Identity Object. When you get a reply to such a message, you know that the computer is connected and that RSLinx is running.
I want to check if FTLinx is running on a PC. @Ken Is this possible using the method mentioned. If so, can you give some more details on reading the identity object please?
  Reply With Quote
Old July 19th, 2020, 03:07 AM   #8
Dayvieboy
Lifetime Supporting Member
United States

Dayvieboy is offline
 
Dayvieboy's Avatar
 
Join Date: Jun 2013
Location: San Francisco Bay Area
Posts: 114
We build watch dog heart beats into most of our SCADA systems.
Every 250 ms we increment a tag in the PLC from the SCADA system.
.
This gives you dynamic live data about the system connection, unlike a ping that is only a low level check.
.
We do this in:
Wonderware, Ignition, Citect, RsView, Win CC, LabView
  Reply With Quote
Old July 19th, 2020, 03:07 AM   #9
Dayvieboy
Lifetime Supporting Member
United States

Dayvieboy is offline
 
Dayvieboy's Avatar
 
Join Date: Jun 2013
Location: San Francisco Bay Area
Posts: 114
We build watch dog heart beats into most of our SCADA systems.
Every 250 ms we increment a tag in the PLC from the SCADA system.
.
This gives you dynamic live data about the system connection, unlike a ping that is only a low level check.
.
We do this in:
Wonderware, Ignition, Citect, RsView, Win CC, LabView
  Reply With Quote
Old July 19th, 2020, 12:32 PM   #10
mike_dr
Member
Yemen

mike_dr is offline
 
Join Date: Oct 2011
Location: Mla
Posts: 215
you need to check in the pc with ftlinx. its impossible to do it in plc
  Reply With Quote
Old July 19th, 2020, 12:48 PM   #11
cardosocea
Member
United Kingdom

cardosocea is offline
 
Join Date: Nov 2016
Location: Fields of corn
Posts: 2,259
Quote:
Originally Posted by GeneralJim View Post
I want to check if FTLinx is running on a PC.
Ping will merely tell you that the IP address you pinged is connected to the network. It may even be another PLC, IO, HMI, Server, you name it... but it won't be Linx.
  Reply With Quote
Old July 19th, 2020, 01:19 PM   #12
GeneralJim
Member
United Kingdom

GeneralJim is offline
 
Join Date: Jul 2020
Location: UK
Posts: 2
Quote:
Originally Posted by cardosocea View Post
Ping will merely tell you that the IP address you pinged is connected to the network. It may even be another PLC, IO, HMI, Server, you name it... but it won't be Linx.
I am aware of this. The only reason I replied in this thread was because I wanted more information on Ken’s post regarding the identity object.
  Reply With Quote
Old July 20th, 2020, 01:12 PM   #13
mad4x4
Member
United Kingdom

mad4x4 is offline
 
mad4x4's Avatar
 
Join Date: Mar 2009
Location: ST CYrus
Posts: 288
You should be able to read a packet of data and write a packet of data to and from the device using GSV commands but not the simplest and may take a bit of time with wire shark, best way is to re/write a Tag to/from Scada and verify as a watchdog.

Mmaybe a better question to ask is why do you need to know the machine is alive or dead? Does the PLC need to know the PC is present?
  Reply With Quote
Old January 19th, 2023, 10:55 PM   #14
Dayvieboy
Lifetime Supporting Member
United States

Dayvieboy is offline
 
Dayvieboy's Avatar
 
Join Date: Jun 2013
Location: San Francisco Bay Area
Posts: 114
Mmaybe a better question to ask is why do you need to know the machine is alive or dead? Does the PLC need to know the PC is present?[/QUOTE]

Sometimes the PC collects data from other sources the PLC uses for interlocks, if the PC stops communicating we shut down some devices.
  Reply With Quote
Old January 20th, 2023, 02:42 PM   #15
TheWaterboy
Lifetime Supporting Member + Moderator
United States

TheWaterboy is offline
 
TheWaterboy's Avatar
 
Join Date: May 2006
Location: State of Denial
Posts: 1,538
I would imagine it might be possible to construct one with open sockets wouldn't it? Not that I would know how, but I thought Open Sockets opened all possibilities...
__________________
. . .Nostalgia used to be so much better . . .
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Can I periodically ping a PC then view in PLC? g20kid LIVE PLC Questions And Answers 17 June 20th, 2017 02:54 AM
PLC Update - Back Issues Collection Now Available! Phil Melore LIVE PLC Questions And Answers 11 October 22nd, 2015 04:17 AM
Siemens PLC won't auto-run after power-up Lamboom LIVE PLC Questions And Answers 5 August 19th, 2014 06:32 PM
VMware-can ping but rslinx cannot detect the PLC Nigasai LIVE PLC Questions And Answers 20 June 29th, 2012 01:50 PM
PC to PLC Protocol TheRixta LIVE PLC Questions And Answers 13 December 17th, 2008 02:56 PM


All times are GMT -4. The time now is 01:51 AM.


.