Skip to content

Latest commit

 

History

History
148 lines (92 loc) · 3.98 KB

ModbusServer.rst

File metadata and controls

148 lines (92 loc) · 3.98 KB

ModbusServer

Description

The ModbusServer object is the base class for all Modbus servers (slaves) and manages a number of slaves to communicate with.

This object was introduced in InCore 2.0.

› Inherits

ModbusDevice <object_ModbusDevice>

› Inherited by

ModbusRtuSlave <object_ModbusRtuSlave>, ModbusTcpServer <object_ModbusTcpServer>

Overview

Properties

  • address <property_ModbusServer_address>
  • registers <property_ModbusServer_registers>
  • ModbusDevice.autoConnect <property_ModbusDevice_autoConnect>
  • ModbusDevice.error <property_ModbusDevice_error>
  • ModbusDevice.errorString <property_ModbusDevice_errorString>
  • ModbusDevice.state <property_ModbusDevice_state>
  • Object.objectId <property_Object_objectId>
  • Object.parent <property_Object_parent>

Methods

  • ModbusDevice.connectDevice() <method_ModbusDevice_connectDevice>
  • ModbusDevice.disconnectDevice() <method_ModbusDevice_disconnectDevice>
  • Object.deserializeProperties() <method_Object_deserializeProperties>
  • Object.fromJson() <method_Object_fromJson>
  • Object.serializeProperties() <method_Object_serializeProperties>
  • Object.toJson() <method_Object_toJson>

Signals

  • dataErrorOccurred() <signal_ModbusServer_dataErrorOccurred>
  • mapErrorOccurred() <signal_ModbusServer_mapErrorOccurred>
  • registersDataChanged() <signal_ModbusServer_registersDataChanged>
  • ModbusDevice.connected() <signal_ModbusDevice_connected>
  • ModbusDevice.disconnected() <signal_ModbusDevice_disconnected>
  • ModbusDevice.errorOccurred() <signal_ModbusDevice_errorOccurred>
  • Object.completed() <signal_Object_completed>

Enumerations

  • ModbusDevice.Error <enum_ModbusDevice_Error>
  • ModbusDevice.State <enum_ModbusDevice_State>

Properties

single: address

address

This property holds the address (slave ID) of the local Modbus server.

› Type

SignedInteger

› Signal

addressChanged()

› Attributes

Writable

single: registers

registers

This property holds a list of Modbus registers to make available to Modbus clients.

› Type

List <object_List><ModbusRegister <object_ModbusRegister>>

› Signal

registersChanged()

› Attributes

Readonly

Signals

single: dataErrorOccurred

dataErrorOccurred()

This signal is emitted in very rare cases when the update the internal data map fails. This happens if the internal register map is out of sync due to an inconsistent property update order.

single: mapErrorOccurred

mapErrorOccurred()

This signal is emitted whenever an error occurs while building or updating the internal register map. This usually indicates a problem with the type <property_ModbusRegister_type>, address <property_ModbusRegister_address> or count <property_ModbusRegister_count> of one or multiple Modbus registers <object_ModbusRegister>.

single: registersDataChanged

registersDataChanged(SignedInteger index)

This signal is emitted whenever the List.dataChanged() <signal_List_dataChanged> signal is emitted, i.e. the item at index in the registers <property_ModbusServer_registers> list itself emitted the dataChanged() signal.