After separating PLC update time from Ethernet transaction time, the 1.5 ms delay can be assigned to the correct subsystem and the acquisition path can be changed if necessary. A real-time host operating system alone cannot make a request/reply transaction complete in less than 50 µs; that target must be verified against the controller’s documented cyclic, binary, or shared-memory interfaces.
Latency Target and Measurement Boundary
Before anything else, confirm what the timer measures. Sending a request for P101 and stopping the timer when its value returns normally measures a complete request/reply transaction, not the age of the angle value or one-way network delay.
| Reading | Meaning | Next check |
|---|---|---|
Approximately 1.5 ms from send to reply |
Measured request/reply time, provided the timestamps surround only that operation | Measure when P101 changes |
| Value changes slower than replies arrive | The PLC calculation or scan is the limiting stage | Check the PLC production path |
| Value is fresh but the reply is late | The delay lies in the protocol, controller service, network, or host path | Instrument the Ethernet transaction |
Requirement is less than 50 µs
|
The present 1.5 ms result is 30 times the target |
Evaluate a different data path |
If the requirement means a new sample every 50 µs, the implied update rate is 1 / 50 µs = 20,000 samples/s. If it means only transport latency, sample rate and latency remain separate acceptance criteria. Record which definition applies before selecting an interface.
PLC Source-Freshness Check
- Add or select a controller-side value that changes on every execution of the logic that calculates the arc-second angle and writes
P101. Use an existing documented counter or timestamp if one is available; do not add logic that materially changes the task being measured. - Read the marker with
P101. Confirm whether consecutive replies contain a new marker value. - If several replies return the same marker, measure the interval between marker changes. Do not move on until that interval is below the required data-update interval.
- If the marker changes promptly but the host receives it late, retain the controller timestamp or counter for the remaining tests. It distinguishes old data delivered quickly from fresh data delivered slowly.
The PLC calculation, write to P101, communications service, and host request are asynchronous unless the controller documentation defines synchronization between them. A request can arrive just after the PLC task has executed and return the previous sample. Faster Ethernet polling does not correct a slow or phase-misaligned producer.
Ethernet Transaction-Path Check
- Timestamp immediately before the host submits the request and immediately after the complete reply becomes available. Exclude angle conversion, logging, display updates, and unrelated application work.
- Run a series of transactions and retain minimum, typical, maximum, and outlier latency rather than one average. The minimum approximates the unloaded path; the spread exposes scheduling and buffering.
- Capture traffic at the host interface. Compare request transmission time with response arrival time. A prompt response at the interface followed by a late application timestamp points to host scheduling or receive processing.
- Repeat the test with only one outstanding read. Then test any documented block-read operation that can return all required feedback in one transaction. Multiple serialized requests multiply protocol and scheduling overhead.
- Check for retries, reconnects, malformed replies, and queued requests. Correct those conditions before comparing interface architectures.
An application-level read includes host API processing, protocol framing, operating-system networking, frame transmission, controller communications scheduling, variable lookup, reply construction, receive processing, and application wake-up. A real-time operating system can bound selected host tasks, but it does not remove controller service time or turn an unspecified request/reply protocol into a deterministic feedback channel.
Host and Controller Scheduling Branch
| Observed pattern | Likely limiting stage | Action |
|---|---|---|
Stable delay near 1.5 ms
|
Fixed controller service or protocol cycle | Check the documented communications update mechanism |
| Low minimum with large positive outliers | Host scheduling, buffering, contention, or retransmission | Trace task wake-up and packet timing |
| Delay rises with request count | Serialized command overhead | Use one documented block or cyclic transfer |
| Reply is quick but its controller marker is old | PLC calculation/update phase | Move or reschedule the calculation using documented task controls |
- Give the acquisition task an appropriate real-time priority and keep blocking file, display, and logging operations out of its timed path.
- Confirm that the client does not open a connection for every read. Use a persistent connection when the controller protocol documents that operating mode.
- Check whether the controller processes Ethernet commands in a periodic communications task. Read its configured rate or diagnostic timing from the controller, rather than inferring it from the host timer.
- Do not move on until packet timing identifies whether the dominant delay occurs before the request leaves, between request and reply, or after the reply arrives.
Acquisition-Architecture Decision
The existing design uses the PLC to calculate an angle in arc-seconds, stores it in P101, and has the host repeatedly request that variable. This is suitable only if the worst-case age and request latency satisfy the motion application.
- If
P101is stale, shorten or relocate its calculation using documented PLC task controls, or acquire the native feedback value through a documented interface and perform the arc-second conversion at the consumer. - If
P101is fresh but individual reads remain too slow, look in the Clipper/PMAC communications documentation for a cyclic, unsolicited, binary, block-transfer, or direct feedback mechanism. Use only a mode explicitly supported by the installed hardware and software. - If no Ethernet mode provides a documented worst-case bound below
50 µs, Ethernet request/reply polling does not meet the requirement. Select a documented deterministic interface. The uninstalled DPRAM option cannot be treated as available, and its performance must be read from the applicable hardware documentation before selection. - If only average latency matters, optimize the documented Ethernet path and validate its distribution. If the motion function requires a hard deadline, base acceptance on maximum observed latency plus the interface’s documented bounds, not the average.
Resolution and Verification Procedure
- Define acceptance limits for sample age, transaction latency, update interval, and permitted missed samples. Record whether
50 µsapplies to one-way delivery, round-trip response, or sample period. - Instrument the PLC-produced value with a controller-side counter or timestamp and instrument the host at request submission and complete-reply receipt.
- Measure the current
P101path under representative controller, network, and host load. Save minimum, maximum, distribution, stale-sample count, and retry count. - Apply the resolving branch: correct the PLC update path when data is stale; remove serialized reads through a documented block or cyclic mode when transaction overhead dominates; or move to a documented deterministic interface when Ethernet cannot satisfy the deadline.
- Repeat the same loaded test without changing timestamp boundaries. Do not accept the change merely because the average is lower.
- Pass the design only when every measured sample satisfies the defined age and latency limits for the complete test interval and controller diagnostics show no retries, overruns, or missed updates.
Frequently Asked Questions
How do I tell whether P101 or Ethernet causes the delay?
Return a controller-side counter or timestamp with P101. Old markers in fast replies identify the PLC update path; fresh markers arriving late identify the communications or host path.
How do I compare 1.5 ms with a 50 µs requirement?
1.5 ms = 1,500 µs, so the measured request/reply transaction is 30 times the target. Confirm that both figures describe the same boundary before using that ratio.
How do I reduce repeated Ethernet read overhead?
Keep the documented connection open and replace multiple serialized reads with a supported block, binary, cyclic, or unsolicited transfer. Measure packet-to-application timing after each change.
How do I verify a Clipper feedback latency fix?
Repeat the loaded test with identical timestamp boundaries, then check worst-case sample age, maximum transaction latency, missed samples, retries, and controller overruns. Accept the path only when every reading remains within the defined limit.