Function GetVSVoltage

 

Function GetVSVoltage( ByVal nHandle&, ByRef vdMag() as double ) As Long

Purpose: Retrieves voltage sag analysis result

Works in:      OneLiner only.

Parameters:     

nHandle       [in] bus handle

vdMag       [out] Magnitude of voltage sag at monitored bus in fault on this bus

Return value:

1               success

0               failure

Remarks: The size of arrays vdMag must be at least 4, one each for voltage drop result with fault connections: 1LG, 2LG, 3PH, LL respectively

 

Example:

 

  If 0 = GetVSVoltage( nBusHnd,  vdMag ) Then GoTo HasError

  dSag# = -1.0

  For ii=1 to 4

    If dSag < vdMag(ii) then dSag = vdmag(ii)

  Next

  Print "Voltage sag on fault at: " + FullBusName(nBusHnd) + " = " + Str(dSag)

Function ErrorString

 

Function ErrorString( ) As String

Purpose: Retrieves the description of the last error. The result is a string.

Works in:      OneLiner and Power Flow.

Parameters:  none.

Remarks:

Example:

 

HasError:

   Print "Error: ", ErrorString( )

   Stop