|
|
@@ -1,5 +1,5 @@
|
|
|
#!/usr/bin/env python3
|
|
|
-"""24-Hour Continuous Hardware Stress Test for Prod2U 6400 V2.0 (24-PTC / 8-fan current protocol).
|
|
|
+"""24-Hour Continuous Hardware Stress Test for Prod2U 6400 V2.0 (24 PTC / 8 fan / 3 SSR protocol).
|
|
|
|
|
|
Continuously maintains all 24 physical PTC heating channels at 50% duty cycle,
|
|
|
feeds the 30-second hardware watchdog every loop, periodically queries and verifies
|
|
|
@@ -29,9 +29,11 @@ except ImportError:
|
|
|
serial = None
|
|
|
|
|
|
# The historical filename is kept for existing launch commands; this tool now
|
|
|
-# targets 6400-v2's 24 PTC + 4 intake + 4 exhaust duties (SET=32, DATA=83).
|
|
|
+# targets 6400-v2 3.0: 24 PTC + 8 fan + 3 SSR (SET=35, DATA=86).
|
|
|
+# This PTC-only stress test keeps all three heater-cloth SSR outputs at zero.
|
|
|
PTC_COUNT = 24
|
|
|
FAN_COUNT = 8
|
|
|
+SSR_COUNT = 3
|
|
|
|
|
|
|
|
|
def make_frame(msg_type: int, payload: bytes = b"") -> bytes:
|
|
|
@@ -68,6 +70,7 @@ class StressTester:
|
|
|
self.last_fans = []
|
|
|
self.last_bmc = []
|
|
|
self.last_ct = []
|
|
|
+ self.last_ssr = []
|
|
|
self.receiver = StreamReceiver("6400-v2")
|
|
|
self.autonomous_data = 0
|
|
|
self.rejected_frames = 0
|
|
|
@@ -124,9 +127,9 @@ class StressTester:
|
|
|
return None
|
|
|
|
|
|
def send_safe_stop(self):
|
|
|
- """Set all current 24 PTC duties to zero, preserving cooling at 20%."""
|
|
|
+ """Set all 24 PTC and 3 SSR duties to zero, preserving cooling at 20%."""
|
|
|
logging.info("Stopping: setting all 24 PTC channels to 0%%...")
|
|
|
- payload = bytes([0] * PTC_COUNT + [20] * FAN_COUNT)
|
|
|
+ payload = bytes([0] * PTC_COUNT + [20] * FAN_COUNT + [0] * SSR_COUNT)
|
|
|
for attempt in range(3):
|
|
|
if not self.ser or not self.ser.is_open:
|
|
|
self.connect()
|
|
|
@@ -147,7 +150,7 @@ class StressTester:
|
|
|
self.reconnect_count += 1
|
|
|
return False
|
|
|
try:
|
|
|
- payload = bytes([self.ptc_duty] * PTC_COUNT + [self.fan_duty] * FAN_COUNT)
|
|
|
+ payload = bytes([self.ptc_duty] * PTC_COUNT + [self.fan_duty] * FAN_COUNT + [0] * SSR_COUNT)
|
|
|
got_ack = self.exchange(FrameType.SET_ALL, payload) is not None
|
|
|
if got_ack:
|
|
|
self.set_ack_success += 1
|
|
|
@@ -165,7 +168,8 @@ class StressTester:
|
|
|
self.last_fans = list(data[24:32]) # intake chamber 1..4, exhaust chamber 1..4
|
|
|
self.last_bmc = list(data[32:56])
|
|
|
self.last_ct = list(data[56:83])
|
|
|
- matches = data[:32] == payload
|
|
|
+ self.last_ssr = list(data[83:86])
|
|
|
+ matches = len(data) == 86 and data[:32] + data[83:86] == payload
|
|
|
if not matches:
|
|
|
self.duty_mismatch_count += 1
|
|
|
logging.error("[Cycle %d] Duty mismatch: PTC=%s intake=%s exhaust=%s",
|
|
|
@@ -212,6 +216,8 @@ class StressTester:
|
|
|
"last_ptc_all_match": (len(self.last_ptc) == PTC_COUNT and all(v == self.ptc_duty for v in self.last_ptc)),
|
|
|
"last_ptc_duties": self.last_ptc,
|
|
|
"last_fan_duties": self.last_fans,
|
|
|
+ "last_ssr_duties": self.last_ssr,
|
|
|
+ "target_ssr_duties": [0, 0, 0],
|
|
|
"intake_chambers_1_to_4": self.last_fans[:4],
|
|
|
"exhaust_chambers_1_to_4": self.last_fans[4:],
|
|
|
"temperatures": {
|