TCP/IP Socket Connection to the Beamline Control System The TCP/IP communications driver uses Port 10000 of each of the beamline control system computers (bl831b.als.lbl.gov, bl821b.als.lbl.gov, bl822b.als.lbl.gov). It expects the commands to be in one of the following formats: cmdor cmd motor_nameor cmd motor_name The first command format is used to get status, position, or stop. The second is used for the move command. The following describes the commands: Command : no_op Action : none Return : "OK!-500 Invalid Command" Command : getpos Action : Returns the motor position or averaged analog value depending whether motor_name is a motor or analog input. Return : "OK!-500 No Motor Name" if not motor name given "OK!-500 Invalid Name" if name not valid "%f!0" with motor position or analog value in %f format Command : getstat Action : Returns the motor status Return : "OK!-500 No Motor Name" if not motor name given "OK!-500 Invalid Name" if name not valid "0!0" if motor is not moving "1!0" if motor is moving "3!0" if the motor is off, at a hardware or software limit switch, or if there is a following error Command : moveto Action : Moves a motor to the desired position Return : "OK!-500 In Local Control" if Beamline controls is in local control "OK!-500 No Motor Name" if not motor name given "OK!-500 Invalid Name" if name not valid "OK!-500 Invalid Move" if move is not translatable by %f "OK!0" if move command is given Command : setpos Action : Moves a motor to the desired position Return : "OK!-500 In Local Control" if Beamline controls is in local control "OK!-500 No Motor Name" if not motor name given "OK!-500 Invalid Name" if name not valid "OK!-500 Invalid Move" if move is not translatable by %f "OK!0" if move command is given Command : stop Action : Stops a motor Return : "OK!-500 In Local Control" if Beamline controls is in local control "OK!-500 No Motor Name" if not motor name given "OK!-500 Invalid Name" if name not valid "OK!0" if move command is given Command : autoon Action : Turns autoscaling on Return : "OK!-500 In Local Control" if Beamline controls is in local control "OK!0" if move command is given Command : autooff Action : Turns autoscaling off Return : "OK!-500 In Local Control" if Beamline controls is in local control "OK!0" if move command is given Command : sendamp Action : Applies saved amplifier settings Return : "OK!-500 In Local Control" if Beamline controls is in local control "OK!0" if move command is given Command : cntlstat Action : Returns the local/remote control status Return : "0!0" if it is in local control "1!0" if it is in remote control The motor names are: M1 Tilt M2 Tilt M2 Bend Up M2 Bend Down Theta Y2 Z2 Theta2 Theta2 PZT Chi2 BPM Aperture Upper Aperture Lower Aperture Line 9 Aperture Line 7 Horizontal Aperture Position Vertical Aperture Position Horizontal Aperture Size Vertical Aperture Size Mono eV Horizontal Convergance Angle Vertical Convergance Angle Tune Rocking Curve Tune M2 Tilt Tune Chi2 Tweak eV Tune M1 Tilt Control M2 Tilt to Position Control Chi2 to Position Mono eV with z Theta with pull in Horizontal Video Control Vertical Video Control The analog input names are: Imono In Imono Out Izero Iend Horizontal Beam Position A Horizontal Beam Position B Vertical Beam Position A Vertical Beam Position B Horizontal Position Vertical Position Horizontal FWHM Vertical FWHM Horizontal Centroid Vertical Centroid Horizontal A+B Vertical A+B ln(Izero/Iend) Horizontal Goal Position Vertical Goal Position Beam Current Shutter Status (Note: Analog inputs Beam Current and Shutter Status and the cntlstat command are currently active only on 8.2.2)