–
S2
–
Degrader Calculator
S2 — Degradersystem (TS3ED7*)
Degrader Tables S2
S2 Calculation
<%'Calculation***********************************************************************************%> <% 'Error Delete********************************************************************************** On Error Resume Next 'Input Variables************************************************************************************ Beam_size_y_S2 = Cdbl ( Request ("Beam_size") ) If Beam_size_y_S2 < 0 then Beam_size_y_S2 = 0 If Beam_size_y_S2 > 200 then Beam_size_y_S2 = 200 Beam_size_y_S2 = Round (Beam_size_y_S2,2) Beam_size_y_S2 = Formatnumber (Beam_size_y_S2,2) '**************************************************************************************************** Total_thickness_S2_soll = Cdbl ( Request ("Thickness_soll") ) If Total_thickness_S2_soll <= 0 then Total_thickness_S2_soll = 0 Total_thickness_S2_soll = Round (Total_thickness_S2_soll,2) Total_thickness_S2_soll = Formatnumber (Total_thickness_S2_soll,2) '**************************************************************************************************** Angle_soll = Cdbl ( Request ("Ang_soll") ) If Angle_soll > 360 then Angle_soll = 360 If Angle_soll < -360 then Angle_soll = -360 Angle_soll = Round (Angle_soll,2) Angle_soll = Formatnumber (Angle_soll,2) '**************************************************************************************************** Wed = Request ("Wedges") Dis = Request ("Disc") Lad = Request ("Ladder") 'Wedges Calculation********************************************************************************* Wedge_S2u_max_thickness = WedgeS2u_max_para * WedgeS2u_spec_para / 10 Wedge_S2d_max_thickness = WedgeS2d_max_para * WedgeS2d_spec_para / 10 Wedge_S2u_min_thickness = WedgeS2u_min_para * WedgeS2u_spec_para / 10 Wedge_S2d_min_thickness = WedgeS2d_min_para * WedgeS2d_spec_para / 10 Wedge_S4u_max_thickness = WedgeS4u_max_para * WedgeS4u_spec_para / 10 Wedge_S4d_max_thickness = WedgeS4d_max_para * WedgeS4d_spec_para / 10 Wedge_S4u_min_thickness = WedgeS4u_min_para * WedgeS4u_spec_para / 10 Wedge_S4d_min_thickness = WedgeS4d_min_para * WedgeS4d_spec_para / 10 Wedge_S2_max_total_thickness = (WedgeS2u_min_para + WedgeS2d_min_para _ + ((WedgeS2u_height_para - 0.5 * Beam_size_y_S2) _ * (WedgeS2d_max_para - WedgeS2u_min_para) / WedgeS2u_height_para) _ + ((WedgeS2d_height_para - 0.5 * Beam_size_y_S2) _ * (WedgeS2d_max_para - WedgeS2d_min_para) / WedgeS2d_height_para)) _ * ((WedgeS2d_spec_para + WedgeS2u_spec_para) / 20) Wedge_S2_max_total_thickness = Round (Wedge_S2_max_total_thickness,2) Wedge_S2_min_total_thickness = (WedgeS2u_min_para + WedgeS2d_min_para _ + (0.5 * Beam_size_y_S2 _ * (WedgeS2d_max_para - WedgeS2u_min_para) / WedgeS2u_height_para) _ + (0.5 * Beam_size_y_S2 _ * (WedgeS2d_max_para - WedgeS2d_min_para) / WedgeS2d_height_para)) _ * ((WedgeS2d_spec_para + WedgeS2u_spec_para) / 20) Wedge_S2_min_total_thickness = Round (Wedge_S2_min_total_thickness,2) Wedge_S4_max_total_thickness = (WedgeS4u_min_para + WedgeS4d_min_para _ + ((WedgeS4u_height_para - 0.5 * Beam_size_y_S4) _ * (WedgeS4u_max_para - WedgeS4u_min_para) / WedgeS4u_height_para) _ + ((WedgeS4d_height_para - 0.5 * Beam_size_y_S4) _ * (WedgeS4d_max_para - WedgeS4d_min_para) / WedgeS4d_height_para)) _ * ((WedgeS4d_spec_para + WedgeS4u_spec_para) / 20) Wedge_S4_max_total_thickness = Round (Wedge_S4_max_total_thickness,2) Wedge_S4_min_total_thickness = (WedgeS4u_min_para + WedgeS4d_min_para _ + (0.5 * Beam_size_y_S4 _ * (WedgeS4u_max_para - WedgeS4u_min_para) / WedgeS4u_height_para) _ + (0.5 * Beam_size_y_S4 _ * (WedgeS4d_max_para - WedgeS4d_min_para) / WedgeS4d_height_para)) _ * (WedgeS4d_spec_para + WedgeS4u_spec_para) / 20 Wedge_S4_min_total_thickness = Round (Wedge_S4_min_total_thickness,2) 'Disk Calculation********************************************************************************** Disk1_cent_para = (Disk1_min_para + Disk1_max_para) / 2 Disk2_cent_para = (Disk2_min_para + Disk2_max_para) / 2 Disk_cent_para = Disk1_cent_para + Disk2_cent_para Disk_cent_thickness = Disk_cent_para / 10 * (Disk1_spec_para + Disk2_spec_para) / 2 Disk1_angle_para = Atn((Disk1_max_para - Disk1_min_para) / (2 * Disk1_radius_para)) * 1000 Disk2_angle_para = Atn((Disk2_max_para - Disk2_min_para) / (2 * Disk2_radius_para)) * 1000 Disk_Max_angle = Disk1_angle_para + Disk2_angle_para Disk_Min_angle = -Disk_Max_angle Disk_Max_angle = Round (Disk_Max_angle,2) Disk_Min_angle = Round (Disk_Min_angle,2) 'Ladder Calculation**************************************************************************** Ladder1_cent_para = (Ladder1_min_para + Ladder1_max_para) / 2 Ladder2_cent_para = (Ladder2_min_para + Ladder2_max_para) / 2 Ladder3_cent_para = (Ladder3_min_para + Ladder3_max_para) / 2 Ladder4_cent_para = (Ladder4_min_para + Ladder4_max_para) / 2 Ladder5_cent_para = (Ladder5_min_para + Ladder5_max_para) / 2 Ladder1_cent_para = Round (Ladder1_cent_para,2) Ladder2_cent_para = Round (Ladder2_cent_para,2) Ladder3_cent_para = Round (Ladder3_cent_para,2) Ladder4_cent_para = Round (Ladder4_cent_para,2) Ladder5_cent_para = Round (Ladder5_cent_para,2) Ladder1_cent_thickness = Ladder1_spec_para * Ladder1_cent_para / 10 Ladder2_cent_thickness = Ladder2_spec_para * Ladder2_cent_para / 10 Ladder3_cent_thickness = Ladder3_spec_para * Ladder3_cent_para / 10 Ladder4_cent_thickness = Ladder4_spec_para * Ladder4_cent_para / 10 Ladder5_cent_thickness = Ladder5_spec_para * Ladder5_cent_para / 10 Ladder1_cent_thickness = Round (Ladder1_cent_thickness,2) Ladder2_cent_thickness = Round (Ladder2_cent_thickness,2) Ladder3_cent_thickness = Round (Ladder3_cent_thickness,2) Ladder4_cent_thickness = Round (Ladder4_cent_thickness,2) Ladder5_cent_thickness = Round (Ladder5_cent_thickness,2) Ladder1_slope_para = Atn((Ladder1_max_para - Ladder1_min_para) / Ladder1_l_para) * 1000 Ladder2_slope_para = Atn((Ladder2_max_para - Ladder2_min_para) / Ladder2_l_para) * 1000 Ladder3_slope_para = Atn((Ladder3_max_para - Ladder3_min_para) / Ladder3_l_para) * 1000 Ladder4_slope_para = Atn((Ladder4_max_para - Ladder4_min_para) / Ladder4_l_para) * 1000 Ladder5_slope_para = Atn((Ladder5_max_para - Ladder5_min_para) / Ladder5_l_para) * 1000 Ladder1_slope_para = Round (Ladder1_slope_para,2) Ladder2_slope_para = Round (Ladder2_slope_para,2) Ladder3_slope_para = Round (Ladder3_slope_para,2) Ladder4_slope_para = Round (Ladder4_slope_para,2) Ladder5_slope_para = Round (Ladder5_slope_para,2) 'Create Ladder_field*************************************************************************** Ladder(0, 1) = 0 Ladder(0, 2) = 0 Ladder(0, 3) = Ladder0_pos_para Ladder(1, 1) = Ladder1_cent_thickness Ladder(1, 2) = Ladder1_slope_para Ladder(1, 3) = Ladder1_pos_para Ladder(2, 1) = Ladder2_cent_thickness Ladder(2, 2) = Ladder2_slope_para Ladder(2, 3) = Ladder2_pos_para Ladder(3, 1) = Ladder3_cent_thickness Ladder(3, 2) = Ladder3_slope_para Ladder(3, 3) = Ladder3_pos_para Ladder(4, 1) = Ladder4_cent_thickness Ladder(4, 2) = Ladder4_slope_para Ladder(4, 3) = Ladder4_pos_para Ladder(5, 1) = Ladder5_cent_thickness Ladder(5, 2) = Ladder5_slope_para Ladder(5, 3) = Ladder5_pos_para Drive_soll = "n" 'Degrader Limits************************************************************************************* DEGRADER_LIM(0, 1) = Ladder(0, 1) + Disk_cent_thickness + Wedge_S2_min_total_thickness DEGRADER_LIM(0, 2) = Ladder(0, 1) + Disk_cent_thickness + Wedge_S2_max_total_thickness DEGRADER_LIM(0, 3) = Ladder(0, 1) + Wedge_S2_min_total_thickness DEGRADER_LIM(0, 4) = Ladder(0, 1) + Wedge_S2_max_total_thickness DEGRADER_LIM(0, 5) = Ladder(0, 2) - Disk_Max_angle DEGRADER_LIM(0, 6) = Ladder(0, 2) + Disk_Max_angle DEGRADER_LIM(0, 7) = Ladder(0, 2) DEGRADER_LIM(0, 8) = Ladder(0, 1) DEGRADER_LIM(0, 9) = Ladder(0, 1) + Disk_cent_thickness DEGRADER_LIM(1, 1) = Ladder(1, 1) + Disk_cent_thickness + Wedge_S2_min_total_thickness DEGRADER_LIM(1, 2) = Ladder(1, 1) + Disk_cent_thickness + Wedge_S2_max_total_thickness DEGRADER_LIM(1, 3) = Ladder(1, 1) + Wedge_S2_min_total_thickness DEGRADER_LIM(1, 4) = Ladder(1, 1) + Wedge_S2_max_total_thickness DEGRADER_LIM(1, 5) = Ladder(1, 2) - Disk_Max_angle DEGRADER_LIM(1, 6) = Ladder(1, 2) + Disk_Max_angle DEGRADER_LIM(1, 7) = Ladder(1, 2) DEGRADER_LIM(1, 8) = Ladder(1, 1) DEGRADER_LIM(1, 9) = Ladder(1, 1) + Disk_cent_thickness DEGRADER_LIM(2, 1) = Ladder(2, 1) + Disk_cent_thickness + Wedge_S2_min_total_thickness DEGRADER_LIM(2, 2) = Ladder(2, 1) + Disk_cent_thickness + Wedge_S2_max_total_thickness DEGRADER_LIM(2, 3) = Ladder(2, 1) + Wedge_S2_min_total_thickness DEGRADER_LIM(2, 4) = Ladder(2, 1) + Wedge_S2_max_total_thickness DEGRADER_LIM(2, 5) = Ladder(2, 2) - Disk_Max_angle DEGRADER_LIM(2, 6) = Ladder(2, 2) + Disk_Max_angle DEGRADER_LIM(2, 7) = Ladder(2, 2) DEGRADER_LIM(2, 8) = Ladder(2, 1) DEGRADER_LIM(2, 9) = Ladder(2, 1) + Disk_cent_thickness DEGRADER_LIM(3, 1) = Ladder(3, 1) + Disk_cent_thickness + Wedge_S2_min_total_thickness DEGRADER_LIM(3, 2) = Ladder(3, 1) + Disk_cent_thickness + Wedge_S2_max_total_thickness DEGRADER_LIM(3, 3) = Ladder(3, 1) + Wedge_S2_min_total_thickness DEGRADER_LIM(3, 4) = Ladder(3, 1) + Wedge_S2_max_total_thickness DEGRADER_LIM(3, 5) = Ladder(3, 2) - Disk_Max_angle DEGRADER_LIM(3, 6) = Ladder(3, 2) + Disk_Max_angle DEGRADER_LIM(3, 7) = Ladder(3, 2) DEGRADER_LIM(3, 8) = Ladder(3, 1) DEGRADER_LIM(3, 9) = Ladder(3, 1) + Disk_cent_thickness DEGRADER_LIM(4, 1) = Ladder(4, 1) + Disk_cent_thickness + Wedge_S2_min_total_thickness DEGRADER_LIM(4, 2) = Ladder(4, 1) + Disk_cent_thickness + Wedge_S2_max_total_thickness DEGRADER_LIM(4, 3) = Ladder(4, 1) + Wedge_S2_min_total_thickness DEGRADER_LIM(4, 4) = Ladder(4, 1) + Wedge_S2_max_total_thickness DEGRADER_LIM(4, 5) = Ladder(4, 2) - Disk_Max_angle DEGRADER_LIM(4, 6) = Ladder(4, 2) + Disk_Max_angle DEGRADER_LIM(4, 7) = Ladder(4, 2) DEGRADER_LIM(4, 8) = Ladder(4, 1) DEGRADER_LIM(4, 9) = Ladder(4, 1) + Disk_cent_thickness DEGRADER_LIM(5, 1) = Ladder(5, 1) + Disk_cent_thickness + Wedge_S2_min_total_thickness DEGRADER_LIM(5, 2) = Ladder(5, 1) + Disk_cent_thickness + Wedge_S2_max_total_thickness DEGRADER_LIM(5, 3) = Ladder(5, 1) + Wedge_S2_min_total_thickness DEGRADER_LIM(5, 4) = Ladder(5, 1) + Wedge_S2_max_total_thickness DEGRADER_LIM(5, 5) = Ladder(5, 2) - Disk_Max_angle DEGRADER_LIM(5, 6) = Ladder(5, 2) + Disk_Max_angle DEGRADER_LIM(5, 7) = Ladder(5, 2) DEGRADER_LIM(5, 8) = Ladder(5, 1) DEGRADER_LIM(5, 9) = Ladder(5, 1) + Disk_cent_thickness ANZ = 0 Flag = False 'No Element*********************************************************************************** If ((Wed = "") And (Dis = "") And (Lad = "")) Then Min_Thick_0 = DEGRADER_LIM(0, 8) Max_Thick_0 = DEGRADER_LIM(0, 8) Min_Ang_0 = DEGRADER_LIM(0, 7) Max_Ang_0 = DEGRADER_LIM(0, 7) Wedge_down_pos_soll_S2 = WedgeS2d_outposition_para Wedge_up_pos_soll_S2 = WedgeS2u_outposition_para Drive_soll = "Out" While ((Not Flag) And (ANZ <= 0)) If (Abs(Total_thickness_S2_soll - DEGRADER_LIM(ANZ, 8)) < Fehler) Then If (Abs(Angle_soll - DEGRADER_LIM(ANZ, 7)) < Fehler) Then Flag = True Else ANZ = ANZ + 1 End If Else ANZ = ANZ + 1 End If Wend 'Only Wedges*************************************************************************** ElseIf ((Wed = "angekreuzt") And (Dis = "") And (Lad = "")) Then Min_Thick_0 = DEGRADER_LIM(0, 3) Max_Thick_0 = DEGRADER_LIM(0, 4) Min_Ang_0 = DEGRADER_LIM(0, 7) Max_Ang_0 = DEGRADER_LIM(0, 7) Drive_soll = "Out" Wedge_down_pos_soll_S2 = WedgeS2d_outposition_para Wedge_up_pos_soll_S2 = WedgeS2u_outposition_para While ((Not Flag) And (ANZ <= 0)) Wedge_S2_total_thickness_soll = Total_thickness_S2_soll _ - Ladder(ANZ, 1) If ((Wedge_S2_total_thickness_soll <= Wedge_S2_max_total_thickness) _ And (Wedge_S2_total_thickness_soll >= Wedge_S2_min_total_thickness)) Then If (Abs(Angle_soll - Ladder(ANZ, 2)) < Fehler) Then Flag = True Wedge_down_pos_soll_S2 = (Wedge_S2_total_thickness_soll _ - Wedge_S2u_min_thickness _ - Wedge_S2d_min_thickness) _ / _ ((Wedge_S2u_max_thickness - Wedge_S2u_min_thickness) _ / WedgeS2u_height_para _ + (Wedge_S2d_max_thickness - Wedge_S2d_min_thickness) _ / WedgeS2d_height_para) Wedge_down_pos_soll_S2 = -Round (Wedge_down_pos_soll_S2,1) Wedge_up_pos_soll_S2 = Wedge_down_pos_soll_S2 Else ANZ = ANZ + 1 End If Else ANZ = ANZ + 1 End If Wend 'Only Disk********************************************************************************* ElseIf ((Wed = "") And (Dis = "angekreuzt") And (Lad = "")) Then Min_Thick_0 = DEGRADER_LIM(0, 9) Max_Thick_0 = DEGRADER_LIM(0, 9) Min_Ang_0 = DEGRADER_LIM(0, 5) Max_Ang_0 = DEGRADER_LIM(0, 6) Total_thickness_S2_soll =Min_Thick_0 Drive_soll = "IN" Wedge_down_pos_soll_S2 = WedgeS2d_outposition_para Wedge_up_pos_soll_S2 = WedgeS2u_outposition_para While ((Not Flag) And (ANZ <= 0)) If (Abs(Total_thickness_S2_soll - DEGRADER_LIM(ANZ, 9)) < Fehler) Then Disk_angle_soll = Angle_soll - Ladder(ANZ, 2) If ((Disk_angle_soll < Disk_Max_angle) _ And (Disk_angle_soll > Disk_Min_angle)) Then x = Disk_angle_soll / (Disk1_angle_para + Disk2_angle_para) Disk_motor_angle_soll = (PI / 2 - Atn(x / Sqr(1 - x ^ 2))) * 360 / (2 * PI) Disk_motor_angle_soll = Round (Disk_motor_angle_soll,2) Flag = True Else ANZ = ANZ + 1 End If Else ANZ = ANZ + 1 End If Wend 'Only Ladder***************************************************************************** ElseIf ((Wed = "") And (Dis = "") And (Lad = "angekreuzt")) Then Min_Thick_0 = DEGRADER_LIM(0, 8) Max_Thick_0 = DEGRADER_LIM(0, 8) Min_Ang_0 = DEGRADER_LIM(0, 7) Max_Ang_0 = DEGRADER_LIM(0, 7) Min_Thick_1 = DEGRADER_LIM(1, 8) Max_Thick_1 = DEGRADER_LIM(1, 8) Min_Ang_1 = DEGRADER_LIM(1, 7) Max_Ang_1 = DEGRADER_LIM(1, 7) Min_Thick_2 = DEGRADER_LIM(2, 8) Max_Thick_2 = DEGRADER_LIM(2, 8) Min_Ang_2 = DEGRADER_LIM(2, 7) Max_Ang_2 = DEGRADER_LIM(2, 7) Min_Thick_3 = DEGRADER_LIM(3, 8) Max_Thick_3 = DEGRADER_LIM(3, 8) Min_Ang_3 = DEGRADER_LIM(3, 7) Max_Ang_3 = DEGRADER_LIM(3, 7) Min_Thick_4 = DEGRADER_LIM(4, 8) Max_Thick_4 = DEGRADER_LIM(4, 8) Min_Ang_4 = DEGRADER_LIM(4, 7) Max_Ang_4 = DEGRADER_LIM(4, 7) Min_Thick_5 = DEGRADER_LIM(5, 8) Max_Thick_5 = DEGRADER_LIM(5, 8) Min_Ang_5 = DEGRADER_LIM(5, 7) Max_Ang_5 = DEGRADER_LIM(5, 7) Wedge_down_pos_soll_S2 = WedgeS2d_outposition_para Wedge_up_pos_soll_S2 = WedgeS2u_outposition_para Drive_soll = "out" While ((Not Flag) And (ANZ <= MAX_ANZ)) If (Abs(Total_thickness_S2_soll - DEGRADER_LIM(ANZ, 8)) < Fehler) Then If (Abs(Angle_soll - DEGRADER_LIM(ANZ, 7)) < Fehler) Then Flag = True Else ANZ = ANZ + 1 End If Else ANZ = ANZ + 1 End If Wend 'Wedges And Disk******************************************************************************* ElseIf ((Wed = "angekreuzt") And (Dis = "angekreuzt") And (Lad = "")) Then Min_Thick_0 = DEGRADER_LIM(0, 1) Max_Thick_0 = DEGRADER_LIM(0, 2) Min_Ang_0 = DEGRADER_LIM(0, 5) Max_Ang_0 = DEGRADER_LIM(0, 6) Drive_soll = "in" While ((Not Flag) And (ANZ <= 0)) Wedge_S2_total_thickness_soll = Total_thickness_S2_soll _ - Disk_cent_thickness _ - Ladder(ANZ, 1) If ((Wedge_S2_total_thickness_soll <= Wedge_S2_max_total_thickness) _ And (Wedge_S2_total_thickness_soll >= Wedge_S2_min_total_thickness)) Then Disk_angle_soll = Angle_soll - Ladder(ANZ, 2) If ((Disk_angle_soll < Disk_Max_angle) _ And (Disk_angle_soll > Disk_Min_angle)) Then x = Disk_angle_soll / (Disk1_angle_para + Disk2_angle_para) Disk_motor_angle_soll = (PI / 2 - Atn(x / Sqr(1 - x ^ 2))) * 360 / (2 * PI) Disk_motor_angle_soll = Round (Disk_motor_angle_soll,2) Wedge_down_pos_soll_S2 = (Wedge_S2_total_thickness_soll _ - Wedge_S2u_min_thickness _ - Wedge_S2d_min_thickness) _ / _ ((Wedge_S2u_max_thickness - Wedge_S2u_min_thickness) _ / WedgeS2u_height_para _ + (Wedge_S2d_max_thickness - Wedge_S2d_min_thickness) _ / WedgeS2d_height_para) Wedge_down_pos_soll_S2 = -Round (Wedge_down_pos_soll_S2,1) Wedge_up_pos_soll_S2 = Wedge_down_pos_soll_S2 Flag = True Else ANZ = ANZ + 1 End If Else ANZ = ANZ + 1 End If Wend 'Wedges And Ladder*************************************************************************** ElseIf ((Wed = "angekreuzt") And (Dis = "") And (Lad = "angekreuzt")) Then Min_Thick_0 = DEGRADER_LIM(0, 3) Max_Thick_0 = DEGRADER_LIM(0, 4) Min_Ang_0 = DEGRADER_LIM(0, 7) Max_Ang_0 = DEGRADER_LIM(0, 7) Min_Thick_1 = DEGRADER_LIM(1, 3) Max_Thick_1 = DEGRADER_LIM(1, 4) Min_Ang_1 = DEGRADER_LIM(1, 7) Max_Ang_1 = DEGRADER_LIM(1, 7) Min_Thick_2 = DEGRADER_LIM(2, 3) Max_Thick_2 = DEGRADER_LIM(2, 4) Min_Ang_2 = DEGRADER_LIM(2, 7) Max_Ang_2 = DEGRADER_LIM(2, 7) Min_Thick_3 = DEGRADER_LIM(3, 3) Max_Thick_3 = DEGRADER_LIM(3, 4) Min_Ang_3 = DEGRADER_LIM(3, 7) Max_Ang_3 = DEGRADER_LIM(3, 7) Min_Thick_4 = DEGRADER_LIM(4, 3) Max_Thick_4 = DEGRADER_LIM(4, 4) Min_Ang_4 = DEGRADER_LIM(4, 7) Max_Ang_4 = DEGRADER_LIM(4, 7) Min_Thick_5 = DEGRADER_LIM(5, 3) Max_Thick_5 = DEGRADER_LIM(5, 4) Min_Ang_5 = DEGRADER_LIM(5, 7) Max_Ang_5 = DEGRADER_LIM(5, 7) Drive_soll = "out" While ((Not Flag) And (ANZ <= MAX_ANZ)) Wedge_S2_total_thickness_soll = Total_thickness_S2_soll _ - Ladder(ANZ, 1) If ((Wedge_S2_total_thickness_soll <= Wedge_S2_max_total_thickness) _ And (Wedge_S2_total_thickness_soll >= Wedge_S2_min_total_thickness)) Then If (Abs(Angle_soll - Ladder(ANZ, 2)) < Fehler) Then Flag = True Wedge_down_pos_soll_S2 = (Wedge_S2_total_thickness_soll _ - Wedge_S2u_min_thickness _ - Wedge_S2d_min_thickness) _ / _ ((Wedge_S2u_max_thickness - Wedge_S2u_min_thickness) _ / WedgeS2u_height_para _ + (Wedge_S2d_max_thickness - Wedge_S2d_min_thickness) _ / WedgeS2d_height_para) Wedge_down_pos_soll_S2 = -Round (Wedge_down_pos_soll_S2,1) Wedge_up_pos_soll_S2 = Wedge_down_pos_soll_S2 Else ANZ = ANZ + 1 End If Else ANZ = ANZ + 1 End If Wend 'Disk And Ladder******************************************************************************* ElseIf ((Wed = "") And (Dis = "angekreuzt") And (Lad = "angekreuzt")) Then Min_Thick_0 = DEGRADER_LIM(0, 9) Max_Thick_0 = DEGRADER_LIM(0, 9) Min_Ang_0 = DEGRADER_LIM(0, 5) Max_Ang_0 = DEGRADER_LIM(0, 6) Min_Thick_1 = DEGRADER_LIM(1, 9) Max_Thick_1 = DEGRADER_LIM(1, 9) Min_Ang_1 = DEGRADER_LIM(1, 5) Max_Ang_1 = DEGRADER_LIM(1, 6) Min_Thick_2 = DEGRADER_LIM(2, 9) Max_Thick_2 = DEGRADER_LIM(2, 9) Min_Ang_2 = DEGRADER_LIM(2, 5) Max_Ang_2 = DEGRADER_LIM(2, 6) Min_Thick_3 = DEGRADER_LIM(3, 9) Max_Thick_3 = DEGRADER_LIM(3, 9) Min_Ang_3 = DEGRADER_LIM(3, 5) Max_Ang_3 = DEGRADER_LIM(3, 6) Min_Thick_4 = DEGRADER_LIM(4, 9) Max_Thick_4 = DEGRADER_LIM(4, 9) Min_Ang_4 = DEGRADER_LIM(4, 5) Max_Ang_4 = DEGRADER_LIM(4, 6) Min_Thick_5 = DEGRADER_LIM(5, 9) Max_Thick_5 = DEGRADER_LIM(5, 9) Min_Ang_5 = DEGRADER_LIM(5, 5) Max_Ang_5 = DEGRADER_LIM(5, 6) Drive_soll = "in" Wedge_down_pos_soll_S2 = -100 Wedge_up_pos_soll_S2 = -Wedge_down_pos_soll_S2 While ((Not Flag) And (ANZ <= MAX_ANZ)) If (Abs(Total_thickness_S2_soll - DEGRADER_LIM(ANZ, 9)) < Fehler) Then Disk_angle_soll = Angle_soll - Ladder(ANZ, 2) If ((Disk_angle_soll < Disk_Max_angle) _ And (Disk_angle_soll > Disk_Min_angle)) Then x = Disk_angle_soll / (Disk1_angle_para + Disk2_angle_para) Disk_motor_angle_soll = (PI / 2 - Atn(x / Sqr(1 - x ^ 2))) * 360 / (2 * PI) Disk_motor_angle_soll = Round (Disk_motor_angle_soll,2) Wedge_up_pos_soll_S2 = -Wedge_down_pos_soll_S2 Flag = True Else ANZ = ANZ + 1 End If Else ANZ = ANZ + 1 End If Wend 'Wedges And Disk And Ladder************************************************************************* ElseIf ((Wed = "angekreuzt") And (Dis = "angekreuzt") And (Lad = "angekreuzt")) Then Min_Thick_0 = DEGRADER_LIM(0, 1) Max_Thick_0 = DEGRADER_LIM(0, 2) Min_Ang_0 = DEGRADER_LIM(0, 5) Max_Ang_0 = DEGRADER_LIM(0, 6) Min_Thick_1 = DEGRADER_LIM(1, 1) Max_Thick_1 = DEGRADER_LIM(1, 2) Min_Ang_1 = DEGRADER_LIM(1, 5) Max_Ang_1 = DEGRADER_LIM(1, 6) Min_Thick_2 = DEGRADER_LIM(2, 1) Max_Thick_2 = DEGRADER_LIM(2, 2) Min_Ang_2 = DEGRADER_LIM(2, 5) Max_Ang_2 = DEGRADER_LIM(2, 6) Min_Thick_3 = DEGRADER_LIM(3, 1) Max_Thick_3 = DEGRADER_LIM(3, 2) Min_Ang_3 = DEGRADER_LIM(3, 5) Max_Ang_3 = DEGRADER_LIM(3, 6) Min_Thick_4 = DEGRADER_LIM(4, 1) Max_Thick_4 = DEGRADER_LIM(4, 2) Min_Ang_4 = DEGRADER_LIM(4, 5) Max_Ang_4 = DEGRADER_LIM(4, 6) Min_Thick_5 = DEGRADER_LIM(5, 1) Max_Thick_5 = DEGRADER_LIM(5, 2) Min_Ang_5 = DEGRADER_LIM(5, 5) Max_Ang_5 = DEGRADER_LIM(5, 6) Drive_soll = "in" While ((Not Flag) And (ANZ <= MAX_ANZ)) Wedge_S2_total_thickness_soll = Total_thickness_S2_soll _ - Disk_cent_thickness _ - Ladder(ANZ, 1) If ((Wedge_S2_total_thickness_soll <= Wedge_S2_max_total_thickness) _ And (Wedge_S2_total_thickness_soll >= Wedge_S2_min_total_thickness)) Then Disk_angle_soll = Angle_soll - Ladder(ANZ, 2) If ((Disk_angle_soll < Disk_Max_angle) _ And (Disk_angle_soll > Disk_Min_angle)) Then x = Disk_angle_soll / (Disk1_angle_para + Disk2_angle_para) Disk_motor_angle_soll = (PI / 2 - Atn(x / Sqr(1 - x ^ 2))) * 360 / (2 * PI) Disk_motor_angle_soll = Round (Disk_motor_angle_soll,2) Wedge_down_pos_soll_S2 = (Wedge_S2_total_thickness_soll _ - Wedge_S2u_min_thickness _ - Wedge_S2d_min_thickness) _ / _ ((Wedge_S2u_max_thickness - Wedge_S2u_min_thickness) _ / WedgeS2u_height_para _ + (Wedge_S2d_max_thickness - Wedge_S2d_min_thickness) _ / WedgeS2d_height_para) Wedge_down_pos_soll_S2 = -Round (Wedge_down_pos_soll_S2,1) Wedge_up_pos_soll_S2 = Wedge_down_pos_soll_S2 Flag = True Else ANZ = ANZ + 1 End If Else ANZ = ANZ + 1 End If Wend 'Messages******************************************************************************************* End If If (Flag = True) Then Message = "" Lad_Pos = Ladder(ANZ, 3) Dis_Ang = Disk_motor_angle_soll Dis_Dri = Drive_soll Wed_Up_Pos = Wedge_up_pos_soll_S2 Wed_Down_Pos = Wedge_down_pos_soll_S2 Else Message = "Thickness or Angle at S2 is not reachable" Lad_Pos = "" Dis_Ang = "" Dis_Dri = "" Wed_Up_Pos = "" Wed_Down_Pos = "" End If 'Format Two Numbers After Komma****************************************************************** Lad_Pos = FormatNumber(Lad_Pos,1) Dis_Ang = FormatNumber(Dis_Ang,1) Wed_Up_Pos = FormatNumber(Wed_Up_Pos,1) Wed_Down_Pos = FormatNumber(Wed_Down_Pos,1) Min_Thick_0 = FormatNumber(Min_Thick_0,2) Max_Thick_0 = FormatNumber(Max_Thick_0,2) Min_Ang_0 = FormatNumber(Min_Ang_0,2) Max_Ang_0 = FormatNumber(Max_Ang_0,2) Min_Thick_1 = FormatNumber(Min_Thick_1,2) Max_Thick_1 = FormatNumber(Max_Thick_1,2) Min_Ang_1 = FormatNumber(Min_Ang_1,2) Max_Ang_1 = FormatNumber(Max_Ang_1,2) Min_Thick_2 = FormatNumber(Min_Thick_2,2) Max_Thick_2 = FormatNumber(Max_Thick_2,2) Min_Ang_2 = FormatNumber(Min_Ang_2,2) Max_Ang_2 = FormatNumber(Max_Ang_2,2) Min_Thick_3 = FormatNumber(Min_Thick_3,2) Max_Thick_3 = FormatNumber(Max_Thick_3,2) Min_Ang_3 = FormatNumber(Min_Ang_3,2) Max_Ang_3 = FormatNumber(Max_Ang_3,2) Min_Thick_4 = FormatNumber(Min_Thick_4,2) Max_Thick_4 = FormatNumber(Max_Thick_4,2) Min_Ang_4 = FormatNumber(Min_Ang_4,2) Max_Ang_4 = FormatNumber(Max_Ang_4,2) Min_Thick_5 = FormatNumber(Min_Thick_5,2) Max_Thick_5 = FormatNumber(Max_Thick_5,2) Min_Ang_5 = FormatNumber(Min_Ang_5,2) Max_Ang_5 = FormatNumber(Max_Ang_5,2) %>
<%'Output**************************************************************************************%>
Position
Min. Thickness [mg/cm
2
]
Max. Thickness [mg/cm
2
]
Min. Angle [mrad]
Max. Angle [mrad]
0
<% = Min_Thick_0 %>
<% = Max_Thick_0 %>
<% = Min_Ang_0 %>
<% = Max_Ang_0 %>
1
<% = Min_Thick_1 %>
<% = Max_Thick_1 %>
<% = Min_Ang_1 %>
<% = Max_Ang_1 %>
2
<% = Min_Thick_2 %>
<% = Max_Thick_2 %>
<% = Min_Ang_2 %>
<% = Max_Ang_2 %>
3
<% = Min_Thick_3 %>
<% = Max_Thick_3 %>
<% = Min_Ang_3 %>
<% = Max_Ang_3 %>
4
<% = Min_Thick_4 %>
<% = Max_Thick_4 %>
<% = Min_Ang_4 %>
<% = Max_Ang_4 %>
5
<% = Min_Thick_5 %>
<% = Max_Thick_5 %>
<% = Min_Ang_5 %>
<% = Max_Ang_5 %>
<%'Checkbox**************************************************************************************%>
INPUT:
<% Wed = Request("Wedges") %><% If Wed = "angekreuzt" Then %>
<% Else %>
<% End If %> Wedges
<% Dis = Request("Disc") %><% If Dis = "angekreuzt" Then %>
<% Else %>
<% End If %>Disk
<% Lad = Request("Ladder") %><% If Lad = "angekreuzt" Then %>
<% Else %>
<% End If %>Ladder
OUTPUT:
<%'Inputbox**************************************************************************************%>
Thickness:
<%'Output**************************************************************************************%>
mg/cm
2
Messages: <% = Message %>
<%'Inputbox**************************************************************************************%>
Angle:
<%'Output**************************************************************************************%>
mrad
Wedge Up Position Soll (<% = Wedge_Up_S2 %>): <% = Wed_Up_Pos %> mm
Beam Diameter Y:
mm
Wedge Down Position Soll (<% = Wedge_Down_S2 %>): <% = Wed_Down_Pos %> mm
PRESS BUTTON OR 'ENTER' TO CALCULATE
Disk Motor Angle Soll (<% = Disk_Angle_S2 %>): <% = Dis_Ang %> grad
Disk Drive (<% = Disk_Drive_S2 %>): <% = Dis_Dri %>
Ladder Position (<% = Ladder_S2 %>): <% = Lad_Pos %> mm
<%'Button Calculate*********************************************************************************%>
<%'Button Exit****************************************************************************************%>