Skip to main content
17-Peridot
May 8, 2023
Solved

PLC to kepware connectivity

  • May 8, 2023
  • 2 replies
  • 4928 views

Hello,

 

I am quite new to using Kepware so sorry if there is a super obvious answer to this question.

 

What are some ways a PLC can know that it has lost connection to Kepware?

 

In one of my projects we created a handshake between Thingworx and the PLC to ensure that the PLC would know that the data had been saved on the Thingworx side.

I also read about some OPC UA status codes that should be sent if the connection is lost.

Is this what should be used?

 

I have tried to find some information about this on google but haven't really had much luck, so any help would be highly appreciated.

 

Thanks,

Jens

Best answer by cmorehead

@jensc 

 

There is a device level system tag called "_Error" which can be used to detect when a device has become disconnected. Here is a link to the page in the KEPServerEX manual that covers the system tag use:

 

https://www.kepware.com/getattachment/e1943820-ef3c-4932-b055-4ef2a80ab863/kepserverex-manual.pdf#page=128

 

Thanks,

*Chris

2 replies

22-Sapphire I
May 18, 2023

Not the great expert here, but Kepware will basically fail to retrieve data from the PLC and that is what you could use to detect disconnect from the data source, then if Kepware is disconnected from Thingworx, that is also detected.

jensc17-PeridotAuthor
17-Peridot
May 19, 2023

Hello @PaiChung,

 

Yeah, it seems like the easiest thing is to check the status of the properties, if they are good or not. Or if the PLC needs to know that the data has been saved, do a handshake.

 

As it is Kepware that is reading from the PLC, I suppose it would be close to impossible for the PLC to be able to know if Kepware can read the values or not...

 

Thanks for the clarification!

 

Regards,

Jens

cmorehead13-AquamarineAnswer
13-Aquamarine
May 19, 2023

@jensc 

 

There is a device level system tag called "_Error" which can be used to detect when a device has become disconnected. Here is a link to the page in the KEPServerEX manual that covers the system tag use:

 

https://www.kepware.com/getattachment/e1943820-ef3c-4932-b055-4ef2a80ab863/kepserverex-manual.pdf#page=128

 

Thanks,

*Chris

12-Amethyst
May 19, 2023

I use those _ERROR tags and can verify they work very effectively.