Macro command Add

<< Click to Display Table of Contents >>

Navigation:  Macros > Macro commands and parameters > Macro alteration commands >

Macro command Add

Purpose:

Adds a value to an attribute or a variable.

 

General notation:

Add( Object( ObjectName ).Attribute , value )

or

Add( Variable , value )

 

Examples:

Increase transformer with name 'MyTransformer' tap changer position with 1 step:

 Add( Transformer( 'MyTransformer' ).Tap , 1 )

Lower load with name 'MyLoad' with 0.1 MW:

 Add( Load ( 'MyLoad' ).Pl , -0.1 )

Increase load behaviour with name 'MyLoadBehaviour' scaling factor with 0.1:

 Add( LoadBehaviour( 'MyLoadBehaviour' ).Scaling , 0.1 )

Lower variable with name 'MyVoltage' with 0.5:

 Add( MyVoltage , -0.5 )

Compose a name dependent text for a node voltage warning:

 Set( BranchName, 'Node with short name ' )

 Add(BranchName, Node( 'MyNode' ).Short )

 Add(BranchName, ' voltage is low. ' )