viewof systemType = Inputs.select(
["Motion Control", "Process Control", "Safety System", "HMI Display", "Data Logging", "MES Batch", "ERP Planning"],
{label: "System Type", value: "Motion Control"}
)
viewof numDevices = Inputs.range([1, 1000], {
label: "Number of Devices",
step: 1,
value: 100
})
viewof dataRate = Inputs.range([1, 10000], {
label: "Data Points per Device (Hz)",
step: 1,
value: 1000
})
// Calculate timing requirements based on system type
timingReqs = {
const reqs = {
"Motion Control": {level: "0-1", cycleTime: "62.5 μs - 1 ms", jitter: "< 1 μs", determinism: "Hard real-time"},
"Process Control": {level: "1", cycleTime: "10 - 100 ms", jitter: "< 10 ms", determinism: "Hard real-time"},
"Safety System": {level: "1", cycleTime: "1 - 10 ms", jitter: "< 100 μs", determinism: "Hard real-time"},
"HMI Display": {level: "2", cycleTime: "100 ms - 1 s", jitter: "< 100 ms", determinism: "Soft real-time"},
"Data Logging": {level: "2", cycleTime: "1 - 10 s", jitter: "< 1 s", determinism: "Best effort"},
"MES Batch": {level: "3", cycleTime: "10 s - 1 min", jitter: "< 10 s", determinism: "Best effort"},
"ERP Planning": {level: "4", cycleTime: "1 hour - 1 day", jitter: "N/A", determinism: "Best effort"}
};
return reqs[systemType];
}
// Calculate bandwidth
bandwidth = {
const samplesPerSecond = numDevices * dataRate;
const bytesPerSample = 4; // 32-bit float
const bytesPerSecond = samplesPerSecond * bytesPerSample;
const mbPerSecond = bytesPerSecond / (1024 * 1024);
const gbPerDay = (mbPerSecond * 86400) / 1024;
return {
samplesPerSecond: samplesPerSecond.toLocaleString(),
mbPerSecond: mbPerSecond.toFixed(2),
gbPerDay: gbPerDay.toFixed(2)
};
}
// Recommended protocol
protocol = {
const protocols = {
"Motion Control": "EtherCAT (< 100 μs cycle)",
"Process Control": "PROFINET IRT or EtherCAT",
"Safety System": "PROFINET IRT with Safety",
"HMI Display": "EtherNet/IP or PROFINET IO",
"Data Logging": "OPC-UA or Modbus TCP",
"MES Batch": "OPC-UA",
"ERP Planning": "REST APIs or MQTT"
};
return protocols[systemType];
}
html`<div style="background: #f8f9fa; border-left: 4px solid #2C3E50; padding: 16px; margin: 20px 0; border-radius: 4px;">
<h3 style="color: #2C3E50; margin-top: 0;">Real-Time Requirements Analysis</h3>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 16px 0;">
<div style="background: white; padding: 12px; border-radius: 4px; border: 1px solid #e0e0e0;">
<div style="color: #7F8C8D; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px;">ISA-95 Level</div>
<div style="color: #2C3E50; font-size: 24px; font-weight: bold; margin-top: 4px;">${timingReqs.level}</div>
</div>
<div style="background: white; padding: 12px; border-radius: 4px; border: 1px solid #e0e0e0;">
<div style="color: #7F8C8D; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px;">Cycle Time</div>
<div style="color: #16A085; font-size: 20px; font-weight: bold; margin-top: 4px;">${timingReqs.cycleTime}</div>
</div>
<div style="background: white; padding: 12px; border-radius: 4px; border: 1px solid #e0e0e0;">
<div style="color: #7F8C8D; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px;">Max Jitter</div>
<div style="color: #E67E22; font-size: 20px; font-weight: bold; margin-top: 4px;">${timingReqs.jitter}</div>
</div>
<div style="background: white; padding: 12px; border-radius: 4px; border: 1px solid #e0e0e0;">
<div style="color: #7F8C8D; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px;">Determinism</div>
<div style="color: #9B59B6; font-size: 20px; font-weight: bold; margin-top: 4px;">${timingReqs.determinism}</div>
</div>
</div>
<div style="background: white; padding: 16px; border-radius: 4px; border: 1px solid #e0e0e0; margin-top: 16px;">
<h4 style="color: #2C3E50; margin-top: 0; margin-bottom: 12px;">Bandwidth Requirements</h4>
<div style="display: grid; gap: 8px;">
<div style="display: flex; justify-content: space-between; padding: 8px; background: #f8f9fa; border-radius: 4px;">
<span style="color: #7F8C8D;">Samples/second:</span>
<span style="color: #2C3E50; font-weight: bold;">${bandwidth.samplesPerSecond}</span>
</div>
<div style="display: flex; justify-content: space-between; padding: 8px; background: #f8f9fa; border-radius: 4px;">
<span style="color: #7F8C8D;">Bandwidth:</span>
<span style="color: #16A085; font-weight: bold;">${bandwidth.mbPerSecond} MB/sec</span>
</div>
<div style="display: flex; justify-content: space-between; padding: 8px; background: #f8f9fa; border-radius: 4px;">
<span style="color: #7F8C8D;">Daily data volume:</span>
<span style="color: #E67E22; font-weight: bold;">${bandwidth.gbPerDay} GB/day</span>
</div>
</div>
</div>
<div style="background: #e8f4f8; padding: 12px; border-radius: 4px; margin-top: 16px; border-left: 3px solid #3498DB;">
<div style="color: #2C3E50; font-weight: bold; margin-bottom: 4px;">Recommended Protocol:</div>
<div style="color: #3498DB; font-size: 18px;">${protocol}</div>
</div>
</div>`Real-Time Requirements Calculator
Real-Time Requirements Calculator
animation
iiot
industrial-operations
Try Change Number of Devices, then press Calculate bandwidth.
Observe After Calculate bandwidth, watch Samples/second, Bandwidth, and Daily data volume.
Explain Explain why Number of Devices changes Bandwidth after Calculate bandwidth.
Technical boundaries. Bandwidth uses 4 bytes per sample. Timing requirements and recommended protocols are fixed by system type.
Real-Time Requirements Calculator
Try it: Adjust the system type and number of devices to see how timing requirements and bandwidth change across ISA-95 levels. Notice how motion control requires orders of magnitude faster response times than enterprise planning.