Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

ErrTrap

  • Last UpdatedJul 18, 2023
  • 1 minute read

Generates an error trap. If Plant SCADA error checking is enabled, this function will generate a hardware error and may halt Cicode execution (see bHalt argument). If user error checking is enabled, the user function specified in OnEvent(2,Fn) is called.

Syntax

ErrTrap(Error, bHalt)

Error:

The error number to trap.

bHalt:

Determines whether the Cicode execution will be halted.

0 - Cicode execution is not halted

1 - Cicode execution is halted

Return Value

0 (zero) if successful, otherwise an error is returned.

ErrSetHw, ErrSet, ErrSetLevel, OnEvent

Example

IF Tag=0 THEN

ErrTrap(273); ! Traps a divide by zero error.

ELSE

Value=10/Tag;

END

See Also

Error Functions

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in