# Obtain the data of the demodulator through the command :id=top

------

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

------

> Read sensor or spectrum data through the SA1 API.  
> On the device: TCP `127.0.0.1:7090`. From a PC: UDP 7082 / 8190, or logged-in `/m/tcpclient.php`.  
> Do not open 7094 from a PC. Do not use Websocket 7091 (removed).

## 1. Acquire the binary data of the spectrum
  Spectral mode switch.  
  ```:DATA:ODT:OS```    
  Retrieve data.  
  ```:DATA:RAW?```  
  [Data format](data-os.md)

> Notice:  
> Spectral data only returns the spectrum of the current channel of the system for each command.  
> If you need to traverse all the channel data, you need to send the command multiple times and read the data in a loop, and confirm which channel data is based on the channel identification bit in the data.

## 2. Obtain the binary data of the wavelength
  Wavelength mode switch.  
  ```:DATA:ODT:WAV```  
  Retrieve data.  
  ```:DATA:RAW?```  
  [Data format](data-wl.md)

> On-disk save can be switched to SA2 v1.7 [`0x10`](data-wl-v1.7.md) with Data save 1.11. This command still returns original `0x00`. Cookbook: [Save protocol and integration](data-save-proto.md).

## 3. Get the binary data of the physical value
  Wavelength mode switch.  
  ```:DATA:ODT:WAV```   
  Retrieve data.  
  ```:DATA:PV?``` or ```*PV?```  
  [Data format](data-pv.md)  

  This reads the raw cache and **does not** include precise-wavelength calibration. Use the JSON below to verify cal.

## 4. Get the JSON string format data of the physical value
  Wavelength mode switch.  
  ```:DATA:ODT:WAV```   
  Retrieve data.  
  ```:DATA:PVJ?``` or ```*PVJ?```  

  Calibrated wavelength / PV after precise-wl. Confirm the etalon channel on the spectrum. Remote: `sa-cli scpi ':DATA:PVJ?'`. On-box: `printf ':DATA:PVJ?\n' | nc -w 2 127.0.0.1 7090`. Do not use `:DATA:PV?`. Vs wavemeter ~+22 pm → 0.5 pm. Full text: [Precise wavelength](precise_wl.md)
## 5. Modbus TCP (holding registers)
  Third ingest path besides 7090 SCPI and UDP 8190/7082. Masters poll **FC03**; the device does not push.

  1. Log in as **admin** → Addon → **Modbus Configure** (`addon.php?view=2`).
  2. Enable, Port **1502**, Save. AfterCfg `:SYS:RELOAD` should return `0`.
  3. `ss -lnt | grep 1502` should show `0.0.0.0:1502`.
  4. Factory dense map: start **4096** (`0x1000`), 32 channels = **64** registers; two registers per channel, big-endian float32.

  Register map, endian examples, pymodbus / mbpoll, exceptions, troubleshooting: [Modbus TCP slave](modbus_tcp_slave.md)

## Change log :id=changelog

|Version|Date|Description|
|:--:|----|----------|
|1.6|09/14/2026|CLI verify: sa-cli scpi ':DATA:PVJ?'; vs wavemeter ~+22 pm → 0.5 pm.|
|1.5|09/14/2026|Save protocol 1.11 does not change :DATA:RAW? / :DATA:PV?.|
|1.4|09/14/2026|Precise-wl: use PVJ, not :DATA:PV?.|
|1.3|09/13/2026|UI enable steps and factory read.|
|1.2|09/13/2026|Link to Modbus TCP slave (FC03, default off).|
|1.1|09/03/2026|SA1 ports: localhost 7090, no 7091/7094 from PC.|
|1.0|03/03/2022|1. New file format for help file.|

------

[Top](#top)
