PROP-031 Rev 1.0 · 16 Jul 2026

Cane Agency · Change Proposal (ACCEPTED — applied to spec v0.8.0)สถาบันอ้อย · ข้อเสนอการเปลี่ยนแปลง (รับแล้ว — นำเข้า spec v0.8.0)

Weighbridge hardware integration — one scale link service that speaks every port the factory already has, feeding the application gateway or the platform API gatewayการเชื่อมฮาร์ดแวร์เครื่องชั่ง — scale link service หนึ่งเดียวที่พูดได้ทุกพอร์ตที่โรงงานมีอยู่แล้ว ป้อนเข้า application gateway หรือ API gateway ของ platform

Documentเอกสาร
PROP-031
Statusสถานะ
ACCEPTED (client, 16 Jul 2026) — applied to spec v0.8.0 · Q-37 CLOSEDรับแล้ว (ลูกค้า 16 ก.ค. 2569) — นำเข้า spec v0.8.0 · ปิด Q-37
Originที่มา
Client direction (16 Jul 2026) while working gate question Q-37 (the A-10 scale-link blocking state): the weighbridge application must be rewritten to work with the on-site application gateway (PROP-028) or communicate directly with the platform's API gateway, and must talk to the factory's existing scale hardware over whatever physical interface it has — parallel port, serial RS-232, RS-485, USB-A, and in future USB-C. Not a yes/no policy item — a full integration domain.ทิศทางจากลูกค้า (16 ก.ค. 2569) ระหว่างพิจารณาคำถาม Q-37 ของ gate (สถานะปิดกั้นเมื่อสายเครื่องชั่งหลุด ตาม A-10): ต้องเขียนแอปห้องชั่งใหม่ให้ทำงานกับ application gateway ในโรงงาน (PROP-028) หรือสื่อสารตรงกับ API gateway ของ platform และต้องคุยกับฮาร์ดแวร์เครื่องชั่งที่มีอยู่แล้วของโรงงานผ่านพอร์ตกายภาพที่มี — พอร์ตขนาน, serial RS-232, RS-485, USB-A และอนาคต USB-C ไม่ใช่ข้อนโยบายตอบใช่/ไม่ใช่ — เป็นโดเมนการเชื่อมต่อทั้งชุด
Kindประเภท
New integration & hardware-abstraction domain — goals, requirements, the Scale Link Service (SLS) definition, communication paths, and architecture for embedding onto existing factory hardware.โดเมนการเชื่อมต่อและ abstraction ฮาร์ดแวร์ใหม่ — เป้าหมาย ข้อกำหนด นิยาม Scale Link Service (SLS) เส้นทางการสื่อสาร และสถาปัตยกรรมสำหรับฝังบนฮาร์ดแวร์เดิมของโรงงาน
Depends onขึ้นกับ
A-10 (electronic read only; blocking state on link loss — Q-37) · PROP-028 (gateway topology; ST-WB is a gateway client) · A-35/A-06/A-07 (two factory postures) · A-36/PROP-029 (4-ply impact printing, dual scales, token flow at ST-WB) · FR-05 (weigh transaction contract).A-10 (อ่านค่าอิเล็กทรอนิกส์เท่านั้น; สถานะปิดกั้นเมื่อสายหลุด — Q-37) · PROP-028 (ผัง gateway; ST-WB เป็น client ของ gateway) · A-35/A-06/A-07 (สองท่าของโรงงาน) · A-36/PROP-029 (พิมพ์ impact 4 สำเนา ชั่งสองตัว การไหลของเหรียญที่ ST-WB) · FR-05 (สัญญา transaction การชั่ง)
Affectsกระทบ
Graph: +ScaleHead, +ScaleLink, +WeightReading entities; mill-wb gains the link-lost blocking state (closes Q-37); NFR additions (read integrity, latency, legal-for-trade). Docs: SPEC-APP (integration tier), SPEC-PRD/PWF-MILL (ST-WB), PROP-028 hardware spec, PROP-021 station suite.graph: +entity ScaleHead, ScaleLink, WeightReading; mill-wb เพิ่มสถานะปิดกั้นสายหลุด (ปิด Q-37); เพิ่ม NFR (ความถูกต้องของการอ่าน ค่าหน่วง การรับรองตามกฎหมายชั่งตวงวัด) เอกสาร: SPEC-APP (ชั้นการเชื่อมต่อ), SPEC-PRD/PWF-MILL (ST-WB), spec ฮาร์ดแวร์ PROP-028, ชุดสถานี PROP-021
Version bumpการขยับเวอร์ชัน
MINOR — additive integration tier; FR-05's transaction contract is unchanged, it gains a defined upstream.MINOR — ชั้นการเชื่อมต่อส่วนเพิ่ม; สัญญา transaction ของ FR-05 คงเดิม เพียงได้ต้นทางที่นิยามชัด
Updatedปรับปรุงล่าสุด
16 Jul 2026

1. Summary1. สรุปข้อเสนอ

The pointใจความ Thai mills run weighbridges bought across three decades: an indicator head wired to a PC's parallel port here, an RS-232 serial line there, an RS-485 multi-drop loop serving two bridges elsewhere, a USB adapter on the newest install. A-10 says the operator may never type a weight — so the software must read every one of these heads reliably, on the factory's existing hardware. This proposal defines the Scale Link Service (SLS): a small, embeddable service that owns the physical port, speaks the indicator's protocol through a vendor driver, and hands verified weight readings to the weighbridge application — which forwards them through the on-site application gateway (PROP-028 factories) or directly to the platform's API gateway (cloud-posture factories). The same service defines the link-health signal that drives A-10's blocking state, closing Q-37 as a by-product. โรงงานไทยใช้เครื่องชั่งที่ซื้อมาต่างยุคกันสามทศวรรษ: หัวอ่านต่อพอร์ตขนานของ PC ที่หนึ่ง สาย serial RS-232 อีกที่หนึ่ง วง RS-485 multi-drop เลี้ยงสองแท่นชั่งอีกแห่ง และ USB adapter ในการติดตั้งใหม่สุด A-10 ห้าม operator พิมพ์น้ำหนักเอง — software จึงต้องอ่านหัวชั่งทุกแบบได้อย่างน่าเชื่อถือ บนฮาร์ดแวร์เดิมของโรงงาน ข้อเสนอนี้นิยาม Scale Link Service (SLS): service ขนาดเล็กฝังได้ ที่เป็นเจ้าของพอร์ตกายภาพ พูดโปรโตคอลของหัวอ่านผ่าน driver ของแต่ละยี่ห้อ และส่งค่าน้ำหนักที่ตรวจแล้วให้แอปห้องชั่ง — ซึ่งส่งต่อผ่าน application gateway ในโรงงาน (โรงงาน PROP-028) หรือตรงไปที่ API gateway ของ platform (โรงงานท่า cloud) service เดียวกันนิยามสัญญาณสุขภาพสายที่ขับสถานะปิดกั้นของ A-10 — ปิด Q-37 ไปในตัว

2. Goals & purpose2. เป้าหมายและวัตถุประสงค์

G1 · Existing hardware, zero forkliftฮาร์ดแวร์เดิม ไม่ต้องรื้อ A factory adopts the platform without replacing its scale, indicator head, or wiring. The software adapts to the port the factory has — never the reverse. New hardware is only ever an optional adapter (e.g. a USB-to-RS-485 dongle), not a new scale. โรงงานใช้ platform ได้โดยไม่เปลี่ยนแท่นชั่ง หัวอ่าน หรือสายไฟ software ปรับเข้าหาพอร์ตที่โรงงานมี — ไม่ใช่ทางกลับ ฮาร์ดแวร์ใหม่มีได้แค่ adapter เสริม (เช่น USB-to-RS-485) ไม่ใช่เครื่องชั่งใหม่
G2 · One abstraction, many protocolsabstraction เดียว หลายโปรโตคอล The weighbridge application never touches a port. It consumes one uniform reading stream from the SLS; physical transport (parallel, RS-232, RS-485, USB-A, future USB-C) and vendor framing live in swappable drivers below the abstraction line. แอปห้องชั่งไม่แตะพอร์ตเลย มันบริโภค stream ค่าอ่านรูปแบบเดียวจาก SLS; การขนส่งกายภาพ (ขนาน, RS-232, RS-485, USB-A, อนาคต USB-C) และ framing ของยี่ห้ออยู่ใน driver ที่สลับได้ใต้เส้น abstraction
G3 · A-10 preserved end-to-endคง A-10 ตลอดสาย Weights enter the system only from the scale head, through the SLS, cryptographically attributable to a registered ScaleHead. No manual entry path exists at any layer; a broken link produces a blocking state, never a typed number. น้ำหนักเข้าระบบได้ทางเดียว: จากหัวอ่าน ผ่าน SLS ระบุที่มาได้ถึง ScaleHead ที่ลงทะเบียน ไม่มีเส้นทางกรอกมือในชั้นใด; สายหลุดได้สถานะปิดกั้น ไม่ใช่ตัวเลขที่พิมพ์เอง
G4 · Both factory postures, one serviceสองท่าโรงงาน service เดียว The same SLS serves gateway factories (readings flow to ST-WB → application gateway, offline-capable per PROP-028) and cloud-posture factories (readings flow to the mill-wb web surface via the platform API gateway, online-only per A-35). Posture is deployment config, not a fork. SLS เดียวกันรองรับโรงงานท่า gateway (ค่าอ่านไหลไป ST-WB → application gateway ทำงาน offline ได้ตาม PROP-028) และโรงงานท่า cloud (ค่าอ่านไหลไปหน้าจอ mill-wb ผ่าน API gateway ของ platform, online เท่านั้นตาม A-35) ท่าคือ config การติดตั้ง ไม่ใช่การแยกสาย
G5 · Legal-for-trade honestyซื่อตรงตามกฎหมายชั่งตวงวัด The reading the farmer is paid on must match the certified indicator's display. The SLS records raw frames alongside parsed values so any dispute can be replayed against the head's own output; stability flags (motion/steady) come from the indicator, not inferred. ค่าที่ใช้จ่ายเงินชาวไร่ต้องตรงกับจอหัวอ่านที่ผ่านการรับรอง SLS เก็บ frame ดิบคู่กับค่าที่แปลงแล้ว ให้ replay ข้อพิพาทเทียบกับ output ของหัวอ่านได้; ธง stable/motion มาจากหัวอ่าน ไม่ใช่การเดา

3. Specification requirements3. ข้อกำหนดเฉพาะ

IDRequirementข้อกำหนดNotesหมายเหตุ
HW-01Physical transports: parallel port (LPT/Centronics, incl. BCD-parallel indicator outputs), serial RS-232 (DB9/DB25), RS-485 (2-wire multi-drop, up to 32 heads incl. dual-scale layouts per PROP-029), USB-A (CDC-ACM and vendor-serial adapters). USB-C reserved as a future transport — same driver model, new connector.การขนส่งกายภาพ: พอร์ตขนาน (LPT/Centronics รวม output แบบ BCD-parallel), serial RS-232 (DB9/DB25), RS-485 (multi-drop 2 สาย สูงสุด 32 หัว รวมผังชั่งสองตัวตาม PROP-029), USB-A (CDC-ACM และ adapter serial ของยี่ห้อ) จอง USB-C เป็นการขนส่งอนาคต — โมเดล driver เดิม เปลี่ยนแค่หัวต่อRS-232 confirmed by the client (16 Jul 2026, OQ-1); BCD-parallel confirmed from field source (EXH-031-A).ลูกค้ายืนยัน RS-232 (16 ก.ค. 2569, OQ-1); ยืนยัน BCD ขนานจาก source หน้างาน (EXH-031-A)
HW-02Vendor protocol drivers: pluggable per indicator model — continuous-stream (head broadcasts weight frames) and poll/response (service requests a reading) both supported; frame format, baud/parity, checksum, and stable-flag semantics are driver config, not code.driver โปรโตคอลรายยี่ห้อ: เสียบเพิ่มได้ตามรุ่นหัวอ่าน — รองรับทั้งแบบ stream ต่อเนื่อง (หัวส่ง frame น้ำหนักเอง) และแบบ poll/response (service ขอค่า); รูปแบบ frame, baud/parity, checksum และความหมายธง stable เป็น config ของ driver ไม่ใช่ codeDriver catalog seeded from the factory survey (OQ-2). First two drivers specced from field source: DRV-TOLEDO-CONT (RS-232, 1200-E-7-1, STX-framed continuous stream) and DRV-KLD700-BCD (8255 parallel BCD) — EXH-031-A.แคตตาล็อก driver ตั้งต้นจากการสำรวจโรงงาน (OQ-2) สอง driver แรกระบุ spec ได้แล้วจาก source หน้างาน: DRV-TOLEDO-CONT (RS-232, 1200-E-7-1, frame คั่น STX) และ DRV-KLD700-BCD (BCD ขนานผ่าน 8255) — EXH-031-A
HW-03Embeddable: the SLS runs on the factory's existing weighbridge PC (Windows service / Linux daemon) or, where no usable PC exists, on a small adapter box we supply that bridges the legacy port to the LAN.ฝังได้: SLS ทำงานบน PC ห้องชั่งเดิมของโรงงาน (Windows service / Linux daemon) หรือหากไม่มี PC ที่ใช้ได้ ใช้กล่อง adapter ขนาดเล็กที่เราจัดหา เชื่อมพอร์ตเก่าเข้า LANAdapter-box ownership/pricing → OQ-3.เจ้าของ/ราคากล่อง adapter → OQ-3
SW-01Uniform reading contract: every reading = {scale_head_id, weight_kg, stable_flag, raw_frame, read_at, seq}. The WeighTicket transaction (FR-05) may only commit a reading with stable_flag = true.สัญญาค่าอ่านรูปแบบเดียว: ทุกค่าอ่าน = {scale_head_id, weight_kg, stable_flag, raw_frame, read_at, seq} transaction WeighTicket (FR-05) commit ได้เฉพาะค่าที่ stable_flag = trueRaw frame retained for legal replay (G5).เก็บ frame ดิบไว้ replay ตามกฎหมาย (G5)
SW-02Link health: the SLS emits heartbeat + link state (up / degraded / lost) per head; loss of frames beyond a configurable window (default 5 s) → link-lost, which puts that bridge's mill-wb into the A-10 blocking state.สุขภาพสาย: SLS ส่ง heartbeat + สถานะสาย (ปกติ/เสื่อม/หลุด) ต่อหัว; ไม่มี frame เกินหน้าต่างที่ตั้งได้ (ค่าเริ่มต้น 5 วินาที) → สายหลุด ซึ่งพาห้องชั่งแท่นนั้นเข้าสถานะปิดกั้นตาม A-10Closes Q-37 — see Section 6.ปิด Q-37 — ดูข้อ 6
SW-03Head registry: each physical indicator registers as a ScaleHead (mill, bridge, transport, driver, certification ref, calibration due date); readings are attributable and un-registered heads are rejected.ทะเบียนหัวอ่าน: หัวอ่านกายภาพแต่ละตัวลงทะเบียนเป็น ScaleHead (โรงงาน แท่นชั่ง การขนส่ง driver เลขที่รับรอง วันครบกำหนดสอบเทียบ); ค่าอ่านระบุที่มาได้ และหัวที่ไม่ลงทะเบียนถูกปฏิเสธ
NF-01Latency: head-to-screen ≤ 500 ms in normal operation; the operator sees the live weight move as the truck settles.ค่าหน่วง: หัวอ่านถึงหน้าจอ ≤ 500 ms ในการทำงานปกติ; operator เห็นน้ำหนักวิ่งขณะรถนิ่งตัว
NF-02Integrity: checksum-failed or out-of-range frames are logged and dropped, never surfaced as readings; two consecutive stable frames must agree within the head's division (e) before commit is offered.ความถูกต้อง: frame ที่ checksum ผิดหรือค่าเกินช่วง ถูก log แล้วทิ้ง ไม่โผล่เป็นค่าอ่าน; frame stable สองครั้งติดต้องตรงกันภายใน 1 ขีด (e) ของหัวอ่านก่อนเปิดให้ commit
NF-03Legal-for-trade: the integration must not alter the certified measuring chain — the SLS is read-only toward the head; compliance posture with the Weights and Measures Act (พ.ร.บ. มาตราชั่งตวงวัด) documented per install.ตามกฎหมายชั่งตวงวัด: การเชื่อมต่อต้องไม่แก้สายการวัดที่ผ่านการรับรอง — SLS อ่านอย่างเดียวต่อหัวอ่าน; จัดทำเอกสารความสอดคล้อง พ.ร.บ. มาตราชั่งตวงวัด ต่อการติดตั้งCertification attaches to the weighbridge — annual on-site audit + certificate by the Department of Weights and Measures (OQ-4 ruling); the SLS carries the certificate ref/expiry per head (SW-03) and blocks pricing on a lapsed certificate.การรับรองอยู่ที่เครื่องชั่ง — สำนักชั่งตวงวัดตรวจและออกใบรับรองทุกปี (คำวินิจฉัย OQ-4); SLS เก็บเลขใบรับรอง/วันหมดอายุต่อหัว (SW-03) และกันการคิดราคาเมื่อใบรับรองขาดอายุ

4. The application service — Scale Link Service (SLS)4. บริการแอปพลิเคชัน — Scale Link Service (SLS)

5. Communication architecture5. สถาปัตยกรรมการสื่อสาร

indicator head ──[parallel | RS-232 | RS-485 | USB-A | (USB-C)]──▶ SLS (driver + health) SLS ──local──▶ ST-WB station app (.NET MAUI) ──▶ application gateway ──sync──▶ platform (mode A · factory · PROP-028) SLS ──local──▶ ST-WB station app (.NET MAUI, standalone) ──HTTPS + offline queue──▶ platform API gateway (mode B · remote bridge / เครนขนถ่าย)

6. Q-37 disposition — the blocking state, now defined6. การจัดการ Q-37 — สถานะปิดกั้น นิยามแล้ว

7. Open questions7. คำถามเปิด

OQ-1 "RS-323" — confirm RS-232 was meant Decided (client, 16 Jul 2026): RS-232 confirmed. Residual: any other transports in the field (current-loop 20 mA, Ethernet-native heads)?"RS-323" — ยืนยันว่าหมายถึง RS-232 ตัดสินแล้ว (ลูกค้า 16 ก.ค. 2569): ยืนยัน RS-232 ตกค้าง: มีการขนส่งอื่นในหน้างานไหม (current-loop 20 mA, หัวอ่าน Ethernet)?

Residual part-answered from source (16 Jul 2026):ตอบข้อตกค้างบางส่วนจาก source (16 ก.ค. 2569): the caneScale teardown (EXH-031-A) proves a second field transport: raw BCD-parallel indicator output (KL-D700 via an 8255 I/O card) — the HW-03 adapter-box case in the flesh. 20 mA / Ethernet still unconfirmed → FORM-031 "other" checkbox.การชำแหละ caneScale (EXH-031-A) พิสูจน์การขนส่งที่สองในหน้างาน: output หัวอ่านแบบ BCD ขนานดิบ (KL-D700 ผ่านการ์ด I/O 8255) — กรณีกล่อง adapter ของ HW-03 ตัวเป็น ๆ 20 mA / Ethernet ยังไม่ยืนยัน → ช่อง "อื่นๆ" ของ FORM-031

OQ-2 Hardware survey: per pilot factory — indicator brand/model, port type, existing PC OS/specs, dual-scale wiring. Seeds the driver catalog and decides where adapter boxes are needed.สำรวจฮาร์ดแวร์: ต่อโรงงานนำร่อง — ยี่ห้อ/รุ่นหัวอ่าน ชนิดพอร์ต OS/สเปก PC เดิม การเดินสายชั่งสองตัว เป็นฐานแคตตาล็อก driver และชี้ว่าที่ใดต้องใช้กล่อง adapter

In progress (16 Jul 2026):กำลังดำเนินการ (16 ก.ค. 2569): printable bilingual survey form issued as FORM-031 — one page per factory for field technicians (factory info, per-bridge indicator table, per-bridge port checkboxes + photo prompts, PC/OS, note printer, calibration refs). OQ-2 closes when the pilot-factory forms return; the OQ-1 residual (other transports in the field) rides on the same form's "other" checkbox.ออกแบบสำรวจสองภาษาพิมพ์ได้เป็น FORM-031 — หนึ่งหน้าต่อโรงงาน สำหรับช่างเทคนิคหน้างาน (ข้อมูลโรงงาน ตารางหัวอ่านรายแท่น ช่องกาพอร์ตรายแท่น + จุดให้ถ่ายรูป PC/OS เครื่องพิมพ์ใบรับอ้อย ข้อมูลสอบเทียบ) OQ-2 ปิดเมื่อแบบฟอร์มโรงงานนำร่องกลับมา; ข้อตกค้างของ OQ-1 (การขนส่งอื่นในหน้างาน) ไปกับช่อง "อื่นๆ" ของฟอร์มเดียวกัน

OQ-3 Adapter box: who owns/pays — bundled in the PROP-028 on-site tier, sold, or leased? Same for USB-C adapters later. Decided (client, 16 Jul 2026): lease/bundle — never sold.กล่อง adapter: ใครเป็นเจ้าของ/จ่าย — รวมในชั้นติดตั้ง PROP-028, ขาย หรือให้เช่า? ตัดสินแล้ว (ลูกค้า 16 ก.ค. 2569): ให้เช่า/รวมในชั้นบริการ — ไม่ขายขาด

Ruling:คำวินิจฉัย: the factory gets the option to lease the box or take it bundled in the PROP-028 on-site tier; ownership always stays with the platform — the box carries our software and driver updates, so maintenance, replacement and the legal-for-trade posture (OQ-4) stay in one pair of hands. Outright sale is off the table. The same rule covers future USB-C adapters. Residuals: lease pricing vs the on-site-tier SKU (rides PROP-028 OQ-6 packaging) and the count of bridges actually needing a box (FORM-031 survey returns).โรงงานเลือกได้ระหว่างเช่ากล่อง หรือรับแบบรวมในชั้นติดตั้ง PROP-028; กรรมสิทธิ์อยู่กับ platform เสมอ — กล่องบรรจุ software และ driver ของเรา งานบำรุงรักษา การเปลี่ยนทดแทน และท่าทีตามกฎหมายชั่งตวงวัด (OQ-4) จึงอยู่ในมือเดียว ไม่มีการขายขาด กฎเดียวกันครอบ adapter USB-C ในอนาคต ตกค้าง: ราคาเช่าเทียบ SKU ชั้นติดตั้ง (ไปกับ OQ-6 ของ PROP-028) และจำนวนแท่นที่ต้องใช้กล่องจริง (รอผล FORM-031)

OQ-4 Legal-for-trade scope: does reading the certified head for payment require any approval/registration of the SLS itself under the Weights and Measures Act, or is read-only tapping outside the certified chain? Decided (client, 16 Jul 2026): certification attaches to the weighbridge, not the software — the SLS needs no registration of its own.ขอบเขตกฎหมายชั่งตวงวัด: การอ่านหัวที่รับรองเพื่อจ่ายเงินต้องขออนุญาต/ขึ้นทะเบียน SLS เองตาม พ.ร.บ. มาตราชั่งตวงวัด หรือการอ่านอย่างเดียวอยู่นอกสายที่รับรอง? ตัดสินแล้ว (ลูกค้า 16 ก.ค. 2569): การรับรองอยู่ที่เครื่องชั่ง ไม่ใช่ซอฟต์แวร์ — SLS ไม่ต้องขึ้นทะเบียนเอง

Ruling (client, 16 Jul 2026):คำวินิจฉัย (ลูกค้า 16 ก.ค. 2569): the Department of Weights and Measures audits each weighbridge annually, on site, and issues the certificate for the weighbridge itself — certification of the instrument and its reading is done by the authority, as required by law. The certified chain therefore ends at the weighbridge/indicator; downstream read-only software (caneScale today, the SLS tomorrow) sits outside it and needs no approval or registration of its own — consistent with vendor readers operating unchallenged for years (EXH-031-A). SLS obligations that FOLLOW from this: (1) never alter the certified chain — read-only stands (NF-03); (2) carry the bridge's certificate reference and expiry on the ScaleHead record (SW-03) and surface a lapsed/expired certificate as a blocking condition alongside the A-10 link-lost state — an uncertified bridge must not price cane; (3) keep raw-frame evidence so any reading can be replayed against the certified display (G5). Residual (design detail, non-blocking): whether certificate expiry blocks weighing outright or warns-and-escalates — to be set with the mill-settings quality/compliance topic.สำนักชั่งตวงวัดเข้าตรวจเครื่องชั่งทุกปี ถึงหน้างาน และออกใบรับรองให้กับตัวเครื่องชั่งเอง — การรับรองเครื่องมือและค่าอ่านทำโดยหน่วยงานเองตามที่กฎหมายกำหนด สายที่รับรองจึงสิ้นสุดที่เครื่องชั่ง/หัวอ่าน; ซอฟต์แวร์อ่านอย่างเดียวที่อยู่ปลายน้ำ (caneScale วันนี้ SLS วันหน้า) อยู่นอกสายนั้น ไม่ต้องขออนุญาต/ขึ้นทะเบียนเอง — สอดคล้องกับการที่ตัวอ่านของ vendor ใช้งานมาหลายปีโดยไม่ถูกทักท้วง (EXH-031-A) หน้าที่ของ SLS ที่ตามมาจากข้อนี้: (1) ห้ามแก้สายที่รับรอง — คงอ่านอย่างเดียว (NF-03); (2) เก็บเลขที่ใบรับรองและวันหมดอายุบนระเบียน ScaleHead (SW-03) และแสดงใบรับรองที่ขาด/หมดอายุเป็นเงื่อนไขปิดกั้นคู่กับสถานะสายหลุดตาม A-10 — แท่นชั่งที่ไม่มีใบรับรองต้องไม่ใช้คิดราคาอ้อย; (3) เก็บหลักฐาน frame ดิบให้ replay ค่าอ่านเทียบจอที่รับรองได้ (G5) ตกค้าง (รายละเอียดการออกแบบ ไม่กั้น): ใบรับรองหมดอายุควรปิดการชั่งทันที หรือเตือนแล้วยกระดับ — ไปตั้งค่ากับหัวข้อคุณภาพ/compliance ของ mill-settings

Field observation (client, 16 Jul 2026):ข้อสังเกตจากหน้างาน (ลูกค้า 16 ก.ค. 2569): some factories already run self-written weighing software that reads one-way off the certified scale head — exactly the SLS posture; whether that software is itself certified/registered is unknown. This is precedent that read-only tapping is at least common practice, but NOT confirmation it is lawful for payment use — the regulatory check stands. Instrumented: FORM-031 already captures the current software/vendor per weighbridge PC; survey returns should also note whether any certification/registration exists for it. OQ-4 stays OPEN pending the Weights & Measures check.บางโรงงานใช้โปรแกรมชั่งที่เขียนเอง อ่านค่าทางเดียวจากหัวเครื่องชั่งที่รับรองอยู่แล้ว — ท่าเดียวกับ SLS; แต่ไม่ทราบว่าโปรแกรมนั้นขึ้นทะเบียน/รับรองหรือไม่ นี่เป็นหลักฐานว่าการอ่านอย่างเดียวเป็นทางปฏิบัติที่พบทั่วไป แต่ยังไม่ยืนยันความชอบด้วยกฎหมายสำหรับการใช้จ่ายเงิน — ยังต้องตรวจสอบกับหน่วยงานกำกับ เครื่องมือ: FORM-031 เก็บโปรแกรม/ผู้พัฒนาปัจจุบันต่อเครื่องชั่งอยู่แล้ว; ผลสำรวจควรระบุด้วยว่ามีการขึ้นทะเบียน/รับรองหรือไม่ OQ-4 ยังเปิด รอผลตรวจสอบด้านชั่งตวงวัด

Source corroboration (16 Jul 2026):ข้อยืนยันจาก source (16 ก.ค. 2569): the attached caneScale source (EXH-031-A) confirms the read-only posture in code — the program never writes to the head on either path. The software is a named local vendor's build (Business Intelligence Technology Co., Ltd.), launched from a parent CIS — so the question sharpens: was that vendor's reader ever registered/approved, or has read-only tapping simply gone unchallenged? Still a regulatory check, now with a concrete precedent to cite.source ของ caneScale ที่แนบมา (EXH-031-A) ยืนยันท่าอ่านอย่างเดียวในระดับ code — โปรแกรมไม่เคยเขียนไปหาหัวอ่านทั้งสองเส้นทาง ซอฟต์แวร์เป็นงานของ vendor ท้องถิ่นที่ระบุชื่อได้ (Business Intelligence Technology Co., Ltd.) ถูกเรียกจากระบบ CIS แม่ — คำถามจึงคมขึ้น: ตัวอ่านของ vendor นั้นเคยขึ้นทะเบียน/ได้รับอนุญาตหรือเปล่า หรือการอ่านอย่างเดียวแค่ไม่เคยถูกทักท้วง? ยังต้องตรวจกับหน่วยงานกำกับ แต่มีแบบอย่างรูปธรรมให้อ้างอิงแล้ว

OQ-5 Posture-B LAN detail: how does a browser page reach the LAN-local SLS (local WebSocket endpoint, PWA, or thin helper app)? Affects the cloud factory install footprint. Decided (client, 16 Jul 2026): no browser at the bridge — the station app is rewritten as a locked-down cross-platform .NET MAUI application.รายละเอียด LAN ท่า B: หน้าเว็บเข้าถึง SLS ใน LAN อย่างไร? ตัดสินแล้ว (ลูกค้า 16 ก.ค. 2569): ไม่ใช้เบราว์เซอร์ที่แท่นชั่ง — เขียนแอปสถานีใหม่เป็น .NET MAUI ข้าม platform แบบ lock down

Ruling:คำวินิจฉัย: the weighbridge application is reverse-engineered from the in-service caneScale workflows (EXH-031-A) and rewritten in .NET MAUI for cross-platform deployment (Windows / Linux / macOS), locked down at the station. Two modes of one app: (A) factory mode — it communicates with the on-prem application gateway (PROP-028), the factory's centralized point that issues sequence numbers, handles all upstream communication, and manages everything inside the factory; the gateway acts as an offline pre-gateway while the internet is down and syncs up when it returns. (B) standalone mode — remote bridges and transfer/crane hubs (เครนขนถ่าย, PROP-030) run the same app talking directly to the platform API gateway with its own built-in offline queue. The old posture-B answer (browser page + LAN SLS) is retired — A-35's online-only bare-cloud weighbridge screen is superseded by standalone mode on acceptance (mill-wb web remains a back-office/monitoring surface, not the live weighing seat). Residuals (non-blocking): the Linux-desktop leg rides the Avalonia-powered MAUI backend (announced 11 Nov 2025 — keeps the MAUI codebase, swaps the renderer; early access, MIT on stabilization) — validate on the pilot hardware before committing, with an alternative fallback mechanism and, if Linux desktop stays unsupported, a dedicated kiosk/lockdown deployment on Android or Windows Embedded/IoT — both first-class MAUI targets — specced as the escape hatch (client, 16 Jul 2026); standalone-mode offline scope (what commits are queueable beyond weigh events); kiosk/lockdown spec → PROP-021/PROP-028 station registry.แอปห้องชั่งถูก reverse-engineer จาก workflow ของ caneScale ที่ใช้งานจริง (EXH-031-A) แล้วเขียนใหม่ด้วย .NET MAUI ให้ข้าม platform (Windows / Linux / macOS) และ lock down ที่สถานี แอปเดียวสองโหมด: (A) โหมดโรงงาน — สื่อสารกับ application gateway ในโรงงาน (PROP-028) ศูนย์กลางที่จ่ายเลขลำดับ จัดการการสื่อสาร และดูแลทุกอย่างในโรงงาน; เป็น pre-gateway แบบ offline ระหว่างเน็ตล่มแล้ว sync ขึ้นเมื่อกลับมา (B) โหมด standalone — แท่นชั่งนอกโรงงาน/เครนขนถ่าย (PROP-030) ใช้แอปเดียวกันคุยตรงกับ API gateway ของ platform พร้อมคิว offline ในตัว คำตอบท่า B เดิม (เบราว์เซอร์ + SLS ใน LAN) เลิกใช้ — หน้าจอชั่ง online-only ตาม A-35 ถูกแทนด้วยโหมด standalone เมื่อรับข้อเสนอ (mill-wb บนเว็บเหลือเป็นจอสำนักงาน/เฝ้าดู ไม่ใช่ที่นั่งชั่งสด) ตกค้าง (ไม่กั้น): ขา Linux desktop ใช้ MAUI backend ที่ขับเคลื่อนด้วย Avalonia (ประกาศ 11 พ.ย. 2568 — คง codebase MAUI เดิม เปลี่ยนเฉพาะชั้น render; ยัง early access) — ต้องทดสอบบนฮาร์ดแวร์นำร่องก่อนผูกมัด โดยมีกลไกสำรองอื่น และหาก Linux desktop ไม่รองรับจะทำ spec kiosk/lockdown บน Android หรือ Windows Embedded/IoT — ทั้งคู่เป็น target หลักของ MAUI — เป็นทางออก (ลูกค้า 16 ก.ค. 2569); ขอบเขต offline ของโหมด standalone; spec kiosk/lock down → PROP-021/ทะเบียนสถานี PROP-028

8. Graph deltas on acceptance (summary)8. รายการแก้ graph เมื่อรับ (สรุป)

9. Revision history9. ประวัติการแก้ไข

RevDateวันที่Changesการเปลี่ยนแปลง
0.12026-07-16First draft from client direction on Q-37: goals (existing hardware, protocol abstraction, A-10 end-to-end, both postures, legal-for-trade), requirements HW-01…NF-03, the Scale Link Service definition, communication paths (gateway posture / API-gateway posture), the Q-37 blocking-state disposition, five OQs, graph-delta summary.ร่างแรกจากทิศทางลูกค้าเรื่อง Q-37: เป้าหมาย (ฮาร์ดแวร์เดิม, abstraction โปรโตคอล, A-10 ตลอดสาย, สองท่า, ตามกฎหมายชั่งตวงวัด) ข้อกำหนด HW-01…NF-03 นิยาม Scale Link Service เส้นทางสื่อสาร (ท่า gateway / ท่า API gateway) การจัดการสถานะปิดกั้นของ Q-37 OQ ห้าข้อ และสรุปรายการแก้ graph
0.22026-07-16OQ-1 half-closed by the client: RS-232 confirmed ("RS-323" was a typo); HW-01 note updated. Residual kept under OQ-1: whether any field installs use other transports (20 mA current loop, Ethernet-native heads) — folds into the OQ-2 hardware survey.ลูกค้าปิดครึ่ง OQ-1: ยืนยัน RS-232 ("RS-323" พิมพ์ผิด); ปรับหมายเหตุ HW-01 ตกค้างคงใน OQ-1: มีการติดตั้งที่ใช้การขนส่งอื่นไหม (current loop 20 mA, หัวอ่าน Ethernet) — รวบเข้าการสำรวจฮาร์ดแวร์ OQ-2
0.32026-07-16OQ-2 instrumented: printable bilingual field survey issued as FORM-031 (one page per factory: per-bridge indicator + port tables with photo prompts, PC/OS, note printer, calibration). OQ-2 closes when the pilot forms return.เตรียมเครื่องมือ OQ-2: ออกแบบสำรวจสองภาษาพิมพ์ได้เป็น FORM-031 (หนึ่งหน้าต่อโรงงาน: ตารางหัวอ่าน + พอร์ตรายแท่นพร้อมจุดถ่ายรูป PC/OS เครื่องพิมพ์ การสอบเทียบ) OQ-2 ปิดเมื่อฟอร์มนำร่องกลับมา
0.42026-07-16OQ-3 decided by the client: adapter boxes are leased or bundled (PROP-028 on-site tier) — never sold; ownership stays with the platform (software/driver updates, maintenance and the OQ-4 legal posture in one hand); same rule for future USB-C adapters. Residuals: lease pricing vs the on-site SKU (→ PROP-028 OQ-6), box count per factory (→ FORM-031 returns).ลูกค้าตัดสิน OQ-3: กล่อง adapter ให้เช่าหรือรวมในชั้นติดตั้ง (PROP-028) — ไม่ขายขาด; กรรมสิทธิ์อยู่กับ platform (software/driver งานซ่อมบำรุง และท่าทีตาม OQ-4 อยู่ในมือเดียว); กฎเดียวกันกับ adapter USB-C ในอนาคต ตกค้าง: ราคาเช่าเทียบ SKU ชั้นติดตั้ง (→ OQ-6 ของ PROP-028), จำนวนกล่องต่อโรงงาน (→ รอผล FORM-031)
0.52026-07-16OQ-4 field observation recorded (client): some factories already run self-written one-way read-off software against the certified head — precedent for the SLS posture, but certification status unknown; OQ-4 stays OPEN pending the Weights & Measures regulatory check. FORM-031 gains a certified/registered checkbox for the existing software.บันทึกข้อสังเกตหน้างานของ OQ-4 (ลูกค้า): บางโรงงานใช้โปรแกรมชั่งที่เขียนเองอ่านค่าทางเดียวจากหัวที่รับรองอยู่แล้ว — เป็นหลักฐานแนวปฏิบัติแบบเดียวกับ SLS แต่ไม่ทราบสถานะการรับรอง; OQ-4 ยังเปิด รอผลตรวจสอบด้านชั่งตวงวัด เพิ่มช่องถามการขึ้นทะเบียน/รับรองของโปรแกรมเดิมใน FORM-031
0.62026-07-16Client attached the actual field software's VB6 source (caneScale, WinXP-era) — teardown recorded as EXH-031-A: Toledo RS-232 protocol pinned (1200-E-7-1, STX-framed continuous one-way stream, per-model sign quirks → DRV-TOLEDO-CONT); KL-D700 parallel-BCD bit map pinned (8255 card, inverted nibbles → DRV-KLD700-BCD) — OQ-1 residual part-answered (BCD-parallel exists in the field); read-only posture confirmed in code and vendor identified (OQ-4 sharpened, still open); local queue-number running corroborates A-06/A-07; five SLS anti-requirement gaps recorded (no stability gating, no integrity checks, no link health, plaintext credentials, 2005 hardware assumptions). HW-01/HW-02 notes updated.ลูกค้าแนบ source VB6 ของซอฟต์แวร์หน้างานจริง (caneScale ยุค WinXP) — บันทึกการชำแหละเป็น EXH-031-A: ระบุโปรโตคอล Toledo RS-232 (1200-E-7-1, stream ทางเดียวคั่น STX → DRV-TOLEDO-CONT); ผังบิต BCD ขนานของ KL-D700 (การ์ด 8255, nibble กลับค่า → DRV-KLD700-BCD) — ตอบข้อตกค้าง OQ-1 บางส่วน (BCD ขนานมีจริงในหน้างาน); ยืนยันท่าอ่านอย่างเดียวใน code และระบุ vendor ได้ (OQ-4 คมขึ้น ยังเปิด); การ run เลขคิวท้องถิ่นยืนยัน A-06/A-07; บันทึกช่องว่าง 5 ข้อสำหรับ SLS (ไม่กรองความนิ่ง ไม่ตรวจความถูกต้อง ไม่มีสุขภาพสาย credential เปิดเผย สมมติฐานฮาร์ดแวร์ปี 2005) ปรับหมายเหตุ HW-01/HW-02
0.72026-07-16OQ-4 decided by the client: the Department of Weights and Measures audits each weighbridge annually on site and issues the certificate for the weighbridge itself (required by law) — the certified chain ends at the instrument; downstream read-only software needs no approval/registration of its own. SLS consequences: NF-03 read-only stands; ScaleHead carries certificate ref + expiry (SW-03) and a lapsed certificate blocks pricing alongside the A-10 blocking state. Residual (non-blocking): expiry block-vs-warn policy → mill-settings. Only OQ-2 (survey returns) and OQ-5 (posture-B LAN mechanics) remain open.ลูกค้าตัดสิน OQ-4: สำนักชั่งตวงวัดเข้าตรวจเครื่องชั่งทุกปีถึงหน้างานและออกใบรับรองให้ตัวเครื่องชั่งเอง (กฎหมายกำหนด) — สายที่รับรองสิ้นสุดที่เครื่องมือ; ซอฟต์แวร์อ่านอย่างเดียวปลายน้ำไม่ต้องขออนุญาต/ขึ้นทะเบียนเอง ผลต่อ SLS: คง NF-03 อ่านอย่างเดียว; ScaleHead เก็บเลขใบรับรอง + วันหมดอายุ (SW-03) และใบรับรองขาดอายุกันการคิดราคา คู่กับสถานะปิดกั้นตาม A-10 ตกค้าง (ไม่กั้น): นโยบายปิดหรือเตือนเมื่อหมดอายุ → mill-settings เหลือเปิดเฉพาะ OQ-2 (รอผลสำรวจ) และ OQ-5 (กลไก LAN ท่า B)
0.82026-07-16OQ-5 decided by the client: the station app is reverse-engineered from caneScale and rewritten in .NET MAUI (cross-platform, locked down); no browser at the bridge. One app, two modes: factory mode ↔ on-prem application gateway (PROP-028 — sequence numbers, all comms, offline pre-gateway, sync-up); standalone mode for remote bridges/crane hubs (เครนขนถ่าย, PROP-030) direct to the platform API gateway with a built-in offline queue. A-35's online-only bare-cloud weighing screen is superseded on acceptance; mill-wb web becomes monitoring/back-office. Section 5 architecture updated. Residuals: Linux desktop via the Avalonia-powered MAUI backend (announced Nov 2025; early access) — validate on pilot hardware; fallback mechanism to be selected, and if Linux desktop stays unsupported a kiosk/lockdown deployment on Android or Windows Embedded/IoT (first-class MAUI targets); standalone offline scope; kiosk spec → PROP-021/028. Only OQ-2 (survey returns) remains open.ลูกค้าตัดสิน OQ-5: แอปสถานีถูก reverse-engineer จาก caneScale แล้วเขียนใหม่ด้วย .NET MAUI (ข้าม platform, lock down); ไม่ใช้เบราว์เซอร์ที่แท่นชั่ง แอปเดียวสองโหมด: โหมดโรงงาน ↔ application gateway ในโรงงาน (PROP-028 — เลขลำดับ การสื่อสาร pre-gateway offline แล้ว sync); โหมด standalone สำหรับแท่นชั่งนอกโรงงาน/เครนขนถ่าย (PROP-030) ตรงถึง API gateway พร้อมคิว offline จอชั่ง online-only ตาม A-35 ถูกแทนเมื่อรับข้อเสนอ; mill-wb บนเว็บเป็นจอเฝ้าดู/สำนักงาน ปรับสถาปัตยกรรมข้อ 5 ตกค้าง: Linux desktop ผ่าน MAUI backend ของ Avalonia (ประกาศ พ.ย. 2568; early access) — ทดสอบบนเครื่องนำร่อง; เลือกกลไกสำรองภายหลัง และหาก Linux ไม่รองรับใช้ kiosk/lockdown บน Android หรือ Windows Embedded/IoT; ขอบเขต offline โหมด standalone; spec kiosk → PROP-021/028 เหลือเปิดเฉพาะ OQ-2 (รอผลสำรวจ)
1.02026-07-16ACCEPTED by the client and applied to the graph (spec v0.7.0 → v0.8.0): +ScaleHead (with certificate ref/expiry per the OQ-4 ruling) / +ScaleLink / +WeightReading; FR-05 gains the SLS reading contract (registered head, stable only, current certificate); +NFR-34 (latency/integrity); NFR-33 extended (certification attaches to the weighbridge); ScaleLinkLost/Restored events; wb.blocked.scale_link + hint copy — Q-37 CLOSED. ST-WB station app = .NET MAUI (factory / standalone modes); A-35 online-only screen superseded; mill-wb web = monitoring. Post-acceptance: OQ-2 survey returns refine the driver catalog; Linux-desktop validation (Avalonia MAUI backend, kiosk Android/Windows-Embedded escape hatch).ลูกค้ารับข้อเสนอและนำเข้า graph แล้ว (spec v0.7.0 → v0.8.0): +ScaleHead (พร้อมเลขใบรับรอง/วันหมดอายุตามคำวินิจฉัย OQ-4) / +ScaleLink / +WeightReading; FR-05 เพิ่มสัญญาค่าอ่านจาก SLS (หัวลงทะเบียน เฉพาะค่านิ่ง ใบรับรองไม่ขาดอายุ); +NFR-34 (ค่าหน่วง/ความถูกต้อง); ขยาย NFR-33 (การรับรองอยู่ที่เครื่องชั่ง); event ScaleLinkLost/Restored; wb.blocked.scale_link + ข้อความแนะนำ — ปิด Q-37 แอปสถานี ST-WB = .NET MAUI (โหมดโรงงาน / standalone); จอ online-only ตาม A-35 ถูกแทน; mill-wb บนเว็บ = จอเฝ้าดู หลังการรับ: ผลสำรวจ OQ-2 เติมแคตตาล็อก driver; ทดสอบ Linux desktop (Avalonia MAUI backend, ทางออก kiosk Android/Windows Embedded)