Class TPLCTag
Unit
Declaration
type TPLCTag = class(TTag, IManagedTagInterface)
Description
Base class of a communication tag.
:
Hierarchy
- TComponent
- TTag
- TPLCTag
Overview
Fields
![]() |
PValidTag:Boolean; |
![]() |
PModified:Boolean; |
![]() |
FTagManager:TObject; |
![]() |
FSyncWrites:Boolean; |
![]() |
PProtocolDriver:TProtocolDriver; |
![]() |
PLastScanTimeStamp:TDateTime; |
![]() |
PValueTimeStamp:TDateTime; |
![]() |
PLastSyncReadCmdResult:TProtocolIOResult; |
![]() |
PLastSyncWriteCmdResult:TProtocolIOResult; |
![]() |
PLastASyncReadCmdResult:TProtocolIOResult; |
![]() |
PLastASyncWriteCmdResult:TProtocolIOResult; |
![]() |
FProtocolTagType:TProtocolTagType; |
![]() |
FTagType:TTagType; |
![]() |
FSwapDWords:Boolean; |
![]() |
FSwapWords:Boolean; |
![]() |
FSwapBytes:Boolean; |
![]() |
FProtocolWordSize:Byte; |
![]() |
FCurrentWordSize:Byte; |
Methods
![]() |
function IsMyCallBack(Cback:TTagCommandCallBack):Boolean; virtual; |
![]() |
procedure GetNewProtocolTagSize; |
![]() |
function RemainingMiliseconds:Int64; virtual; |
![]() |
function RemainingMilisecondsForNextScan:Int64; virtual; |
![]() |
function IsValidTag:Boolean; virtual; |
![]() |
procedure SetTagValidity(TagValidity:Boolean); virtual; |
![]() |
function PLCValuesToTagValues(Values:TArrayOfDouble; Offset:Cardinal):TArrayOfDouble; virtual; |
![]() |
function TagValuesToPLCValues(Values:TArrayOfDouble; Offset:Cardinal):TArrayOfDouble; virtual; |
![]() |
function GetAvgUpdateRate:Double; |
![]() |
procedure UpdateTagSizeOnProtocol; virtual; |
![]() |
procedure RebuildValues; virtual; |
![]() |
procedure SetSwapDWords(v:Boolean); virtual; |
![]() |
procedure SetSwapWords(v:Boolean); virtual; |
![]() |
procedure SetSwapBytes(v:Boolean); virtual; |
![]() |
procedure SetGUID(v:AnsiString); |
![]() |
procedure SetAutoRead(v:Boolean); virtual; |
![]() |
procedure SetAutoWrite(v:Boolean); virtual; |
![]() |
procedure SetMemAddress(v:Cardinal); virtual; |
![]() |
procedure SetMemFileDB(v:Cardinal); virtual; |
![]() |
procedure SetMemReadFunction(v:Cardinal); virtual; |
![]() |
procedure SetMemWriteFunction(v:Cardinal); virtual; |
![]() |
procedure SetMemSubElement(v:Cardinal); virtual; |
![]() |
procedure SetPath(v:AnsiString); virtual; |
![]() |
procedure SetPLCStation(v:Cardinal); virtual; |
![]() |
procedure SetPLCHack(v:Cardinal); virtual; |
![]() |
procedure SetPLCSlot(v:Cardinal); virtual; |
![]() |
procedure SetRefreshTime(v:TRefreshTime); virtual; |
![]() |
procedure SetProtocolDriver(p:TProtocolDriver); virtual; |
![]() |
procedure SetTagType(newType:TTagType); virtual; |
![]() |
procedure TagCommandCallBack(Values:TArrayOfDouble; ValuesTimeStamp:TDateTime; TagCommand:TTagCommand; LastResult:TProtocolIOResult; Offset:LongInt); virtual; |
![]() |
procedure BuildTagRec(out tr:TTagRec; Count, OffSet:LongInt); |
![]() |
procedure ScanRead; virtual; |
![]() |
procedure ScanWrite(Values:TArrayOfDouble; Count, Offset:Cardinal); virtual; abstract; |
![]() |
procedure Read; virtual; abstract; |
![]() |
procedure Write(Values:TArrayOfDouble; Count, Offset:Cardinal); overload; virtual; abstract; |
![]() |
procedure RemoveDriver; |
Properties
![]() |
property Modified: Boolean read PModified; |
![]() |
property AutoRead write SetAutoRead default true; |
![]() |
property AutoWrite write SetAutoWrite default true; |
![]() |
property CommReadErrors default 0; |
![]() |
property CommReadsOK nodefault; |
![]() |
property CommWriteErrors default 0; |
![]() |
property CommWritesOk nodefault; |
![]() |
property PLCRack write SetPLCHack nodefault; |
![]() |
property PLCSlot write SetPLCSlot nodefault; |
![]() |
property PLCStation write SetPLCStation nodefault; |
![]() |
property MemFile_DB write SetMemFileDB nodefault; |
![]() |
property MemAddress write SetMemAddress nodefault; |
![]() |
property MemSubElement write SetMemSubElement nodefault; |
![]() |
property MemReadFunction write SetMemReadFunction nodefault; |
![]() |
property MemWriteFunction write SetMemWriteFunction nodefault; |
![]() |
property Retries write PRetries default 1; |
![]() |
property RefreshTime write SetRefreshTime stored false; |
![]() |
property UpdateTime write SetRefreshTime default 1000; |
![]() |
property Size nodefault; |
![]() |
property LongAddress write SetPath nodefault; |
![]() |
property ProtocolDriver: TProtocolDriver read PProtocolDriver write SetProtocolDriver; |
![]() |
property ValueTimestamp: TDateTime read PValueTimeStamp; |
![]() |
property SyncWrites: Boolean read FSyncWrites write FSyncWrites default false ; |
![]() |
property TagType: TTagType read FTagType write SetTagType default pttDefault; |
![]() |
property SwapBytes: Boolean read FSwapBytes write SetSwapBytes default false; |
![]() |
property SwapWords: Boolean read FSwapWords write SetSwapWords default false; |
![]() |
property SwapDWords: Boolean read FSwapDWords write SetSwapDWords default false; |
![]() |
property TagSizeOnProtocol: LongInt read GetTagSizeOnProtocol; |
![]() |
property AvgUpdateRate: Double read GetAvgUpdateRate; |
![]() |
property TagGUID: AnsiString read PGUID write SetGUID; |
![]() |
property LastSyncReadStatus: TProtocolIOResult Read PLastSyncReadCmdResult; |
![]() |
property LastSyncWriteStatus: TProtocolIOResult Read PLastSyncWriteCmdResult; |
![]() |
property LastASyncReadStatus: TProtocolIOResult Read PLastASyncReadCmdResult; |
![]() |
property LastASyncWriteStatus: TProtocolIOResult Read PLastASyncWriteCmdResult; |
Description
Fields
![]() |
PValidTag:Boolean; |
![]() |
PModified:Boolean; |
![]() |
FTagManager:TObject; |
: Stores the tag manager. |
![]() |
FSyncWrites:Boolean; |
: Tells if the write command will be synchronous or asynchronous. |
![]() |
PProtocolDriver:TProtocolDriver; |
: Stores the protocol driver used by tag. |
![]() |
PLastScanTimeStamp:TDateTime; |
: Date/time of the last scan read request of tag. |
![]() |
PValueTimeStamp:TDateTime; |
: Date/time of the last update of the tag value. |
![]() |
PLastSyncReadCmdResult:TProtocolIOResult; |
: Stores the I/O result of the last synchronous read command done. |
![]() |
PLastSyncWriteCmdResult:TProtocolIOResult; |
: Stores the I/O result of the last synchronous write command done. |
![]() |
PLastASyncReadCmdResult:TProtocolIOResult; |
: Stores the I/O result of the last asynchronous read command done. |
![]() |
PLastASyncWriteCmdResult:TProtocolIOResult; |
: Stores the I/O result of the last synchronous write command done. |
![]() |
FProtocolTagType:TProtocolTagType; |
: Stores the datatype returned by the protocol driver. |
![]() |
FTagType:TTagType; |
: Datatype of the tag. |
![]() |
FSwapDWords:Boolean; |
: Tells if the DWords of an Double (64 bits) will be swaped. |
![]() |
FSwapWords:Boolean; |
: Tells if the words of an DWORD (LongInt,cardinal and float) will be swaped. |
![]() |
FSwapBytes:Boolean; |
: Tells if the bytes of an WORD (SmallInt, Word) will be swaped. |
![]() |
FProtocolWordSize:Byte; |
: Word size returned by the protocol and current word size of the tag in bits. |
![]() |
FCurrentWordSize:Byte; |
: Word size returned by the protocol and current word size of the tag in bits. |
Methods
![]() |
function IsMyCallBack(Cback:TTagCommandCallBack):Boolean; virtual; |
![]() |
procedure GetNewProtocolTagSize; |
![]() |
function RemainingMiliseconds:Int64; virtual; |
![]() |
function RemainingMilisecondsForNextScan:Int64; virtual; |
![]() |
function IsValidTag:Boolean; virtual; |
![]() |
procedure SetTagValidity(TagValidity:Boolean); virtual; |
![]() |
function PLCValuesToTagValues(Values:TArrayOfDouble; Offset:Cardinal):TArrayOfDouble; virtual; |
: Convert values comming from the PLC to the datatype of the tag. |
![]() |
function TagValuesToPLCValues(Values:TArrayOfDouble; Offset:Cardinal):TArrayOfDouble; virtual; |
: Convert values of the datatype of the tag to the datatype of the driver. |
![]() |
function GetAvgUpdateRate:Double; |
: Average scan update rate. |
![]() |
procedure UpdateTagSizeOnProtocol; virtual; |
: Returns the real size of the tag. |
![]() |
procedure RebuildValues; virtual; |
: Rebuild the tag values. |
![]() |
procedure SetSwapDWords(v:Boolean); virtual; |
: Enable/disables the swap of DWords. Valid only if your tag type is pttDouble. Parameters
|
![]() |
procedure SetSwapWords(v:Boolean); virtual; |
: Enable/disables the swap of words. Parameters
|
![]() |
procedure SetSwapBytes(v:Boolean); virtual; |
: Enable/disables the swap of bytes. Parameters
|
![]() |
procedure SetGUID(v:AnsiString); |
: Sets a new unique tag identification. Called by the Tag Manager. |
![]() |
procedure SetAutoRead(v:Boolean); virtual; |
: Enable/disables the automatic tag read. Parameters
|
![]() |
procedure SetAutoWrite(v:Boolean); virtual; |
: Enable/disables the automatic write of values of the tag. Parameters
|
![]() |
procedure SetMemAddress(v:Cardinal); virtual; |
: Sets the memory address. Parameters
|
![]() |
procedure SetMemFileDB(v:Cardinal); virtual; |
: Sets the File/DB that contains the mapped memory. Parameters
|
![]() |
procedure SetMemReadFunction(v:Cardinal); virtual; |
: Sets the function to be used to read the memory. Parameters
|
![]() |
procedure SetMemWriteFunction(v:Cardinal); virtual; |
: Sets the function to be used to write values on memory. Parameters
|
![]() |
procedure SetMemSubElement(v:Cardinal); virtual; |
: Sets the sub-element of the memory being mapped. Parameters
|
![]() |
procedure SetPath(v:AnsiString); virtual; |
: Sets the long address (text) of the tag. Parameters
|
![]() |
procedure SetPLCStation(v:Cardinal); virtual; |
: Sets the address of device being mapped. Parameters
|
![]() |
procedure SetPLCHack(v:Cardinal); virtual; |
: Sets the Rack of the device being mapped. Parameters
|
![]() |
procedure SetPLCSlot(v:Cardinal); virtual; |
: Sets the Slot number of the device being mapped. Parameters
|
![]() |
procedure SetRefreshTime(v:TRefreshTime); virtual; |
: Sets the scan rate of the tag in milliseconds. Parameters
|
![]() |
procedure SetProtocolDriver(p:TProtocolDriver); virtual; |
: Sets the protocol driver to be used the read/write values on device. Parameters
|
![]() |
procedure SetTagType(newType:TTagType); virtual; |
: Sets the datatype of the tag. See also |
![]() |
procedure TagCommandCallBack(Values:TArrayOfDouble; ValuesTimeStamp:TDateTime; TagCommand:TTagCommand; LastResult:TProtocolIOResult; Offset:LongInt); virtual; |
########################################################################## : Procedure called by the protocol driver to update tag values. |
![]() |
procedure BuildTagRec(out tr:TTagRec; Count, OffSet:LongInt); |
: Returns a structure with all informations about the tag. See also |
![]() |
procedure ScanRead; virtual; |
: Request a update of tag values. |
![]() |
procedure ScanWrite(Values:TArrayOfDouble; Count, Offset:Cardinal); virtual; abstract; |
: Write values of the tag on your device asynchronous. Parameters
|
![]() |
procedure Read; virtual; abstract; |
: Request a synchronous read of the tag value. |
![]() |
procedure Write(Values:TArrayOfDouble; Count, Offset:Cardinal); overload; virtual; abstract; |
: Write values of the tag on your device synchronous. Parameters
|
![]() |
procedure RemoveDriver; |
: Called when the protocol driver is being destroyed. |
Properties
![]() |
property Modified: Boolean read PModified; |
![]() |
property AutoRead write SetAutoRead default true; |
: See also |
![]() |
property AutoWrite write SetAutoWrite default true; |
: See also |
![]() |
property CommReadErrors default 0; |
: See also |
![]() |
property CommReadsOK nodefault; |
: See also |
![]() |
property CommWriteErrors default 0; |
: See also |
![]() |
property CommWritesOk nodefault; |
: See also |
![]() |
property PLCRack write SetPLCHack nodefault; |
: See also |
![]() |
property PLCSlot write SetPLCSlot nodefault; |
: See also |
![]() |
property PLCStation write SetPLCStation nodefault; |
: See also |
![]() |
property MemFile_DB write SetMemFileDB nodefault; |
: See also |
![]() |
property MemAddress write SetMemAddress nodefault; |
: See also |
![]() |
property MemSubElement write SetMemSubElement nodefault; |
: See also |
![]() |
property MemReadFunction write SetMemReadFunction nodefault; |
: See also |
![]() |
property MemWriteFunction write SetMemWriteFunction nodefault; |
: See also |
![]() |
property Retries write PRetries default 1; |
: See also |
![]() |
property RefreshTime write SetRefreshTime stored false; |
: See also |
![]() |
property UpdateTime write SetRefreshTime default 1000; |
: See also
|
![]() |
property Size nodefault; |
: See also |
![]() |
property LongAddress write SetPath nodefault; |
: See also |
![]() |
property ProtocolDriver: TProtocolDriver read PProtocolDriver write SetProtocolDriver; |
: Protocol driver used by tag to read/write values on your device. See also |
![]() |
property ValueTimestamp: TDateTime read PValueTimeStamp; |
: Date/time of the last update of the tag value. |
![]() |
property SyncWrites: Boolean read FSyncWrites write FSyncWrites default false ; |
: If |
![]() |
property TagType: TTagType read FTagType write SetTagType default pttDefault; |
: Datatype of the tag. |
![]() |
property SwapBytes: Boolean read FSwapBytes write SetSwapBytes default false; |
: Tells if the bytes of an WORD (SmallInt, Word) will be swaped. |
![]() |
property SwapWords: Boolean read FSwapWords write SetSwapWords default false; |
: Tells if the words of an DWORD (LongInt, cardinal and float) will be swaped. |
![]() |
property SwapDWords: Boolean read FSwapDWords write SetSwapDWords default false; |
: Tells if the DWords of an Double (float 64 bits) will be swaped. |
![]() |
property TagSizeOnProtocol: LongInt read GetTagSizeOnProtocol; |
: Tells the real size of the tag on protocol driver. |
![]() |
property AvgUpdateRate: Double read GetAvgUpdateRate; |
: Average update rate of the tag. |
![]() |
property TagGUID: AnsiString read PGUID write SetGUID; |
: Tells the unique tag identification. |
![]() |
property LastSyncReadStatus: TProtocolIOResult Read PLastSyncReadCmdResult; |
: I/O result of the last synchronous read done. See also |
![]() |
property LastSyncWriteStatus: TProtocolIOResult Read PLastSyncWriteCmdResult; |
: I/O result of the last synchronous write done. See also |
![]() |
property LastASyncReadStatus: TProtocolIOResult Read PLastASyncReadCmdResult; |
: I/O result of the last asynchronous read done. See also |
![]() |
property LastASyncWriteStatus: TProtocolIOResult Read PLastASyncWriteCmdResult; |
: I/O result of the last asynchronous write done. See also |
Author
- Fabio Luis Girardi [email protected]
Generated by PasDoc 0.14.0.