Comm.Modbus

Slave

Modbus slave/server interface.

15 public methods

Import

from Xenonix.Comm.Modbus import Slave

Search this API

Filter methods, arguments, and configuration keys on this page.

Configuration

Use Config(...) with these keys where the class exposes configuration.

This object does not expose a public Config table.

Public methods

Create

Creates a new Slave instance.

Create()

Arguments

No arguments.

Output

Creates a new Slave object.

Config

Changes one or more supported settings. Pass only the configuration keys you want to update.

Config(IP='', Port=502, Callback=None, Vendor_Name=None, Product_Code=None, Major_Minor_Revision=None, Vendor_Url=None, Product_Name=None, Model_Name=None, User_Application_Name=None)

Arguments

Argument Default Accepted values What it does
IP '' Any valid value IP value used by the operation.
Port 502 Any valid value Port value used by the operation.
Callback None Any valid value Optional callback function called during processing.
Vendor_Name None Any valid value Vendor Name value used by the operation.
Product_Code None Any valid value Product Code value used by the operation.
Major_Minor_Revision None Any valid value Major Minor Revision value used by the operation.
Vendor_Url None Any valid value Vendor Url value used by the operation.
Product_Name None Any valid value Product Name value used by the operation.
Model_Name None Any valid value Model Name value used by the operation.
User_Application_Name None Any valid value User Application Name value used by the operation.

Output

Updates configuration values on the object.

Add

Adds a new item to the object or UI.

Add(ID, Protocol='TCP', Vendor_Name=None, Product_Code=None, Major_Minor_Revision=None, Vendor_Url=None, Product_Name=None, Model_Name=None, User_Application_Name=None)

Arguments

Argument Default Accepted values What it does
ID Required Any valid value ID value used by the operation.
Protocol 'TCP' Any valid value Protocol value used by the operation.
Vendor_Name None Any valid value Vendor Name value used by the operation.
Product_Code None Any valid value Product Code value used by the operation.
Major_Minor_Revision None Any valid value Major Minor Revision value used by the operation.
Vendor_Url None Any valid value Vendor Url value used by the operation.
Product_Name None Any valid value Product Name value used by the operation.
Model_Name None Any valid value Model Name value used by the operation.
User_Application_Name None Any valid value User Application Name value used by the operation.

Output

Runs the operation. Some methods update the object in place.

Create

Runs the Create operation for Slave.

Create(ID, Type, Size)

Arguments

Argument Default Accepted values What it does
ID Required Any valid value ID value used by the operation.
Type Required Coil, Discrete_Input Mode/value selector for type.
Size Required Any valid value Size value used by the operation or widget.

Output

Runs the operation. Some methods update the object in place.

Start

Starts the process or connection.

Start()

Arguments

No arguments.

Output

Returns success/status or the operation result.

Stop

Stops the process or connection.

Stop()

Arguments

No arguments.

Output

Returns success/status or the operation result.

Read

Reads data from a file path.

Read(ID, Type, Start, Size)

Arguments

Argument Default Accepted values What it does
ID Required Any valid value ID value used by the operation.
Type Required Any valid value Type value used by the operation.
Start Required Any valid value Start value used by the operation.
Size Required Any valid value Size value used by the operation or widget.

Output

Returns success/status or the operation result.

Write

Writes the current data to a file path.

Write(ID, Type, Start, Size, Value)

Arguments

Argument Default Accepted values What it does
ID Required Any valid value ID value used by the operation.
Type Required Coil, Discrete_Input, Exception Mode/value selector for type.
Start Required Any valid value Start value used by the operation.
Size Required Any valid value Size value used by the operation or widget.
Value Required Any valid value Value to set or process.

Output

Returns success/status or the operation result.

File_Create

Runs the File_Create operation for Slave.

File_Create(ID, File_Number, Record_Number, Record_Length)

Arguments

Argument Default Accepted values What it does
ID Required Any valid value ID value used by the operation.
File_Number Required Any valid value File Number value used by the operation.
Record_Number Required Any valid value Record Number value used by the operation.
Record_Length Required Any valid value Record Length value used by the operation.

Output

Returns the calculated result.

File_Write

Runs the File_Write operation for Slave.

File_Write(ID, File_Number, Record_Number, Value_List)

Arguments

Argument Default Accepted values What it does
ID Required Any valid value ID value used by the operation.
File_Number Required Any valid value File Number value used by the operation.
Record_Number Required Any valid value Record Number value used by the operation.
Value_List Required Any valid value Value List value used by the operation.

Output

Runs the operation. Some methods update the object in place.

File_Read

Runs the File_Read operation for Slave.

File_Read(ID, File_Number, Record_Number, Record_Length)

Arguments

Argument Default Accepted values What it does
ID Required Any valid value ID value used by the operation.
File_Number Required Any valid value File Number value used by the operation.
Record_Number Required Any valid value Record Number value used by the operation.
Record_Length Required Any valid value Record Length value used by the operation.

Output

Returns structured data such as a list or dictionary.

Fifo_Set

Runs the Fifo_Set operation for Slave.

Fifo_Set(ID, Fifo_Address, Value_List)

Arguments

Argument Default Accepted values What it does
ID Required Any valid value ID value used by the operation.
Fifo_Address Required Any valid value Fifo Address value used by the operation.
Value_List Required Any valid value Value List value used by the operation.

Output

Runs the operation. Some methods update the object in place.

Fifo_Get

Runs the Fifo_Get operation for Slave.

Fifo_Get(ID, Fifo_Address)

Arguments

Argument Default Accepted values What it does
ID Required Any valid value ID value used by the operation.
Fifo_Address Required Any valid value Fifo Address value used by the operation.

Output

Returns the calculated result.

Fifo_Push

Runs the Fifo_Push operation for Slave.

Fifo_Push(ID, Fifo_Address, Value)

Arguments

Argument Default Accepted values What it does
ID Required Any valid value ID value used by the operation.
Fifo_Address Required Any valid value Fifo Address value used by the operation.
Value Required Any valid value Value to set or process.

Output

Runs the operation. Some methods update the object in place.

Fifo_Clear

Runs the Fifo_Clear operation for Slave.

Fifo_Clear(ID, Fifo_Address)

Arguments

Argument Default Accepted values What it does
ID Required Any valid value ID value used by the operation.
Fifo_Address Required Any valid value Fifo Address value used by the operation.

Output

Runs the operation. Some methods update the object in place.