EXH-031-A Rev 0.1 · 16 Jul 2026

Cane Agency · Evidence exhibit for PROP-031สถาบันอ้อย · เอกสารหลักฐานประกอบ PROP-031

caneScale source teardown — the in-service WinXP/VB6 weighbridge reader from the field, and what the Scale Link Service inherits from itชำแหละ source โปรแกรม caneScale — โปรแกรมอ่านเครื่องชั่งยุค WinXP/VB6 ที่ใช้จริงหน้างาน และสิ่งที่ Scale Link Service รับต่อจากมัน

Documentเอกสาร
EXH-031-A
Statusสถานะ
EVIDENCE — analyzedหลักฐาน — วิเคราะห์แล้ว
Sourceที่มา
Client-attached VB6 source folder caneScale_ForWinXP (16 Jul 2026) — the weighing program a few factories use to read the weighbridge. Project vendor string: Business Intelligence Technology Co., Ltd. Startup Sub Main, launched from a parent CIS system.โฟลเดอร์ source VB6 caneScale_ForWinXP ที่ลูกค้าแนบ (16 ก.ค. 2569) — โปรแกรมชั่งที่บางโรงงานใช้อ่านเครื่องชั่ง ผู้พัฒนาตามโปรเจกต์: Business Intelligence Technology Co., Ltd. เริ่มที่ Sub Main ถูกเรียกจากระบบ CIS แม่
Bears onเกี่ยวข้องกับ
PROP-031 HW-01/HW-02 (driver catalog — two drivers now specced from source), OQ-1 residual (parallel BCD confirmed in the field), OQ-2 (baseline data point ahead of FORM-031), OQ-4 (the "self-written" software is a named local vendor's build; read-only posture confirmed in code).PROP-031 HW-01/HW-02 (แคตตาล็อก driver — สอง driver ระบุ spec ได้จาก source แล้ว), ข้อตกค้าง OQ-1 (ยืนยัน BCD ขนานในหน้างาน), OQ-2 (ข้อมูลฐานก่อน FORM-031), OQ-4 (โปรแกรม "เขียนเอง" คืองานของ vendor ท้องถิ่นที่ระบุชื่อได้; ยืนยันท่าอ่านอย่างเดียวจาก code)
Updatedปรับปรุงล่าสุด
16 Jul 2026

1. What was received1. สิ่งที่ได้รับ

Fileไฟล์What it isคืออะไร
caneScale.vbpVB6 project: 3 forms + 2 modules; references MSCOMM32.OCX (serial) and DllPort.dll (raw port I/O). Vendor: Business Intelligence Technology Co., Ltd.โปรเจกต์ VB6: 3 form + 2 module; อ้าง MSCOMM32.OCX (serial) และ DllPort.dll (อ่านพอร์ตดิบ) ผู้พัฒนา: Business Intelligence Technology Co., Ltd.
mdl_MainMenu.basEntry point: reads C:\LOGIN (company code, DB, username, password, menu number) and opens one of three screens: 11.11.1 parameter setup · 11.11.2 Toledo · 11.11.3 KL-D700.จุดเริ่ม: อ่าน C:\LOGIN (รหัสบริษัท, DB, ผู้ใช้, รหัสผ่าน, เลขเมนู) แล้วเปิดหนึ่งในสามจอ: 11.11.1 ตั้งค่า · 11.11.2 Toledo · 11.11.3 KL-D700
frm_SCALE.frmParameter screen: scale model (8142 / 8530 / KL-D700), COM port (1/2 only), baud fixed 1200, weigh-in-report flag, run-queue flag → persisted to C:\SCALESPARA.TXT.จอตั้งค่า: รุ่นเครื่องชั่ง (8142 / 8530 / KL-D700), COM port (1/2 เท่านั้น), baud คงที่ 1200, ธงพิมพ์รายงานชั่งเข้า, ธง run คิว → บันทึกลง C:\SCALESPARA.TXT
frm_TOLEDO.frmSerial reader for Toledo indicator heads (Models 8142 / 8530 / "8142(P)"), MSComm-based, continuous stream.ตัวอ่าน serial ของหัว Toledo (รุ่น 8142 / 8530 / "8142(P)") ใช้ MSComm รับ stream ต่อเนื่อง
frm_KLD700.frmParallel BCD reader for the KL-D700 head via an 8255 digital-I/O card, polled 1 Hz.ตัวอ่าน BCD ขนานของหัว KL-D700 ผ่านการ์ด I/O ดิจิทัล 8255 อ่านทุก 1 วินาที
caneScale_*.exeFive compiled per-factory variants (AV, crs, rsc, rsc+tn, tn) — one codebase, per-factory builds; r_compcode branches in code (e.g. company 5 relabels 8530 → "8142(P)"; a commented company-2 branch for CRS).ไบนารีห้ารุ่นรายโรงงาน (AV, crs, rsc, rsc+tn, tn) — โค้ดชุดเดียว build แยกโรงงาน; มีสาขาเงื่อนไข r_compcode ใน code (เช่น บริษัท 5 เปลี่ยนป้าย 8530 → "8142(P)"; สาขาบริษัท 2 ของ CRS ถูก comment ไว้)
rptwoutunload*.rptCrystal Reports templates for the weigh-out ticket — the same program owns ticket printing.แม่แบบ Crystal Reports ของใบชั่งออก — โปรแกรมเดียวกันเป็นเจ้าของการพิมพ์ใบชั่ง

2. Driver evidence A — Toledo over RS-232 (continuous stream)2. หลักฐาน driver A — Toledo ผ่าน RS-232 (stream ต่อเนื่อง)

port COM1 | COM2 only settings 1200 baud · EVEN parity · 7 data · 1 stop ("9600,N,7,1" variant commented out) direction one-way: head → PC the program NEVER writes to the port (continuous/broadcast mode, no polling command) framing STX (0x02)-anchored, ~18-byte frames · RThreshold 18 · InBufferSize 512 · UI refresh 1 s frame [ … ] [STX] [F1 F2 F3] [x] [W W W W W (W)] 0x02 status ×3 weight, 5 digits (8530) or 6 digits (8142) sign 8530: frame char at position 5 = "3" → negative 8142: char at STX+2 = "r" → negative
Finding T1 — protocol pinnedข้อพบ T1 — โปรโตคอลระบุได้แล้ว The SLS Toledo driver (DRV-TOLEDO-CONT) can be specced today from this source: continuous-stream, STX-framed, 1200-E-7-1, per-model weight-field width and sign quirks as driver config — exactly the HW-02 "frame format is config, not code" model. The 8142 vs 8530 vs 8142(P) differences are three config rows, not three programs. driver Toledo ของ SLS (DRV-TOLEDO-CONT) ระบุ spec ได้ทันทีจาก source นี้: stream ต่อเนื่อง, frame คั่นด้วย STX, 1200-E-7-1, ความกว้างช่องน้ำหนักและวิธีอ่านเครื่องหมายลบตามรุ่น เป็น config ของ driver — ตรงตามโมเดล HW-02 "รูปแบบ frame เป็น config ไม่ใช่ code" ความต่างของ 8142 / 8530 / 8142(P) คือ config สามแถว ไม่ใช่สามโปรแกรม
Finding T2 — the status bytes exist but are ignoredข้อพบ T2 — byte สถานะมีอยู่แต่ถูกเมิน The three flag characters after STX (Toledo status bytes — motion/stable, unit, zero, over-capacity live here) are captured into a textbox and never decoded. caneScale accepts whatever weight is on screen when the operator clicks — there is no stability gating anywhere. The SLS's stable_flag (SW-01, commit only when stable) must be decoded from these same status bytes — the data is already on the wire. อักขระธงสามตัวหลัง STX (byte สถานะของ Toledo — motion/stable, หน่วย, ศูนย์, เกินพิกัด อยู่ตรงนี้) ถูกเก็บใส่ textbox แต่ไม่เคยถูกถอดรหัส caneScale รับน้ำหนักใดก็ตามที่อยู่บนจอตอน operator กด — ไม่มีการกรองความนิ่งเลย ธง stable_flag ของ SLS (SW-01 — commit เฉพาะค่านิ่ง) ต้องถอดจาก byte สถานะชุดเดียวกันนี้ — ข้อมูลอยู่บนสายอยู่แล้ว

3. Driver evidence B — KL-D700 over parallel BCD (8255 I/O card)3. หลักฐาน driver B — KL-D700 ผ่าน BCD ขนาน (การ์ด I/O 8255)

hardware 8255 PIA card, base 0x300 · control 0x303 · mode 0x9B (ports A, B, C all input) · raw Inp32 via DllPort.dll polling 1 Hz timer — no interrupts, no handshake encoding 5 decimal digits × 4-bit nibbles, INVERTED (digit = 15 − nibble) port A bits 0-3 → units port A bits 4-7 → tens port B bits 0-3 → hundreds port B bits 4-7 → thousands port C bits 0-3 → ten-thousands sign port C bit 4: 1 → "+" 0 → "−"
Finding K1 — parallel BCD is real, and it is the adapter-box caseข้อพบ K1 — BCD ขนานมีจริง และคือกรณีกล่อง adapter The OQ-1 residual ("do other transports exist in the field?") is part-answered from source: yes — a raw BCD-parallel indicator output read through a plugged I/O card, no serial anywhere. No modern PC has this card slot; this head class is precisely HW-03's adapter-box scenario (the box's GPIO reads the BCD lines and bridges to LAN). Driver DRV-KLD700-BCD is fully specced by the bit map above. ข้อตกค้างของ OQ-1 ("มีการขนส่งแบบอื่นในหน้างานไหม") ตอบได้บางส่วนจาก source: มี — output หัวอ่านแบบ BCD ขนานดิบ อ่านผ่านการ์ด I/O เสียบเพิ่ม ไม่มี serial เลย PC ยุคใหม่ไม่มีสล็อตการ์ดนี้; หัวอ่านชนิดนี้คือสถานการณ์กล่อง adapter ของ HW-03 พอดี (GPIO ของกล่องอ่านสาย BCD แล้วเชื่อมเข้า LAN) driver DRV-KLD700-BCD ระบุ spec ครบจากผังบิตด้านบน

4. Corroborations for the wider spec4. ข้อยืนยันต่อ spec ภาพรวม

5. Gaps the SLS must close (anti-requirements)5. ช่องว่างที่ SLS ต้องปิด (ข้อกำหนดเชิงลบ)

GAP-1 · No stability gatingไม่กรองความนิ่ง Any displayed value can be accepted mid-motion. SLS: commit only on stable_flag + two agreeing frames (SW-01/NF-02). ค่าใดบนจอก็รับได้แม้รถยังขยับ SLS: commit เฉพาะ stable_flag + frame ตรงกันสองครั้ง (SW-01/NF-02)
GAP-2 · No integrity checksไม่ตรวจความถูกต้อง No checksum, no range check; a corrupt frame can render as a weight. Worse, every parse error raises a modal message box that halts reading until dismissed. SLS: log-and-drop bad frames, never block the stream (NF-02), no modal failure modes. ไม่มี checksum ไม่เช็คช่วงค่า; frame เสียแสดงเป็นน้ำหนักได้ ซ้ำร้าย ทุก error การแปลงเด้ง message box แบบ modal ที่หยุดการอ่านจนกว่าจะกดปิด SLS: log แล้วทิ้ง frame เสีย ไม่ block stream (NF-02) ไม่มีโหมดล้มเหลวแบบ modal
GAP-3 · No link-health conceptไม่มีแนวคิดสุขภาพสาย A silent line just freezes the last number on screen — indistinguishable from a parked truck. SLS: heartbeat + link-lost → the A-10 blocking state (SW-02); this is the exact failure Q-37 exists for. สายเงียบ = ตัวเลขล่าสุดค้างบนจอ — แยกไม่ออกจากรถจอดนิ่ง SLS: heartbeat + สายหลุด → สถานะปิดกั้นตาม A-10 (SW-02); นี่คือความล้มเหลวที่ Q-37 มีไว้จัดการโดยตรง
GAP-4 · Plaintext credentials & root-drive configรหัสผ่าน plaintext และ config ที่ราก C:\ C:\LOGIN carries DB credentials in plaintext; config sits at C:\SCALESPARA.TXT. SLS: per-station credentials from the PROP-028 station registry, mutually authenticated LAN traffic, no secrets on disk in the clear. C:\LOGIN เก็บ credential ฐานข้อมูลแบบ plaintext; config อยู่ที่ C:\SCALESPARA.TXT SLS: credential ต่อสถานีจากทะเบียนสถานี PROP-028, ทราฟฟิก LAN ยืนยันสองทาง, ไม่มีความลับบนดิสก์แบบเปิดเผย
GAP-5 · Hardware assumptions frozen in 2005สมมติฐานฮาร์ดแวร์ค้างที่ปี 2005 COM1/COM2 only, 1200 baud fixed, WinXP-era OCX dependencies, ISA/PCI I/O card for BCD. SLS: transport list per HW-01, driver config per HW-02, adapter box per HW-03 for exactly these machines. มีแค่ COM1/COM2, baud คงที่ 1200, พึ่ง OCX ยุค WinXP, การ์ด I/O แบบ ISA/PCI สำหรับ BCD SLS: รายการการขนส่งตาม HW-01, config driver ตาม HW-02, กล่อง adapter ตาม HW-03 สำหรับเครื่องแบบนี้โดยเฉพาะ

6. Revision history6. ประวัติการแก้ไข

RevDateวันที่Changesการเปลี่ยนแปลง
0.116 Jul 2026First analysis of the client-attached caneScale VB6 source: file inventory, Toledo RS-232 protocol (1200-E-7-1, STX-framed, per-model sign quirks), KL-D700 parallel-BCD bit map (8255 card, inverted nibbles, sign bit), corroborations (read-only posture, local queue running, bridge-side printing), five SLS anti-requirement gaps.วิเคราะห์ครั้งแรกของ source caneScale VB6 ที่ลูกค้าแนบ: บัญชีไฟล์, โปรโตคอล Toledo RS-232 (1200-E-7-1, frame คั่น STX, วิธีอ่านเครื่องหมายลบตามรุ่น), ผังบิต BCD ขนานของ KL-D700 (การ์ด 8255, nibble กลับค่า, บิตเครื่องหมาย), ข้อยืนยัน (ท่าอ่านอย่างเดียว, run เลขคิวท้องถิ่น, พิมพ์ที่แท่นชั่ง), ช่องว่างเชิงลบ 5 ข้อสำหรับ SLS