cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

ThingWorx Navigate is now Windchill Navigate Learn More

Translate the entire conversation x

U-CON Driver over UDP – Data Stops Updating Without Errors

HK_13498803
3-Newcomer

U-CON Driver over UDP – Data Stops Updating Without Errors

Dear ptc community
I am currently using the U-CON driver in Kepware to collect data from a device over UDP (not TCP). The system works stably for the most part, but intermittently, the tag values stop updating in Kepware without any errors or changes in status. The data quality remains "Good", but the values become frozen.
To clarify: I’ve verified using both Wireshark and Kepware's diagnostics tools that UDP packets are still being received from the device at the expected interval and in the correct format.
Despite this, Kepware stops updating tag values, and there is no indication of failure or timeout within the application.
Only a restart or reinitialization of the U-CON driver restores normal operation.
The device always ends its transmission with a consistent termination character. I’ve tried both termination-based and fixed-length receive modes, but the issue still occurs occasionally.
I would appreciate your help with the following:
What could cause the U-CON driver to stop updating values even when valid UDP packets are still arriving?
Is there a log file or debugging method specific to the U-CON driver that could help identify the issue?
Are there any recommended settings or best practices for using U-CON over UDP in long-running environments?
Please let me know if you need any additional information for my analysis.

ACCEPTED SOLUTION

Accepted Solutions

Hi @HK_13498803 ,

 

This behaviour with the U-CON driver over UDP can occur due to how Kepware manages inbound UDP sessions and internal buffer synchronisation, especially in long-running or high-frequency systems. Since UDP is a connectionless protocol, Kepware relies entirely on consistent packet structure and timing to maintain data flow and detect stale data.

Here are key points and actions to check:

  1. Driver Buffer Handling and Idle Timeout

    • The U-CON driver utilises internal buffers that can occasionally halt processing new packets if packet framing (termination or length) becomes desynchronized.

    • Even if the packets appear valid in Wireshark, a missing termination or unexpected byte count can cause Kepware to silently drop data without flagging a quality fault.

    • Try enabling fixed-length receive mode with a defined record size if your data structure is consistent and remains constant. Avoid mixing termination-based parsing unless absolutely required.

  2. Diagnostics and Logging

    • In Kepware, enable Diagnostics → Communication Log for the U-CON channel.

    • Set the Log Group to "Comm", "Error", and "I/O". This captures whether Kepware is discarding packets or missing terminations.

    • Logs are stored in C:\ProgramData\Kepware\KEPServerEX\V6\Logs.

  3. Packet Frequency and Processing Latency

    • If packets arrive faster than Kepware can process, the UDP buffer can overflow, causing updates to freeze.

    • Consider increasing the Scan Rate or reducing the incoming packet frequency slightly (for example, from 100 ms to 250 ms).

  4. Watchdog or Keep-Alive Logic

    • Implement a simple “heartbeat” or watchdog tag from the device that toggles on every send cycle.

    • In U-CON, you can script a reset or reinitialization trigger if that heartbeat stops changing for a defined period.

  5. Best Practice for Long-Running UDP Sessions

    • Run the Kepware service under a stable network interface (avoid virtual adapters).

    • Restart the U-CON channel periodically via scripting or scheduled service restart if uptime exceeds several days.

    • If possible, consider switching to TCP for reliability—U-CON performs better with predictable session framing.

If the problem persists, you can capture a short Kepware Communication Log. At the same time, the issue occurs and share it with PTC Technical Support—they can verify whether the driver is stalling at the parsing or buffer level.

 

Thanks,

Shashi Preetham,
+91 8099838001 | shashi@psptechhub.com,
PSPTechHub  ||  World of PTC Thingworx  ||  LinkedIn

View solution in original post

1 REPLY 1

Hi @HK_13498803 ,

 

This behaviour with the U-CON driver over UDP can occur due to how Kepware manages inbound UDP sessions and internal buffer synchronisation, especially in long-running or high-frequency systems. Since UDP is a connectionless protocol, Kepware relies entirely on consistent packet structure and timing to maintain data flow and detect stale data.

Here are key points and actions to check:

  1. Driver Buffer Handling and Idle Timeout

    • The U-CON driver utilises internal buffers that can occasionally halt processing new packets if packet framing (termination or length) becomes desynchronized.

    • Even if the packets appear valid in Wireshark, a missing termination or unexpected byte count can cause Kepware to silently drop data without flagging a quality fault.

    • Try enabling fixed-length receive mode with a defined record size if your data structure is consistent and remains constant. Avoid mixing termination-based parsing unless absolutely required.

  2. Diagnostics and Logging

    • In Kepware, enable Diagnostics → Communication Log for the U-CON channel.

    • Set the Log Group to "Comm", "Error", and "I/O". This captures whether Kepware is discarding packets or missing terminations.

    • Logs are stored in C:\ProgramData\Kepware\KEPServerEX\V6\Logs.

  3. Packet Frequency and Processing Latency

    • If packets arrive faster than Kepware can process, the UDP buffer can overflow, causing updates to freeze.

    • Consider increasing the Scan Rate or reducing the incoming packet frequency slightly (for example, from 100 ms to 250 ms).

  4. Watchdog or Keep-Alive Logic

    • Implement a simple “heartbeat” or watchdog tag from the device that toggles on every send cycle.

    • In U-CON, you can script a reset or reinitialization trigger if that heartbeat stops changing for a defined period.

  5. Best Practice for Long-Running UDP Sessions

    • Run the Kepware service under a stable network interface (avoid virtual adapters).

    • Restart the U-CON channel periodically via scripting or scheduled service restart if uptime exceeds several days.

    • If possible, consider switching to TCP for reliability—U-CON performs better with predictable session framing.

If the problem persists, you can capture a short Kepware Communication Log. At the same time, the issue occurs and share it with PTC Technical Support—they can verify whether the driver is stalling at the parsing or buffer level.

 

Thanks,

Shashi Preetham,
+91 8099838001 | shashi@psptechhub.com,
PSPTechHub  ||  World of PTC Thingworx  ||  LinkedIn
Announcements


Top Tags