156 lines
6.3 KiB
PHP
156 lines
6.3 KiB
PHP
<?php
|
|
// phpcs:ignoreFile
|
|
declare(strict_types=1);
|
|
|
|
include __DIR__ . '/../../items.php';
|
|
require_once __DIR__ . '/module-helpers.php';
|
|
|
|
$caneToday = module_numeric(module_capture(__DIR__ . '/tonsin.php')) ?? 0.0;
|
|
$recordDate = module_capture(__DIR__ . '/recorddate.php');
|
|
$recordTonnage = module_numeric(module_capture(__DIR__ . '/record.php')) ?? 0.0;
|
|
$runHours = module_numeric($value['RUNHRSTODAY']);
|
|
|
|
$groundToday = (module_numeric($value['CANETOT']) ?? 0.0) + (module_numeric($value['W TONS GROUND']) ?? 0.0);
|
|
$groundYesterday = (module_numeric($value['PREVTONS']) ?? 0.0) + (module_numeric($value['WPREVGROUND']) ?? 0.0);
|
|
$prevRunHours = module_numeric($value['PREVTIME']);
|
|
|
|
$eastAvg = module_numeric($value['AVG_TONS_PER_HOUR']);
|
|
$westAvg = module_numeric($value['New Mill Avg1']);
|
|
$totalTph = (module_numeric($value['TONS_PER_HOUR']) ?? 0.0) + (module_numeric($value['RATE']) ?? 0.0);
|
|
$lossTime = module_numeric($value['LOSSTIME']);
|
|
|
|
$steamFlow = module_numeric($value['TTL_STEAMFLOW2']);
|
|
$liveSteam = module_numeric($value['PT_001']);
|
|
|
|
if ($liveSteam === null) {
|
|
$liveSteamPill = module_status('No Signal', 'module-pill--alert');
|
|
} elseif ($liveSteam < 156) {
|
|
$liveSteamPill = module_status('Low', 'module-pill--alert');
|
|
} elseif ($liveSteam <= 165) {
|
|
$liveSteamPill = module_status('Watch', 'module-pill--warn');
|
|
} else {
|
|
$liveSteamPill = module_status('Optimal', 'module-pill--success');
|
|
}
|
|
|
|
$exhaustMode = (int) ($value['ExhaustAM'] ?? 0);
|
|
$exhaustModeLabel = $exhaustMode === 0 ? 'Auto' : 'Manual';
|
|
$exhaustModeClass = $exhaustMode === 0 ? 'module-pill--success' : 'module-pill--warn';
|
|
|
|
$exhaustPressure = module_numeric($ID['00244'] ?? null);
|
|
if ($exhaustPressure === null) {
|
|
$exhaustPill = module_status('No Signal', 'module-pill--alert');
|
|
} elseif ($exhaustPressure < 10) {
|
|
$exhaustPill = module_status('Low', 'module-pill--alert');
|
|
} elseif ($exhaustPressure < 14) {
|
|
$exhaustPill = module_status('Watch', 'module-pill--warn');
|
|
} else {
|
|
$exhaustPill = module_status('Optimal', 'module-pill--success');
|
|
}
|
|
|
|
$vaporHeader = module_numeric($value['VAPOR HDR PRES']);
|
|
?>
|
|
|
|
<section class="module-card module-card--tight">
|
|
<div class="module-heading">
|
|
<h2 class="module-heading__title">General & Steam Data</h2>
|
|
<span class="module-heading__meta">Throughput with live steam signals</span>
|
|
</div>
|
|
|
|
<div class="module-grid module-grid--two">
|
|
<div class="module-stack">
|
|
<div class="module-metric-grid">
|
|
<div class="module-metric">
|
|
<span class="module-metric__label">Cane In Today</span>
|
|
<span class="module-metric__value"><?php echo module_number($caneToday); ?></span>
|
|
<span class="module-metric__note">tons</span>
|
|
</div>
|
|
<div class="module-metric">
|
|
<span class="module-metric__label">Daily Record</span>
|
|
<span class="module-metric__value"><?php echo module_number($recordTonnage); ?></span>
|
|
<span class="module-metric__note"><?php echo module_html($recordDate); ?></span>
|
|
</div>
|
|
<div class="module-metric">
|
|
<span class="module-metric__label">Run Hours</span>
|
|
<span class="module-metric__value"><?php echo module_number($runHours, 1); ?></span>
|
|
<span class="module-metric__note">hours</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="module-metric-grid">
|
|
<div class="module-metric">
|
|
<span class="module-metric__label">Ground Today</span>
|
|
<span class="module-metric__value"><?php echo module_number($groundToday); ?></span>
|
|
<span class="module-metric__note">tons</span>
|
|
</div>
|
|
<div class="module-metric">
|
|
<span class="module-metric__label">Total Ground Yesterday</span>
|
|
<span class="module-metric__value"><?php echo module_number($groundYesterday); ?></span>
|
|
<span class="module-metric__note">tons</span>
|
|
</div>
|
|
<div class="module-metric">
|
|
<span class="module-metric__label">Prev Run Hours</span>
|
|
<span class="module-metric__value"><?php echo module_number($prevRunHours, 1); ?></span>
|
|
<span class="module-metric__note">hours</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="module-divider"></div>
|
|
|
|
<div class="module-row">
|
|
<span class="module-row__label">Total Tons per Hour</span>
|
|
<span class="module-row__value"><?php echo module_number($totalTph, 1); ?></span>
|
|
</div>
|
|
|
|
<div class="module-metric-grid">
|
|
<div class="module-metric">
|
|
<span class="module-metric__label">East 15 Min Avg</span>
|
|
<span class="module-metric__value"><?php echo module_number($eastAvg, 1); ?></span>
|
|
<span class="module-metric__note">tons/hr</span>
|
|
</div>
|
|
<div class="module-metric">
|
|
<span class="module-metric__label">West 15 Min Avg</span>
|
|
<span class="module-metric__value"><?php echo module_number($westAvg, 1); ?></span>
|
|
<span class="module-metric__note">tons/hr</span>
|
|
</div>
|
|
<div class="module-metric">
|
|
<span class="module-metric__label">Today's Loss Time</span>
|
|
<span class="module-metric__value"><?php echo module_number($lossTime, 2); ?></span>
|
|
<span class="module-metric__note">hours</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="module-stack">
|
|
<div class="module-metric-grid">
|
|
<div class="module-metric">
|
|
<span class="module-metric__label">Total Steam Flow</span>
|
|
<span class="module-metric__value"><?php echo module_number($steamFlow); ?></span>
|
|
<span class="module-metric__note">kpph</span>
|
|
</div>
|
|
<div class="module-metric">
|
|
<span class="module-metric__label">Live Steam Pressure</span>
|
|
<span class="module-metric__value"><?php echo module_number($liveSteam, 1); ?></span>
|
|
<span class="module-metric__note">psi</span>
|
|
<div><?php echo $liveSteamPill; ?></div>
|
|
</div>
|
|
<div class="module-metric">
|
|
<span class="module-metric__label">Exhaust Pressure</span>
|
|
<span class="module-metric__value"><?php echo module_number($exhaustPressure, 1); ?></span>
|
|
<span class="module-metric__note">psi</span>
|
|
<div><?php echo $exhaustPill; ?></div>
|
|
</div>
|
|
<div class="module-metric">
|
|
<span class="module-metric__label">Vapor Header Pressure</span>
|
|
<span class="module-metric__value"><?php echo module_number($vaporHeader, 1); ?></span>
|
|
<span class="module-metric__note">psi</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="module-row">
|
|
<span class="module-row__label">Exhaust Control</span>
|
|
<div class="module-row__value"><?php echo module_status($exhaustModeLabel, $exhaustModeClass); ?></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|