FB_DetectOnlineChange - General Information

Overview

Type:

Function Block

Available as of:

V1.0.4.0

Inherits from:

-

Implemented:

-

Task

A function block that checks whether a change has been executed since the last log in and whether the change should be transferred to the PacDrive controller using the online-change function.

Description

The function block checks via a parameter of the PacDrive controller if an online change took place. The parameter is a counter and is incremented after every online change.

During initialization, the POU always reports that an online change has taken place (q_xChange := TRUE).

This function block can be used to update pointers when required, for example.

Interface

Input

Data type

Description

i_xEnable

BOOL

A rising edge FALSE -> TRUE activates the POU, a falling edge TRUE -> FALSE deactivates the POU.

A deactivated POU does not execute any actions.

i_xDetect

BOOL

TRUE: The system is checked for an online change.

Output

Data type

Description

q_xActive

BOOL

TRUE: The POU is active and has to be executed further.

FALSE: The POU is inactive.

q_xReady

BOOL

TRUE: The POU is ready to operate and accepts user commands.

FALSE: the POU is not ready to operate and does not accept user commands.

q_etDiag

GD.ET_Diag

General, library-independent statement on the diagnostic.

A value not equal to ET_Diag.Ok corresponds to an error message.

q_etDiagExt

ET_DiagExt

POU-specific output on the diagnostic.

q_etDiag = ET_Diag.Ok -> Status message

q_etDiag <> ET_Diag.Ok -> Error message

q_sMsg

STRING[80]

Event-triggered message which gives more detailed information on the diagnostic state.

q_xChange

BOOL

TRUE: An online change was performed between the last call-up of the POUs and this call-up of the POUs.

FALSE: There was no online change.

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

OK

Detecting

52

Detect

OK

Disabled

22

Diagnostic message disabled

OK

WaitForDetect

51

Waiting for Detect.

ControllerConditionInvalid

ControllerInvalid

6

The controller is invalid.

ControllerInvalid

Enumeration name:

ControllerInvalid

Enumeration value:

6

Description:

The controller is invalid.

Issue

Cause

Solution

-

The controller does not provide the required conditions.

For more details, see q_sMsg output

Detecting

Enumeration name:

Detecting

Enumeration value:

52

Description:

Detect

The controller is checked for online changes.

Disabled

Enumeration name:

Disabled

Enumeration value:

22

Description:

Diagnostic message disabled

The function block is disabled and executes no actions whatsoever. i_xEnable and q_xActive are set to FALSE

WaitForDetect

Enumeration name:

WaitForDetect

Enumeration value:

51

Description:

Waiting for Detect.

The POU is enabled and is expecting a signal at the i_xDetect input.