FB_TermCoeRead_TcPfw()

FB_TermCoeRead_TcPfw() 1:

A function block of this type is used by FB_TempCtrlCallback_TcPfw for read access to EL terminals.

Syntax

VAR_INPUT    
     Execute      : BOOL;
    TermType      : E_TcPfw_TerminalType:=eTcPfwTermT_NoTerminal;
    Pdata         : POINTER TO BYTE:=0;
    ByteCount     : BYTE:=0;
    Index         : WORD:=0;
    Subindex      : BYTE:=0;
END_VAR
VAR_IN_OUT
    TempIn        : ST_TcPfw_TempCtrlInput;
END_VAR
VAR_OUTPUT
    Busy          : BOOL:=FALSE;
    Done          : BOOL:=FALSE;
    CommandAborted: BOOL:=FALSE;
    Error         : BOOL:=FALSE;
    ErrorID       : UDINT:=0;
END_VAR

FB_TermCoeRead_TcPfw() 2: Inputs

Name

Type

Description

Execute

BOOL

A rising edge starts the process.
A falling edge clears all outputs.

TermType

E_TcPfw_TerminalType

The coded type of the addressed terminal.

Pdata

POINTER TO BYTE

The destination address for the read data.

ByteCount

BYTE

The size of the data to be read in bytes.

Index

WORD

The CoE address according to the object directory of the terminal.

Subindex

BYTE

The CoE address according to the object directory of the terminal.

FB_TermCoeRead_TcPfw() 3: Inputs/outputs

Name

Type

Description

TempIn

ST_TcPfw_TempCtrlInput

The input process image of the terminal.

FB_TermCoeRead_TcPfw() 4: Outputs

Name

Type

Description

Busy

BOOL

The ongoing activity of the function block is signaled here.

Done

BOOL

The successful completion of the operation is reported here.

CommandAborted

BOOL

A TRUE indicates here that the process was aborted.

Error

BOOL

A TRUE indicates here the occurrence of a problem.

ErrorID

UDINT

In the event of an error, coded information is provided here.

Behavior of the function block:

A rising edge at Execute causes the function block to perform a series of checks.

If one of the above conditions is not met, an error is reported. Otherwise, the access is transmitted to the terminal. The result of the transmission is provided at the outputs.

FB_TermCoeRead_TcPfw() 5:

In addition to the above-mentioned error possibilities, problems can occur during transmission. Furthermore, the terminal can report a problem (addressing, values, access type).

FB_TermCoeRead_TcPfw() 6:

A CoE access requires that ST_TcPfw_TempCtrlInput.EL_AdsAddr is linked.