KEPServerEX's diagnostic feature provides real-time data on the performance of your communication driver. The diagnostic window can be a powerful tool in solving tough communication problems. This document will walk you through the key features of the channel diagnostics and how they can be of help to you in solving those communication problems.
Enabling Channel Diagnostics
The first step in enabling channel diagnostics is to go into KEPServerEX and in the General section of Channel Properties make sure the Enable Diagnostics radio button is checked off.

Once diagnostics are enabled you can view the communications between your client and KEPServerEX by viewing the diagnostics window. Before we get into diagnostics window properties and functionality it is a good idea to have some knowledge of what tags become available when selecting the "Enable Diagnostics" button. The diagnostic tags are used to provide feedback to client applications regarding the operation of the channel communications in the server. Currently there are seven built-in diagnostic tags available when diagnostics is enabled. They are as follows:
| _SuccessfulReads |
The _SuccessfulReads tag contains a count of the number of reads this channel has completed successfully since the start of the application or since the last time the _Reset tag was invoked. This tag is formatted as unsigned 32 bit integer and will eventually roll over. This tag is Read Only. |
_SuccessfulWrites
|
The _SuccessfulWrites tag contains a count of the number of writes this channel has completed successfully since the start of the application or since the last time the _Reset tag was invoked. This tag is formatted as an unsigned 32 bit integer and will eventually roll over. This tag is Read Only. |
_FailedReads
|
The _FailedReads tag contains a count of the number of reads this channel has failed to complete since the start of the application or since the last time the _Reset tag was invoked. This count is only incremented after the channel has failed the request based on the configured timeout and retry count for the device. This tag is formatted as an unsigned 32 bit integer and will eventually roll over. This tag is Read Only. |
_FailedWrites
|
The _FailedWrites tag contains a count of the number of writes this channel has failed to complete since the start of the application or since the last time the _Reset tag was invoked. This count is only incremented after the channel has failed the request based on the configured timeout and retry count for the device. This tag is formatted as unsigned 32 bit integer and will eventually roll over. This tag is Read Only. |
_RxBytes
|
The _RxBytes tag contains a count of the number of bytes the channel has received from connected devices since the start of the application or since the last time the _Reset tag was invoked. This tag is formatted as unsigned 32 bit integer and will eventually roll over. This tag is Read Only. |
_TxBytes
|
The _TxBytes tag contains a count of the number of bytes the channel has sent to connected devices since the start of the application or since the last time the _Reset tag was invoked. This tag is formatted as unsigned 32 bit integer and will eventually roll over. This tag is Read Only. |
_Reset
|
The _Reset tag can be used to reset all diagnostic counters. The _Reset tag is formatted as a Boolean tag. Writing a non-zero value to the _Reset tag will cause the diagnostic counters to be reset. This tag is Read/Write |
Note: These tags can be browsed from the _Statistics branch of the server channel by an OPC client.
Note: This table can also be found in the Server Help File.
Diagnostics Window
The channel diagnostics window provides a real time view of the diagnostic tags for the selected channel and a real-time view of the actual device protocol. The protocol view window can be sized to suit your application needs. To view the diagnostics window right click on the desired channel and select Diagnostics. It can also be accessed by selecting View from the Servers menu, selecting diagnostics and then Channel.

Diagnostic Controls
The Pause button will capture and freeze the protocol data in the diagnostics window, while the diagnostic tags will continue to be updated. The Reset button will clear only the contents of the protocol view and does not affect the diagnostic tags. The Mode selection allows you to display the protocol information in a pure Hex representation (Hex Mode) or in a mixture of ASCII and Hex representation (Mix Mode). Depending on the nature of the target device, the Mode selection may need to be changed to provide the best view of your protocol. The Auto pause on failure function causes the capture buffer of the protocol view to stop whenever either a read or write error occurs. By default, this selection is off and the protocol capture will run in continuous mode. The Auto pause feature is a great way to capture intermittent communications issues.

The first step to using the diagnostic window is to ensure that diagnostic functions have been enabled on the channel properties page. Once diagnostics have been enabled, the diagnostic window can be displayed by selecting it from a context menu on the channel or by the View|Diagnostics menu option. Once the diagnostic menu is displayed it will begin capturing the real-time protocol data. If communications are occurring properly you will see a stream of communications messages between the server and the device. You can tell when this is occurring due to the two-color scheme of the protocol window and by current counts of the diagnostic tags displayed near the bottom of the diagnostic window.
If, for some reason, communications do not appear to be occurring normally, you can access any of the parameters for the channel using the dialogs to configure these settings. The diagnostic window will remain displayed even when you display the channel properties for settings like the communications parameters. This allows you to interactively change communications parameters while monitoring the effect in the protocol view. Remember to display the diagnostic window first, before accessing any parameter dialogs.
Once you have the diagnostic window displayed, you can modify various communication and device settings (in your channel and device) to see the effect on your communications stream. If you are certain that you have your communication parameters set correctly and you are still having a communications issue, you can use the second benefit of the diagnostic window.
By right clicking in the diagnostic window, you will be presented with context menu as shown here:

The selections available from this context menu allow you to tailor the operation of the diagnostic window and copy the contents of the protocol view to the Clipboard. The Copy to Clipboard selection is the most important feature that will help aid technical support in solving many of your communications issues, should they occur. Once the Copy to Clipboard selection is invoked, the current contents of the protocol capture buffer is formatted as text for easy "cut and paste" into either an email or fax message that can be sent to technical support for analysis. This can be very helpful when trying to diagnose a communications issue. The Auto Scroll selection simply ensures that the protocol view will automatically scroll to the next line as new protocol data is received. The Always on Top selection can be used to force the diagnostics window to remain on the top of all other application windows. Always on top is the default condition.
The Options… selection allows you to select a buffer size for the protocol capture buffer, set the font used by protocol view and its size, as well as assign unique colors to both the transmit and receive data streams.

The Buffer Size selection allows you to select a capture buffer of 1024, 2048, 4096, 8192, 16384, 32768, 65536 bytes. Depending on the speed of your device, a larger buffer size may be needed to effectively capture protocol related issues.

The Display settings allow you to tailor the appearance of the protocol view. The Background, TX Characters, and RX Characters color selections allow you to select a color from a palette of 16 available colors with each selection required to be unique. The font used by the protocol view can also be selected from this dialog as well as the size of that font. When selecting a font to be used by the protocol view, keep in mind that the speed of update can be affected if a font size is set to large. Additionally, larger font sizes will prevent you from being able to see a usable amount of the protocol.
Download the KEPServerEX Help File.
Technical Support Form
|