Class TModBusDriver
Unit
Declaration
type TModBusDriver = class(TProtocolDriver)
Description
TModBusDriver
Hierarchy
- TComponent
- TProtocolDriver
- TModBusDriver
Overview
Fields
PFirstRequestLen:LongInt; |
|
PFuncByteOffset:LongInt; |
|
PCRCLen:LongInt; |
|
POutputMaxHole:Cardinal; |
|
PInputMaxHole:Cardinal; |
|
PRegistersMaxHole:Cardinal; |
|
PInternalDelayBetweenCmds:Cardinal; |
|
PModbusPLC:array of TModBusPLC; |
Methods
function AllowBroadCast:Boolean; virtual; |
|
function GetTagProperts(TagObj:TTag; var Station, Address, Size, RegType, ScanTime:LongInt):Boolean; |
|
procedure SetOutputMaxHole(v:Cardinal); |
|
procedure SetInputMaxHole(v:Cardinal); |
|
procedure SetRegisterMaxHole(v:Cardinal); |
|
procedure BuildTagRec(plc,func,startaddress,size:LongInt; out tr:TTagRec); |
|
function EncodePkg(TagObj:TTagRec; ToWrite:TArrayOfDouble; var ResultLen:LongInt):BYTES; virtual; |
|
function DecodePkg(pkg:TIOPacket; out values:TArrayOfDouble):TProtocolIOResult; virtual; |
|
function RemainingBytes(buffer:BYTES):LongInt; virtual; |
|
procedure DoAddTag(TagObj:TTag; TagValid:Boolean); override; |
|
procedure DoDelTag(TagObj:TTag); override; |
|
procedure DoScanRead(Sender:TObject; var NeedSleep:LongInt); override; |
|
procedure DoGetValue(TagObj:TTagRec; var values:TScanReadRec); override; |
|
function DoWrite(const tagrec:TTagRec; const Values:TArrayOfDouble; Sync:Boolean):TProtocolIOResult; override; |
|
function DoRead (const tagrec:TTagRec; out Values:TArrayOfDouble; Sync:Boolean):TProtocolIOResult; override; |
|
function SizeOfTag(aTag:TTag; isWrite:Boolean; var ProtocolTagType:TProtocolTagType):BYTE; override; |
|
procedure OpenTagEditor(InsertHook: TAddTagInEditorHook; CreateProc: TCreateTagProc); override; |
|
function HasTabBuilderEditor: Boolean; override; |
Properties
property OutputMaxHole: Cardinal read POutputMaxHole write SetOutputMaxHole default 50; |
|
property InputMaxHole: Cardinal read PInputMaxHole write SetInputMaxHole default 50; |
|
property RegisterMaxHole: Cardinal read PRegistersMaxHole write SetRegisterMaxHole default 10; |
Description
Fields
PFirstRequestLen:LongInt; |
|
PFuncByteOffset:LongInt; |
|
PCRCLen:LongInt; |
|
POutputMaxHole:Cardinal; |
|
PInputMaxHole:Cardinal; |
|
PRegistersMaxHole:Cardinal; |
|
PInternalDelayBetweenCmds:Cardinal; |
|
PModbusPLC:array of TModBusPLC; |
|
Methods
function AllowBroadCast:Boolean; virtual; |
|
function GetTagProperts(TagObj:TTag; var Station, Address, Size, RegType, ScanTime:LongInt):Boolean; |
|
procedure SetOutputMaxHole(v:Cardinal); |
|
procedure SetInputMaxHole(v:Cardinal); |
|
procedure SetRegisterMaxHole(v:Cardinal); |
|
procedure BuildTagRec(plc,func,startaddress,size:LongInt; out tr:TTagRec); |
|
function EncodePkg(TagObj:TTagRec; ToWrite:TArrayOfDouble; var ResultLen:LongInt):BYTES; virtual; |
|
: Encode a modbus packet. |
function DecodePkg(pkg:TIOPacket; out values:TArrayOfDouble):TProtocolIOResult; virtual; |
|
: Decodes a modbus packet. |
function RemainingBytes(buffer:BYTES):LongInt; virtual; |
|
: Returns the remaing bytes on RX buffer of communication port. |
procedure DoAddTag(TagObj:TTag; TagValid:Boolean); override; |
|
: See also |
procedure DoDelTag(TagObj:TTag); override; |
|
: See also |
procedure DoScanRead(Sender:TObject; var NeedSleep:LongInt); override; |
|
: See also |
procedure DoGetValue(TagObj:TTagRec; var values:TScanReadRec); override; |
|
: See also |
function DoWrite(const tagrec:TTagRec; const Values:TArrayOfDouble; Sync:Boolean):TProtocolIOResult; override; |
|
: See also |
function DoRead (const tagrec:TTagRec; out Values:TArrayOfDouble; Sync:Boolean):TProtocolIOResult; override; |
|
: See also |
function SizeOfTag(aTag:TTag; isWrite:Boolean; var ProtocolTagType:TProtocolTagType):BYTE; override; |
|
: See also |
procedure OpenTagEditor(InsertHook: TAddTagInEditorHook; CreateProc: TCreateTagProc); override; |
|
: See also |
function HasTabBuilderEditor: Boolean; override; |
|
: See also |
Properties
property OutputMaxHole: Cardinal read POutputMaxHole write SetOutputMaxHole default 50; |
|
: How many digital outputs can be undeclared to keep the block continuous. See also |
property InputMaxHole: Cardinal read PInputMaxHole write SetInputMaxHole default 50; |
|
: How many digital inputs can be undeclared to keep the block continuous. See also |
property RegisterMaxHole: Cardinal read PRegistersMaxHole write SetRegisterMaxHole default 10; |
|
: How many registers can be undeclared to keep the block continuous. See also |
Generated by PasDoc 0.14.0.