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

From GlueXWiki
Jump to: navigation, search
(Moving the Laser)
(Moving the Laser)
Line 2: Line 2:
  
 
= Moving the Laser =
 
= Moving the Laser =
# 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)
+
# 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).
 
#:
 
#:
# 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:
+
# 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'''''
+
#* '''killall -9 telnet'''
#* '''''telnet 192.168.1.2'''''
+
#* '''telnet 192.168.1.2'''
 
#:
 
#:
# Now you may start typing commands to move the laser. Several commands exist, the most relevant being:
+
#: 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''.
#* ''Laser_Home()''
+
#* ''Laser_MoveRelative("x","y")''
+
 
#:
 
#:
#: Type in either command (though replacing ''x'' and ''y'' with actual numbers) and hit return to start moving the laser right away.
+
# 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).
The ''Laser_Home()'' command will move the laser until both the limit switches in the lower, left-hand side are hit. Note that this move can take a couple of minutes if the laser is starting far from the bottom of the range.
+
#* '''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''.
 +
#* '''Laser_MoveHorizontal()''' -- Moves the laser from the left limit switch to the right one ''or vice-versa''.
 +
#:
 +
#: Type in a command (though replacing '''x''' and '''y''' with actual numbers) and hit return to start moving the laser right away.
  
The values entered for ''x'' and ''y'' are in inches and will move the laser to a position relative to it's current position. Three things to note:
+
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.
 
* 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).
+
* 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")''.
+
* 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.
+
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 =
 
= Troubleshooting =

Revision as of 15:55, 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
    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.
  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.
    • Laser_MoveHorizontal() -- Moves the laser from the left limit switch to the right one or vice-versa.
    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, you should issue a Laser_Home() command to recalibrate the laser position as known by the VME crate once the VME crate has been rebooted.
  • 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