# Demodulator data format - wavelength :id=top

------

> _Doc Ver:_ 1.8  
_App Ver:_ 2.6.6.53  
_Date:_ 09/14/2026

------

On-device wavelength files:

```
persist/data/wl/{idn}_{sn}-wl-{YYYYMMDD}_{HHMMSSNNN}[_{end_date}_{end_time}].dat[.tar.gz]
```

Default version `0x00` (this page). Set Data save **1.11** (`DS_SAVE_PROTO=1`) to write SA2 v1.7 [`0x10`](data-wl-v1.7.md) instead. Live UDP **8190** / `:DATA:RAW?` stay `0x00`. Kind is hyphen-bounded (`-wl-`). Product kinds are only `wl` / `pv` / `raw`.

**CSV** (Data page / `sa-file csv --kind wl`) matches SA2. **No header.** One row per frame, non-zero peaks only:

```
{YYYY-MM-DD HH:MM:SS}.{usec6},{unix}.{usec6},{counter},{ch},{wl},{ch},{wl},…
```

Field 12 on disk is `wavelength − 1_500_000`. Export adds `1_500_000` (`%.6f`). SA2 `0x10` already stores absolute pm — do not add again. Not the old English long table (`time_sec,…,wavelength_pm`).

## Wavelength data format :id=title

|#|Number|Field name|Bytes|Value|Description|
|:-:|:-:|----------|:-:|:------:|--------------------|
1|1|Start identifier|4|0xFFFFFFFF|
2|2|Data version|1|0x00|Wavelength mode
3||||0x01|Spectrum mode (4096 voltage type)
4||||0x02|Combined wavelength and spectrum mode
5||||0x03|Physical value mode
6||||0x04|Wavelength and physical value
7||||0x05|Wavelength, physical value, and virtual physical value
8||||0x20|Standard sensor configuration
9||||0x21|Standard sensor and virtual sensor configuration
10||||0x22|Sensor precision calibration parameter configuration
11||||0x23|Sensor warning and alarm configuration
12|3|Checksum|1|0x00|Checksum reserved
13|4|Device serial number|4||If there is no serial number, these 4 bytes are 0.
14|5|Device time|4|Second|Unix Time seconds format. If there is no built-in time, these 4 bytes are 0.
15|||4|Microsecond|
16|6|Counter|4|Counter|Internal counter; wraps to zero when it increments past the maximum.
17|7|Device status|4|0x00000000|No sensor data, no fault. If there is no sensor data, fields after item 7 are not output except the end identifier.
18||||0x00000001|Sensor data present, device normal
19||||0x00000002|Built-in laser thermometer fault
20||||0x00000004|Laser temperature abnormal
21||||0x00000008|Laser fault
22||||0x00000010|Device thermometer fault
23||||0x00000020|Device temperature abnormal
24||||0x00000040|Device hygrometer fault
25||||0x00000080|Device humidity abnormal
26||||0x00000100|Device vibration sensor fault
27||||0x00000200|Device excessive vibration fault
28||||0x00000400|Device temperature-control abnormal
29||||0x00000800|Device supply voltage abnormal
30||||0x00001000|Detector fault; fault channels are reported in '8 Device status 2'.
31||||0x00002000|Fiber optical-path fault; fault channels are reported in '8 Device status 2'.
32||||0x00004000|Channel threshold adjustment abnormal; fault channels are reported in '8 Device status 2'.
33||||0x00010000|Insufficient CPU computing power
34||||0x00020000|Data output busy/blocked
35||||0x00040000|Insufficient computing space
36||||0x00080000|Insufficient storage space
37||||0x00100000|Data serial-port fault
38||||0x00200000|Network-port fault
39||||0x00400000|Indicator-lamp fault; indicator type is reported in '8 Device status 2'.
40||||0x00800000|Key fault; key type is reported in '8 Device status 2'.
41||||0x01000000|Display output device fault
42||||0x10000000|FBG sensor missing alarm; missing count is reported in '8 Device status 2'.
43||||0x20000000|FBG sensor warning; warning count is reported in '8 Device status 2'.
44||||0x40000000|FBG sensor critical alarm; alarm count is reported in '8 Device status 2'.
45||||0x80000000|Unknown fault
46|8|Device status 2|4||Supplements the device status "" information, for example which detector has a problem and how many sensor alarms.
47|9|Laser temperature|4||4byte float
48|10|System valid channel count|1||
49|11|Sensor count per channel|32||Wavelength mode: each byte is the sensor count of each channel in order.
50|12|FBG wavelength data|4*N||4byte float, 2 digits after the decimal point. Wavelength data = wavelength-1500000. After precise-wavelength calibration this is the calibrated value ([Precise wavelength](precise_wl.md)).
51|13|End identifier|4|0xFEFEFEFE|


## Change log :id=changelog

|Version|Date|Description|
|:--:|----|----------|
|1.8|09/14/2026|1. Optional SA2 v1.7 on-disk `0x10` via `DS_SAVE_PROTO`. Live stays `0x00`.|
|1.7|09/07/2026|1. File name `{idn}_{sn}-wl-…`. SA2 wavelength CSV (no header; +1_500_000).|
|1.6|03/03/2022|1. Created help using the new file format.|

------

[Top](#top)
