Class TSiemensProtocolFamily
Unit
Declaration
type TSiemensProtocolFamily = class(TProtocolDriver)
Description
TSiemensProtocolFamily
Hierarchy
- TComponent
- TProtocolDriver
- TSiemensProtocolFamily
Overview
Fields
![]() |
PDUIncoming:LongInt; |
![]() |
PDUOutgoing:LongInt; |
![]() |
FPLCs:TS7CPUs; |
![]() |
FAdapterInitialized:Boolean; |
Methods
![]() |
function GetTagInfo(tagobj:TTag):TTagRec; virtual; |
![]() |
procedure SetBytes(Ptr:PByte; idx:LongInt; values:BYTES); |
![]() |
function initAdapter:Boolean; virtual; |
![]() |
function disconnectAdapter:Boolean; virtual; |
![]() |
function connectPLC(var CPU:TS7CPU):Boolean; virtual; |
![]() |
function disconnectPLC(var CPU:TS7CPU):Boolean; virtual; |
![]() |
function exchange(var CPU:TS7CPU; var msgOut:BYTES; var msgIn:BYTES; IsWrite:Boolean):Boolean; virtual; |
![]() |
procedure sendMessage(var msgOut:BYTES); virtual; |
![]() |
function getResponse(var msgIn:BYTES; var BytesRead:LongInt):TIOResult; virtual; |
![]() |
function SwapBytesInWord(W:Word):Word; |
![]() |
procedure PrepareToSend(var msg:BYTES); virtual; |
![]() |
procedure AddParam(var MsgOut:BYTES; const param:BYTES); virtual; |
![]() |
procedure AddData(var MsgOut:BYTES; const data:BYTES); virtual; |
![]() |
procedure InitiatePDUHeader(var MsgOut:BYTES; PDUType:LongInt); virtual; |
![]() |
function NegotiatePDUSize(var CPU:TS7CPU):Boolean; virtual; |
![]() |
function SetupPDU(var msg:BYTES; MsgOutgoing:Boolean; out PDU:TPDU; out error:integer):Boolean; virtual; |
![]() |
procedure PrepareReadRequest(var msgOut:BYTES); virtual; |
![]() |
procedure PrepareWriteRequest(var msgOut:BYTES); virtual; |
![]() |
procedure PrepareReadOrWriteRequest(const WriteRequest:Boolean; var msgOut:BYTES); virtual; |
![]() |
procedure AddToReadRequest(var msgOut:BYTES; iArea, iDBnum, iStart, iByteCount:LongInt); virtual; |
![]() |
procedure AddParamToWriteRequest(var msgOut:BYTES; iArea, iDBnum, iStart:LongInt; buffer:BYTES); virtual; |
![]() |
procedure AddDataToWriteRequest(var msgOut:BYTES; iArea, iDBnum, iStart:LongInt; buffer:BYTES); virtual; |
![]() |
procedure RunPLC(CPU:TS7CPU); |
![]() |
procedure StopPLC(CPU:TS7CPU); |
![]() |
function S7ErrorCodeToProtocolErrorCode(code:Word):TProtocolIOResult; |
![]() |
function DoublesToBytes(const Values:TArrayOfDouble; Start, Len:LongInt):BYTES; |
![]() |
function BytesToDoubles(const ByteSeq:BYTES; Start, Len:LongInt):TArrayOfDouble; |
![]() |
function CreatePLC(iRack, iSlot, iStation:LongInt):LongInt; virtual; |
![]() |
procedure DeletePLC(PLCIndex:Integer); virtual; |
![]() |
procedure UpdateMemoryManager(pkgin, pkgout:BYTES; writepkg:Boolean; ReqList:TS7ReqList; var ResultValues:TArrayOfDouble); |
![]() |
procedure DoAddTag(TagObj:TTag; TagValid:Boolean); override; |
![]() |
procedure DoDelTag(TagObj:TTag); override; |
![]() |
procedure DoScanRead(Sender:TObject; var NeedSleep:LongInt); override; |
![]() |
procedure DoGetValue(TagRec: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; |
![]() |
function LiteralTagAddress(aTag: TTag; aBlockTag: TTag=nil):AnsiString; override; |
![]() |
procedure OpenTagEditor(InsertHook: TAddTagInEditorHook; CreateProc: TCreateTagProc); override; |
![]() |
function HasTabBuilderEditor: Boolean; override; |
Properties
![]() |
property ReadSomethingAlways; |
Description
Fields
![]() |
PDUIncoming:LongInt; |
: Where PDU starts on incoming and outgoing packets. |
![]() |
PDUOutgoing:LongInt; |
: Where PDU starts on incoming and outgoing packets. |
![]() |
FPLCs:TS7CPUs; |
: Lists all CPU's being read by the protocol driver. See also |
![]() |
FAdapterInitialized:Boolean; |
: If the protocol needs to initialize the adapter, stores if it was initialized. |
Methods
![]() |
function GetTagInfo(tagobj:TTag):TTagRec; virtual; |
: Returns a structure with informations about the tag. |
![]() |
procedure SetBytes(Ptr:PByte; idx:LongInt; values:BYTES); |
: Gets a byte from a pointer of bytes. function GetByte(Ptr:PByte; idx:LongInt):LongInt; : Sets a byte in a pointer of bytes. procedure SetByte(Ptr:PByte; idx:LongInt; value:Byte); : Sets a lot of bytes in a pointer of bytes. |
![]() |
function initAdapter:Boolean; virtual; |
: Initializes the adapter, if needed. |
![]() |
function disconnectAdapter:Boolean; virtual; |
: Disconnects from adapter. |
![]() |
function connectPLC(var CPU:TS7CPU):Boolean; virtual; |
: Connects on a PLC. Parameters
|
![]() |
function disconnectPLC(var CPU:TS7CPU):Boolean; virtual; |
: Disconnects from a PLC. Parameters
|
![]() |
function exchange(var CPU:TS7CPU; var msgOut:BYTES; var msgIn:BYTES; IsWrite:Boolean):Boolean; virtual; |
: Exchange data with a PLC. Parameters
Returns
|
![]() |
procedure sendMessage(var msgOut:BYTES); virtual; |
: Sends a message. Parameters
|
![]() |
function getResponse(var msgIn:BYTES; var BytesRead:LongInt):TIOResult; virtual; |
: Gets a incoming packet from the communication port. Parameters
ReturnsiorOK if was come some packet. |
![]() |
function SwapBytesInWord(W:Word):Word; |
: Swap the bytes of a word. Parameters
ReturnsThe word with their bytes swaped. |
![]() |
procedure PrepareToSend(var msg:BYTES); virtual; |
: Prepares a message to be sent. Parameters
|
![]() |
procedure AddParam(var MsgOut:BYTES; const param:BYTES); virtual; |
: Adds a parameter into the message to be sent. Parameters
|
![]() |
procedure AddData(var MsgOut:BYTES; const data:BYTES); virtual; |
: Adds a dataset into the message to be sent. Parameters
|
![]() |
procedure InitiatePDUHeader(var MsgOut:BYTES; PDUType:LongInt); virtual; |
: Initialize the PDU on outgoing message. Parameters
|
![]() |
function NegotiatePDUSize(var CPU:TS7CPU):Boolean; virtual; |
: Negotiate the maximum PDU size. Parameters
|
![]() |
function SetupPDU(var msg:BYTES; MsgOutgoing:Boolean; out PDU:TPDU; out error:integer):Boolean; virtual; |
: Creates a PDU structure from message. Parameters
ReturnsThe error number of PDU, if exists. |
![]() |
procedure PrepareReadRequest(var msgOut:BYTES); virtual; |
: Prepares the message to do a memory read request from PLC. Parameters
|
![]() |
procedure PrepareWriteRequest(var msgOut:BYTES); virtual; |
: Prepares the message to write data into the PLC memory. Parameters
|
![]() |
procedure PrepareReadOrWriteRequest(const WriteRequest:Boolean; var msgOut:BYTES); virtual; |
: Prepares the message to read or write on PLC. Parameters
|
![]() |
procedure AddToReadRequest(var msgOut:BYTES; iArea, iDBnum, iStart, iByteCount:LongInt); virtual; |
: Add into the outgoing message, informations about what must be read from PLC. Parameters
|
![]() |
procedure AddParamToWriteRequest(var msgOut:BYTES; iArea, iDBnum, iStart:LongInt; buffer:BYTES); virtual; |
: Add into the outgoing message, informations about the data to be written on PLC. Parameters
|
![]() |
procedure AddDataToWriteRequest(var msgOut:BYTES; iArea, iDBnum, iStart:LongInt; buffer:BYTES); virtual; |
: Add into the outgoing message the data to be written on PLC. Parameters
|
![]() |
procedure RunPLC(CPU:TS7CPU); |
: Put the PLC in RUN state, if possible. Don't work yet. |
![]() |
procedure StopPLC(CPU:TS7CPU); |
: Stops the PLC, if possible. Don't work yet. |
![]() |
function S7ErrorCodeToProtocolErrorCode(code:Word):TProtocolIOResult; |
: Converts a Siemens error code to a protocol error code. |
![]() |
function DoublesToBytes(const Values:TArrayOfDouble; Start, Len:LongInt):BYTES; |
: Converts TArrayOfDouble to BYTES. Parameters
ReturnsConverted Array of BYTES. |
![]() |
function BytesToDoubles(const ByteSeq:BYTES; Start, Len:LongInt):TArrayOfDouble; |
: Converts BYTES to TArrayOfDouble. Parameters
ReturnsArray of TArrayOfDouble. |
![]() |
procedure DeletePLC(PLCIndex:Integer); virtual; |
: Delete a PLC from the addressed PLC's list. Parameters
|
![]() |
procedure UpdateMemoryManager(pkgin, pkgout:BYTES; writepkg:Boolean; ReqList:TS7ReqList; var ResultValues:TArrayOfDouble); |
: Updates the manager of non-continuous memory blocks. Parameters
|
![]() |
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(TagRec:TTagRec; var values:TScanReadRec); override; |
: See also |
![]() |
function DoWrite(const tagrec:TTagRec; const Values:TArrayOfDouble; Sync:Boolean):TProtocolIOResult; override; |
estas funcoes ficaram apenas por motivos compatibilidade com os tags e seus metodos de leitura e escrita diretas. : 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 |
![]() |
function LiteralTagAddress(aTag: TTag; aBlockTag: TTag=nil):AnsiString; override; |
: See also |
![]() |
procedure OpenTagEditor(InsertHook: TAddTagInEditorHook; CreateProc: TCreateTagProc); override; |
: See also |
![]() |
function HasTabBuilderEditor: Boolean; override; |
: See also |
Properties
![]() |
property ReadSomethingAlways; |
: See also |
Generated by PasDoc 0.14.0.