|
SIMATIC S7 MatLab Toolbox
|
Provides an abstract base class which represents a connection to a device. More...
Public Types | |
| enum | Events { Closed , Closing , Connected , Connecting , Disconnected , Faulted , Opened , Opening } |
| The definition of the events defined by the PlcDeviceConnection. More... | |
Public Member Functions | |
| function | delete (in this) |
| function get | BreakDetectionTimeout (in this) |
| Gets the time that is used to detect a connection break. | |
| function set | BreakDetectionTimeout (in this, in value) |
| Sets the time that is used to detect a connection break. | |
| function get | ConnectTimeout (in this) |
| Gets the wait time before terminating the attempt to establish a connection. | |
| function set | ConnectTimeout (in this, in value) |
| Sets the wait time before terminating the attempt to establish a connection. | |
| function get | Device (in this) |
| Gets the PlcDevice associated with the connection. | |
| function set | Device (in this, in value) |
| Sets the PlcDevice associated with the connection. | |
| function get | ReceiveTimeout (in this) |
| Gets the wait time before terminating the attempt to receive data. | |
| function set | ReceiveTimeout (in this, in value) |
| Sets the wait time before terminating the attempt to receive data. | |
| function get | State (in this) |
| Gets a value that indicates the current state of the connection. | |
| function get | TransmitTimeout (in this) |
| Gets the wait time before terminating the attempt to transmit data. | |
| function set | TransmitTimeout (in this, in value) |
| Sets the wait time before terminating the attempt to transmit data. | |
| function get | UseBreakDetection (in this) |
| Gets a value indicating whether a connection break detection is to be used. | |
| function set | UseBreakDetection (in this, in value) |
| Sets a value indicating whether a connection break detection is to be used. | |
| function | Close (in this) |
| Causes a connection to transition from its current state into the closed state while an established connection to a device will be closed. More... | |
| function | Connect (in this) |
| Causes a connection to transition from the opened state into the connected state while it does fully establish a connection to a device. More... | |
| function | Open (in this) |
| Causes a connection to transition from the created or closed state into the opened state while it does establish a connection to a device. More... | |
| function | ReadBoolean (in this, in address, in count) |
| Reads the value(s) stored at the specified address as a scalar logical value (in PLC a BOOL) or if count is specified an array of n logical values (in PLC an ARRAY OF BOOL). More... | |
| function | ReadByte (in this, in address, in count) |
| Reads the value(s) stored at the specified address as a scalar binary value (in PLC a BYTE) or if count is specified an array of n binary values (in PLC an ARRAY OF BYTE). More... | |
| function | ReadChar (in this, in address, in count) |
| Reads the value(s) stored at the specified address as a scalar character value (in PLC a CHAR) or if count is specified an array of n character values (in PLC an ARRAY OF CHAR). More... | |
| function | ReadDate (in this, in address) |
| Reads the value stored at the specified address as a scalar date number (in PLC a DATE). More... | |
| function | ReadDateTime (in this, in address) |
| Reads the value stored at the specified address as a scalar date number (in PLC a DATE_AND_TIME). More... | |
| function | ReadDouble (in this, in address, in count) |
| Reads the value(s) stored at the specified address as a scalar double value (in PLC a DOUBLE) or if count is specified an array of n double values (in PLC an ARRAY OF DOUBLE). More... | |
| function | ReadInt16 (in this, in address, in count) |
| Reads the value(s) stored at the specified address as a scalar int16 value (in PLC a INT) or if count is specified an array of n int16 values (in PLC an ARRAY OF INT). More... | |
| function | ReadInt32 (in this, in address, in count) |
| Reads the value(s) stored at the specified address as a scalar int32 value (in PLC a DINT) or if count is specified an array of n int32 values (in PLC an ARRAY OF DINT). More... | |
| function | ReadReal (in this, in address, in count) |
| Reads the value(s) stored at the specified address as a scalar single value (in PLC a REAL) or if count is specified an array of n single values (in PLC an ARRAY OF REAL). More... | |
| function | ReadS5Time (in this, in address) |
| Reads the value stored at the specified address as a scalar date number value (in PLC a S5TIME), while the date number does only express time information. More... | |
| function | ReadString (in this, in address, in length) |
| Reads the value stored at the specified address as a scalar string value (in PLC a TEXT). More... | |
| function | ReadTime (in this, in address) |
| Reads the value stored at the specified address as a scalar date number value (in PLC a TIME), while the date number does only express time information. More... | |
| function | ReadTimeOfDay (in this, in address) |
| Reads the value stored at the specified address as a scalar date number value (in PLC a TIME_OF_DAY), while the date number does only express time information. More... | |
| function | ReadUInt16 (in this, in address, in count) |
| Reads the value(s) stored at the specified address as a scalar uint16 value (in PLC a WORD) or if count is specified an array of n uint16 values (in PLC an ARRAY OF WORD). More... | |
| function | ReadUInt32 (in this, in address, in count) |
| Reads the value(s) stored at the specified address as a scalar uint32 value (in PLC a DWORD) or if count is specified an array of n uint32 values (in PLC an ARRAY OF DWORD). More... | |
| function | ReadValues (in this, in values) |
| Reads the values specified. More... | |
| function | WriteBoolean (in this, in address, in values) |
| Writes the logical value(s) (in PLC BOOL or ARRAY OF BOOL) to the data area specified by address. More... | |
| function | WriteByte (in this, in address, in values) |
| Writes the binary value(s) (in PLC BYTE or ARRAY OF BYTE) to the data area specified by address. More... | |
| function | WriteChar (in this, in address, in values) |
| Writes the character value(s) (in PLC CHAR or ARRAY OF CHAR) to the data area specified by address. More... | |
| function | WriteDate (in this, in address, in value) |
| Writes the date number (in PLC DATE) to the data area specified by address. More... | |
| function | WriteDateTime (in this, in address, in value) |
| Writes the date number (in PLC DATE_AND_TIME) to the data area specified by address. More... | |
| function | WriteDouble (in this, in address, in values) |
| Writes the double value(s) (in PLC DOUBLE or ARRAY OF DOUBLE) to the data area specified by address. More... | |
| function | WriteInt16 (in this, in address, in values) |
| Writes the int16 value(s) (in PLC INT or ARRAY OF INT) to the data area specified by address. More... | |
| function | WriteInt32 (in this, in address, in values) |
| Writes the int32 value(s) (in PLC DINT or ARRAY OF DINT) to the data area specified by address. More... | |
| function | WriteReal (in this, in address, in values) |
| Writes the single value(s) (in PLC REAL or ARRAY OF REAL) to the data area specified by address. More... | |
| function | WriteS5Time (in this, in address, in value) |
| Writes the time part of the date number (in PLC S5TIME) to the data area specified by address. More... | |
| function | WriteString (in this, in address, in value) |
| Writes the string (in PLC TEXT) to the data area specified by address. More... | |
| function | WriteTime (in this, in address, in value) |
| Writes the time part of the date number (in PLC TIME) to the data area specified by address. More... | |
| function | WriteTimeOfDay (in this, in address, in value) |
| Writes the time part of the date number (in PLC TIME_OF_DAY) to the data area specified by address. More... | |
| function | WriteUInt16 (in this, in address, in values) |
| Writes the uint16 value(s) (in PLC WORD or ARRAY OF WORD) to the data area specified by address. More... | |
| function | WriteUInt32 (in this, in address, in values) |
| Writes the uint32 value(s) (in PLC DWORD or ARRAY OF DWORD) to the data area specified by address. More... | |
| function | WriteValues (in this, in values) |
| Writes the values specified. More... | |
Public Attributes | |
| Constant Property | DefaultTimeout = 5000 |
| brief Represents the default timeout value that is used by the PlcDeviceConnection as initial value of all timeout properties. | |
| Property | BreakDetectionTimeout |
| Gets or sets the time that is used to detect a connection break. The time in milliseconds to detect a connection break. | |
| Property | ConnectTimeout |
| Gets or sets the wait time before terminating the attempt to establish a connection. The time in milliseconds to wait for the connection to connect. | |
| Property | ReceiveTimeout |
| Gets or sets the wait time before terminating the attempt to receive data. The time in milliseconds to wait for the connection to receive. | |
| Property | State |
| Gets a value that indicates the current state of the connection. One of the members defined by the PlcDeviceConnectionState enumeration. Which specifies the current state of the connection. | |
| Property | TransmitTimeout |
| Gets or sets the wait time before terminating the attempt to transmit data. The time in milliseconds to wait for the connection to transmit. | |
| Property | UseBreakDetection |
| Gets or sets a value indicating whether a connection break detection is to be used. The default value of this property is false. | |
| Property | ManagedInstance |
| This property is not intended to be used outside of the toolbox. | |
Protected Member Functions | |
| function | PlcDeviceConnection (in device) |
| Initializes a new instance of the PlcDeviceConnection class using the specified device. More... | |
Provides an abstract base class which represents a connection to a device.
The definition of the events defined by the PlcDeviceConnection.
|
protected |
Initializes a new instance of the PlcDeviceConnection class using the specified device.
| device | The PlcDevice associated with the new PlcDeviceConnection. |
Errors
| function PlcDeviceConnection::Close | ( | in | this | ) |
Causes a connection to transition from its current state into the closed state while an established connection to a device will be closed.
Errors
| function PlcDeviceConnection::Connect | ( | in | this | ) |
Causes a connection to transition from the opened state into the connected state while it does fully establish a connection to a device.
Errors
Remarks
In case there is already a connection fully established (see IsConnected) Connect does not perform any connect attempt.
| function PlcDeviceConnection::delete | ( | in | this | ) |
Performs toolbox-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
| function PlcDeviceConnection::Open | ( | in | this | ) |
Causes a connection to transition from the created or closed state into the opened state while it does establish a connection to a device.
Errors
| function PlcDeviceConnection::ReadBoolean | ( | in | this, |
| in | address, | ||
| in | count | ||
| ) |
Reads the value(s) stored at the specified address as a scalar logical value (in PLC a BOOL) or if count is specified an array of n logical values (in PLC an ARRAY OF BOOL).
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to read. |
| count | The number of values to read from the data area. |
| value | The value(s) stored at the area specified by address. |
Errors
| function PlcDeviceConnection::ReadByte | ( | in | this, |
| in | address, | ||
| in | count | ||
| ) |
Reads the value(s) stored at the specified address as a scalar binary value (in PLC a BYTE) or if count is specified an array of n binary values (in PLC an ARRAY OF BYTE).
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to read. |
| count | The number of values to read from the data area. |
| value | The value(s) stored at the area specified by address. |
Errors
| function PlcDeviceConnection::ReadChar | ( | in | this, |
| in | address, | ||
| in | count | ||
| ) |
Reads the value(s) stored at the specified address as a scalar character value (in PLC a CHAR) or if count is specified an array of n character values (in PLC an ARRAY OF CHAR).
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to read. |
| count | The number of values to read from the data area. |
| value | The value(s) stored at the area specified by address. |
Errors
| function PlcDeviceConnection::ReadDate | ( | in | this, |
| in | address | ||
| ) |
Reads the value stored at the specified address as a scalar date number (in PLC a DATE).
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to read. |
| value | The value stored at the area specified by address. |
Errors
| function PlcDeviceConnection::ReadDateTime | ( | in | this, |
| in | address | ||
| ) |
Reads the value stored at the specified address as a scalar date number (in PLC a DATE_AND_TIME).
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to read. |
| value | The value stored at the area specified by address. |
Errors
| function PlcDeviceConnection::ReadDouble | ( | in | this, |
| in | address, | ||
| in | count | ||
| ) |
Reads the value(s) stored at the specified address as a scalar double value (in PLC a DOUBLE) or if count is specified an array of n double values (in PLC an ARRAY OF DOUBLE).
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to read. |
| count | The number of values to read from the data area. |
| value | The value(s) stored at the area specified by address. |
Errors
| function PlcDeviceConnection::ReadInt16 | ( | in | this, |
| in | address, | ||
| in | count | ||
| ) |
Reads the value(s) stored at the specified address as a scalar int16 value (in PLC a INT) or if count is specified an array of n int16 values (in PLC an ARRAY OF INT).
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to read. |
| count | The number of values to read from the data area. |
| value | The value(s) stored at the area specified by address. |
Errors
| function PlcDeviceConnection::ReadInt32 | ( | in | this, |
| in | address, | ||
| in | count | ||
| ) |
Reads the value(s) stored at the specified address as a scalar int32 value (in PLC a DINT) or if count is specified an array of n int32 values (in PLC an ARRAY OF DINT).
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to read. |
| count | The number of values to read from the data area. |
| value | The value(s) stored at the area specified by address. |
Errors
| function PlcDeviceConnection::ReadReal | ( | in | this, |
| in | address, | ||
| in | count | ||
| ) |
Reads the value(s) stored at the specified address as a scalar single value (in PLC a REAL) or if count is specified an array of n single values (in PLC an ARRAY OF REAL).
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to read. |
| count | The number of values to read from the data area. |
| value | The value(s) stored at the area specified by address. |
Errors
| function PlcDeviceConnection::ReadS5Time | ( | in | this, |
| in | address | ||
| ) |
Reads the value stored at the specified address as a scalar date number value (in PLC a S5TIME), while the date number does only express time information.
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to read. |
| value | The value stored at the area specified by address. |
Errors
| function PlcDeviceConnection::ReadString | ( | in | this, |
| in | address, | ||
| in | length | ||
| ) |
Reads the value stored at the specified address as a scalar string value (in PLC a TEXT).
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to read. |
| length | The length of the string value to read. |
| value | The value stored at the area specified by address. |
Errors
| function PlcDeviceConnection::ReadTime | ( | in | this, |
| in | address | ||
| ) |
Reads the value stored at the specified address as a scalar date number value (in PLC a TIME), while the date number does only express time information.
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to read. |
| value | The value stored at the area specified by address. |
Errors
| function PlcDeviceConnection::ReadTimeOfDay | ( | in | this, |
| in | address | ||
| ) |
Reads the value stored at the specified address as a scalar date number value (in PLC a TIME_OF_DAY), while the date number does only express time information.
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to read. |
| value | The value stored at the area specified by address. |
Errors
| function PlcDeviceConnection::ReadUInt16 | ( | in | this, |
| in | address, | ||
| in | count | ||
| ) |
Reads the value(s) stored at the specified address as a scalar uint16 value (in PLC a WORD) or if count is specified an array of n uint16 values (in PLC an ARRAY OF WORD).
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to read. |
| count | The number of values to read from the data area. |
| value | The value(s) stored at the area specified by address. |
Errors
| function PlcDeviceConnection::ReadUInt32 | ( | in | this, |
| in | address, | ||
| in | count | ||
| ) |
Reads the value(s) stored at the specified address as a scalar uint32 value (in PLC a DWORD) or if count is specified an array of n uint32 values (in PLC an ARRAY OF DWORD).
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to read. |
| count | The number of values to read from the data area. |
| value | The value(s) stored at the area specified by address. |
Errors
| function PlcDeviceConnection::ReadValues | ( | in | this, |
| in | values | ||
| ) |
Reads the values specified.
| this | The instance of the PlcDeviceConnection class to operate on. |
| values | The values to be read (as cell array). |
| value | An array of the values read. |
Errors
| function PlcDeviceConnection::WriteBoolean | ( | in | this, |
| in | address, | ||
| in | values | ||
| ) |
Writes the logical value(s) (in PLC BOOL or ARRAY OF BOOL) to the data area specified by address.
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to that the values are to be written. |
| values | The logical values to write to the area specified by address. |
Errors
| function PlcDeviceConnection::WriteByte | ( | in | this, |
| in | address, | ||
| in | values | ||
| ) |
Writes the binary value(s) (in PLC BYTE or ARRAY OF BYTE) to the data area specified by address.
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to that the values are to be written. |
| values | The binary values to write to the area specified by address. |
Errors
| function PlcDeviceConnection::WriteChar | ( | in | this, |
| in | address, | ||
| in | values | ||
| ) |
Writes the character value(s) (in PLC CHAR or ARRAY OF CHAR) to the data area specified by address.
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to that the values are to be written. |
| values | The character values to write to the area specified by address. |
Errors
| function PlcDeviceConnection::WriteDate | ( | in | this, |
| in | address, | ||
| in | value | ||
| ) |
Writes the date number (in PLC DATE) to the data area specified by address.
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to that the values are to be written. |
| value | The date number to write to the area specified by address. |
Errors
| function PlcDeviceConnection::WriteDateTime | ( | in | this, |
| in | address, | ||
| in | value | ||
| ) |
Writes the date number (in PLC DATE_AND_TIME) to the data area specified by address.
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to that the values are to be written. |
| value | The date number to write to the area specified by address. |
Errors
| function PlcDeviceConnection::WriteDouble | ( | in | this, |
| in | address, | ||
| in | values | ||
| ) |
Writes the double value(s) (in PLC DOUBLE or ARRAY OF DOUBLE) to the data area specified by address.
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to that the values are to be written. |
| values | The double values to write to the area specified by address. |
Errors
| function PlcDeviceConnection::WriteInt16 | ( | in | this, |
| in | address, | ||
| in | values | ||
| ) |
Writes the int16 value(s) (in PLC INT or ARRAY OF INT) to the data area specified by address.
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to that the values are to be written. |
| values | The int16 values to write to the area specified by address. |
Errors
| function PlcDeviceConnection::WriteInt32 | ( | in | this, |
| in | address, | ||
| in | values | ||
| ) |
Writes the int32 value(s) (in PLC DINT or ARRAY OF DINT) to the data area specified by address.
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to that the values are to be written. |
| values | The int32 values to write to the area specified by address. |
Errors
| function PlcDeviceConnection::WriteReal | ( | in | this, |
| in | address, | ||
| in | values | ||
| ) |
Writes the single value(s) (in PLC REAL or ARRAY OF REAL) to the data area specified by address.
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to that the values are to be written. |
| values | The single values to write to the area specified by address. |
Errors
| function PlcDeviceConnection::WriteS5Time | ( | in | this, |
| in | address, | ||
| in | value | ||
| ) |
Writes the time part of the date number (in PLC S5TIME) to the data area specified by address.
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to that the values are to be written. |
| value | The date number to write to the area specified by address. |
Errors
| function PlcDeviceConnection::WriteString | ( | in | this, |
| in | address, | ||
| in | value | ||
| ) |
Writes the string (in PLC TEXT) to the data area specified by address.
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to that the values are to be written. |
| value | The string to write to the area specified by address. |
Errors
| function PlcDeviceConnection::WriteTime | ( | in | this, |
| in | address, | ||
| in | value | ||
| ) |
Writes the time part of the date number (in PLC TIME) to the data area specified by address.
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to that the values are to be written. |
| value | The date number to write to the area specified by address. |
Errors
| function PlcDeviceConnection::WriteTimeOfDay | ( | in | this, |
| in | address, | ||
| in | value | ||
| ) |
Writes the time part of the date number (in PLC TIME_OF_DAY) to the data area specified by address.
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to that the values are to be written. |
| value | The date number to write to the area specified by address. |
Errors
| function PlcDeviceConnection::WriteUInt16 | ( | in | this, |
| in | address, | ||
| in | values | ||
| ) |
Writes the uint16 value(s) (in PLC WORD or ARRAY OF WORD) to the data area specified by address.
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to that the values are to be written. |
| values | The uint16 values to write to the area specified by address. |
Errors
| function PlcDeviceConnection::WriteUInt32 | ( | in | this, |
| in | address, | ||
| in | values | ||
| ) |
Writes the uint32 value(s) (in PLC DWORD or ARRAY OF DWORD) to the data area specified by address.
| this | The instance of the PlcDeviceConnection class to operate on. |
| address | The address of the data area to that the values are to be written. |
| values | The uint32 values to write to the area specified by address. |
Errors
| function PlcDeviceConnection::WriteValues | ( | in | this, |
| in | values | ||
| ) |
Writes the values specified.
| this | The instance of the PlcDeviceConnection class to operate on. |
| values | The values to write (as cell array). |
Errors