Difference between revisions of "HOWTO move the FDC Flatness Scanner to a specific position"

From GlueXWiki
Jump to: navigation, search
m (Moving the Laser)
(Moving the Laser)
Line 9: Line 9:
 
#* '''telnet 192.168.1.2'''
 
#* '''telnet 192.168.1.2'''
 
#:
 
#:
#: Note that, for the moment, both computers have the same name.  This means that after typing in these commands, ''it will appear as though nothing has changed, but you should now be logged into the VME crate that controls the laser''.
+
#: After entering these commands, the prompt should change from ''halldsc1>'' to ''halld-laser2>''.  This indicates that you are logged into the VME crate that controls the motors.
 
#:
 
#:
 
# Before moving the laser, ''please check that nothing is obstructing the path of the laser''.  Now you may start typing commands to move the laser. Several commands exist, the most relevant being:
 
# Before moving the laser, ''please check that nothing is obstructing the path of the laser''.  Now you may start typing commands to move the laser. Several commands exist, the most relevant being:
#* '''Laser_Home()''' -- Moves the laser to the lower-left corner of the rock (motion stops when both limit switches in that corner are compressed).
+
#* '''Laser_Home()''' Moves the laser to the lower-left corner of the rock (motion stops when both limit switches in that corner are compressed).
#* '''Laser_MoveRelative("x","y")''' -- Moves the laser '''x''' inches left, and '''y''' inches down from its current position (negative values will cause right/upward motion).
+
#* '''Laser_MoveRelative("x","y")''' Moves the laser '''x''' inches left, and '''y''' inches down from its current position (negative values will cause right/upward motion).
#* '''Laser_MoveVertical()''' -- Moves the laser from the bottom limit switch to the top one ''or vice-versa''. You may need to hit ''control-c'' to cancel this command if it fails.
+
#* '''Laser_MoveVertical()''' Moves the laser from the bottom limit switch to the top one ''or vice-versa''. You may need to hit ''control-c'' to cancel this command if it fails.
#* '''Laser_MoveHorizontal()''' -- Moves the laser from the left limit switch to the right one ''or vice-versa''. You may need to hit ''control-c'' to cancel this command if it fails.
+
#* '''Laser_MoveHorizontal()''' Moves the laser from the left limit switch to the right one ''or vice-versa''. You may need to hit ''control-c'' to cancel this command if it fails.
 
#:
 
#:
 
#: Type in a command (though replacing '''x''' and '''y''' with actual numbers) and hit return to start moving the laser right away.
 
#: Type in a command (though replacing '''x''' and '''y''' with actual numbers) and hit return to start moving the laser right away.

Revision as of 18:23, 12 June 2009

To move the laser measurement device to a specific location, do the following:

Moving the Laser

  1. Make sure the computer is on as well as the driver box and the VME crate (you will need to wait for 2 minutes after first turning on the VME crate to allow it time to boot up).
  2. Log in to the VME crate using telnet. The VME crate allows only one telnet connection at a time so you'll need to kill any existing telnet process to ensure no other connection currently exists:
    • killall -9 telnet
    • telnet 192.168.1.2
    After entering these commands, the prompt should change from halldsc1> to halld-laser2>. This indicates that you are logged into the VME crate that controls the motors.
  3. Before moving the laser, please check that nothing is obstructing the path of the laser. Now you may start typing commands to move the laser. Several commands exist, the most relevant being:
    • Laser_Home() – Moves the laser to the lower-left corner of the rock (motion stops when both limit switches in that corner are compressed).
    • Laser_MoveRelative("x","y") – Moves the laser x inches left, and y inches down from its current position (negative values will cause right/upward motion).
    • Laser_MoveVertical() – Moves the laser from the bottom limit switch to the top one or vice-versa. You may need to hit control-c to cancel this command if it fails.
    • Laser_MoveHorizontal() – Moves the laser from the left limit switch to the right one or vice-versa. You may need to hit control-c to cancel this command if it fails.
    Type in a command (though replacing x and y with actual numbers) and hit return to start moving the laser right away.

Three things to note:

  • The laser will stop motion in a given direction if it hits either of it's limit switches. It will continue any remaining motion in the orthogonal direction though.
  • Negative values may be entered, be aware which directions are positive and which are negative (they are marked near the ends of the rails for the underlying control system which is opposite to the convention used in the software described here).
  • The absolute position of the laser is reported in inches relative to the home position at the end of every call to Laser_MoveRelative("x","y").

NOTE: Because of limitations in how the VxWorks command prompt works, it is not possible to call the routine that moves the laser to an absolute position from the command prompt. You will need to simply do the math yourself to make the appropriate move with Laser_MoveRelative("x","y"), or in the worst case, issue a Laser_Home() command followed by a Laser_MoveRelative("x","y") command passing in the absolute coordinates as the arguments.

Troubleshooting

  • If you make a mistake and wish to stop a currently executing motion, then you can do one of the following:
    1. Turn off power to the driver box to immediately stop motion in both directions.
    2. You can activate the limit switch by hand to stop motion in a given direction. Only do this if the laser is far from the switch you're activating to avoid getting your finger pinched.
    3. Turn off power to the VME crate. This should immediately stop motion in both directions. If you do this, the laser's position will be reported incorrectly until you issue a Laser_Home() command to recalibrate.
  • If there are problems of any sort with either logging in to the VME crate or getting any response from the motors, try power cycling the driver and VME crate first. If there are still problems, try rebooting the Desktop computer.

Contact

Please refer any questions to David Lawrence davidl@jlab.org x5567