diff options
author | Abhishek Patel | 2016-06-22 17:33:36 +0530 |
---|---|---|
committer | Abhishek Patel | 2016-06-22 17:33:36 +0530 |
commit | d3deccfc9c64c7eb4996ca5e1a3253c037a1c0c7 (patch) | |
tree | 5db4d866c3dbf3d970c92c2e4602e018b77193ee | |
parent | dfc342ff023d7b01dea839bf37d980e58cdb6170 (diff) | |
download | eSimWebApp-d3deccfc9c64c7eb4996ca5e1a3253c037a1c0c7.tar.gz eSimWebApp-d3deccfc9c64c7eb4996ca5e1a3253c037a1c0c7.tar.bz2 eSimWebApp-d3deccfc9c64c7eb4996ca5e1a3253c037a1c0c7.zip |
default funtionality shown,model.libs divided
-rw-r--r-- | views/schematic.html | 45 | ||||
-rw-r--r-- | views/script/gui.js | 36 | ||||
-rw-r--r-- | views/script/savenetlist.js | 72 | ||||
-rw-r--r-- | views/script/schematic.js | 2 | ||||
-rw-r--r-- | views/webtronix_server/parts.json | 14 | ||||
-rw-r--r-- | views/webtronix_server/spice/2n2222.lib | 5 | ||||
-rw-r--r-- | views/webtronix_server/spice/2n2907.lib | 5 | ||||
-rw-r--r-- | views/webtronix_server/spice/2n3055.lib | 4 | ||||
-rw-r--r-- | views/webtronix_server/spice/2n3819.lib | 2 | ||||
-rw-r--r-- | views/webtronix_server/spice/2n3904.lib | 4 | ||||
-rw-r--r-- | views/webtronix_server/spice/2n3906.lib | 5 | ||||
-rw-r--r-- | views/webtronix_server/spice/mpf102.lib | 4 |
12 files changed, 148 insertions, 50 deletions
diff --git a/views/schematic.html b/views/schematic.html index c8d7e8d..0e3165f 100644 --- a/views/schematic.html +++ b/views/schematic.html @@ -1163,19 +1163,14 @@ add code text <select id="analysis_selectbox" class="exclude_button"><br> - <option selected="selected" value="4">Analysis Type</option> + <option selected="selected" value="3">Transient</option> <option value="1">DC</option> <option value="2">AC</option> - <option value="3">Transient</option> + <!-- <option value="4">Four</option> --> </select> - <div id = "select" display: none;> - <input id ="webtronics_netlist_cancels" class="button_cancel" type="button" value="cancel" ><br> - - </div> - <!------------------------- AC MENU FORM AND DIV --------------------------------------------------------------------------------------------------------------> @@ -1197,8 +1192,8 @@ add code text <td> <select id="start_frequency_selectbox" class="exclude_button"> - <option value="" disabled="disabled" selected="selected"> Start Frequency Units</option> - <option value="1">Hz</option> + <!-- <option value="" selected="selected"> Start Frequency Units</option> --> + <option selected="selected" value="1">Hz</option> <option value="2">THz</option> <option value="3">GHz</option> <option value="4">Meg</option> @@ -1214,8 +1209,8 @@ add code text </td> <td> <select id="stop_frequency_selectbox" class="exclude_button"> - <option value="" disabled="disabled" selected="selected">Stop Frequency Units</option> - <option value="1">Hz</option> + <!-- <option value="" selected="selected">Stop Frequency Units</option> --> + <option selected="selected" value="1">Hz</option> <option value="2">THz</option> <option value="3">GHz</option> <option value="4">Meg</option> @@ -1230,8 +1225,8 @@ add code text </td> <td> <select id="scale_selectbox" class="exclude_button"> - <option value="" disabled="disabled" selected="selected">Scale</option> - <option value="1">Lin</option> + <!-- <option value="" selected="selected">Scale</option> --> + <option selected="selected" value="1">Lin</option> <option value="2">Dec</option> <option value="3">Oct</option> @@ -1270,8 +1265,8 @@ add code text <input type="number" id="start_time" pattern="[0-9]{3}" min="0" name="Start Time"> <select id="start_time_selectbox" class="exclude_button"> - <option value="" disabled="disabled" selected="selected">Start Time units</option> - <option value="1">ms</option> + <!-- <option value="" selected="selected">Start Time units</option> --> + <option selected="selected" value="1">ms</option> <option value="2">us</option> <option value="3">ns</option> <option value="4">ps</option> @@ -1287,8 +1282,8 @@ add code text <select id="step_time_selectbox" class="exclude_button"> - <option value="" disabled="disabled" selected="selected">Step Time units</option> - <option value="1">ms</option> + <!-- <option value="" selected="selected">Step Time units</option> --> + <option selected="selected" value="1">ms</option> <option value="2">us</option> <option value="3">ns</option> <option value="4">ps</option> @@ -1301,8 +1296,8 @@ add code text <label for="dummy3">Stop Time</label> <input type="number" id="stop_time" pattern="[0-9]{3}" min="0" name="Stop Time"> <select id="stop_time_selectbox" class="exclude_button"> - <option value="" disabled="disabled" selected="selected">Stop Time units</option> - <option value="1">ms</option> + <!-- <option value="" selected="selected">Stop Time units</option> --> + <option selected="selected" value="1">ms</option> <option value="2">us</option> <option value="3">ns</option> <option value="4">ps</option> @@ -1350,8 +1345,8 @@ DC MENU FORM AND DIV <input type="number" id="startval" pattern="[0-9]{3}" min="0" name="Start" > <select id="start_volt_selectbox" class="exclude_button"> - <option value="" disabled="disabled" selected="selected">Start Time Units</option> - <option value="1">Volts or Amperes</option> + <!-- <option value="" selected="selected">Start Time Units</option> --> + <option selected="selected" value="1">Volts or Amperes</option> <option value="2">mV or mA</option> <option value="3">uV or uA</option> <option value="4">nV or nA</option> @@ -1368,8 +1363,8 @@ DC MENU FORM AND DIV <select id="inc_volt_selectbox" class="exclude_button"> - <option value="" disabled="disabled" selected="selected">Increment Time Units</option> - <option value="1">Volts or Amperes</option> + <!-- <option value="" selected="selected">Increment Time Units</option> --> + <option selected="selected" value="1">Volts or Amperes</option> <option value="2">mV or mA</option> <option value="3">uV or uA</option> <option value="4">nV or nA</option> @@ -1384,8 +1379,8 @@ DC MENU FORM AND DIV <input type="number" id="stopval" pattern="[0-9]{3}" min="0" name="Stop"> <select id="stop_volt_selectbox" class="exclude_button"> - <option value="" disabled="disabled" selected="selected">Stop Time Units</option> - <option value="1">Volts or Amperes</option> + <!-- <option value="" selected="selected">Stop Time Units</option> --> + <option selected="selected" value="1">Volts or Amperes</option> <option value="2">mV or mA</option> <option value="3">uV or uA</option> <option value="4">nV or nA</option> diff --git a/views/script/gui.js b/views/script/gui.js index 231dd28..a18e6bc 100644 --- a/views/script/gui.js +++ b/views/script/gui.js @@ -80,6 +80,24 @@ var webtronics={ },
+ showdefault:function(){
+
+
+ {
+ webtronics.openProperties();
+ this.enablepage();
+ $('webtronics_properties_div').style.display = "none";
+ var elemnt=document.getElementById("webtronics_properties_ok");
+ elemnt.click();
+ webtronics.circuit.createvalue(webtronics.circuit.selected[0]);
+ }
+
+
+
+ },
+
+
+
getvalues:function(elem){
@@ -138,6 +156,7 @@ jQuery(".analog").hide(); $("webtronics_risedelay").style.display='none';
$("webtronics_falldelay").style.display='none';
$("webtronics_inputload").style.display='none';
+
if(!c){
netlistcreator.writewtx(this.circuit.selected[0],"name","ic");
}
@@ -476,6 +495,7 @@ jQuery(".analog").hide(); $("webtronics_amplitude").style.display='none'
$("webtronics_phase").style.display='none'
}
+
else if(category=="analogmodels"){
$("models").style.display='none'
if(c=="gains"){
@@ -893,6 +913,7 @@ jQuery(".analog").hide(); else {
+
this.getvalues(this.circuit.selected[0]);
$("directive").style.display='none'
@@ -952,6 +973,10 @@ jQuery(".analog").hide(); }
+ if(category=="mosfets"||category=="transistors"){
+ $("directive").style.display='block';
+
+ }
if(c=="diode")$("directive").style.display='block'
var id=netlistcreator.readwtx(this.circuit.selected[0],"id");
if(type=="x")$("directive").style.display='block';
@@ -1195,6 +1220,11 @@ savepng:function(){ var group=$$( "#"+ part.id+" g" )[0];
webtronics.circuit.getgroup(group);
webtronics.setMode('select','Selection');
+
+
+ webtronics.showdefault();
+
+
});
Event.observe(part,'mouseup',function(e){
webtronics.circuit.deleteSelection();
@@ -1477,7 +1507,7 @@ if($("webtronics_select"))Event.observe($('webtronics_select'), 'click', functio flag1=0;
-
+ analysis_type=3;
jQuery("#analysis_selectbox").change(function(){
analysis_type = jQuery(this).val();
@@ -1530,12 +1560,12 @@ if($("webtronics_select"))Event.observe($('webtronics_select'), 'click', functio if (analysis_type == "1")
{
- console.log(jQuery("#analysis_selectbox").val());
+// console.log(jQuery("#analysis_selectbox").val());
jQuery("#webtronics_netlist_text_area").val(Flag + '\n'+ ".dc" + " " + source + " " + start + "e" + "-" + start_dc_unit + " " + stop + "e" + "-" + stop_dc_unit + " " + increment + "e" + "-" + increment_dc_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n"+ ".end \n" );
change_val = "1";
- console.log(jQuery("#analysis_selectbox").val());
+ //console.log(jQuery("#analysis_selectbox").val());
}
diff --git a/views/script/savenetlist.js b/views/script/savenetlist.js index 43aece6..7d598a4 100644 --- a/views/script/savenetlist.js +++ b/views/script/savenetlist.js @@ -128,7 +128,7 @@ jQuery(function(){ jQuery("#select").show(); jQuery("#dc_menu").hide(); jQuery("#ac_menu").hide(); - jQuery("#transient_menu").hide(); + jQuery("#transient_menu").show(); jQuery("#analysis_selectbox").change(function(){ if (jQuery(this).val() == "4") @@ -201,14 +201,27 @@ jQuery("#saveac").click(function(){ jQuery("#webtronics_disable").hide(); } - +scale_val=savedacval1; +if(scale_val==""){ + scale_val="lin"; +} +start_ac_unit=savedacval2; +if(start_ac_unit==""){ + start_ac_unit="Hz"; +} +stop_ac_unit=savedacval3; +if(stop_ac_unit==""){ + stop_ac_unit="Hz"; +} }); - +var savedacval3=""; +var savedacval2=""; +var savedacval1=""; jQuery("#frequency_selectbox").change(function(){ freq = jQuery(this).val(); - //console.log(freq); + // console.log(freq); }); jQuery("#scale_selectbox").change(function(){ @@ -226,6 +239,7 @@ jQuery("#scale_selectbox").change(function(){ { scale_val = "octal"; } + savedacval1=scale_val; }); jQuery("#start_frequency_selectbox").change(function(){ @@ -252,7 +266,7 @@ jQuery("#start_frequency_selectbox").change(function(){ { start_ac_unit = "KHz"; } - + savedacval2=start_ac_unit; }); jQuery("#stop_frequency_selectbox").change(function(){ @@ -279,7 +293,8 @@ jQuery("#stop_frequency_selectbox").change(function(){ { stop_ac_unit = "KHz"; } - + savedacval3=stop_ac_unit; + }); /*------------------------------------------------------------------------------------------------------------------------------------------------ @@ -316,9 +331,23 @@ jQuery("#savedc").click(function(){ jQuery("#webtronics_disable").hide(); } +start_dc_unit=saveddcval1; +if(start_dc_unit==""){ + start_dc_unit="00"; +} +increment_dc_unit=saveddcval2; +if(increment_dc_unit==""){ + increment_dc_unit="00"; +} +stop_dc_unit=saveddcval3; +if(stop_dc_unit==""){ + stop_dc_unit="00"; +} }); - +var saveddcval1=""; +var saveddcval2=""; +var saveddcval3=""; jQuery("#start_volt_selectbox").change(function(){ @@ -344,7 +373,7 @@ jQuery("#start_volt_selectbox").change(function(){ { start_dc_unit = "12"; } - + saveddcval1=start_dc_unit; //console.log(start_dc_unit); }); @@ -373,7 +402,7 @@ jQuery("#inc_volt_selectbox").change(function(){ { increment_dc_unit = "12"; } - + saveddcval2=increment_dc_unit; //console.log(increment_dc_unit); }); @@ -402,7 +431,7 @@ jQuery("#stop_volt_selectbox").change(function(){ { stop_dc_unit = "12"; } - + saveddcval3=stop_dc_unit; //console.log(stop_dc_unit); }); @@ -437,10 +466,25 @@ jQuery("#savetransient").click(function(){ jQuery("#webtronics_disable").hide(); } +start_trans_unit=savedtransval1; +if(start_trans_unit==""){ + start_trans_unit="03"; +} +step_trans_unit=savedtransval2; +if(step_trans_unit==""){ + step_trans_unit="03"; +} +stop_trans_unit=savedtransval3; +if(stop_trans_unit==""){ + stop_trans_unit="03"; +} + }); - +var savedtransval1=""; +var savedtransval2=""; +var savedtransval3=""; jQuery("#start_time_selectbox").change(function(){ trans_start_time = jQuery(this).val(); @@ -461,7 +505,7 @@ jQuery("#start_time_selectbox").change(function(){ { start_trans_unit = "12"; } - + savedtransval1=start_trans_unit; //console.log(start_trans_unit); }); @@ -485,7 +529,7 @@ jQuery("#step_time_selectbox").change(function(){ { step_trans_unit = "12"; } - + savedtransval2=step_trans_unit; //console.log(step_trans_unit); }); @@ -509,7 +553,7 @@ jQuery("#stop_time_selectbox").change(function(){ { stop_trans_unit = "12"; } - + savedtransval3=stop_trans_unit; //console.log(stop_trans_unit); }); diff --git a/views/script/schematic.js b/views/script/schematic.js index 1d064df..016116a 100644 --- a/views/script/schematic.js +++ b/views/script/schematic.js @@ -699,7 +699,7 @@ Schematic.prototype.createvalue=function(elem){ $(label).appendChild(valuespan);
}
$(label).appendChild(idspan);
- $(label).appendChild(valuespan);
+ //$(label).appendChild(valuespan);
}
else{
var text=this.createtext("",'black',0,0-this.fontsize);
diff --git a/views/webtronix_server/parts.json b/views/webtronix_server/parts.json index f1eb7e8..6241db9 100644 --- a/views/webtronix_server/parts.json +++ b/views/webtronix_server/parts.json @@ -105,8 +105,8 @@ "mosfets":{ "njfet":{ "values":{ - "mpf102":["models.lib"], - "2n3819":["models.lib"] + "mpf102":["mpf102.lib"], + "2n3819":["2n3819.lib"] } }, @@ -130,16 +130,16 @@ "npn":{ "values":{ - "2n3904":["models.lib"], - "2n2222":["models.lib"], - "2n3055":["models.lib"] + "2n3904":["2n3904.lib"], + "2n2222":["2n2222.lib"], + "2n3055":["2n3055.lib"] } }, "pnp":{ "values":{ - "2n3906":["models.lib"], - "2n2907":["models.lib"] + "2n3906":["2n3906.lib"], + "2n2907":["2n2907.lib"] } } diff --git a/views/webtronix_server/spice/2n2222.lib b/views/webtronix_server/spice/2n2222.lib new file mode 100644 index 0000000..00badab --- /dev/null +++ b/views/webtronix_server/spice/2n2222.lib @@ -0,0 +1,5 @@ +.model 2N2222 NPN(IS=14.34F XTI=3 EG=1.11 VAF= 74.03 BF=255.9 ++ NE=1.307 ISE=14.34F IKF=.2847 XTB=1.5 BR=6.092 NC=2 ++ ISC=0 IKR=0 RC=1 CJC=7.306P MJC=.3416 VJC=.75 FC=.5 ++ CJE=22.01P MJE=.377 VJE=.75 TR=46.91N TF=411.1P ITF=.6 ++ VTF=1.7 XTF=3 RB=10)
\ No newline at end of file diff --git a/views/webtronix_server/spice/2n2907.lib b/views/webtronix_server/spice/2n2907.lib new file mode 100644 index 0000000..d6720e4 --- /dev/null +++ b/views/webtronix_server/spice/2n2907.lib @@ -0,0 +1,5 @@ +.MODEL 2N2907 PNP (IS=15.294E-15 BF=297.85 VAF=100 IKF=1.6607 ISE=29.577E-15 ++ NE=1.5507 BR=476 VAR=100 IKR=2.2270 ISC=7.6418E-9 NC=2.1591 NK=.97918 ++ RB=2.4875 RC=.69253 CJE=33.186E-12 VJE=.8716 MJE=.40799 CJC=15.649E-12 ++ VJC=.56868 MJC=.3619 TF=456.18E-12 XTF=22.393 VTF=28.493 ITF=.62109 ++ TR=10.000E-9 )
\ No newline at end of file diff --git a/views/webtronix_server/spice/2n3055.lib b/views/webtronix_server/spice/2n3055.lib new file mode 100644 index 0000000..70eb213 --- /dev/null +++ b/views/webtronix_server/spice/2n3055.lib @@ -0,0 +1,4 @@ +.MODEL 2N3055 NPN(IS=4.66E-12 BF=360 VAF=100 IKF=0.25 ISE=3.339E-11 ++ BR=2 ISC=5E-9 RB=3 IRB=0.001 RBM=0.4 RC=0.04 CJE=5.802E-10 VJE=1.2 ++ MJE=0.45 TF=8E-8 XTF=1 ITF=3 PTF=120 CJC=2.121E-10 MJC=0.4 TR=2.55E-6 ++ XTB=1 )
\ No newline at end of file diff --git a/views/webtronix_server/spice/2n3819.lib b/views/webtronix_server/spice/2n3819.lib new file mode 100644 index 0000000..cc3a762 --- /dev/null +++ b/views/webtronix_server/spice/2n3819.lib @@ -0,0 +1,2 @@ +.model 2n3819 NJF(Beta=1.304m Rd=1 Rs=1 Lambda=2.25m Vto=-3 Is=33.57f ++ Cgd=1.6p Pb=1 Fc=.5 Cgs=2.414p Kf=9.882E-18 Af=1)
\ No newline at end of file diff --git a/views/webtronix_server/spice/2n3904.lib b/views/webtronix_server/spice/2n3904.lib new file mode 100644 index 0000000..b448b35 --- /dev/null +++ b/views/webtronix_server/spice/2n3904.lib @@ -0,0 +1,4 @@ +.model 2N3904 NPN(Is=6.734f Xti=3 Eg=1.11 Vaf=74.03 Bf=416.4 Ne=1.259 ++ Ise=6.734f Ikf=66.78m Xtb=1.5 Br=.7371 Nc=2 Isc=0 Ikr=0 Rc=1 ++ Cjc=3.638p Mjc=.3085 Vjc=.75 Fc=.5 Cje=4.493p Mje=.2593 Vje=.75 ++ Tr=239.5n Tf=301.2p Itf=.4 Vtf=4 Xtf=2 Rb=10)
\ No newline at end of file diff --git a/views/webtronix_server/spice/2n3906.lib b/views/webtronix_server/spice/2n3906.lib new file mode 100644 index 0000000..57564f7 --- /dev/null +++ b/views/webtronix_server/spice/2n3906.lib @@ -0,0 +1,5 @@ +.model 2n3906 PNP(Is=455.9E-18 Xti=3 Eg=1.11 Vaf=33.6 Bf=204.7 Ise=7.558f ++ Ne=1.536 Ikf=.3287 Nk=.9957 Xtb=1.5 Var=100 Br=3.72 ++ Isc=529.3E-18 Nc=15.51 Ikr=11.1 Rc=.8508 Cjc=10.13p Mjc=.6993 ++ Vjc=1.006 Fc=.5 Cje=10.39p Mje=.6931 Vje=.9937 Tr=10n Tf=181.2p ++ Itf=4.881m Xtf=.7939 Vtf=10 Rb=10)
\ No newline at end of file diff --git a/views/webtronix_server/spice/mpf102.lib b/views/webtronix_server/spice/mpf102.lib new file mode 100644 index 0000000..96c2097 --- /dev/null +++ b/views/webtronix_server/spice/mpf102.lib @@ -0,0 +1,4 @@ +.model mpf102 NJF (Beta=1.04m Betatce=-.5 Rd=1 Rs=1 Lambda=2m Vto=-3.41 ++ Vtotc=-2.5m Is=33.57f Isr=322.4f N=1 Nr=2 Xti=3 Alpha=311.7 ++ Vk=243.6 Cgd=1.6p M=.3622 Pb=1 Fc=.5 Cgs=2.414p Kf=11.73E-18 ++ Af=1)
\ No newline at end of file |