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

AVEVA™ Plant SCADA

ErrSetLevel

  • Last UpdatedJul 18, 2023
  • 1 minute read

Sets the nesting error level to enable Plant SCADA error checking inside a nested function (when Plant SCADA error checking has been disabled). This function returns the old error level and sets a new error level.

The nesting error level is incremented every time the ErrSet(1) function is called.

Syntax

ErrSetLevel(Level)

Level:

The nesting error level.

Return Value

Returns the old error level and sets a new error level.

ErrSet

Example

! ErrorLevel 0 defaults to ErrSet(0) - enables Plant SCADA error-checking.

FUNCTION MainFn()

ErrSet(1);

! ErrorLevel 1 - disables Plant SCADA error checking.

Fn1();

ErrSet(0);

! Enables Plant SCADA error checking.

END

FUNCTION Fn1()

ErrSet(1);

! ErrorLevel 2 - disables Plant SCADA error checking.

Test=Var/0;

Error=IsError();

! Sets Error to 273 (divide by zero).

Fn2();

ErrSet(0);

! Enables Plant SCADA error checking.

END

FUNCTION Fn2()

OldErrorLevel=ErrSetLevel(0);

! Sets nesting error level to 0 to enable Plant SCADA error-checking.

Test=Var/0;

! Cicode halts and a hardware alarm is generated.

ErrSetLevel(OldErrorLevel)

! Resets nesting error level to disable Plant SCADA error-checking.

END

See Also

Error Functions

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