# Demodulator binary data extended format :id=top

------

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

------

> Binary command-return and save format for SA1 (`sa-di`). The **live** frame layout is the same as on older RTLinux field devices.
> - Command data return
>   - [`:DATA:RAW?`](/api?id=data) return format of commands `17` and `18`   
> - Binary data save    
>   - Data save **1.11** (`DS_SAVE_PROTO`) default `0`: wl is `0x00`, pv is `0x04`/`0x05`. Set `1` for SA2 v1.7 on-disk ([wavelength](data-wl-v1.7.md) / [physical](data-pv-v1.7.md)). Mode 0 writes after compute; Mode 1 skips pv. Live stays original.   
>   - `Menu > 'Data' > 'Realtime save' > 'Setting'`: same files. Optional raw is [SA_DATA_FILE](data-rawfile.md). 
------

## Wavelength mode :id=wl

> Data format of each frame in wavelength mode.

|#|Number|Field name|Bytes|Value|Description|Notes|
|:-:|:-:|----------|:-:|:------:|----------|----------|
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|Full wavelength and physical value mode|
7||||0x05|Full wavelength, physical value, and lifetime evaluation mode|
8|3|Checksum|1|0x00|Checksum reserved|
9|4|Device serial number|4||If there is no serial number, these 4 bytes are 0|
10|5|Device time|4|Second|"Unit Time seconds format<br/>If there is no built-in time, these 4 bytes are 0"|
11|||4|Microsecond||
12|6|Counter|4|Counter|Internal counter|Wraps to zero when it increments past the maximum
13|7|Device status|4|0x00000000|"No sensor data, no fault;<br/>If there is no sensor data, fields after item 7 are not output except the end identifier"|
14||||0x00000001|Sensor data present, device normal|
15||||||
16||||0x00000002|Built-in laser thermometer fault|
17||||0x00000004|Laser temperature abnormal|
18||||0x00000008|Laser fault|
19||||||
20||||0x00000010|Device thermometer fault|
21||||0x00000020|Device temperature abnormal|
22||||0x00000040|Device hygrometer fault|
23||||0x00000080|Device humidity abnormal|
24||||0x00000100|Device vibration sensor fault|
25||||0x00000200|Device excessive vibration fault|
26||||0x00000400|Device temperature-control abnormal|
27||||0x00000800|Device supply voltage abnormal|
28||||||
29||||0x00001000|Detector fault|Fault channels are reported in "8 Device status 2"
30||||0x00002000|Fiber optical-path fault|Fault channels are reported in "8 Device status 2"
31||||0x00004000|Channel threshold adjustment abnormal|Fault channels are reported in "8 Device status 2"
32||||||
33||||0x00010000|Insufficient CPU computing power|
34||||0x00020000|Data output busy/blocked|
35||||0x00040000|Insufficient computing space|
36||||0x00080000|Insufficient storage space|
37||||||
38||||0x00100000|Data serial-port fault|
39||||0x00200000|Network-port fault|
40||||0x00400000|Indicator-lamp fault|Indicator type is reported in "8 Device status 2"
41||||0x00800000|Key fault|Key type is reported in "8 Device status 2"
42||||0x01000000|Display output device fault|
43||||||
44||||0x10000000|FBG sensor missing alarm|Missing count is reported in "8 Device status 2"
45||||0x20000000|FBG sensor warning|Warning count is reported in "8 Device status 2"
46||||0x40000000|FBG sensor critical alarm|Alarm count is reported in "8 Device status 2"
47||||||
48||||0x80000000|Unknown fault|
49|8|Device status 2|4||Supplements the "Device status" information|"Supplements the highest-weight problem description, for example:<br/>which detector has a problem, how many sensor alarms"
50|9|Laser temperature|4||4-byte float|
51|10|System valid channel count|1|||
52|11|Sensor count per channel|32||Wavelength mode: each byte is the sensor count of each channel in order.|
53|12|FBG wavelength data|2*N||"2-byte integer.<br/>Wavelength data = wavelength-1510000;"|
54|13|End identifier|4|0xFEFEFEFE||



## Spectrum mode :id=os

> Data format of each frame in spectrum mode.   
> The difference from the wavelength-mode data format is in items "51~53".

|#|Number|Field name|Bytes|Value|Description|Notes|
|:-:|:-:|----------|:-:|:------:|----------|----------|
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|Full wavelength and physical value mode|
7||||0x05|Full wavelength, physical value, and lifetime evaluation mode|
8|3|Checksum|1|0x00|Checksum reserved|
9|4|Device serial number|4||If there is no serial number, these 4 bytes are 0|
10|5|Device time|4|Second|"Unit Time seconds format<br/>If there is no built-in time, these 4 bytes are 0"|
11|||4|Microsecond||
12|6|Counter|4|Counter|Internal counter|Wraps to zero when it increments past the maximum
13|7|Device status|4|0x00000000|"No sensor data, no fault;<br/>If there is no sensor data, fields after item 7 are not output except the end identifier"|
14||||0x00000001|Sensor data present, device normal|
15||||||
16||||0x00000002|Built-in laser thermometer fault|
17||||0x00000004|Laser temperature abnormal|
18||||0x00000008|Laser fault|
19||||||
20||||0x00000010|Device thermometer fault|
21||||0x00000020|Device temperature abnormal|
22||||0x00000040|Device hygrometer fault|
23||||0x00000080|Device humidity abnormal|
24||||0x00000100|Device vibration sensor fault|
25||||0x00000200|Device excessive vibration fault|
26||||0x00000400|Device temperature-control abnormal|
27||||0x00000800|Device supply voltage abnormal|
28||||||
29||||0x00001000|Detector fault|Fault channels are reported in "8 Device status 2"
30||||0x00002000|Fiber optical-path fault|Fault channels are reported in "8 Device status 2"
31||||0x00004000|Channel threshold adjustment abnormal|Fault channels are reported in "8 Device status 2"
32||||||
33||||0x00010000|Insufficient CPU computing power|
34||||0x00020000|Data output busy/blocked|
35||||0x00040000|Insufficient computing space|
36||||0x00080000|Insufficient storage space|
37||||||
38||||0x00100000|Data serial-port fault|
39||||0x00200000|Network-port fault|
40||||0x00400000|Indicator-lamp fault|Indicator type is reported in "8 Device status 2"
41||||0x00800000|Key fault|Key type is reported in "8 Device status 2"
42||||0x01000000|Display output device fault|
43||||||
44||||0x10000000|FBG sensor missing alarm|Missing count is reported in "8 Device status 2"
45||||0x20000000|FBG sensor warning|Warning count is reported in "8 Device status 2"
46||||0x40000000|FBG sensor critical alarm|Alarm count is reported in "8 Device status 2"
47||||||
48||||0x80000000|Unknown fault|
49|8|Device status 2|4||Supplements the "Device status" information|"Supplements the highest-weight problem description, for example:<br/>which detector has a problem, how many sensor alarms"
50|9|Laser temperature|4||4-byte float|
51|10|System current channel|1
52|11|Spectrum data length of a single channel|2
53|12|Spectrum data of a single channel|2*N
54|13|End identifier|4|0xFEFEFEFE


## Change log :id=changelog

|Version|Date|Description|
|:--:|----|----------|
|1.8|09/14/2026|1. Optional SA2 v1.7 save (`DS_SAVE_PROTO=1`). This page remains the original live/on-disk dialect.|
|1.6|09/07/2026|1. Save files are wl 0x00 and pv 0x04/0x05. Mode 0/1/2; Mode 1 skips pv.|
|1.5|11/15/2021|1. Created help using the new file format.|

------

## [Top](#top)
