Support and Services

Troubleshooting KEPServerEX

Step 1

Problem Area Step 1

The first step in diagnosing an OPC problem is to determine if the client application is actually talking to KEPServerEX. The easiest way do this is to check the status bar of KEPServerEX and see if the server thinks any OPC client applications are attached and using tags. Check the Connection Status Bar at the lower right edge of the KEPServerEX window.

The status bar must display at least one Active Client and one of one Active tags or the KEPServerEX communication driver in use will not poll the PLC or device to request data. If the Connection Status Bar is blank, then no client application is connected to the server and no data is being requested. This tells you that the problem lies between the OPC client application and KEPServerEX.

Listed below are some of the more common client/server connection problems:

1. The client application is not in Run mode. All users should be aware that KEPServerEX will not attempt to talk to their target device or show any active tags until they run their OPC client application.

2. The configuration of the KEPServerEX program ID in the OPC client is incorrect. Check the OPC setup in the OPC client you are using. The example below shows a screen shot of the connection properties window of our free OPC Quick Client:

As shown the proper "Prog ID" for KEPServerEX is "Kepware.KEPServerEX.V4". Case is not important so don't worry if the user enters it as all lower case. HMI client products may also refer to the Prog ID as the "OPC Server Name", "Server Name", "Server Address", or "OPC Server".

3. Another possible issue can also be incorrect tag item names. If you enter bad tag items you may see KEPServerEX report that it has a client connection but Zero of Zero tags will be active. Check the KEPServerEX Event window for error messages.

4. Another possible issue could be DCOM configuration. Under most circumstances KEPServerEX will install itself and properly configure its own DCOM settings to work properly with OPC client applications. DCOM issues form the body of our complete DCOM configuration document. See DCOM issues Before editing DCOM perform the alternate test in step 5 below.

5. Another way to test the DCOM settings is to use the OPC Quick Client provided with KEPServerEX. Invoke the Quick Client using the tool bar icon on KEPServerEX as shown here by the arrow:

Once you click on the Quick Client button the Quick Client will be launched. The Quick Client will then automatically browse KEPServerEX for any available tags. If this works correctly then you know the DCOM settings are OK and the problem may be in the OPC client application.

Contact Kepware Technical Support.
Technical Support Form

Step 2

Problem Area Step 2

If you determine that the connection between your OPC client and KEPServerEX is good then the next most likely problem could be between KEPServerEX and the device. As shown in the view below KEPServerEX has reported that the device, in this case a GE9030 PLC is not responding to communications requests.

If you do not see a "Device not responding" message in the Event window proceed to Step3 If you see a "Device not responding" message, this means that the driver is polling the device for data but is not receiving a recognizable response. This is classified as a communication problem.

If you suspect a communication issue to be the root of the problem here are the most common causes of communication errors.

1. Cables - The cable used between the PLC and the device is always the first place to start. The only sure way to confirm the cable is to ensure that you are able to use this cable with other software such as the device configuration or programming package. If you confirm that the cable works with your programming package the most likely cause of the problem will be flow control settings. You may want to try setting the KEPServerEX channel configuration to a Flow Control of RTS Always or RTS,DTR. This is a common solution. Each KEPServerEX communications driver includes a specific help file with connection information and cable diagrams. Driver help can be accessed from the KEPServerEX Help menu or by going to the desktop start menu, then Programs folder, and then KEPServerEX folder. When using RS-485 or RS-422, check the Kepware web site for converters that we recommend. RS-485 and RS-422 converters are a common source of communications issues. If you are using KEPServerEX Modem capability for dial up modems, be sure to thoroughly read the Modem section of the KEPServerEX help file.

2. Channel Communication Settings - Do the channel settings for baud rate, parity, and number of data bits match the current parameters of the PLC or device? A quick test is to use the ladder-programming package of the PLC to confirm these settings. The full time online nature of KEPServerEX allows the communication settings to be adjusted while KEPServerEX has active client connections, so troubleshooting adjustments can be made quickly and easily. Simply invoke the properties tab on the channel in question in KEPServerEX and make the adjustments as needed.

3. Device ID - The Device ID set in the KEPServerEX project must match the communication ID of the PLC or device. Check the specific driver help file for unique device settings. Like the Channel properties of baud rate and parity, users can change the Device ID on the fly. Simply invoke the properties dialog for the given device in KEPServerEX and change the device ID as needed.

For Serial drivers: Most serial devices have a default ID of 1, but you must check the current ID of the device. You should be able to check this using the ladder programming package of the PLC. Also, make sure that the IDs in the device and KEPServerEX are in the same Decimal, HEX, or Octal format. The most common format is Decimal. Device IDs can also be adjusted while KEPServerEX has active clients.

For Ethernet drivers: Verify that you can ping the PLC's device IP from a Windows command prompt. If you cannot successfully ping the device, the KEPServerEX Ethernet driver in use will not be able to communicate with the device.

For Modbus Plus(uses Modicon SA85 card): Verify devices on the Modbus Plus network with the Modbus Plus Network Browser Utility that installs in the KEPServerEX|Utilities folder of the desktop start menu.

4. Comm Port - Is the serial communication port (comm port) of the PC valid and not currently being used by another application or device? Are you certain that the comm port works? Use some other software package to verify that the comm port is functioning properly. If extra comm ports have been added to the PC, there could be an issue with IRQ conflicts. If the comm port is not working, the server will post an error message to the Event window. Check the "Error Descriptions" section of the appropriate driver help file for info on comm port error messages.

KEPServerEX does offer some unique built-in diagnostic tools that can make trouble shooting these types of issues a little easier. To enable the diagnostics invoke the properties dialog on your channel name in KEPServerEX. Once the properties of the channel have been exposed click on the "General" Tab. You can enable the Diagnostics as shown here:

Once the diagnostic features have been enabled invoke the diagnostic view by right clicking on the channel name and selecting Diagnostics, the result is the display of the diagnostic window as shown here:

As you can see the diagnostic window provides a protocol view as well as statistics on the number of read and writes that are occurring and the number that have failed. One of the most important aspects of the diagnostic window is the protocol view. If you display the diagnostic window first then invoke the channel properties dialog, you will be able to make changes to baud rate, parity, or stop bits and see the effect that has on the success or failure of the communications stream. This can be a powerful tool for helping you debug your communications issue. We almost go so far as to say it makes troubleshooting fun. For more information on the diagnostic window consult the KEPServerEX main help section "Diagnostics".

Contact Kepware Technical Support.
Technical Support Form

Step 3

Problem Area Step 3

Not all problems are directly related to a loss of communications. In some cases the driver can communicate with the device but the device may not like what the driver is requesting. Additionally the user can also ask the driver to perform an action that it does not allow. This next section covers some of the most common issues of this type. If you notice any other relevant warning or error messages displayed in the server Event window please review the following list of messages for possible causes:

1. Failed to add item - As shown here, KEPServerEX has refused to add a tag because the user requested something that was outside of the allowable address range.

To remedy the issue, verify that the item reference of channelname.devicename.itemname is correct. In the example above we show a dynamic reference to a Siemens S5 output address. By checking the Siemens S5 driver help file (Addressing section) we see:

Discrete Outputs Q0.b - Q127.b.b is Bit Number 0 -7 Boolean Read - Write

Thus for discrete outputs, only bit offsets in the range of 0-7 are allowed, thus the dynamic reference of "Q0.8" is not valid so the server fails to add the item. This is a very common mistake.

2. Bad Address in Block (Modbus family of drivers) - Many communications drivers will report a bad address request when they issue an out of bound command to the PLC.

In this example, the user is referencing holding register offset (denoted by leading 4) 25001 but the address does not exist in the PLC so the driver posts the error message. Consult the hardware vendor documentation for the PLC or device to determine valid offsets. Many non-Modicon devices use non-contiguous address references, and you may need to reduce the holding register block size as shown below:

If the block sizes are grayed out, you will need to disconnect the client application before you will be able to edit the block sizes.

3. Time comparison error:

After entering a valid license number the server will provide a 10 day grace period in which to unlock the driver license number. If the user attempts to roll the clock back on the PC the server will not allow a new 10-day grace period.

4. Demo period has expired for 10 day grace period: When the user is issued a license for a KEPServerEX driver and they enter this license number into KEPServerEX they are given 10 days to contact Kepware Technical support or use our online registration & unlock interface to finish unlocking their driver.

If the user fails to finish unlocking their driver within that 10 day period KEPServerEX will time out on this 10 day grace period and the driver will cease to run. The user still has the ability to call Kepware or sign in to their My Kepware account to receive their unlock codes. Once the 10 day period has expired the driver will no longer run until the user obtains and enters the unlock code.

Contact Kepware Technical Support.
Technical Support Form