# Manufacturing Test Infrastructure

## DOS Test Stations (64 total)
- Stations: TS-1 through TS-30 (plus L/R variants for dual-station setups)
- Dev/Test: TS-GURU, TS-TOM
- OS: MS-DOS 6.22
- Software: QuickBASIC 4.5 ATE programs
- Network: SMB1 via D2TESTNAS Samba proxy
- Not domain-joined

### Boot Sequence
AUTOEXEC.BAT v4.1 (deployed 2026-03-12):
1. `STARTNET.BAT` → Map T: (\\\\D2TESTNAS\test) and X: (\\\\D2TESTNAS\datasheets)
2. `NWTOC.BAT` → Download software updates from T:\COMMON\ProdSW
3. `CTONW.BAT` → Upload DAT files to T:\TS-XX\LOGS\
4. `CTONWTXT.BAT` → Upload TXT datasheets to T:\STAGE\TS-XX\
5. `menux` → Launch test menu system

### Test Programs by Product Family
| Family | Programs | Description |
|--------|----------|-------------|
| SCM5B | TEST5B1E/2E | Voltage/current/TC/RTD modules |
| SCM5B | TST5B45B | Frequency/counter |
| SCM5B | TST5B481 | Multi-bandwidth |
| SCM5B | TST5B49B | Sample & hold |
| 8B | TEST8B1D/2D | 8B series modules |
| DSCA | KDSCOUT1/2 | Output modules |
| DSCA | TSTDIN1B/2B | Input modules |
| DSCT | TST5SCT1/2 | Transmitters |
| SCM7B | 7BMAIN4, TEST7B1C/2C/3C | 7B series modules |

## Test Datasheet Pipeline

### Original Pipeline (pre-crypto attack, broken)
1. QuickBASIC writes DAT (binary) + TXT (formatted) on DOS machines
2. CTONW.BAT uploads DAT to NAS, CTONWTXT.BAT uploads TXT
3. DFWDS.exe (VB6) validates/renames files, moves to X:\For_Web
4. TestDataSheetUploader (VB.NET) syncs to dataforth.com via HTTP
5. Website serves at dataforth.com/TestDataReport

Status: Steps 3–4 broken after crypto wipe. Step 2 (CTONWTXT) was not being called.

### New Pipeline (rebuilt 2026-03-27–29)
1. DOS machines write DAT files → NAS (via CTONW.BAT) ✓
2. Sync-FromNAS pulls DAT to AD2 every 15 min ✓
3. import.js parses DAT into SQLite database ✓
4. export-datasheets.js generates exact-match TXT → X:\For_Web ✓
5. Website upload mechanism **TBD** (old endpoints return 404)

**Key improvement:** Datasheets generated server-side from DAT data. Eliminates need for CTONWTXT.BAT, DFWDS.exe, and DOS-side TXT transfer.

## Model Specifications (Spec Files)
| File | Models | Family |
|------|--------|--------|
| 5BMAIN.DAT | 481 | SCM5B |
| 5B45DATA.DAT | 56 | SCM5B frequency/counter |
| DB5B48.DAT | 3 | SCM5B multi-bandwidth |
| 5B49_2.DAT | 15 | SCM5B sample & hold |
| 8BMAIN.DAT | 148 | 8B |
| DSCOUT.DAT | 23 | DSCA output |
| DSCMAIN4.DAT | 391 | DSCA input |
| SCTMAIN.DAT | 103 | DSCT transmitters |
| 7BMAIN.DAT | 276 | SCM7B |
| **Total** | **1,470+** | |

Location: C:\Shares\testdatadb\specdata\
Source: \\\\AD1\Engineering\ENGR\ATE\<family>\<DATA>\

## Webshare Layout (X: / C:\Shares\webshare on AD2)
| Path | Contents | Count |
|------|----------|-------|
| X:\For_Web\ | Validated test datasheets | ~1,058 current year |
| X:\For_Web\2011\–2025\ | Archived by year | 500K+ files total |
| X:\For_Web_PDF\ | PDF versions | ~4,773 |
| X:\Test_Datasheets\ | Incoming/staging from DFWDS | — |
| X:\Bad_Datasheets\ | Invalid files | ~18,801 |
| X:\Datasheets_Log\ | DFWDS processing logs | ~3,336 |

## TestDataDB Statistics
| Metric | Value |
|--------|-------|
| Test Records | 2,281,524 |
| Work Orders | 33,745 (63,263 test lines) |
| Records with WO | 2,277,183 |
| ForWeb Exported | 1,435,989 |
| Pending Export | ~845K |
| Model Specs | 1,470+ |

## Future Product Lines (not yet integrated)
| Product | Format | Location | Notes |
|---------|--------|----------|-------|
| MAQ20 | XLS (multi-sheet) | T:\ENGR\DESIGN\MAQ20 Design\Test Data | Needs K: drive move, path update |
| PWRM10 | XLS | U:\DESIGN\PWRM10...\Test Data\Final Pass Test | — |
| 10D | JSON | K:\10D\first_pass and second_pass | ~May 2026 |
| DSCMHV | — | — | New line, uses MAQ20/PWRM naming standard |
