Types

Python equivalent for snap7 specific types.

enum snap7.type.Area(value)[source]

The snap7 area types

Member Type:

int

Valid values are as follows:

PE = <Area.PE: 129>
PA = <Area.PA: 130>
MK = <Area.MK: 131>
DB = <Area.DB: 132>
CT = <Area.CT: 28>
TM = <Area.TM: 29>
snap7.type.Areas(value)

alias of Area :Member Type: int

enum snap7.type.Block(value)[source]

The snap7 block type

Member Type:

int

Valid values are as follows:

OB = <Block.OB: 56>
DB = <Block.DB: 65>
SDB = <Block.SDB: 66>
FC = <Block.FC: 67>
SFC = <Block.SFC: 68>
FB = <Block.FB: 69>
SFB = <Block.SFB: 70>
class snap7.type.BlocksList[source]

The snap7 block list structure

enum snap7.type.Parameter(value)[source]

The snap7 parameter types

Member Type:

int

Valid values are as follows:

LocalPort = <Parameter.LocalPort: 1>
RemotePort = <Parameter.RemotePort: 2>
PingTimeout = <Parameter.PingTimeout: 3>
SendTimeout = <Parameter.SendTimeout: 4>
RecvTimeout = <Parameter.RecvTimeout: 5>
WorkInterval = <Parameter.WorkInterval: 6>
SrcRef = <Parameter.SrcRef: 7>
DstRef = <Parameter.DstRef: 8>
SrcTSap = <Parameter.SrcTSap: 9>
PDURequest = <Parameter.PDURequest: 10>
MaxClients = <Parameter.MaxClients: 11>
BSendTimeout = <Parameter.BSendTimeout: 12>
BRecvTimeout = <Parameter.BRecvTimeout: 13>
RecoveryTime = <Parameter.RecoveryTime: 14>
KeepAliveTime = <Parameter.KeepAliveTime: 15>
class snap7.type.S7CpInfo[source]
S7 Cp class for Communication Information :
  • MaxPduLength => Size of the maximum PDU length in bytes

  • MaxConnections => Max connection allowed to S7-CPU or Server

  • MaxMpiRate => MPI rate (MPI use is deprecated)

  • MaxBusRate => Profibus rate

Every data packet exchanged with a PLC must fit within the PDU size, whose is fixed from 240 up to 960 bytes.

class snap7.type.S7CpuInfo[source]
S7CpuInfo class for handling CPU with :
  • ModuleTypeName => Model of S7-CPU

  • SerialNumber => SN of the S7-CPU

  • ASName => Family Class of the S7-CPU

  • Copyright => Siemens Copyright

  • ModuleName => TIA project name or for other S7-CPU, same as ModuleTypeName

class snap7.type.S7OrderCode[source]
class snap7.type.S7Protection[source]

See §33.19 of System Software for S7-300/400 System and Standard Functions

class snap7.type.S7SZL[source]

See §33.1 of System Software for S7-300/400 System and Standard Functions

class snap7.type.S7SZLHeader[source]

LengthDR: Length of a data record of the partial list in bytes NDR: Number of data records contained in the partial list

class snap7.type.S7SZLList[source]
enum snap7.type.SrvArea(value)[source]

The snap7 server area types

NOTE: these values are DIFFERENT from the normal area IDs.

Member Type:

int

Valid values are as follows:

PE = <SrvArea.PE: 0>
PA = <SrvArea.PA: 1>
MK = <SrvArea.MK: 2>
CT = <SrvArea.CT: 3>
TM = <SrvArea.TM: 4>
DB = <SrvArea.DB: 5>
class snap7.type.SrvEvent[source]

The snap7 server event structure

class snap7.type.TS7BlockInfo[source]
enum snap7.type.WordLen(value)[source]

The snap7 word length types

Member Type:

int

Valid values are as follows:

Bit = <WordLen.Bit: 1>
Byte = <WordLen.Byte: 2>
Char = <WordLen.Char: 3>
Word = <WordLen.Word: 4>
Int = <WordLen.Int: 5>
DWord = <WordLen.DWord: 6>
DInt = <WordLen.DInt: 7>
Real = <WordLen.Real: 8>
Counter = <WordLen.Counter: 28>
Timer = <WordLen.Timer: 29>
snap7.type.buffer_type

alias of c_ubyte_Array_65536