mbserver 0.5.1
modbus Namespace Reference

Classes

class  Address

Variables

int Memory_Unknown = -1
 Memory type for invalid address.
int Memory_0x = 0
 Memory type for coils.
int Memory_1x = 1
 Memory type for input discretes.
int Memory_3x = 3
 Memory type for input registers.
int Memory_4x = 4
 Memory type for iholding registers.
int Notation_Default = 0
 Default notation which is equal to Modbus notation.
int Notation_Modbus = 1
 Standard Modbus address notation like 000001, 100001, 300001, 400001.
int Notation_IEC61131 = 2
 IEC-61131 address notation like %Q0, %I0, %IW0, %MW0.
int Notation_IEC61131Hex = 3
 IEC-61131 Hex address notation like %Q0000h, %I0000h, %IW0000h, %MW0000h.
dict MemoryTypeSet = { Memory_0x, Memory_1x, Memory_3x, Memory_4x }
 Python set that contains supported Modbus Address types.
str sIEC61131Prefix0x = "%Q"
 IEC-61131 address notation prefix for coils.
str sIEC61131Prefix1x = "%I"
 IEC-61131 address notation prefix for input discretes.
str sIEC61131Prefix3x = "%IW"
 IEC-61131 address notation prefix for input registers.
str sIEC61131Prefix4x = "%MW"
 IEC-61131 address notation prefix for holding registers.
str cIEC61131SuffixHex = 'h'
 Suffix for IEC-61131 Hex address notation.
dict IEC61131PrefixMap
 Python set that contains supported Modbus address IEC61131 prefixes.

Detailed Description

@package modbus
Module to work with Modbus protocol.
 
Includes class Address to work with modbus address.

Variable Documentation

◆ IEC61131PrefixMap

dict modbus.IEC61131PrefixMap
Initial value:
1= {
2 Memory_0x: sIEC61131Prefix0x,
3 Memory_1x: sIEC61131Prefix1x,
4 Memory_3x: sIEC61131Prefix3x,
5 Memory_4x: sIEC61131Prefix4x,
6 }

Python set that contains supported Modbus address IEC61131 prefixes.