State
(read/write)
This property sets/gets the present state of relay. If set to open, open relay's controlled element and lock out the relay. If set to close, close relay's controlled element and resets relay to first operation.
Example
% Create DSS object
DSSObject = actxserver('OpenDSSEngine.DSS')
if ~DSSObject.Start(0),
disp('Unable to start openDSS');
return
end;
DSSText = DSSObject.Text;
DSSCircuit = DSSObject.ActiveCircuit;
% Compile a model
DSSText.Command = 'Compile C:\myPath\myModel.dss';
DSSRelays = DSSCircuit.Relays;
% Activates the first relay of the list
i = DSSRelays.First;
% gets the state of the relay
myState = DSSRelays.State;