Create
Creates a new Slave instance.
Create()
Arguments
No arguments.
Output
Creates a new Slave object.
Modbus slave/server interface.
from Xenonix.Comm.Modbus import Slave
Filter methods, arguments, and configuration keys on this page.
Use Config(...) with these keys where the class exposes configuration.
This object does not expose a public Config table.
Creates a new Slave instance.
Create()
No arguments.
Creates a new Slave object.
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)
| 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. |
Updates configuration values on the object.
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)
| 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. |
Runs the operation. Some methods update the object in place.
Runs the Create operation for Slave.
Create(ID, Type, Size)
| 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. |
Runs the operation. Some methods update the object in place.
Starts the process or connection.
Start()
No arguments.
Returns success/status or the operation result.
Stops the process or connection.
Stop()
No arguments.
Returns success/status or the operation result.
Reads data from a file path.
Read(ID, Type, Start, Size)
| 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. |
Returns success/status or the operation result.
Writes the current data to a file path.
Write(ID, Type, Start, Size, Value)
| 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. |
Returns success/status or the operation result.
Runs the File_Create operation for Slave.
File_Create(ID, File_Number, Record_Number, Record_Length)
| 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. |
Returns the calculated result.
Runs the File_Write operation for Slave.
File_Write(ID, File_Number, Record_Number, Value_List)
| 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. |
Runs the operation. Some methods update the object in place.
Runs the File_Read operation for Slave.
File_Read(ID, File_Number, Record_Number, Record_Length)
| 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. |
Returns structured data such as a list or dictionary.
Runs the Fifo_Set operation for Slave.
Fifo_Set(ID, Fifo_Address, Value_List)
| 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. |
Runs the operation. Some methods update the object in place.
Runs the Fifo_Get operation for Slave.
Fifo_Get(ID, Fifo_Address)
| 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. |
Returns the calculated result.
Runs the Fifo_Push operation for Slave.
Fifo_Push(ID, Fifo_Address, Value)
| 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. |
Runs the operation. Some methods update the object in place.
Runs the Fifo_Clear operation for Slave.
Fifo_Clear(ID, Fifo_Address)
| 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. |
Runs the operation. Some methods update the object in place.