Show / Hide Table of Contents

Class StaticMatrix

This type of matrix has the number of rows and columns set during initialization and then they cannot be changed. Derived class must:

  • Declare a VAR array of LREAL named Data_
  • Call Init_ in FB_init, pointing to the local arrays, with Rows and Cols such that Rows*Cols <= Length(Data_) This simple abstract class sets the rules for all static memory matricies by creating a protected Init_(R,C) method that must be called to set the initial size of the matrix. It also implements the required Rows and Cols properties to return the values that were set during initialization.
warning

It is the callers responsibility to ensure that the pointer provided to the initializer is valid: - The length of the data structure pointed to (probably an array of LREAL) is at least as long as Rows x Cols - The scope of the data structure pointed to is the same as the scope of the corresponding ExternalStaticMatrix (probably declared adjacent to eachother as a VAR or GVL) Additionally, direct assignment (:=) should not be used with this type of matrix because a second copy of the Matrix, but with a pointer to the original's data source, would be created. For this reason, the pragma {attribute 'no_assign'} is used to block assignment at compile-time. Keep in mind that returning a value from a function is also a form of assignment and is not allowed.

Inheritance
System.Object
Matrix
StaticMatrix
ExternalStaticMatrix
Inherited Members
Matrix.Clear()
Matrix.CopyFrom(Object)
Matrix.ElementDifference(Object)
Matrix.ElementProduct(Object)
Matrix.ElementSum(Object)
Matrix.FillFrom(Object)
Matrix.FillTrapezoidal(Object, Object, Object)
Matrix.GetI(Object)
Matrix.GetRC(Object, Object)
Matrix.GetSize(Object)
Matrix.GetVectorMagnitude()
Matrix.InvertSquare(Object)
Matrix.IsEqualSize(Object)
Matrix.IsNearlyEqual(Object, Object)
Matrix.Power(Object)
Matrix.Scale(Object)
Matrix.SetI(Object, Object)
Matrix.SetRC(Object, Object, Object)
Matrix.SortByColAsc(Object)
Matrix.TransposeSquare()
Matrix.Average
Matrix.IsEmpty
Matrix.IsSquare
Matrix.IsVector
Matrix.Length
Matrix.MaxVal
Matrix.MinVal
Matrix.Sum
Namespace: PlcDocu.TcMatrix
Assembly: TcMatrixConnector.dll
Syntax
public abstract class StaticMatrix : Matrix

Properties

| Improve this Doc View Source

Cols

note

This is PLC property. This method is accessible only from the PLC code.

Declaration
[IgnoreReflection]
public dynamic Cols { get; }
Property Value
Type Description
System.Object

Plc type UINT; Twin type: Vortex.Connector.ValueTypes.OnlinerUInt

| Improve this Doc View Source

Rows

note

This is PLC property. This method is accessible only from the PLC code.

Declaration
[IgnoreReflection]
public dynamic Rows { get; }
Property Value
Type Description
System.Object

Plc type UINT; Twin type: Vortex.Connector.ValueTypes.OnlinerUInt

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX