# WiFi Datalogger (MacSync) Remote Device Configuration

URL: https://www.macnman.com/docs/wifi/datalogger-wifi/macsync_wifi_remote_configure
Section: User Manual › Wifi › Datalogger Wifi

# Payload Structure

## Data Types

<table className="parameter-table">
  <thead>
    <tr>
      <th>Code</th>
      <th>Data Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>00</td>
      <td>INT16</td>
      <td>16-bit signed integer</td>
    </tr>
    <tr>
      <td>01</td>
      <td>UINT16</td>
      <td>16-bit unsigned integer</td>
    </tr>
    <tr>
      <td>02</td>
      <td>INT32 [MSB]</td>
      <td>Most significant 32-bit signed integer</td>
    </tr>
    <tr>
      <td>03</td>
      <td>INT32 [LSB]</td>
      <td>Least significant 32-bit signed integer</td>
    </tr>
    <tr>
      <td>04</td>
      <td>FLOAT32 [MSB]</td>
      <td>Most significant 32-bit floating-point number</td>
    </tr>
    <tr>
      <td>05</td>
      <td>FLOAT32 [LSB]</td>
      <td>Least significant 32-bit floating-point number</td>
    </tr>
  </tbody>
</table>

## Payload Structure

<table className="parameter-table">
  <thead>
    <tr>
      <th>Parameter</th>
      <th>Type</th>
      <th>Description</th>
      <th>Default</th>
      <th>Valid Range</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Field</td>
      <td>Integer</td>
      <td>Data field identifier</td>
      <td>1</td>
      <td>1–255</td>
    </tr>
    <tr>
      <td>slaveld</td>
      <td>Integer</td>
      <td>ID of the slave device</td>
      <td>1</td>
      <td>1–247</td>
    </tr>
    <tr>
      <td>functionCode</td>
      <td>Integer</td>
      <td>Function code for the operation (e.g., read, write)</td>
      <td>3</td>
      <td>1–6, 15, 16</td>
    </tr>
    <tr>
      <td>Enable</td>
      <td>Integer</td>
      <td>Enable flag (1 for enabled, 0 for disabled)</td>
      <td>1</td>
      <td>0 or 1</td>
    </tr>
    <tr>
      <td>datatype</td>
      <td>Integer</td>
      <td>Specifies the data type of the value to read</td>
      <td>01</td>
      <td>00–05</td>
    </tr>
    <tr>
      <td>groupParaNo</td>
      <td>Integer</td>
      <td>Number of registers in a single group</td>
      <td>1</td>
      <td>1–125</td>
    </tr>
    <tr>
      <td>Registeraddress</td>
      <td>Integer</td>
      <td>Address of the registers</td>
      <td>0</td>
      <td>0–65535</td>
    </tr>
  </tbody>
</table>

<div class="faint-line"></div>

## One-Time Modbus Register Read

#### Example payload (JSON): 

```json
{ 
"slaveId": 1, 
"functionCode": 3, 
"dataType": 1, 
"numberOfParameters": 1, 
"Registeraddress": 257
}
```
**Use FPort = 13:**

<div class="faint-line"></div>

## One-Time Modbus Register Write

<table className="parameter-table">
  <thead>
    <tr>
      <th>Parameter</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>slaveId</td>
      <td>Integer</td>
      <td>ID of the slave device</td>
    </tr>
    <tr>
      <td>numberOfRegisters</td>
      <td>Integer</td>
      <td>Number of registers to write (e.g., 1 for INT16)</td>
    </tr>
    <tr>
      <td>address</td>
      <td>Integer</td>
      <td>Address of the register to write</td>
    </tr>
    <tr>
      <td>value</td>
      <td>Integer</td>
      <td>Value to write into the register</td>
    </tr>
  </tbody>
</table>

## How to write registers from server ?

- Example 

```json
{ 
    "slaveId": 1,
    "numberofreg": 1,
    "address": 0,
    "value": 223
}
```

## How to write coils from server ?

- Example 

```json
{ 
    "slaveId": 10,
    "numberofreg": 1,
    "address": 0,
    "value": 65280
}
```

## Related Resources

- Datasheet: [MacSync-WX1-PO RS485 and analog to Wi-Fi data logger datasheet](/product/wifi/dataloggers/macsync-w-power-operated-x-two)
- Datasheet: [MacSync-WX1-BO battery-operated RS485 and analog to Wi-Fi data logger datasheet](/product/wifi/dataloggers/macsync-l-std-battery-operated-gen-one)
- Start of this manual: [WiFi Datalogger (MacSync) Introduction](/wifi/datalogger-wifi/macsync_rs485_wifi_introduction)
- Help: [Contact Macnman support](/help/help)
