Circuit class is used to obtain the information on the entire circuit and operating the component.
This class can be called from Study class.
.
More...
Public Member Functions | |
| void | AddToLibrary (String ¯oName, String &saveName, String &folderName, String &description) |
| Adds the macro component of the specified name to the specified folder in the library. More... | |
| void | Clear () |
| Deletes all components and wires. | |
| void | ClearBrushGraph () |
| Deletes the contact angle for the brush and commutator that were added to the result table. | |
| void | ClearTerminalDifferenceLabel () |
| Deletes all electric potential difference or temperature difference between two terminals from the result table. | |
| void | ClearTerminalLabel () |
| Deletes all electric potentials or temperatures of the terminal from the result table. | |
| void | ClearVoltageDifferenceLabel () |
| Equivalent of Circuit::ClearTerminalDifferenceLabel . More... | |
| void | CreateBrushGraph (int x1, int y1, int x2, int y2) |
| Adds the contact angle of the brush and commutator in the result table. More... | |
| CircuitComponent * | CreateComponent (String &typeName, String &name="") |
| Creates a component. More... | |
| CircuitComponentInstance * | CreateComponentInstance (CircuitComponent *component, int x, int y) |
| Creates an instance from a circuit component. More... | |
| DynamicCircuit * | CreateDynamicCircuit (String &typeName) |
| Returns an object of the specified macro component. More... | |
| CircuitComponentInstance * | CreateInstance (Variant &component, int x, int y) |
| Creates an instance from a component. More... | |
| MacroCircuit * | CreateMacro (String ¯oName) |
| Returns the specified macro component object. More... | |
| CircuitComponentInstance * | CreateNewComponentInstance (String &typeName, int x, int y) |
| Creates a new component by specifying the component type and coordinates, and returns a CircuitComponentInstance object. More... | |
| CircuitComponentInstance * | CreateNewSubCircuitInstance (String &filename, int x, int y) |
| Creates a macro component, and then returns a CircuitComponentInstance object. More... | |
| void | CreateResponseTable (CircuitComponent *component) |
| CircuitComponentInstance * | CreateSubCircuit (String &filename, String &name, int x, int y) |
| Creates a macro component. More... | |
| void | CreateTerminalDifferenceLabel (String &name, int x1, int y1, int x2, int y2) |
| Adds the difference in electric potentials or temperatures between two terminals to the result table. More... | |
| void | CreateTerminalLabel (String &name, int x, int y) |
| Adds the electric potential or temperature of the terminal to the result table. More... | |
| void | CreateVoltageDifferenceLabel (String &name, int x1, int y1, int x2, int y2) |
| Equivalent of Circuit::CreateTerminalDifferenceLabel . More... | |
| CircuitWire * | CreateWire (int x1, int y1, int x2, int y2) |
| Connects two terminals with a wire. More... | |
| void | DeleteComponent (Variant &val) |
| Specifies a name, and deletes a component. More... | |
| void | DeleteComponentInstance (Variant &val) |
| Deletes the component from the specified name or index. More... | |
| void | DeleteComponentInstanceByType (String &typeName, int index) |
| Deletes the component from the specified component type and index. More... | |
| void | DeleteInstance (Variant &val, int index) |
| Specifies a name or index, and deletes an instance. More... | |
| void | DeleteTerminalDifferenceLabel (int x1, int y1, int x2, int y2) |
| Deletes the electric potential difference or temperature difference between two terminals from the result table. More... | |
| void | DeleteTerminalLabel (int x, int y) |
| Deletes the electric potential or temperature of the terminal from the result table. More... | |
| void | DeleteVoltageDifferenceLabel (int x1, int y1, int x2, int y2) |
| Equivalent of Circuit::DeleteTerminalDifferenceLabel . More... | |
| void | DeleteWire (CircuitWire *wire) |
| Specifies the CircuitWire object, and deletes a wire. More... | |
| void | DeleteWireByIndex (int index) |
| Specifies the index, and deletes a wire. More... | |
| CircuitComponentInstance * | DuplicateCircuit (String &name, String &newName) |
| Duplicates a circuit. More... | |
| void | ExportImage (String &filename) |
| Exports an image file (*.png, *.jpg, *.bmp). More... | |
| void | ExportImageWithSize (String &filename, int width, int height) |
| Exports an image file (*.png, *.jpg, *.bmp) by specifying the size. More... | |
| void | ExportXML (String &filename) |
| Exports thermal circuit from magnetic analysis study to xml file. More... | |
| CircuitComponent * | GetComponent (Variant &val) |
| Returns the CircuitComponent object of the specified component name or index. More... | |
| CircuitComponent * | GetComponentByType (String &typeName, int index) |
| Returns the CircuitComponent object from the specified component type and index. . More... | |
| CircuitComponentInstance * | GetComponentInstance (Variant &val) |
| Returns the CircuitComponentInstance object of the specified component name or index. . More... | |
| CircuitComponentInstance * | GetComponentInstanceByType (String &typeName, int index) |
| Returns the CircuitComponentInstance object from the specified component type and index. . More... | |
| CircuitComponentInstance * | GetInstance (Variant &val, int index) |
| Returns an instance. More... | |
| Circuit * | GetSubCircuit (Variant &val) |
| Returns the Circuit object for the specified macro component name or index. More... | |
| CircuitWire * | GetWire (int index) |
| Returns the CircuitWire object of the specified index. More... | |
| bool | IsValid () |
| Returns True if an object is valid. More... | |
| void | MakeSubCircuitEditable (Variant &val) |
| Makes the subcircuit editable for the macro component of the specified name or index. More... | |
| int | NumComponents () |
| Returns the total number of components in the circuit as an integer. More... | |
| int | NumComponentsByType (String &typeName) |
| Returns the total number of components in the circuit as an integer. More... | |
| int | NumInstances () |
| Returns the total number of instances of the component as an integer. More... | |
| int | NumSubCircuit () |
| Returns the total number of macro components as an integer. More... | |
| int | NumWires () |
| Returns the number of wires as an integer. More... | |
| void | Save (String &filename, int version=kProjectFileVersion) |
| Saves a file. More... | |
| void | SaveToolbox (String &title, String &description, String &folder, int version=kProjectFileVersion) |
| Saves circuit file and registers it to the tool box. More... | |
Detailed Description
Circuit class is used to obtain the information on the entire circuit and operating the component.
This class can be called from Study class.
.
Example of obtaining the class object:
For more information on component type names specified by the argument typeName in the circuit settings, see Properties and Flags for the Circuit Settings .
Member Function Documentation
| void Circuit::AddToLibrary | ( | String & | macroName, |
| String & | saveName, | ||
| String & | folderName, | ||
| String & | description | ||
| ) |
Adds the macro component of the specified name to the specified folder in the library.
- Parameters
-
macroName Macro component name saveName Save name in library folderName Save folder name description Description
| void Circuit::ClearVoltageDifferenceLabel | ( | ) |
Equivalent of Circuit::ClearTerminalDifferenceLabel .
- Deprecated:
- Deletes all differences in results between the two terminals added to the result table.
| void Circuit::CreateBrushGraph | ( | int | x1, |
| int | y1, | ||
| int | x2, | ||
| int | y2 | ||
| ) |
Adds the contact angle of the brush and commutator in the result table.
- Parameters
-
x1 X-coordinate of the terminal 1 y1 Y-coordinate of the terminal 1 x2 X-coordinate of the terminal 2 y2 Y-coordinate of the terminal 2
| CircuitComponent * Circuit::CreateComponent | ( | String & | typeName, |
| String & | name = "" |
||
| ) |
Creates a component.
- Parameters
-
typeName Component typeResistorCapacitorInductorDiodeCoilFEMConductorSwitchGroundVoltageSourceTwoTerminalVoltageSourceCurrentSourceTwoTerminalCurrentSourceCurrentProbeVoltageProbe3PhaseVoltageSource3PhaseCurrentSourceMultiPhaseVoltageSourceMultiPhaseCurrentSourceBrushCommutatorMacroComponentReferenceCoilReferenceConductorPowerSourceThreeTerminalResistorThreeTerminalCoilFEAElectricInputFEAElectricOutputCouplingControlUserSubroutineThermalResistorHeatCapacityHeatGenerationHeatTransferFixedTemperatureThermalProbeHeatControlCoilEndCoolingConvectionCoolingname Component name
- Returns
- CircuitComponentInstance object
For more information on component type, see Properties and Flags for the Circuit Settings .
| CircuitComponentInstance * Circuit::CreateComponentInstance | ( | CircuitComponent * | component, |
| int | x, | ||
| int | y | ||
| ) |
Creates an instance from a circuit component.
- Parameters
-
component CircuitComponent object x X-coordinate y Y-coordinate
- Returns
- CircuitComponentInstance object
| DynamicCircuit * Circuit::CreateDynamicCircuit | ( | String & | typeName | ) |
Returns an object of the specified macro component.
- Parameters
-
typeName Type of macro component to be createdcagelap-winding (for brush motors)wave-winding (for brush motors)Serial-Conductors
- Returns
- DynamicCircuit object
For more information on component types, see Properties and Flags for the Circuit Settings .
| CircuitComponentInstance * Circuit::CreateInstance | ( | Variant & | component, |
| int | x, | ||
| int | y | ||
| ) |
Creates an instance from a component.
- Parameters
-
component Component name or index x X-coordinate y Y-coordinate
- Returns
- CircuitComponentInstance object
Specify Ground in the component to create an instance of a Ground component.
| MacroCircuit * Circuit::CreateMacro | ( | String & | macroName | ) |
Returns the specified macro component object.
- Parameters
-
macroName Macro component name
- Returns
- MacroCircuit object
| CircuitComponentInstance * Circuit::CreateNewComponentInstance | ( | String & | typeName, |
| int | x, | ||
| int | y | ||
| ) |
Creates a new component by specifying the component type and coordinates, and returns a CircuitComponentInstance object.
- Parameters
-
typeName Component typeResistorCapacitorInductorDiodeCoilFEMConductorSwitchGroundVoltageSourceTwoTerminalVoltageSourceCurrentSourceTwoTerminalCurrentSourceCurrentProbeVoltageProbe3PhaseVoltageSource3PhaseCurrentSourceMultiPhaseVoltageSourceMultiPhaseCurrentSourceBrushCommutatorMacroComponentReferenceCoilReferenceConductorPowerSourceThreeTerminalResistorThreeTerminalCoilFEAElectricInputFEAElectricOutputCouplingControlUserSubroutineThermalResistorHeatCapacityHeatGenerationHeatTransferFixedTemperatureThermalProbeHeatControlCoilEndCoolingConvectionCoolingx X-coordinate y Y-coordinate
- Returns
- CircuitComponentInstance object
For more information on component type, see Properties and Flags for the Circuit Settings .
| CircuitComponentInstance * Circuit::CreateNewSubCircuitInstance | ( | String & | filename, |
| int | x, | ||
| int | y | ||
| ) |
Creates a macro component, and then returns a CircuitComponentInstance object.
- Parameters
-
typeName Macro component typePAM Inverter(Diode)PAM InverterPWM_InverterDelta ConnectionStar ConnectionThree Phase Power Supply(Current)Three Phase Power Supply(Voltage)Three Phase RectifierPWM_GeneratorPWM_Signal_Generator_6phaseRTPMSM_6phase_MaskVin_Gain_6phasedq_PI_controllerphase_current_PI_controller_6phasesInverter_(Control_Switch)Rt_Fea_SwitchRT_FEA_Switch_Grand_3phaseJMAG-RT_FEA_Switch_6phasePWM_Current_Vector_ControlPWM_Current_Vector_Control_with_RTPWM_Current_Vector_Control_6phasesPWM_Current_Vector_Control_6phases_with_RTIM_PWM_Current_Vector_ControlIM_PWM_Current_Vector_Control_6phasesx X-coordinate y Y-coordinate
- Returns
- CircuitComponentInstance object
| void Circuit::CreateResponseTable | ( | CircuitComponent * | component | ) |
- Deprecated:
- Creates a response value table from the RT component.
- Parameters
-
component CircuitComponent object
| CircuitComponentInstance * Circuit::CreateSubCircuit | ( | String & | filename, |
| String & | name, | ||
| int | x, | ||
| int | y | ||
| ) |
Creates a macro component.
- Parameters
-
typeName Macro component typePAM Inverter(Diode)PAM InverterPWM_InverterDelta ConnectionStar ConnectionThree Phase Power Supply(Current)Three Phase Power Supply(Voltage)Three Phase RectifierPWM_GeneratorPWM_Signal_Generator_6phaseRTPMSM_6phase_MaskVin_Gain_6phasedq_PI_controllerphase_current_PI_controller_6phasesInverter_(Control_Switch)Rt_Fea_SwitchRT_FEA_Switch_Grand_3phaseJMAG-RT_FEA_Switch_6phasePWM_Current_Vector_ControlPWM_Current_Vector_Control_with_RTPWM_Current_Vector_Control_6phasesPWM_Current_Vector_Control_6phases_with_RTIM_PWM_Current_Vector_ControlIM_PWM_Current_Vector_Control_6phasesname Component name x X-coordinate y Y-coordinate
- Returns
- CircuitComponentInstance object
For more information on component type, see Properties and Flags for the Circuit Settings .
| void Circuit::CreateTerminalDifferenceLabel | ( | String & | name, |
| int | x1, | ||
| int | y1, | ||
| int | x2, | ||
| int | y2 | ||
| ) |
Adds the difference in electric potentials or temperatures between two terminals to the result table.
- Parameters
-
name Label given to a pair of terminals for finding the electric potential difference or temperature difference. x1 X-coordinate of terminal 1 y1 Y-coordinate of terminal 1 x2 X-coordinate of terminal 2 y2 Y-coordinate of terminal 2
| void Circuit::CreateTerminalLabel | ( | String & | name, |
| int | x, | ||
| int | y | ||
| ) |
Adds the electric potential or temperature of the terminal to the result table.
- Parameters
-
name Title of the voltage or temperature x X-coordinate of the terminal y Y-coordinate of the terminal
| void Circuit::CreateVoltageDifferenceLabel | ( | String & | name, |
| int | x1, | ||
| int | y1, | ||
| int | x2, | ||
| int | y2 | ||
| ) |
Equivalent of Circuit::CreateTerminalDifferenceLabel .
- Deprecated:
- Adds the difference in results between two terminals to a result table.
| CircuitWire * Circuit::CreateWire | ( | int | x1, |
| int | y1, | ||
| int | x2, | ||
| int | y2 | ||
| ) |
Connects two terminals with a wire.
- Parameters
-
x1 X-coordinate of terminal 1 y1 Y-coordinate of terminal 1 x2 X-coordinate of terminal 2 y2 Y-coordinate of terminal 2
- Returns
- CircuitWire object
| void Circuit::DeleteComponent | ( | Variant & | val | ) |
Specifies a name, and deletes a component.
- Parameters
-
val Component name
| void Circuit::DeleteComponentInstance | ( | Variant & | val | ) |
Deletes the component from the specified name or index.
- Parameters
-
val Name or index of the circuit component
| void Circuit::DeleteComponentInstanceByType | ( | String & | typeName, |
| int | index | ||
| ) |
Deletes the component from the specified component type and index.
- Parameters
-
typeName Component type index Index of circuit component
For more information on component types, see Properties and Flags for the Circuit Settings .
| void Circuit::DeleteInstance | ( | Variant & | val, |
| int | index | ||
| ) |
Specifies a name or index, and deletes an instance.
- Parameters
-
val Name or index of the circuit component index Index of an instance
| void Circuit::DeleteTerminalDifferenceLabel | ( | int | x1, |
| int | y1, | ||
| int | x2, | ||
| int | y2 | ||
| ) |
Deletes the electric potential difference or temperature difference between two terminals from the result table.
- Parameters
-
x1 X-coordinate of the terminal 1 y1 Y-coordinate of the terminal 1 x2 X-coordinate of the terminal 2 y2 Y-coordinate of the terminal 2
| void Circuit::DeleteTerminalLabel | ( | int | x, |
| int | y | ||
| ) |
Deletes the electric potential or temperature of the terminal from the result table.
- Parameters
-
x X-coordinate of the terminal y Y-coordinate of the terminal
| void Circuit::DeleteVoltageDifferenceLabel | ( | int | x1, |
| int | y1, | ||
| int | x2, | ||
| int | y2 | ||
| ) |
Equivalent of Circuit::DeleteTerminalDifferenceLabel .
- Deprecated:
- Deletes the difference in results between two terminals from a result table.
| void Circuit::DeleteWire | ( | CircuitWire * | wire | ) |
Specifies the CircuitWire object, and deletes a wire.
- Parameters
-
wire CircuitWire object
| void Circuit::DeleteWireByIndex | ( | int | index | ) |
Specifies the index, and deletes a wire.
- Parameters
-
index Wire index
| CircuitComponentInstance * Circuit::DuplicateCircuit | ( | String & | name, |
| String & | newName | ||
| ) |
Duplicates a circuit.
- Parameters
-
name Circuit component name newName New circuit component name
| void Circuit::ExportImage | ( | String & | filename | ) |
Exports an image file (*.png, *.jpg, *.bmp).
- Parameters
-
filename File path
| void Circuit::ExportImageWithSize | ( | String & | filename, |
| int | width, | ||
| int | height | ||
| ) |
Exports an image file (*.png, *.jpg, *.bmp) by specifying the size.
- Parameters
-
filename File path width width height height
| void Circuit::ExportXML | ( | String & | filename | ) |
Exports thermal circuit from magnetic analysis study to xml file.
- Parameters
-
filename File path
| CircuitComponent * Circuit::GetComponent | ( | Variant & | val | ) |
Returns the CircuitComponent object of the specified component name or index.
This command is used to operate the properties of a component.
- Parameters
-
val Component name or index
- Returns
- CircuitComponent object
| CircuitComponent * Circuit::GetComponentByType | ( | String & | typeName, |
| int | index | ||
| ) |
Returns the CircuitComponent object from the specified component type and index.
.
This command is used to operate the properties of a component.
- Parameters
-
typeName Component type index Index of circuit component
- Returns
- CircuitComponent object
| CircuitComponentInstance * Circuit::GetComponentInstance | ( | Variant & | val | ) |
Returns the CircuitComponentInstance object of the specified component name or index.
.
This command is used to specify the position and angle of a component.
- Parameters
-
val Name or index of the circuit component
- Returns
- CircuitComponentInstance object
| CircuitComponentInstance * Circuit::GetComponentInstanceByType | ( | String & | typeName, |
| int | index | ||
| ) |
Returns the CircuitComponentInstance object from the specified component type and index.
.
This command is used to operate the position and angle of a component.
- Parameters
-
typeName Component type index Component index
- Returns
- CircuitComponentInstance object
| CircuitComponentInstance * Circuit::GetInstance | ( | Variant & | val, |
| int | index | ||
| ) |
Returns an instance.
- Parameters
-
val Component name/Component index index Instance index
- Returns
- CircuitComponentInstance object
| Circuit * Circuit::GetSubCircuit | ( | Variant & | val | ) |
| CircuitWire * Circuit::GetWire | ( | int | index | ) |
Returns the CircuitWire object of the specified index.
- Parameters
-
index Wire index
- Returns
- CircuitWire object
| bool Circuit::IsValid | ( | ) |
Returns True if an object is valid.
- Returns
- Whether or not the Circuit object is valid
| void Circuit::MakeSubCircuitEditable | ( | Variant & | val | ) |
Makes the subcircuit editable for the macro component of the specified name or index.
- Parameters
-
val Component name / component index
| int Circuit::NumComponents | ( | ) |
Returns the total number of components in the circuit as an integer.
- Returns
- Total number of components
| int Circuit::NumComponentsByType | ( | String & | typeName | ) |
Returns the total number of components in the circuit as an integer.
- Parameters
-
typeName Component type
- Returns
- Total number of components
| int Circuit::NumInstances | ( | ) |
Returns the total number of instances of the component as an integer.
- Returns
- Total number of instances of the component
| int Circuit::NumSubCircuit | ( | ) |
Returns the total number of macro components as an integer.
- Returns
- Total number of macro components
| int Circuit::NumWires | ( | ) |
Returns the number of wires as an integer.
- Returns
- Total number of wires
| void Circuit::Save | ( | String & | filename, |
| int | version = kProjectFileVersion |
||
| ) |
Saves a file.
- Parameters
-
filename File path version Save version
| void Circuit::SaveToolbox | ( | String & | title, |
| String & | description, | ||
| String & | folder, | ||
| int | version = kProjectFileVersion |
||
| ) |
Saves circuit file and registers it to the tool box.
- Parameters
-
title Title description Description folder Folder of tool box version Save version