Navigation:  Equipments (Devices) > SCA06 > Ladder > Data Transfer >

USERERR

User-generated error

Previous pageReturn to chapter overviewNext page

Block that generates an alarm or fault with the number programmed by the user.

 

Ladder Representation

 

USERERR_block

 

Block Structure

 

Variable Type

Name

Data Type

Description

VAR_INPUT

EN

BOOL

Block enabling


CODE

WORD UINT

Error code generated

(950 - 999)


TYPE

BYTE

Error type generated

(0 - Alarm)

(1 - Fault)

VAR_OUTPUT

ENO

BOOL

Success in the generation of error

VAR

USERERR_INST_0

USERERR

(*) Instance of access to block structure

 

wpshelp_common_fig_note

NOTE!

(*) USERERR_INST_0 instance must be configurated to SCA06 and LDW900.

 

Operation

 

When this block has a TRUE value in EN, it generates an alarm or equipment failure, depending on the type defined in TYPE with CODE code.

 

The value of ENO informs if the generation of alarm or fault has been executed successfully.

 

Block Flowchart

 

USERERR_flowchart

 

Example in Ladder

 

USERERR_example01

 

The above example, when identifying TRUE level in DI1, generates a fault with the code 974 and sets the DO1 output.

 

USERERR table configuration

 

On devices that have text-based HMI, messages can be configured through an editor. To access the editor, right click on the USERERR block and select the "Edit USERERR Table" option.

 

USERERR_editor01

 

The texts configured in the table will be displayed on the HMI when the block USERERR is enabled.

 

USERERR_editor02

 

After editing the table, select the argument CODE of the block equal to the CODE column of the table.

 

Example in ST

 

 The example below displays the instructions for applying the example above in the ST language.

 

 

VAR

   USERERR_INST_0 : FB_USERERR;

END_VAR

 

DO1 := USERERR_INST_0(EN:=DI1, CODE:=974, TYPE:=1);