# String format for outbound data transmission :id=top

------

> _Doc Ver:_ 1.2  
_App Ver:_ 2.6.6.53  
_Date:_ 09/13/2026

------

> Outbound data transmission is a mode in which the SA1 demodulator (`sa-di`) acts as a TCP or UDP client and sends data to an external host.  
> There is both a character mode and a binary mode. This page describes the string format.   
> For settings, see: Menu > 'Setting' > 'Data transfer'. Not SA2 MQTT.   

------

## 1. PJ format        :id=pj

PhysicValue JSON,   
Applicable to "Physical value JSON TCP report" and "Physical value JSON UDP report".

~~~
{ 
  VER: 10,                Data format version
  CMD: 'PJ',              Command name; PJ means physical-value JSON format; can be ignored
  Key: 'CASSTK-TEST-KEY', Used by the server for access control; can be ignored
  IP: [ 
    '192.168.3.200', 
    '192.168.100.27' 
  ],                      Device IP addresses on the network
  Code: 0,                Error code
  Time: 1564975754,       Unit-format time
  SN: '6910001331',       Device serial number
  Counter: 159469,        Device counter
  Data:                   Data section
    [
        [ 1, 1, 1, 1520441, -26, 3802001, 0, 0 ],
        [ 1, 2, 1, 1526063, -25, 3802002, 0, 0 ],
        [ 1, 3, 2, 1531991, -22, 3802003, 0, 0 ],
        [ 1, 4, 2, 1539874, -111, 3802004, 0, 0 ] 
    ]
  VS:
  [
        [ 1, 38.577764, 6820013, 0, 0 ]
  ]
}
~~~

Data section:

~~~
Data:[1,2,3,4,5,6,7,8]
    1: Whether a physical-value formula was matched
    2: id number
    3: Channel
    4: Wavelength
    5: Physical value
    6: Serial number
    7: Error code
    8: Warning code
~~~

When virtual sensors are enabled, this data is present after virtual sensors are configured.

~~~
VS:[1,2,3,4,5]
    1: id number
    2: Calculated value
    3: Serial number
    4: Error code
    5: Warning code
~~~

## 2. Avoiding TCP sticky packets       :id=stick

Setting
    Menu > 'Setting' > 'Data transfer' > 'Physical value JSON TCP report'  > '1.6 Data start/end mark', check the box, then save.

Data format:

    1: '0xFFFF': 2-byte start mark;
    2: 1-byte checksum;
    3: 1 reserved byte (data format version);
    4: 4-byte int (low byte first): length of the JSON character data;
    5: JSON character data;
    6: '0xFEFE': 2-byte end mark

## 3. WJ format            :id=wj

Wavelength JSON,   
 
Applicable to wavelength JSON UDP report.

Data format:

~~~
{ 
  VER: 10,
  CMD: 'WJ',   means wavelength, JSON format
  Code: 0,        
  Time: 1564975843,
  SN: '6910001331',
  Counter: 159558,
  Data: [ [ 20442, 26063 ], [ 31991, 39874 ] ]
}

Data section: Data:[]
The data index plus 1 corresponds to the channel index
The value plus 1500000 is the actual wavelength
~~~

------

### [Top](#top)
