S7Client
Description
- › Inherits:
Overview
Properties
Methods
Signals
Enumerations
Properties
autoConnect
This property holds whether the S7 client should connect to the S7 server automatically. Keeping this option enabled will also make the client reconnect on connection errors.
- › Type:
Boolean
- › Default:
true- › Signal:
autoConnectChanged()
- › Attributes:
Writable
byteOrder
This property holds the byte order of the data read from or written to the PLC.
This property was introduced in InCore 2.8.
- › Type:
- › Default:
- › Signal:
byteOrderChanged()
- › Attributes:
Writable
connected
This property holds whether the S7 client is connected to the S7 server.
- › Type:
Boolean
- › Default:
false- › Signal:
connectedChanged()
- › Attributes:
Writable
connectionType
This property holds the connection type which to use for conneting to the S7 server.
- › Type:
- › Default:
- › Signal:
connectionTypeChanged()
- › Attributes:
Writable
error
This property holds the most recently occurred error or S7Client.NoError if no error occurred. If the same error occurs multiple times this property does not change. Use the errorOccurred() signal to detect multiple occurrences of the same error.
- › Type:
- › Signal:
errorChanged()
- › Attributes:
Readonly
errorString
This property holds the current human readable error string corresponding to the current value in the error property. It may include additional information such as failure reasons or locations.
- › Type:
String
- › Signal:
errorStringChanged()
- › Attributes:
Readonly
hostname
This property holds the hostname of the S7 server to connect to.
- › Type:
String
- › Signal:
hostnameChanged()
- › Attributes:
Writable
localTsap
- › Type:
SignedInteger
- › Default:
256- › Signal:
localTsapChanged()
- › Attributes:
Writable
moduleName
- › Type:
String
- › Signal:
moduleNameChanged()
- › Attributes:
Readonly
moduleTypeName
- › Type:
String
- › Signal:
moduleTypeNameChanged()
- › Attributes:
Readonly
port
This property holds the port which the S7 server is listening at.
- › Type:
SignedInteger
- › Default:
102- › Signal:
portChanged()
- › Attributes:
Writable
rack
- › Type:
SignedInteger
- › Default:
0- › Signal:
rackChanged()
- › Attributes:
Writable
remoteTsap
- › Type:
SignedInteger
- › Default:
0- › Signal:
remoteTsapChanged()
- › Attributes:
Writable
serialNumber
- › Type:
String
- › Signal:
serialNumberChanged()
- › Attributes:
Readonly
slot
- › Type:
SignedInteger
- › Default:
0- › Signal:
slotChanged()
- › Attributes:
Writable
Methods
connectToHost()
disconnectFromHost()
Signals
errorOccurred()
This signal is emitted whenever an error has occurred, regardless of whether the error property has changed or not. In contrast to the change notification signal of the error property this signal is also emitted several times if a certain error occurs several times in succession.
Enumerations
ByteOrder
Name |
Value |
Description |
|---|---|---|
|
|
|
|
|
ConnectionType
Name |
Value |
Description |
|---|---|---|
|
|
|
|
|
|
|
|
Error
This enumeration describes all errors which can occur in S7Client objects. The most recently occurred error is stored in the error property.
Name |
Value |
Description |
|---|---|---|
|
|
LIB: Invalid object supplied. |
|
|
LIB: Invalid param supplied. |
|
|
No error occurred or was detected. |
|
|
ISO: Connection error. |
|
|
ISO: Disconnect error. |
|
|
ISO: Bad PDU format. |
|
|
ISO: Datasize passed to send/recv buffer is invalid. |
|
|
ISO: Null passed as pointer. |
|
|
ISO: A short packet received. |
|
|
ISO: Too many packets without EoT flag. |
|
|
ISO: The sum of fragments data exceded maximum packet size. |
|
|
ISO: An error occurred during send. |
|
|
ISO: An error occurred during recv. |
|
|
ISO: Invalid connection params (wrong TSAPs). |
|
|
CPU:Error in PDU negotiation. |
|
|
CLI:invalid param(s) supplied. |
|
|
CLI:Job pending. |
|
|
CLI:too may items (>20) in multi read/write. |
|
|
CLI:invalid WordLength. |
|
|
CLI:Partial data written. |
|
|
CPU:total data exceeds the PDU size. |
|
|
CLI:invalid CPU answer. |
|
|
CPU:Address out of range. |
|
|
CPU:Invalid Transport size. |
|
|
CPU:Data size mismatch. |
|
|
CPU:Item not available. |
|
|
CPU:Invalid value supplied. |
|
|
CPU:Cannot start PLC. |
|
|
CPU:PLC already RUN. |
|
|
CPU:Cannot stop PLC. |
|
|
CPU:Cannot copy RAM to ROM. |
|
|
CPU:Cannot compress. |
|
|
CPU:PLC already STOP. |
|
|
CPU:Function not available. |
|
|
CPU:Upload sequence failed. |
|
|
CLI:Invalid data size received. |
|
|
CLI:Invalid block type. |
|
|
CLI:Invalid block number. |
|
|
CLI:Invalid block size. |
|
|
CPU:Download sequence failed. |
|
|
CPU:block insert refused. |
|
|
CPU:block delete refused. |
|
|
CPU:Function not authorized for current protection level. |
|
|
CPU:Invalid password. |
|
|
CPU:No password to set or clear. |
|
|
CLI:Job Timeout. |
|
|
CLI:Partial data read. |
|
|
CLI:The buffer supplied is too small to accomplish the operation. |
|
|
CLI:function refused by CPU (Unknown error). |
|
|
CLI:Cannot perform (destroying). |
|
|
CLI:Invalid Param Number. |
|
|
CLI:Cannot change this param now. |