EXPERTGetCapturedValue: Returns Content of Capture Registers

Function Block Description

This administrative function block returns the content of a capture register.

Graphical Representation

G-SE-0003853.1.gif-high.gif

 

 

IL and ST Representation

To see the general representation in IL or ST language, refer to Function and Function Block Representation.

I/O Variables Description

This table describes the input variables:

Inputs

Type

Comment

EXPERT_REF_IN

EXPERT_REF

Reference to the EXPERT function block.

Must not be changed during block execution.

Execute

BOOL

On rising edge, starts the function block execution.

On falling edge, resets the outputs of the function block when its execution terminates.

CaptureNumber

BYTE

Index of the capture register:

ofor HSCMain: always 0

ofor Encoder: 0: Cap0, 1: Cap1, or 2: Distance

This table describes the output variables:

Outputs

Type

Comment

EXPERT_REF_OUT

EXPERT_REF

Reference to the EXPERT function block.

Done

BOOL

TRUE = indicates that CaptureValue is valid.

Function block execution is finished.

Busy

BOOL

TRUE = indicates that the function block execution is in progress.

Error

BOOL

TRUE = indicates that an error was detected.

Function block execution is finished.

ErrID

EXPERT_ERR_TYPE

When Error is TRUE: type of the detected error.

CaptureValue

DINT

When Done is TRUE: Capture register value is valid.

NOTE: In case of detected error, variables take the last value captured.

NOTE: For more information about Done, Busy and Execution pins, refer to General Information on Function Block Management.

Adding the EXPERTGetCapturedValue Function Block

Step

Description

1

Select the Libraries tab in the Software Catalog and click Libraries.

Select Controller > M258 > M258 Expert IO > Administrative > EXPERTGetCapturedValue in the list, drag-and-drop the item onto the POU window.

2

Link the EXPERT_REF_IN input to the HSC_REF output of the HSC.