SIMATIC S7 MatLab Toolbox
|
Represents a single Siemens AG specific programmable logic controller (PLC). More...
Public Member Functions | |
function | SimaticDevice (in endPoint, in type) |
Initializes a new instance of the SimaticDevice class using the specified endPoint and type. More... | |
function get | ChannelType (in this) |
Gets a value that indicates how the connection will operate on the device. | |
function set | ChannelType (in this, in value) |
Sets a value that indicates how the connection will operate on the device. | |
function get | Type (in this) |
Gets a value indicating the specific type of device represented. | |
function set | Type (in this, in value) |
Sets a value indicating the specific type of device represented. | |
function | CreateConnection (in this, in createNew) |
Creates a new instance of an object implementing the PlcDeviceConnection class which is associated with the device, if createNew is equals to the value true. More... | |
![]() | |
function get | EndPoint (in this) |
Gets the PlcDeviceEndPoint of the PLC device. | |
function set | EndPoint (in this, in value) |
Sets the PlcDeviceEndPoint of the PLC device. | |
virtual function | CreateConnection (in createNew) |
Creates a new instance of an object implementing the PlcDeviceConnection class which is associated with the device, if createNew is equals to the value true. More... | |
Public Attributes | |
Property | ChannelType |
Gets or sets a value that indicates how the connection will operate on the device. One of the members defined by the SimaticChannelType enumeration. More... | |
Property | Type |
Gets or sets a value indicating the specific type of device represented. One of the members defined by the SimaticDeviceType enumeration. Which specifies the concrete type of Siemens device to represent. More... | |
![]() | |
Property | Connection |
This property is not intended to be used outside of the toolbox. | |
Property | ManagedInstance |
This property is not intended to be used outside of the toolbox. | |
Additional Inherited Members | |
![]() | |
function | PlcDevice (in endPoint) |
Initializes a new instance of the PlcDevice class using the specified endPoint. More... | |
Represents a single Siemens AG specific programmable logic controller (PLC).
function SimaticDevice::SimaticDevice | ( | in | endPoint, |
in | type | ||
) |
Initializes a new instance of the SimaticDevice class using the specified endPoint and type.
endPoint | The PlcDeviceEndPoint which identifies the network address of the device. |
type | The type of Siemens device to represent. |
Errors
function SimaticDevice::CreateConnection | ( | in | this, |
in | createNew | ||
) |
Creates a new instance of an object implementing the PlcDeviceConnection class which is associated with the device, if createNew is equals to the value true.
createNew | A value indicating whether a new instance is to be created (the value true) or if there is already an existing instance of the PlcDeviceConnection class in usable state is to be returned (the value false). |
An | instance of the PlcDeviceConnection class which is associated with the device. |
Remarks
Any changes made on EndPoint and any changes made on the configuration of the returned PlcDeviceConnection will take affect when calling PlcDeviceConnection.Open. Any further changes made on the EndPoint or on the PlcDeviceConnection> instance will when only take affect after closing (using PlcDeviceConnection.Close) and re-opening (using PlcDeviceConnection.Open) the connection.
In multi-threaded environments it is important to take care about which thread does open/close a connection and which threads do use the same connection concurrent. Scenarios there multiple threads do share the same connection instance have to ensure that changes to the PlcDevice (e.g. EndPoint changes) to that a PlcDeviceConnection does belong or any changes made on the connection itself will take affect in all threads (which share the same connection instance) immediately after closing and re-opening the connection.
If there was a connection created for the first time using this PlcDevice instance these connection will be always returned by any subsequent calls to CreateConnection(bool) using createNew with the value false. This is the case until the cached connection will be discarded. A cached connection will be discarded then it is not in created nor in closed state and any changes are made to the configuration of this PlcDevice (e.g. EndPoint).
Property SimaticDevice::ChannelType |
Gets or sets a value that indicates how the connection will operate on the device. One of the members defined by the SimaticChannelType enumeration.
Errors
Property SimaticDevice::Type |
Gets or sets a value indicating the specific type of device represented. One of the members defined by the SimaticDeviceType enumeration. Which specifies the concrete type of Siemens device to represent.
Errors