SIMATIC S7 MatLab Toolbox

Public Member Functions | Public Attributes | Protected Member Functions | List of all members
PlcValue Class Reference

Represents an abstract base class of PLC values. More...

Inheritance diagram for PlcValue:

## Public Member Functions
function get | Address (in this)
| Gets the address of the PLC value.
function | GetValue (in this, in source)
| Retrieves the current value of the PLC value from the source specified. More...
function | IsValidType (in this, in value)
| Determines whether a specified value is acceptable for this PlcValue. More...
function | IsValidValue (in this, in value)
| Determines whether the provided value is accepted for the type of PLC value through basic type checking and also potentially if it is within the allowed range of value for that type. More...
function | SetValue (in this, in target, in value)
| Stores the value in the target specified. More...

## Public Attributes
Property | Address
| Gets the address of the PLC value. The PlcAddress used by the PLC value.
Property | Value
| Gets or sets the value assigned to the PLC value. The value assigned to the PLC value.
Property | ManagedInstance
| This property is not intended to be used outside of the toolbox.

## Protected Member Functions
function | PlcValue (in typeCode, in address, in length, in value)
| Initializes a new instance of the PlcValue class. More...

## Detailed Description

Represents an abstract base class of PLC values.

## Constructor & Destructor Documentation

## ◆ PlcValue()

function PlcValue::PlcValue | ( | in | typeCode,
|  | in | address,
|  | in | length,
|  | in | value
| ) |  |
| protected

Initializes a new instance of the PlcValue class.

Parameters

  typeCode | One of the members defined by the PlcTypeCode enumeration class which defines the concrete type of value represented.
  address | The PlcAddress of the new PlcValue to which the PLC value belongs.
  length | The length of data represented.
  value | The initial value of the new PlcValue.

## Member Function Documentation

## ◆ GetValue()

function PlcValue::GetValue | ( | in | this,
|  | in | source
| ) |  |

Retrieves the current value of the PLC value from the source specified.

Parameters

  this | The instance of the PlcValue class to operate on.
  source | The PlcDevice or PlcDeviceConnection from that the data is to be retrieved.

Return values

  value | The current value of the PLC value.

## ◆ IsValidType()

function PlcValue::IsValidType | ( | in | this,
|  | in | value
| ) |  |

Determines whether a specified value is acceptable for this PlcValue.

Parameters

  this | The instance of the PlcValue class to operate on.
  value | The value to check.

Return values

  value | The value true, if the specified value is the type or an acceptable derived type; otherwise the value false.

## ◆ IsValidValue()

function PlcValue::IsValidValue | ( | in | this,
|  | in | value
| ) |  |

Determines whether the provided value is accepted for the type of PLC value through basic type checking and also potentially if it is within the allowed range of value for that type.

Parameters

  this | The instance of the PlcValue class to operate on.
  value | The value to check.

Return values

  value | The value true, if the specified value is acceptable and is of the correct type or a derived type; otherwise the value false.

## ◆ SetValue()

function PlcValue::SetValue | ( | in | this,
|  | in | target,
|  | in | value
| ) |  |

Stores the value in the target specified.

Parameters

  this | The instance of the PlcValue class to operate on.
  target | The PlcDevice or PlcDeviceConnection to use to store the data.
  value | The value to be stored.

Errors

- The value is invalid. It either does not fall within an expected value range or its type is not supported by the PlcValue.

The documentation for this class was generated from the following file:

- PlcValue.m