Class TPLCMemoryManager
Unit
Declaration
type TPLCMemoryManager = class(TObject)
Description
Class that handles non-continuous memory blocks (fragmented) and the better organization of it.
:
Hierarchy
- TObject
- TPLCMemoryManager
Overview
Fields
Blocks:TRegisterRangeArray; |
Methods
constructor Create; virtual; |
|
destructor Destroy; override; |
|
procedure AddAddress(Address,Size,RegSize,Scan:Cardinal); overload; virtual; |
|
procedure RemoveAddress(Address,Size,RegSize:Cardinal); overload; virtual; |
|
function SetValues(AdrStart,Len,RegSize:Cardinal; Values:TArrayOfDouble; LastResult:TProtocolIOResult):LongInt; virtual; |
|
function GetValues(AdrStart,Len,RegSize:Cardinal; var Values:TArrayOfDouble; var LastResult:TProtocolIOResult; var ValueTimeStamp:TDateTime):LongInt; virtual; |
|
procedure SetFault(AdrStart,Len,RegSize:Cardinal; Fault:TProtocolIOResult); virtual; |
Properties
property MaxHole: LongInt read FMaxHole write SetHoleSize; |
|
property MaxBlockItems: LongInt read FMaxBlockSize write SetBlockSize; |
|
property Size: LongInt read GetSize; |
Description
Fields
Blocks:TRegisterRangeArray; |
|
: Continous memory blocks. |
Methods
constructor Create; virtual; |
|
: Creates the handler of non continuous memory block. |
destructor Destroy; override; |
|
: Destroys the handler of non continuous memory block. |
function SetValues(AdrStart,Len,RegSize:Cardinal; Values:TArrayOfDouble; LastResult:TProtocolIOResult):LongInt; virtual; |
|
:
One value on Values array represents the value of the smaller word of your device. For example: if you are storing the value of MW0 (word) of an Siemens PLC, you must call:
Because on Siemens PLC's the smaller word size is the byte, so, one word are two bytes. But, on a Schneider PLC, you must call:
Because on this PLC, the smaller word size is the Word (16bits).
Parameters
See also |
function GetValues(AdrStart,Len,RegSize:Cardinal; var Values:TArrayOfDouble; var LastResult:TProtocolIOResult; var ValueTimeStamp:TDateTime):LongInt; virtual; |
|
:
One value on Values array represents the value of the smaller word of your device.
Parameters
See also |
procedure SetFault(AdrStart,Len,RegSize:Cardinal; Fault:TProtocolIOResult); virtual; |
|
:
Parameters
See also |
Properties
property Size: LongInt read GetSize; |
|
: How many memories are handled by the manager. |
Author
- Fabio Luis Girardi [email protected]
Generated by PasDoc 0.14.0.