summaryrefslogtreecommitdiff
path: root/src/kicadtoNgspice
diff options
context:
space:
mode:
Diffstat (limited to 'src/kicadtoNgspice')
-rw-r--r--src/kicadtoNgspice/Convert.py10
-rw-r--r--src/kicadtoNgspice/Processing.py11
2 files changed, 11 insertions, 10 deletions
diff --git a/src/kicadtoNgspice/Convert.py b/src/kicadtoNgspice/Convert.py
index 0a38b28e..0454e1a5 100644
--- a/src/kicadtoNgspice/Convert.py
+++ b/src/kicadtoNgspice/Convert.py
@@ -204,13 +204,13 @@ class Convert:
try:
start=line[7]
end=line[8]
- num_turns=str(self.obj_track.model_entry_var[start].text())
+ num_turns=str(self.obj_track.model_entry_var[start+1].text())
if num_turns=="": num_turns="310"
h_array= "H_array = [ "
b_array = "B_array = [ "
- h1=str(self.obj_track.model_entry_var[start+1].text())
- b1=str(self.obj_track.model_entry_var[start+2].text())
+ h1=str(self.obj_track.model_entry_var[start].text())
+ b1=str(self.obj_track.model_entry_var[start+5].text())
if len(h1)!=0 and len(b1)!=0:
h_array=h_array+h1+" "
@@ -218,11 +218,11 @@ class Convert:
bh_array = h_array+" ] " + b_array+" ]"
else:
bh_array = "H_array = [-1000 -500 -375 -250 -188 -125 -63 0 63 125 188 250 375 500 1000] B_array = [-3.13e-3 -2.63e-3 -2.33e-3 -1.93e-3 -1.5e-3 -6.25e-4 -2.5e-4 0 2.5e-4 6.25e-4 1.5e-3 1.93e-3 2.33e-3 2.63e-3 3.13e-3]"
- area=str(self.obj_track.model_entry_var[start+3].text())
+ area=str(self.obj_track.model_entry_var[start+2].text())
length=str(self.obj_track.model_entry_var[start+4].text())
if area=="": area="1"
if length=="":length="0.01"
- num_turns2=str(self.obj_track.model_entry_var[start+5].text())
+ num_turns2=str(self.obj_track.model_entry_var[start+3].text())
if num_turns2=="": num_turns2="620"
addmodelLine=".model "+line[3]+"_primary lcouple (num_turns= "+num_turns+")"
modelParamValue.append([line[0],addmodelLine,"*primary lcouple"])
diff --git a/src/kicadtoNgspice/Processing.py b/src/kicadtoNgspice/Processing.py
index a80084ce..09544f19 100644
--- a/src/kicadtoNgspice/Processing.py
+++ b/src/kicadtoNgspice/Processing.py
@@ -311,7 +311,6 @@ class PrcocessNetlist:
modelList.append([index,compline,modelname,compName,comment,title,type,paramDict])
elif compType in plotList:
- print "Plot Data---------->"
schematicInfo.insert(index,"* "+compline)
if compType == 'plot_v1':
words = compline.split()
@@ -358,12 +357,14 @@ class PrcocessNetlist:
comment = "* "+compline
title = "Transformer details for model "+compName
type = "NA" #It is model but do not load from xml and lib file
- paramDict['primary_turns'] = "Enter the primary number of turns "
paramDict['h1_array'] = "Enter the H1 array "
+ paramDict['primary_turns'] = "Enter the primary number of turns (default=310) "
+ paramDict['area'] = "Enter iron core area (default=1)"
+ paramDict['secondar_turns'] = "Enter the secondary number of turns (default=620)"
+ paramDict['length'] = "Enter iron core length (default=0.01)"
paramDict['b1_array'] = "Enter the B1 array "
- paramDict['area'] = "Enter iron core area "
- paramDict['length'] = "Enter iron core length"
- paramDict['secondar_turns'] = "Enter the secondary number of turns"
+
+
modelList.append([index,compline,modelname,compName,comment,title,type,paramDict])
else: