Navigation:  Equipments (Devices) > SSW900 > 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

 

USERERR2_block

 

Block Structure

 

Variable Type

Name

Data Type

Description

VAR_INPUT

EN

BOOL

Block enabling

CODE

WORD UINT

Error code generated

(750 - 799)

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

 

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

 

USERERR2_example01

 

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

 

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);