FB_MsgAppend_TcTvA()

FB_MsgAppend_TcTvA() 1:

This function block appends active alarms to an array of type ST_TcTvA_Alarm_Itf. To get as much information as possible about the error in the visualization, the parameters listed below can be given to the error message.

Syntax

VAR_IN_OUT
    stTime      : TIMESTRUCT;
END_VAR
VAR_INPUT
    Idx1        : INT:=0;
    Idx2        : INT:=0;
    ErrorId     : DINT:=0;
    Prio        : INT:=0;
    Active      : BOOL:=TRUE;
    
    IdxFirst    : INT;
    IdxLast     : INT;
    sync_idx    : INT:=0;
    pAlarmBuffer: POINTER TO ST_TcTvA_Alarm_Itf;
END_VAR

FB_MsgAppend_TcTvA() 2: Inputs

Name

Type

Description

Idx1

INT

Zone number or drive number of the faulty zone.

Idx2

INT

Module number of the faulty zone.

ErrorId

DINT

If necessary, the error number can also be read as a plain text message from an .xml file.

Prio

INT

The priority of the error, where 3=Alarm 2=Warning 1=Note 0=Empty.

Active

BOOL

Active indicates that the error is active.

IdxFirst

INT

The first index in the alarm buffer.

IdxLast

INT

The last index in the alarm buffer.

sync_idx

INT

The address of the alarm buffer with the type ST_TcTvA_Alarm_Itf.

pAlarmBuffer

POINTER TO ST_TcTvA_Alarm_Itf

The address of the alarm buffer with the type ST_TcTvA_Alarm_Itf.

FB_MsgAppend_TcTvA() 3: Inputs/outputs

Name

Type

Description

stTime

TIMESTRUCT

The time when the error occurred.

After a successful call of this function block, there must be another entry at the first free position in the alarm history.