viewof numNodes = Inputs.range([1, 5000], {
value: 1000,
step: 1,
label: "Number of I/O nodes:"
})
viewof frameBytes = Inputs.range([64, 1500], {
value: 1500,
step: 1,
label: "Ethernet frame size (bytes):"
})
viewof linkSpeed = Inputs.select(
[10, 100, 1000],
{value: 100, label: "Link speed (Mbps):"}
)
// Calculate per-node processing delay (hardware ASIC)
perNodeDelay_ns = 25 // nanoseconds per node
// Calculate total propagation delay
totalPropagation_us = (numNodes * perNodeDelay_ns) / 1000
// Calculate frame transmission time
frameTransmission_us = (frameBytes * 8) / linkSpeed
// Total cycle time
totalCycleTime_us = totalPropagation_us + frameTransmission_us
// Display results
html`<div style="background: linear-gradient(135deg, #2C3E50 0%, #16A085 100%); color: white; padding: 20px; border-radius: 8px; margin: 20px 0;">
<h3 style="margin-top: 0; color: white;">EtherCAT Cycle Time Results</h3>
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 15px;">
<div style="background: rgba(255,255,255,0.1); padding: 15px; border-radius: 6px;">
<div style="font-size: 0.9em; opacity: 0.9;">Propagation Delay</div>
<div style="font-size: 1.8em; font-weight: bold; color: #E67E22;">${totalPropagation_us.toFixed(1)} μs</div>
<div style="font-size: 0.8em; opacity: 0.8; margin-top: 5px;">${numNodes} nodes × 25 ns</div>
</div>
<div style="background: rgba(255,255,255,0.1); padding: 15px; border-radius: 6px;">
<div style="font-size: 0.9em; opacity: 0.9;">Frame Transmission</div>
<div style="font-size: 1.8em; font-weight: bold; color: #3498DB;">${frameTransmission_us.toFixed(1)} μs</div>
<div style="font-size: 0.8em; opacity: 0.8; margin-top: 5px;">${frameBytes} bytes @ ${linkSpeed} Mbps</div>
</div>
</div>
<div style="background: rgba(255,255,255,0.15); padding: 20px; border-radius: 6px; margin-top: 15px; text-align: center;">
<div style="font-size: 1em; opacity: 0.9;">Total Cycle Time</div>
<div style="font-size: 2.5em; font-weight: bold; color: #fff;">${totalCycleTime_us.toFixed(1)} μs</div>
<div style="font-size: 0.9em; opacity: 0.8; margin-top: 10px;">
${totalCycleTime_us < 100 ? '✓ Excellent for high-speed motion control' :
totalCycleTime_us < 1000 ? '✓ Suitable for synchronized drives' :
'Consider optimizing frame size or reducing nodes'}
</div>
</div>
</div>`EtherCAT Cycle Time
EtherCAT Cycle Time
animation
iiot
industrial
protocols
Try Change Number of I/O nodes: while keeping frame size and link speed fixed. Then press Calculate cycle time.
Observe After pressing Calculate cycle time, watch propagation delay and total cycle time as Number of I/O nodes: increases.
Explain Describe how Link speed (Mbps): changes frame transmission time after you press Calculate cycle time.
Technical boundaries. Each node contributes a fixed 25 nanoseconds of processing delay. Total cycle time sums this propagation delay and frame transmission time.