diff --git a/test.py b/beamInfo.py similarity index 100% rename from test.py rename to beamInfo.py diff --git a/beamStatus.py b/beamStatus.py new file mode 100755 index 0000000..6d977df --- /dev/null +++ b/beamStatus.py @@ -0,0 +1,25 @@ +#!/usr/bin/python3 + +import os + +url="http://localhost:8086/write?db=accel" + +import random + +num = random.random()*100 + +cmd = "curl -XPOST " + url + " --data-binary " + "\'testing value=" + str(num) + "\'" + + + +print("Content-type:text/html\r\n\r\n") + + +print(cmd) + +os.system(cmd) + + + +#print('') +#print('') \ No newline at end of file diff --git a/geo.js b/geo.js index 735e60f..d4dff57 100644 --- a/geo.js +++ b/geo.js @@ -326,9 +326,9 @@ let sourceLine; { let RFSource1a = new beamRectElement([windowSize[0]*0.9, windowSize[1]*0.9], 0, 40, 100, color.RFsourcce); let RFSource1b = new beamRectElement(RFSource1a.exitPos, 0, 40, 20, color.RFsourcce); - let s0 = new beamSpliter(RFSource1b.GetExitPos(120), 50, Math.PI, color.Dipole); + let s0 = new beamSpliter(RFSource1b.GetExitPos(120), 80, Math.PI, color.Dipole); - let tandem = new tandemClass(RFSource1b.GetExitPos(200), 300, 100, color.Tandem); + let tandem = new tandemClass(RFSource1b.GetExitPos(200), 300, 200, color.Tandem); let q0 = new beamRectElement(tandem.GetExitPos(50), 0, 60, 60, color.Qpole); let df0a = new beamRectElement(q0.GetExitPos(50), 0, 30, 40, color.Deflector); @@ -341,7 +341,7 @@ let sourceLine; let targetRoom1; { let dipole = new beamDipole(sourceLine.tandem.GetExitPos(300), 80, Math.PI/2, 0, color.Dipole); - let fan = new beamSpliter(dipole.GetExitPos(100), 50, -100 * deg, color.Deflector); + let fan = new beamSpliter(dipole.GetExitPos(100), 80, -100 * deg, color.Deflector); let upperLine; { @@ -498,7 +498,7 @@ let posArray; // thsi is a collection of the position of beamlines let Resolut = [ sourceLine.RFSource1b.GetExitPos(0), - sourceLine.RFSource1b.GetExitPos(1500), + targetRoom2.d2.entracePos, targetRoom2.d2.GetExitPos(0), targetRoom2.d2.GetExitPos(1700), targetRoom2.fan2.GetExitPos(0.7, 500), @@ -508,7 +508,7 @@ let posArray; // thsi is a collection of the position of beamlines let Anasen = [ sourceLine.RFSource1b.GetExitPos(0), - sourceLine.RFSource1b.GetExitPos(1500), + targetRoom2.d2.entracePos, targetRoom2.d2.GetExitPos(0), targetRoom2.d2.GetExitPos(1700), targetRoom2.fan2.GetExitPos(0.5, 500) @@ -516,7 +516,7 @@ let posArray; // thsi is a collection of the position of beamlines let SPS = [ sourceLine.RFSource1b.GetExitPos(0), - sourceLine.RFSource1b.GetExitPos(1500), + targetRoom2.d2.entracePos, targetRoom2.d2.GetExitPos(0), targetRoom2.d2.GetExitPos(1700), targetRoom2.fan2.GetExitPos(0.3, 500), @@ -525,7 +525,7 @@ let posArray; // thsi is a collection of the position of beamlines let Clarion2 = [ sourceLine.RFSource1b.GetExitPos(0), - sourceLine.RFSource1b.GetExitPos(1500), + targetRoom2.d2.entracePos, targetRoom2.d2.GetExitPos(0), targetRoom2.d2.GetExitPos(1700), targetRoom2.fan2.GetExitPos(0.3, 500), diff --git a/index.html b/index.html index 8ff5a2f..4ef1cf0 100644 --- a/index.html +++ b/index.html @@ -190,7 +190,7 @@ function GetBeamSetting(){ beam_Line = data[9]; SwitchMagnet = data[10]; } - client.open('GET', "test.py", false); + client.open('GET', "beamInfo.py", false); client.send(); } @@ -241,6 +241,22 @@ setInterval(BeamSettings, updateTime * 60 * 1000); lineMotion(); + + +