pascalSCADA OPM: ModBusDriver: Class TModBusDriver

Pascal SCADA OPM

Class TModBusDriver

Unit

ModBusDriver

Declaration

type TModBusDriver = class(TProtocolDriver)

Description

TModBusDriver

Hierarchy

Overview

Fields

Protected PFirstRequestLen:LongInt;
Protected PFuncByteOffset:LongInt;
Protected PCRCLen:LongInt;
Protected POutputMaxHole:Cardinal;
Protected PInputMaxHole:Cardinal;
Protected PRegistersMaxHole:Cardinal;
Protected PInternalDelayBetweenCmds:Cardinal;
Protected PModbusPLC:array of TModBusPLC;

Methods

Protected function AllowBroadCast:Boolean; virtual;
Protected function GetTagProperts(TagObj:TTag; var Station, Address, Size, RegType, ScanTime:LongInt):Boolean;
Protected procedure SetOutputMaxHole(v:Cardinal);
Protected procedure SetInputMaxHole(v:Cardinal);
Protected procedure SetRegisterMaxHole(v:Cardinal);
Protected procedure BuildTagRec(plc,func,startaddress,size:LongInt; out tr:TTagRec);
Protected function EncodePkg(TagObj:TTagRec; ToWrite:TArrayOfDouble; var ResultLen:LongInt):BYTES; virtual;
Protected function DecodePkg(pkg:TIOPacket; out values:TArrayOfDouble):TProtocolIOResult; virtual;
Protected function RemainingBytes(buffer:BYTES):LongInt; virtual;
Protected procedure DoAddTag(TagObj:TTag; TagValid:Boolean); override;
Protected procedure DoDelTag(TagObj:TTag); override;
Protected procedure DoScanRead(Sender:TObject; var NeedSleep:LongInt); override;
Protected procedure DoGetValue(TagObj:TTagRec; var values:TScanReadRec); override;
Protected function DoWrite(const tagrec:TTagRec; const Values:TArrayOfDouble; Sync:Boolean):TProtocolIOResult; override;
Protected function DoRead (const tagrec:TTagRec; out Values:TArrayOfDouble; Sync:Boolean):TProtocolIOResult; override;
Public function SizeOfTag(aTag:TTag; isWrite:Boolean; var ProtocolTagType:TProtocolTagType):BYTE; override;
Public procedure OpenTagEditor(InsertHook: TAddTagInEditorHook; CreateProc: TCreateTagProc); override;
Public function HasTabBuilderEditor: Boolean; override;

Properties

Protected property OutputMaxHole: Cardinal read POutputMaxHole write SetOutputMaxHole default 50;
Protected property InputMaxHole: Cardinal read PInputMaxHole write SetInputMaxHole default 50;
Protected property RegisterMaxHole: Cardinal read PRegistersMaxHole write SetRegisterMaxHole default 10;

Description

Fields

Protected PFirstRequestLen:LongInt;
 
Protected PFuncByteOffset:LongInt;
 
Protected PCRCLen:LongInt;
 
Protected POutputMaxHole:Cardinal;
 
Protected PInputMaxHole:Cardinal;
 
Protected PRegistersMaxHole:Cardinal;
 
Protected PInternalDelayBetweenCmds:Cardinal;
 
Protected PModbusPLC:array of TModBusPLC;
 

Methods

Protected function AllowBroadCast:Boolean; virtual;
 
Protected function GetTagProperts(TagObj:TTag; var Station, Address, Size, RegType, ScanTime:LongInt):Boolean;
 
Protected procedure SetOutputMaxHole(v:Cardinal);
 
Protected procedure SetInputMaxHole(v:Cardinal);
 
Protected procedure SetRegisterMaxHole(v:Cardinal);
 
Protected procedure BuildTagRec(plc,func,startaddress,size:LongInt; out tr:TTagRec);
 
Protected function EncodePkg(TagObj:TTagRec; ToWrite:TArrayOfDouble; var ResultLen:LongInt):BYTES; virtual;

: Encode a modbus packet.

Protected function DecodePkg(pkg:TIOPacket; out values:TArrayOfDouble):TProtocolIOResult; virtual;

: Decodes a modbus packet.

Protected function RemainingBytes(buffer:BYTES):LongInt; virtual;

: Returns the remaing bytes on RX buffer of communication port.

Protected procedure DoAddTag(TagObj:TTag; TagValid:Boolean); override;

:

See also
TProtocolDriver.DoAddTag
Protected procedure DoDelTag(TagObj:TTag); override;

:

See also
TProtocolDriver.DoDelTag
Protected procedure DoScanRead(Sender:TObject; var NeedSleep:LongInt); override;

:

See also
TProtocolDriver.DoScanRead
Protected procedure DoGetValue(TagObj:TTagRec; var values:TScanReadRec); override;

:

See also
TProtocolDriver.DoGetValue
Protected function DoWrite(const tagrec:TTagRec; const Values:TArrayOfDouble; Sync:Boolean):TProtocolIOResult; override;

:

See also
TProtocolDriver.DoWrite
Protected function DoRead (const tagrec:TTagRec; out Values:TArrayOfDouble; Sync:Boolean):TProtocolIOResult; override;

:

See also
TProtocolDriver.DoRead
Public function SizeOfTag(aTag:TTag; isWrite:Boolean; var ProtocolTagType:TProtocolTagType):BYTE; override;

:

See also
TProtocolDriver.SizeOfTag
Public procedure OpenTagEditor(InsertHook: TAddTagInEditorHook; CreateProc: TCreateTagProc); override;

:

See also
TProtocolDriver.OpenTagEditor
Public function HasTabBuilderEditor: Boolean; override;

:

See also
TProtocolDriver.HasTabBuilderEditor

Properties

Protected property OutputMaxHole: Cardinal read POutputMaxHole write SetOutputMaxHole default 50;

: How many digital outputs can be undeclared to keep the block continuous.

See also
TPLCMemoryManager.MaxHole
Protected property InputMaxHole: Cardinal read PInputMaxHole write SetInputMaxHole default 50;

: How many digital inputs can be undeclared to keep the block continuous.

See also
TPLCMemoryManager.MaxHole
Protected property RegisterMaxHole: Cardinal read PRegistersMaxHole write SetRegisterMaxHole default 10;

: How many registers can be undeclared to keep the block continuous.

See also
TPLCMemoryManager.MaxHole

Generated by PasDoc 0.14.0.