This is version 48.
It is not the current version, and thus it cannot be edited.
[Back to current version]
[Restore this version]
<html>
<script>
// Due to security resrictions in the browser, the scripts will not
// work immediately after changing the page
//
var cans = {
"DIL3/DIL4": {
MA02: {top: 366, bot: 354, base: 7, win: 38, winbase: 53, candia: 21, spacer: 22.6, dia: 21},
MA6: {top: 366, bot: 311, base: 8, win: 39, winbase: 52, candia: 23.4, spacer: 23.1, dia: 21},
MA7: {top: 366, bot: 361, base: 8, win: 39, winbase: 46, candia: 35.8, spacer: 35.6, dia: 32},
MA10: {top: 605, bot: 0, base: 6, win: 0, winbase: 6, candia: "44?", spacer: 43.5, dia: 40},
MA11: {top: 366, bot: 280, base: 8, win: 39, winbase: 23, candia: 17.1, spacer: 17, dia: 14},
MA15: {top: 366, bot: 280, base: 8, win: 39, winbase: 23, candia: 17.1, spacer: 17, dia: 14},
VARIOX: {top: 473, bot: 0, base: 8, win: 0, winbase: 8, candia: "44?", spacer: 43.5, dia: 40},
},
"DIL2": {
MA02: {top: 345, bot: 354, base: 7, win: 38, winbase: 53, candia: 21, spacer: 22.6, dia: 21},
MA6: {top: 342, bot: 311, base: 7, win: 39, winbase: 52, candia: 23.4, spacer: 23.1, dia: 21},
MA7: {top: 342, bot: 361, base: 8, win: 39, winbase: 46, candia: 35.8, spacer: 35.6, dia: 32},
MA10: {top: 605, bot: 0, base: 6, win: 0, winbase: 6, candia: "44?", spacer: 43.5, dia: 40},
MA11: {top: 345, bot: 277, base: 8, win: 39, winbase: 22, candia: 17.1, spacer: 17, dia: 14},
MA15: {top: 345, bot: 277, base: 8, win: 39, winbase: 22, candia: 17.1, spacer: 17, dia: 14},
VARIOX: {top: 473, bot: 0, base: 8, win: 0, winbase: 8, candia: "44?", spacer: 43.5, dia: 40},
},
}
var dils = {
"DIL3/DIL4": {sealmix: 311},
"DIL2": {sealmix: 290},
}
var vtis = {
MA02: {motor: 160, sample: 1245, edge: 968, vtibot: 1338},
MA6: {motor: 160, sample: 1309, edge: 1078, vtibot: 1389},
MA7: {motor: 160, sample: 1357, edge: 0, vtibot: 1426},
MA10: {motor: 160, sample: 1107, edge: 0, vtibot: 1222},
MA11: {motor: 160, sample: 1302, edge: 1080, vtibot: 1356},
MA15: {motor: 160, sample: 1294, edge: 1078, vtibot: 1433},
VARIOX: {motor: 0, sample: 1068, edge: 0, vtibot: 1138},
}
var magselect = "";
var dilselect = "DIL3/DIL4";
function getinp(name) {
value = parseInt(document.getElementById(name).value);
return value;
}
function putout(name, value) {
console.log(name);
document.getElementById(name).innerHTML = value;
}
function calc() {
var top = getinp("top");
var bot = getinp("bot");
var base = getinp("base");
var win = getinp("win");
var winbase = getinp("winbase");
var sealmix = getinp("sealmix");
var gapmin = getinp("gapmin");
var gapmax = getinp("gapmax");
var motor = getinp("motor");
var edge = getinp("edge");
if (edge) {
edge += motor;
}
var vtibot = getinp("vtibot") + motor;
var sample = getinp("sample") + motor;
var bottom = top + bot - sealmix;
var winmin = bottom + gapmax - winbase - win;
var winmax = bottom + gapmin - winbase;
var center = (winmin + winmax) / 2;
if (edge) {
var minsam = top + Math.max(-edge, bot - vtibot) + sample - sealmix + gapmax;
} else {
var minsam = bottom + sample - vtibot + gapmax;
document.getElementById("edge").value = "";
}
var extmax = bottom - base + gapmin;
if (win > 0) {
putout("winmin", winmin);
putout("center", center);
putout("winmax", winmax);
} else {
putout("winmin", "n/a");
putout("center", "n/a");
putout("winmax", "n/a");
}
putout("minsam", minsam);
putout("extmax", extmax);
putout("sample_plus", sample);
if (edge) {
putout("edge_plus", edge);
} else {
putout("edge_plus", "n/a");
}
putout("vtibot_plus", vtibot);
var motor = getinp("motor");
if (motor > 0) {
document.getElementById("title").innerHTML = dilselect + " in " + magselect + " with sample rotator";
} else {
document.getElementById("title").innerHTML = dilselect + " in " + magselect + " without sample rotator";
}
console.log("calc");
}
function setmag(name) {
console.log(name);
magselect = name;
var can = cansdilselect?name?;
if (can) {
for (var property in can) {
console.log(property);
document.getElementById(property).value = canproperty?;
document.getElementById(property).innerHTML = canproperty?;
}
}
var vti = vtisname?;
for (var property in vti) {
console.log(property);
document.getElementById(property).value = vtiproperty?;
}
calc();
return;
}
function setdil(name) {
dilselect = name;
var dil = dilsdilselect?;
console.log(dil);
if (dil) {
for (var property in dil) {
console.log(property);
document.getElementById(property).value = dilproperty?;
}
}
if (magselect != "") {
calc();
}
}
setTimeout(function() {setdil("DIL3/DIL4");}, 0);
</script>
<style>
table.graph td {
border-spacing: 0px;
}
input {
text-align: right;
}
.important {
border-style:solid;
border-color:#ff0;
}
.rel {
position: relative;
}
.candia { position: absolute; top:600px; left:200px;}
.extbot { position: absolute; top:500px; left:100px;}
</style>
<h1 id=title></h1>
<table class=graph>
<tr style="height:24px;">
<td></td>
<td rowspan=15><img src=attach?page=DilStickGeometry/dil_stick_input.png></td>
<td rowspan=5 colspan=3>
<form>
<input type="radio" name=d onClick="setdil('DIL3/DIL4');" checked=true>DIL3/DIL4<br>
<input type="radio" name=d onClick="setdil('DIL2');">DIL2<br><br>
<input type="radio" name=m onClick="setmag('MA02');">MA02<br>
<input type="radio" name=m onClick="setmag('MA6');">MA6<br>
<input type="radio" name=m onClick="setmag('MA7');">MA7<br>
<input type="radio" name=m onClick="setmag('MA10');">MA10<br>
<input type="radio" name=m onClick="setmag('MA11');">MA11<br>
<input type="radio" name=m onClick="setmag('MA15');">MA15<br>
<input type="radio" name=m onClick="setmag('VARIOX');">VARIOX<br>
sample rotator<br>length:
</form>
<input type="text" id=motor value=0 size=4 onchange='calc();'> <br>
</td>
<td rowspan=15><div class=rel>
<img src=attach?page=DilStickGeometry/dil_stick_output.png>
<div style="color:#840;" class=candia><span id=candia></span>inner dia.</div>
<div style="color:#c00;" class=important,extmax><span id=extmax>0</span>touch bottom</div>
</div></td>
<td></td>
<td></td>
</tr>
<tr style="height:30px;">
<td align=right>><input type="text" id=gapmin value=3 size=4 onchange='calc();' style="color:#c00;"></td>
<td></td>
<td></td>
</tr>
<tr style="height:30px;">
<td align=right><<input type="text" id=gapmax value=5 size=4 onchange='calc();' style="color:#c00;"></td>
<td></td>
<td></td>
</tr>
<tr style="height:246px;">
<td align=right><input type="text" id=sealmix value=0 size=4 onchange='calc();' style="color:#00f;"></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr style="height:54px;">
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr style="height:30px;">
<td></td>
<td><input type="text" id=top value=0 size=4 onchange='calc();' style="color:#880;"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr style="height:30px;">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr style="height:35px;">
<td></td>
<td></td>
<td align=right style="color:#c00;">*<input type="text" id=edge value=0 size=4 onchange='calc();' style="color:#c00;"></td>
<td align=right style="color:#c00;"><span id=edge_plus>0</span></td>
<td></td>
</tr>
<tr style="height:65px;">
<td></td>
<td></td>
<td align=right rowspan=3>*without<br>rotator</td>
<td></td>
<td></td>
<td valign=bottom>inner dia.</td>
</tr>
<tr style="height:25px;">
<td></td>
<td></td>
<td></td>
<td align=right style="color:#840;"><span id=spacer>0</span></td>
<td>spacer dia.</td>
</tr>
<tr style="height:25px;">
<td></td>
<td><input type="text" id=bot value=0 size=4 onchange='calc();' style="color:#088;"></td>
<td></td>
<td align=right><span id=winmin style="color:#c0f;">0</span></td>
<td>window</td>
</tr>
<tr style="height:25px;">
<td align=right><input type="text" id=win value=0 size=4 onchange='calc();' style="color:#0c0;"></td>
<td></td>
<td align=right style="color:#00f;">*<input type="text" id=sample value=0 size=4 onchange='calc();' style="color:#00f;"></td>
<td align=right style="color:#00f;"><span id=sample_plus>0</span></td>
<td align=right style="color:#880;" class=important>><span id=minsam style="color:#880">0</span></td></td>
<td>center: <span id=center>0</span></td>
</tr>
<tr style="height:25px;">
<td></td>
<td></td>
<td></td>
<td></td>
<td align=right style="color:#f80;" class=important><<span id=dia>0</span></td>
<td>sample dia.</td>
</tr>
<tr style="height:25px;">
<td></td>
<td></td>
<td></td>
<td></td>
<td align=right><span id=winmax style="color:#088;">0</span></td>
<td>window</td>
</tr>
<tr style="height:25px;">
<td align=right><input type="text" id=winbase value=0 size=4 onchange='calc();' style="color:#c0f;"></td>
<td><input type="text" id=base value=0 size=4 onchange='calc();' style="color:#c50;"></td>
<td align=right style="color:#0c0;">*<input type="text" id=vtibot value=0 size=4 onchange='calc();' style="color:#0c0;"></td>
<td align=right style="color:#0c0;"><span id=vtibot_plus>0</span></td>
</tr>
</table>
</html>
This particular version was published on 14-Sep-2018 14:45:55 UTC by MarkusZolliker.
|