12.07.2015 Views

spec - Local Sector 7 web page

spec - Local Sector 7 web page

spec - Local Sector 7 web page

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The motor_name() function returns the motor name assigned in the configurationfile.The motor positions are stored in three locations: in program memory, onthe computer’s hard disk and in the hardware registers associated with the motor controller.The program manipulates the angles in its memory. The values on the hard disk areupdated every time a motor is moved but are only read when the program is initialized,or after the reconfig command is invoked. The controller registers count theactual number of steps moved and should be the true positions of the motors (unlessamotor was switched off). Before each motor is moved, the controller registers arecompared with program memory. Ifthere are discrepancies, you are notified andasked which value is correct. The sync command can also be used to synchronize thecontroller registers with program memory. The angles can get out-of-sync by movingthe motors with manual controls, by turning off the power to motor controllers or perhapsby a computer crash.Although the motor controllers work in steps, it is much more convenient to use realunits such as degrees (or, for linear motion, millimeters). The user and dial anglesare in these units, converted from steps by the step-size parameters that are readfrom the configuration file.The chg_dial(motor, dial_angle) function sets the dial register to dial_angle forone motor. The chg_offset(motor, user_angle) function sets the offset used toconvert from dial positions to user positions for one motor. Often during the line-upprocedure you will want to zero a particular angle:60.FOURC> chg_offset(th, 0)61.FOURC># set motor theta to zeroThe set macro includes the above and documents the change on the printer and inthe data file.61.FOURC> set th 0Wed Aug 19 11:53:33 1987. Theta reset from 1.5 to 062.FOURC>Dial and user settings may also be set by the <strong>spec</strong> administrator using the programedconf. See <strong>page</strong> 202 in the Administrator ’sGuide for further details.Usually, diffractometer motions have a limit of travel, beyond which physical damagemay occur (or a hardware limit switch tripped). Software limits therefore exist toprevent you from accidentally moving a motor out of range. The lower and upperlimits for each motor are contained in internal arrays accessed through the30 USER MANUAL AND TUTORIALS INTERIM WORK-IN-PROGRESS (8/16/01) NOT FOR GENERAL DISTRIBUTION

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!