I want to find...

Search

Shares

Table of Content

ModbusSlaveNode.writeDiscreteInput()

[Modbus]

Description

Write to the Discrete Inputs register.

Syntax

node1.writeDiscreteInput(address, value)
node2.writeDiscreteInput(address, size, buffer)

Parameters

  • node1/node2: ModbusSlaveNode object.
  • address: The address of the Discrete Inputs registers to write to.
  • value: The value of the single Discrete Inputs register that you want to write to.
  • size: The number of plural Discrete Inputs registers to write to.
  • buffer: Copy the data of the array in the array space pointed to by the buffer to the Discrete Inputs register.

Returns

int: If it succeeds, send back MODBUS_SUCCESS, and vice versa send back EXCEPTION_CODE.


Libraries Reference Home

The text of the 86Duino reference is a modification of the Arduino reference and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.

Leave a Comment

Scroll to Top