summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfahim-oscad2016-07-12 17:48:37 +0530
committerfahim-oscad2016-07-12 17:48:37 +0530
commit971189242751f5992712a056a06e85f8bbecfa92 (patch)
tree7b64301a399ba09f2d57d1d219e76093829bb189
parent1d89e4eb58ccf55965ddec9b847063ce805820c7 (diff)
downloadeSimWebApp-971189242751f5992712a056a06e85f8bbecfa92.tar.gz
eSimWebApp-971189242751f5992712a056a06e85f8bbecfa92.tar.bz2
eSimWebApp-971189242751f5992712a056a06e85f8bbecfa92.zip
Subject: Added DC Sweep analysis option
Description: Added DC Sweep analysis option
-rw-r--r--views/schematic.html267
-rw-r--r--views/script/gui.js137
-rw-r--r--views/script/savenetlist.js280
3 files changed, 524 insertions, 160 deletions
diff --git a/views/schematic.html b/views/schematic.html
index a3944df..770ef68 100644
--- a/views/schematic.html
+++ b/views/schematic.html
@@ -1307,30 +1307,20 @@ add code text
<option selected="selected" value="3">Transient</option>
<option value="1">DC</option>
<option value="2">AC</option>
-
- <!-- <option value="4">Four</option> -->
+ <option value="4">DC Sweep</option>
</select>
<!------------------------- AC MENU FORM AND DIV -------------------------------------------------------------------------------------------------------------->
-
-
<div id = "ac_menu" display: none;>
-
-
-
-
<div id="inputbox_ac" display: table;>
-
<form >
<table>
-
<tr>
<td>
<label for="dummy1">Start Frequency</label>
<input type="number" id="startfreqval" pattern="[0-9]{3}" min="0" name="Start Frequency">
</td>
-
<td>
<select id="start_frequency_selectbox" class="exclude_button">
<!-- <option value="" selected="selected"> Start Frequency Units</option> -->
@@ -1342,7 +1332,6 @@ add code text
</select>
</td>
</tr>
-
<tr>
<td>
<label for="dummy2">Stop Frequency</label>
@@ -1370,41 +1359,26 @@ add code text
<option selected="selected" value="1">Lin</option>
<option value="2">Dec</option>
<option value="3">Oct</option>
-
</select>
</td>
</tr>
</table>
<input id ="saveac" class="view_netlist" type="button" value="save" >
-
<input id ="webtronics_netlist_cancela" class="button_cancel" type="button" value="cancel" ><br>
-
</form>
-
</div>
-
</div>
-
-
<!----------------------------------------- TRANSIENT MENU FORM AND DIV ------------------------------------------------------------>
-
-
-
<div id="transient_menu" display: none;>
-
<div id="inputbox_transient" display: table;>
-
-
<form >
<table>
-
<tr>
<td>
<label for="dummy1">Start Time</label>
<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="" selected="selected">Start Time units</option> -->
<option selected="selected" value="1">ms</option>
@@ -1414,14 +1388,10 @@ add code text
</select>
</td>
</tr>
-
-
<tr>
<td>
<label for="dummy2">Step Time</label>
<input type="number" id="step_time" pattern="[0-9]{3}" min="0" name="Step Time" >
-
-
<select id="step_time_selectbox" class="exclude_button">
<!-- <option value="" selected="selected">Step Time units</option> -->
<option selected="selected" value="1">ms</option>
@@ -1431,7 +1401,6 @@ add code text
</select>
</td>
</tr>
-
<tr>
<td>
<label for="dummy3">Stop Time</label>
@@ -1448,96 +1417,202 @@ add code text
</table>
<input id ="savetransient" class="view_netlist" type="button" value="save" >
<input id ="webtronics_netlist_cancelt" class="button_cancel" type="button" value="cancel" ><br>
-
</form>
</div>
-
</div>
<!------------------------------------------------------------------------------------------------------------------------------------------------
DC MENU FORM AND DIV
-------------------------------------------------------------------------------------------------------------------------------------------->
-<div id="dc_menu" display: none;>
-
+ <div id="dc_menu" display: none;>
+ <div id="inputbox_dc" display: table;>
+ <form >
+ <table>
+ <td>
+ <label for="dummy1">Source name</label>
+ <input type="text" id="sourceval" name="Source Name">
+ </td>
+ <tr>
+ <td>
+ <label for="dummy2">Start </label>
+ <input type="number" id="startval" pattern="[0-9]{3}" min="0" name="Start" >
+
+ <select id="start_volt_selectbox" class="exclude_button">
+ <!-- <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>
+ <option value="5">pV or pA</option>
+ </select>
+ </td>
+ </tr>
- <div id="inputbox_dc" display: table;>
+ <tr>
+ <td>
+ <label for="dummy3">Incrememnt</label>
+ <input type="number" id="Incrementval" pattern="[0-9]{3}" min="0" name="Increment">
+
+ <select id="inc_volt_selectbox" class="exclude_button">
+ <!-- <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>
+ <option value="5">pV or pA</option>
+ </select>
+ </td>
+ </tr>
- <form >
+ <tr>
+ <td>
+ <label for="dummy4">Stop </label>
+ <input type="number" id="stopval" pattern="[0-9]{3}" min="0" name="Stop">
+
+ <select id="stop_volt_selectbox" class="exclude_button">
+ <!-- <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>
+ <option value="5">pV or pA</option>
+ </select>
+ </td>
+ </tr>
+ </table>
- <!-- Source name: <input type="text" name="source" id ='sourceval' size="10"><br>
- Start : <input type="text" name="start" id ='startval' size="10"><br>
- Increment : <input type="text" name="increment" id ='incrementval' size="10"><br>
- Stop : <input type="text" name="stop" id = 'stopval' size="10"><br>
- -->
+ <input id ="savedc" class="view_netlist" type="button" value="save" >
+ <input id ="webtronics_netlist_canceld" class="button_cancel" type="button" value="cancel" ><br>
- <table>
- <td>
+ </form>
- <label for="dummy1">Source name</label>
- <input type="text" id="sourceval" name="Source Name">
+ </div>
+ </div>
- </td>
+<!------------------------------------------------------------------------------------------------------------------------------------------------
+DC SWEEP MENU FORM AND DIV
+-------------------------------------------------------------------------------------------------------------------------------------------->
+ <div id="dc_sweep_menu" display: none;>
+ <div id="inputbox_dc_sweep" display: table;>
+ <form >
+ <table>
+ <td>
+ <label for="dummy1">Source name 1</label>
+ <input type="text" id="sourceval1" name="Source Name">
- <tr>
- <td>
- <label for="dummy2">Start </label>
- <input type="number" id="startval" pattern="[0-9]{3}" min="0" name="Start" >
+ </td>
- <select id="start_volt_selectbox" class="exclude_button">
- <!-- <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>
- <option value="5">pV or pA</option>
- </select>
- </td>
- </tr>
+ <tr>
+ <td>
+ <label for="dummy2">Start </label>
+ <input type="number" id="startval1" pattern="[0-9]{3}" min="0" name="Start" >
+
+ <select id="start_volt_selectbox1" class="exclude_button">
+ <!-- <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>
+ <option value="5">pV or pA</option>
+ </select>
+ </td>
+ </tr>
- <tr>
- <td>
+ <tr>
+ <td>
+ <label for="dummy3">Incrememnt</label>
+ <input type="number" id="Incrementval1" pattern="[0-9]{3}" min="0" name="Increment">
+
+ <select id="inc_volt_selectbox1" class="exclude_button">
+ <!-- <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>
+ <option value="5">pV or pA</option>
+ </select>
+ </td>
+ </tr>
- <label for="dummy3">Incrememnt</label>
- <input type="number" id="Incrementval" pattern="[0-9]{3}" min="0" name="Increment">
+ <tr>
+ <td>
+ <label for="dummy4">Stop </label>
+ <input type="number" id="stopval1" pattern="[0-9]{3}" min="0" name="Stop">
+
+ <select id="stop_volt_selectbox1" class="exclude_button">
+ <!-- <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>
+ <option value="5">pV or pA</option>
+ </select>
+ </td>
+ </tr>
+ <td>
+ <label for="dummy1">Source name 2</label>
+ <input type="text" id="sourceval2" name="Source Name">
+ </td>
- <select id="inc_volt_selectbox" class="exclude_button">
- <!-- <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>
- <option value="5">pV or pA</option>
- </select>
- </td>
- </tr>
+ <tr>
+ <td>
+ <label for="dummy2">Start </label>
+ <input type="number" id="startval2" pattern="[0-9]{3}" min="0" name="Start" >
+
+ <select id="start_volt_selectbox2" class="exclude_button">
+ <!-- <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>
+ <option value="5">pV or pA</option>
+ </select>
+ </td>
+ </tr>
- <tr>
- <td>
- <label for="dummy4">Stop </label>
- <input type="number" id="stopval" pattern="[0-9]{3}" min="0" name="Stop">
+ <tr>
+ <td>
+ <label for="dummy3">Incrememnt</label>
+ <input type="number" id="Incrementval2" pattern="[0-9]{3}" min="0" name="Increment">
+
+ <select id="inc_volt_selectbox2" class="exclude_button">
+ <!-- <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>
+ <option value="5">pV or pA</option>
+ </select>
+ </td>
+ </tr>
- <select id="stop_volt_selectbox" class="exclude_button">
- <!-- <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>
- <option value="5">pV or pA</option>
- </select>
- </td>
- </tr>
- </table>
+ <tr>
+ <td>
+ <label for="dummy4">Stop </label>
+ <input type="number" id="stopval2" pattern="[0-9]{3}" min="0" name="Stop">
+
+ <select id="stop_volt_selectbox2" class="exclude_button">
+ <!-- <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>
+ <option value="5">pV or pA</option>
+ </select>
+ </td>
+ </tr>
+ </table>
- <input id ="savedc" class="view_netlist" type="button" value="save" >
- <input id ="webtronics_netlist_canceld" class="button_cancel" type="button" value="cancel" ><br>
+ <input id ="savedcs" class="view_netlist" type="button" value="save" >
+ <input id ="webtronics_netlist_canceldcs" class="button_cancel" type="button" value="cancel" ><br>
-</form>
+ </form>
-</div>
-</div>
+ </div>
+ </div>
<div id="domchange"> </div>
diff --git a/views/script/gui.js b/views/script/gui.js
index d9e1ea2..5fc62b1 100644
--- a/views/script/gui.js
+++ b/views/script/gui.js
@@ -5,6 +5,7 @@
str1="";
str2="";
str3="";
+str4="";
final_str="";
globalVariable=0;
@@ -1860,42 +1861,42 @@ if($("webtronics_select"))Event.observe($('webtronics_select'), 'click', functio
//console.log("out")
- if (change_val == "0")
- {
- Flag = jQuery("#webtronics_netlist_text_area").val();
+if (change_val == "0")
+{
+ Flag = jQuery("#webtronics_netlist_text_area").val();
-jQuery("#webtronics_netlist_text_area").val("");
-/*-------------------------------------------------------------------------------------------------------------------------------------
- Here are the conditions concatenated to give final netlist values for dc all cases
- ---------------------------------------------------------------------------------------------------------------------------------------------*/
- if (analysis_type == "1")
- {
-
- str1='\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";
- jQuery("#webtronics_netlist_text_area").val(Flag + str1 );
- final_str=str1;
- change_val = "1";
- //console.log(jQuery("#analysis_selectbox").val());
-}
+ jQuery("#webtronics_netlist_text_area").val("");
+ /*-------------------------------------------------------------------------------------------------------------------------------------
+ Here are the conditions concatenated to give final netlist values for dc all cases
+ ---------------------------------------------------------------------------------------------------------------------------------------------*/
+ if (analysis_type == "1")
+ {
+
+ str1='\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";
+ jQuery("#webtronics_netlist_text_area").val(Flag + str1 );
+ final_str=str1;
+ change_val = "1";
+ //console.log(jQuery("#analysis_selectbox").val());
+ }
-/*------------------------------------------------------------------------------------------------------------------------------------------------
-Here are the all AC Cases for generating final netlist values
-------------------------------------------------------------------------------------------------------------------------------------------------*/
-else if (analysis_type == "2")
-{
- str2='\n'+ ".ac" + " " + scale_val + " " + noofpoint + " " + startfreq + start_ac_unit + " " + stopfreq + stop_ac_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n"+ ".end \n" ;
+ /*------------------------------------------------------------------------------------------------------------------------------------------------
+ Here are the all AC Cases for generating final netlist values
+ ------------------------------------------------------------------------------------------------------------------------------------------------*/
+ else if (analysis_type == "2")
+ {
+ str2='\n'+ ".ac" + " " + scale_val + " " + noofpoint + " " + startfreq + start_ac_unit + " " + stopfreq + stop_ac_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n"+ ".end \n" ;
- jQuery("#webtronics_netlist_text_area").val(Flag +str2 );
- final_str=str2;
- change_val = "1";
- //console.log(jQuery("#webtronics_netlist_text_area").val());
- console.log("from 00");
-}
-/*------------------------------------------------------------------------------------------------------------------------------------------------
-Here are the all Transiet Cases for generating final netlist values
-------------------------------------------------------------------------------------------------------------------------------------------------*/
- //else if (analysis_type == "3" && time == "1")
+ jQuery("#webtronics_netlist_text_area").val(Flag +str2 );
+ final_str=str2;
+ change_val = "1";
+ //console.log(jQuery("#webtronics_netlist_text_area").val());
+ console.log("from 00");
+ }
+ /*------------------------------------------------------------------------------------------------------------------------------------------------
+ Here are the all Transiet Cases for generating final netlist values
+ ------------------------------------------------------------------------------------------------------------------------------------------------*/
+ //else if (analysis_type == "3" && time == "1")
else if (analysis_type== "3")
{
str3='\n' + ".tran" + " " + step_trans + "e" + "-" + step_trans_unit + " " + stop_trans + "e"+ "-" + stop_trans_unit + " " + start_trans + "e" + "-" + start_trans_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n" +".end \n";
@@ -1906,41 +1907,51 @@ Here are the all Transiet Cases for generating final netlist values
}
+ else if (analysis_type == "4")
+ {
+
+ str4='\n'+ ".dc" + " " + source1 + " " + start1 + "e" + "-" + start_dc_unit1 + " " + stop1 + "e" + "-" + stop_dc_unit1 + " " + increment1 + "e" + "-" + increment_dc_unit1 + " " + source2 + " " + start2 + "e" + "-" + start_dc_unit2 + " " + stop2 + "e" + "-" + stop_dc_unit2 + " " + increment2 + "e" + "-" + increment_dc_unit2 + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n"+ ".end \n";
+ jQuery("#webtronics_netlist_text_area").val(Flag + str4 );
+ final_str=str4;
+ change_val = "1";
+ //console.log(jQuery("#analysis_selectbox").val());
+ }
+
}
else if (change_val == "1")
- {
+{
-jQuery("#webtronics_netlist_text_area").val("");
+ jQuery("#webtronics_netlist_text_area").val("");
-/*-------------------------------------------------------------------------------------------------------------------------------------
- Here are the conditions concatenated to give final netlist values for dc all cases
- ---------------------------------------------------------------------------------------------------------------------------------------------*/
- if (analysis_type == "1")
- {
+ /*-------------------------------------------------------------------------------------------------------------------------------------
+ Here are the conditions concatenated to give final netlist values for dc all cases
+ ---------------------------------------------------------------------------------------------------------------------------------------------*/
+ if (analysis_type == "1")
+ {
- 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" );
+ 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());
-}
+ change_val = "1";
+ //console.log(jQuery("#analysis_selectbox").val());
+ }
-/*------------------------------------------------------------------------------------------------------------------------------------------------
-Here are the all AC Cases for generating final netlist values
-------------------------------------------------------------------------------------------------------------------------------------------------*/
-else if (analysis_type == "2")
-{
- jQuery("#webtronics_netlist_text_area").val(Flag + '\n'+ ".ac" + " " + scale_val + " " + noofpoint + " " + startfreq + start_ac_unit + " " + stopfreq + stop_ac_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n"+ ".end \n" );
+ /*------------------------------------------------------------------------------------------------------------------------------------------------
+ Here are the all AC Cases for generating final netlist values
+ ------------------------------------------------------------------------------------------------------------------------------------------------*/
+ else if (analysis_type == "2")
+ {
+ jQuery("#webtronics_netlist_text_area").val(Flag + '\n'+ ".ac" + " " + scale_val + " " + noofpoint + " " + startfreq + start_ac_unit + " " + stopfreq + stop_ac_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n"+ ".end \n" );
- change_val = "1";
+ change_val = "1";
-}
-/*------------------------------------------------------------------------------------------------------------------------------------------------
-Here are the all Transiet Cases for generating final netlist values
-------------------------------------------------------------------------------------------------------------------------------------------------*/
- //else if (analysis_type == "3" && time == "1")
+ }
+ /*------------------------------------------------------------------------------------------------------------------------------------------------
+ Here are the all Transiet Cases for generating final netlist values
+ ------------------------------------------------------------------------------------------------------------------------------------------------*/
+ //else if (analysis_type == "3" && time == "1")
else if (analysis_type== "3")
{
jQuery("#webtronics_netlist_text_area").val(Flag + '\n' + ".tran" + " " + step_trans + "e" + "-" + step_trans_unit + " " + stop_trans + "e"+ "-" + stop_trans_unit + " " + start_trans + "e" + "-" + start_trans_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n" +".end \n" );
@@ -1949,19 +1960,27 @@ Here are the all Transiet Cases for generating final netlist values
}
- console.log(jQuery("#webtronics_netlist_text_area").val());
- console.log("deepblueSea");
+ else if (analysis_type == "4")
+ {
+
+ jQuery("#webtronics_netlist_text_area").val(Flag + '\n'+ ".dc" + " " + source1 + " " + start1 + "e" + "-" + start_dc_unit1 + " " + stop1 + "e" + "-" + stop_dc_unit1 + " " + increment1 + "e" + "-" + increment_dc_unit1 + " " + source2 + " " + start2 + "e" + "-" + start_dc_unit2 + " " + stop2 + "e" + "-" + stop_dc_unit2 + " " + increment2 + "e" + "-" + increment_dc_unit2 + '\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("#webtronics_netlist_text_area").val());
+ console.log("deepblueSea");
}
}
+
else {
alert("Analysis information is not available !");
-
-
}
diff --git a/views/script/savenetlist.js b/views/script/savenetlist.js
index baf494f..dca3110 100644
--- a/views/script/savenetlist.js
+++ b/views/script/savenetlist.js
@@ -129,14 +129,16 @@ jQuery(function(){
jQuery("#dc_menu").hide();
jQuery("#ac_menu").hide();
jQuery("#transient_menu").show();
+ jQuery("#dc_sweep_menu").hide();
jQuery("#analysis_selectbox").change(function(){
- if (jQuery(this).val() == "4")
+ if (jQuery(this).val() == "5")
{
jQuery("#select").show();
jQuery("#transient_menu").hide();
jQuery("#dc_menu").hide();
jQuery("#ac_menu").hide();
+ jQuery("#dc_sweep_menu").hide();
}
else if (jQuery(this).val() == "1")
@@ -145,6 +147,7 @@ jQuery(function(){
jQuery("#dc_menu").show();
jQuery("#ac_menu").hide();
jQuery("#transient_menu").hide();
+ jQuery("#dc_sweep_menu").hide();
}
else if (jQuery(this).val() == "2")
{
@@ -152,6 +155,7 @@ jQuery(function(){
jQuery("#ac_menu").show();
jQuery("#dc_menu").hide();
jQuery("#transient_menu").hide();
+ jQuery("#dc_sweep_menu").hide();
}
else if (jQuery(this).val() == "3")
{
@@ -159,8 +163,17 @@ jQuery(function(){
jQuery("#transient_menu").show();
jQuery("#dc_menu").hide();
jQuery("#ac_menu").hide();
+ jQuery("#dc_sweep_menu").hide();
}
+ else if (jQuery(this).val() == "4")
+ {
+ jQuery("#select").hide();
+ jQuery("#transient_menu").hide();
+ jQuery("#dc_menu").hide();
+ jQuery("#ac_menu").hide();
+ jQuery("#dc_sweep_menu").show();
+ }
//$("#preview").change(function(){
@@ -182,6 +195,14 @@ var savedtransval1="";
var savedtransval2="";
var savedtransval3="";
+var savedsweepval1="";
+var savedsweepval2="";
+var savedsweepval3="";
+var savedsweepval4="";
+var savedsweepval5="";
+var savedsweepval6="";
+
+
/*------------------------------------------------------------------------------------------------------------------------------------------------
Ac netlist variable for ac
------------------------------------------------------------------------------------------------------------------------------------------------*/
@@ -314,8 +335,8 @@ jQuery("#savedc").click(function(){
start = jQuery("#startval").val();
increment = jQuery("#Incrementval").val();
stop = jQuery("#stopval").val();
- //console.log(source,start,increment,stop);
- //console.log(start);
+ // console.log(source,start,increment,stop);
+ // console.log(start);
if (source == "")
{
alert("Please enter Source Name");
@@ -440,6 +461,256 @@ jQuery("#stop_volt_selectbox").change(function(){
console.log(stop_dc_unit);
});
+
+
+/*------------------------------------------------------------------------------------------------------------------------------------------------
+DC netlist variable for dc sweep
+------------------------------------------------------------------------------------------------------------------------------------------------*/
+jQuery("#savedcs").click(function(){
+ source1 = jQuery("#sourceval1").val();
+ start1 = jQuery("#startval1").val();
+ increment1 = jQuery("#Incrementval1").val();
+ stop1 = jQuery("#stopval1").val();
+ source2 = jQuery("#sourceval2").val();
+ start2 = jQuery("#startval2").val();
+ increment2 = jQuery("#Incrementval2").val();
+ stop2 = jQuery("#stopval2").val();
+ //console.log(source1,start1,increment1,stop1);
+ //console.log(start1);
+ if (source1 == "")
+ {
+ alert("Please enter Source Name");
+ }
+ else if (start1 == "")
+ {
+ alert("Please enter Start Time");
+ }
+ else if (increment1 == "")
+ {
+ alert("Please enter the increment value");
+ }
+ else if (stop1 == "")
+ {
+ alert("Please enter the Stop Time");
+ }
+ else if (source2 == "")
+ {
+ alert("Please enter Source Name");
+ }
+ else if (start2 == "")
+ {
+ alert("Please enter Start Time");
+ }
+ else if (increment2 == "")
+ {
+ alert("Please enter the increment value");
+ }
+ else if (stop2 == "")
+ {
+ alert("Please enter the Stop Time");
+ }
+
+ else{
+ jQuery("#webtronics_netlist_analysis").hide();
+ jQuery("#webtronics_disable").hide();
+ }
+
+ start_dc_unit1=savedsweepval1;
+ if(start_dc_unit1==""){
+ start_dc_unit1="00";
+ }
+ increment_dc_unit1=savedsweepval2;
+ if(increment_dc_unit1==""){
+ increment_dc_unit1="00";
+ }
+ stop_dc_unit1=savedsweepval3;
+ if(stop_dc_unit1==""){
+ stop_dc_unit1="00";
+ }
+
+ start_dc_unit2=savedsweepval4;
+ if(start_dc_unit2==""){
+ start_dc_unit2="00";
+ }
+ increment_dc_unit2=savedsweepval5;
+ if(increment_dc_unit2==""){
+ increment_dc_unit2="00";
+ }
+ stop_dc_unit2=savedsweepval6;
+ if(stop_dc_unit2==""){
+ stop_dc_unit2="00";
+ }
+
+});
+
+jQuery("#start_volt_selectbox1").change(function(){
+
+ dc_start_time1 = jQuery(this).val();
+
+ if (dc_start_time1 == "1")
+ {
+ start_dc_unit1 = "00";
+ }
+ else if (dc_start_time1 == "2")
+ {
+ start_dc_unit1 = "03";
+ }
+ if (dc_start_time1 == "3")
+ {
+ start_dc_unit1 = "06";
+ }
+ else if (dc_start_time1 == "4")
+ {
+ start_dc_unit1 = "09";
+ }
+ else if (dc_start_time1 == "5")
+ {
+ start_dc_unit1 = "12";
+ }
+ savedsweepval1=start_dc_unit1;
+ console.log(start_dc_unit1);
+});
+
+jQuery("#inc_volt_selectbox1").change(function(){
+ dc_increment_time1 = jQuery(this).val();
+
+ if (dc_increment_time1 == "1")
+ {
+ increment_dc_unit1 = "00";
+ }
+ else if (dc_increment_time1 == "2")
+ {
+ increment_dc_unit1 = "03";
+ }
+ if (dc_increment_time1 == "3")
+ {
+ increment_dc_unit1 = "06";
+ }
+ else if (dc_increment_time1 == "4")
+ {
+ increment_dc_unit1 = "09";
+ }
+ else if (dc_increment_time1 == "5")
+ {
+ increment_dc_unit1 = "12";
+ }
+ savedsweepval2=increment_dc_unit1;
+ console.log(increment_dc_unit1);
+});
+
+jQuery("#stop_volt_selectbox1").change(function(){
+
+ dc_stop_time1 = jQuery(this).val();
+
+ if (dc_stop_time1 == "1")
+ {
+ stop_dc_unit1 = "00";
+ }
+ else if (dc_stop_time1 == "2")
+ {
+ stop_dc_unit1 = "03";
+ }
+ if (dc_stop_time1 == "3")
+ {
+ stop_dc_unit1 = "06";
+ }
+ else if (dc_stop_time1 == "4")
+ {
+ stop_dc_unit1 = "09";
+ }
+ else if (dc_stop_time1 == "5")
+ {
+ stop_dc_unit1 = "12";
+ }
+ savedsweepval3=stop_dc_unit1;
+ console.log(stop_dc_unit1);
+});
+
+
+jQuery("#start_volt_selectbox2").change(function(){
+
+ dc_start_time2 = jQuery(this).val();
+
+ if (dc_start_time2 == "1")
+ {
+ start_dc_unit2 = "00";
+ }
+ else if (dc_start_time2 == "2")
+ {
+ start_dc_unit2 = "03";
+ }
+ if (dc_start_time2 == "3")
+ {
+ start_dc_unit2 = "06";
+ }
+ else if (dc_start_time2 == "4")
+ {
+ start_dc_unit2 = "09";
+ }
+ else if (dc_start_time2 == "5")
+ {
+ start_dc_unit2 = "12";
+ }
+ savedsweepval4=start_dc_unit2;
+ console.log(start_dc_unit2);
+});
+
+jQuery("#inc_volt_selectbox2").change(function(){
+ dc_increment_time2 = jQuery(this).val();
+
+ if (dc_increment_time2 == "1")
+ {
+ increment_dc_unit2 = "00";
+ }
+ else if (dc_increment_time2 == "2")
+ {
+ increment_dc_unit2 = "03";
+ }
+ if (dc_increment_time2 == "3")
+ {
+ increment_dc_unit2 = "06";
+ }
+ else if (dc_increment_time2 == "4")
+ {
+ increment_dc_unit2 = "09";
+ }
+ else if (dc_increment_time2 == "5")
+ {
+ increment_dc_unit2 = "12";
+ }
+ savedsweepval5=increment_dc_unit2;
+ console.log(increment_dc_unit2);
+});
+
+jQuery("#stop_volt_selectbox2").change(function(){
+
+ dc_stop_time2 = jQuery(this).val();
+
+ if (dc_stop_time2 == "1")
+ {
+ stop_dc_unit2 = "00";
+ }
+ else if (dc_stop_time2 == "2")
+ {
+ stop_dc_unit2 = "03";
+ }
+ if (dc_stop_time2 == "3")
+ {
+ stop_dc_unit2 = "06";
+ }
+ else if (dc_stop_time2 == "4")
+ {
+ stop_dc_unit2 = "09";
+ }
+ else if (dc_stop_time2 == "5")
+ {
+ stop_dc_unit2 = "12";
+ }
+ savedsweepval6=stop_dc_unit2;
+ console.log(stop_dc_unit2);
+});
+
+
/*------------------------------------------------------------------------------------------------------------------------------------------------
@@ -451,8 +722,7 @@ jQuery("#savetransient").click(function(){
step_trans = jQuery("#step_time").val();
stop_trans = jQuery("#stop_time").val();
//console.log(start_trans, step_trans, stop_trans);
- console
-
+
if (start_trans == "")
{
alert("Please enter Start Time")