Skip to main content
4-Participant
October 26, 2023
Solved

Is there a way to know when Kepware reads from a PLC?

  • October 26, 2023
  • 3 replies
  • 2606 views

Hi,

 

I have installed KepwareEx6 (v6.14) with GE Ethernet Suite option on a VM and set it up to read from an Emerson (old GE) PLC that has a CPE330 CPU. On the same VM that Kepware is installed, I have also installed a GE Historian Collector that is set up to collect data from Kepware using OPC DA and send the data to our native GE Historian. This way I can log data from the PLC to our GE Historian every 100 ms.

 

My PLC scan time, however, is between 4 to 5 ms. So, for every sample logged by the Historian I am missing potentially 24 samples from the PLC. If I know when Kepware reads from the PLC then in the PLC I can use that signal as a trigger to find the Minimum, Maximum and Average of the 25 PLC samples of data that correspond to the one sample that Kepware reads every 100 ms and log these statistical values as a separate tag to get a feel about the missing samples. So, this way for each signal of interest from PLC I will have 4 tags:

 

  1. The instantaneous value of the tag every 100 ms,
  2. The minimum of the twenty-five 4 ms samples between each 100 ms sample read by Kepware,
  3. the maximum of the twenty-five 4 ms samples between each 100 ms sample read by Kepware and
  4. the average of the twenty-five 4 ms samples between each 100 ms sample read by Kepware.

 

Best answer by cmorehead

@Behrooz,

 

You could use the KEPServerEX built-in Communication Diagnostics where all read and write operations can be viewed in the Diagnostics Viewer. Here is a link to the page in the manual hat covers the use of the communication diagnostics: 

 

https://www.ptc.com/-/media/kepware-store/en/manuals/kepserverex-manual.pdf#page=260

 

Thanks,

*Chris

3 replies

cmorehead13-AquamarineAnswer
13-Aquamarine
October 30, 2023

@Behrooz,

 

You could use the KEPServerEX built-in Communication Diagnostics where all read and write operations can be viewed in the Diagnostics Viewer. Here is a link to the page in the manual hat covers the use of the communication diagnostics: 

 

https://www.ptc.com/-/media/kepware-store/en/manuals/kepserverex-manual.pdf#page=260

 

Thanks,

*Chris

12-Amethyst
October 30, 2023

there is a system tag called _statistics._successful reads.  You could watch that for change indicating a read has taken place. 

Behrooz4-ParticipantAuthor
4-Participant
October 30, 2023

Hi,

Thanks. I'll see if I can read "_statistics._successful" in PLC and use it as a trigger to know when Kepware is reading from PLC.

Cheers,

Behrooz

Behrooz4-ParticipantAuthor
4-Participant
October 30, 2023

Hi Chris,

Thank you for the reply and providing the reference.

I'll check if there is an OPC diagnostic tag that I could use in PLC as a trigger to determine when Kepware is reading from the PLC.

Cheers,

Behrooz