Beamline Instrument Software Support |
|
SPEC Macro documentation:
[ Macro Index |
BCU Home ]
|
[ source code | installed at | configured at ] | ||||||
See other macros in category: All | ||||||
Description:
| ||||||
Documentation:
Control of the HXP100 Newport hexapode default socket timeout: 5 'scale' parameter: can be set in the config. This is the For example, with a scale of 1000, spec value will be divided by 1000 to be sent to the controller, and the read value will be multiplied by 1000. If not provided, is set to 1 - Position is understood as the position of the Tool coordinate system in the Work coordinate system | ||||||
Macros:
Usage: hxp100_debug toggle the debug mode if (!(whatis("__hxp100_debug") & 2)) rdef __hxp100_debug \'#$*\' hxp100_simul Usage: hxp100_simul toggle debug mode for the present macros. hxp100_geterrstr Usage: hxp100_geterrstr (<host:socket>,err) return the string associated to an error number, for hexapode in host:socket adress. hxp100_getstatusstr Usage: hxp100_getstatusstr (<host:socket>,err) return the string associated to an status number, for hexapode in host:socket adress. hxp100_init Usage: hxp100_init (mne) Makes an init on the hexapode defined above the motor 'mne' It canbe called by providing any motor of the hexapode hxp100_status Usage: hxp100_status (mne) Reads the status hxp100_write Usage: hxp100_write (mne,string) Writes a string hxp100_read Usage: hxp100_read (mne) read the answer hxp100_home Usage: hxp100_home (mne) Homing procedure.Needs hexapode motors been defined with hxp100_list hxp100_coord_get Usage: hxp100_coord_get (mne,coord) get the coordinate system position - <mne>: provide any macromotor as argument - <coord>: can be Work/Tool/ ... - returns -2 if controler does not respond, or the response string. hxp100_coord_put Usage: hxp100_coord_put (mne,coord,pos_x,pos_y,pos_z,pos_u,pos_v,pos_w) sets the coordinate system position - <mne>: provide any macromotor as argument - <coord>: can be Work/Tool/ ... - <pos_x>, <pos_y>, <pos_z>, <pos_u>, <pos_v>, <pos_w> : the coord. hxp100_write_and_get Usage: hxp100_write_and_get (mne, string) sends the string to the controller - returns -2 if no response - else returns the response hxp100_r Usage: hxp100_r (theta,dy) From an original sample positions, a rotation of the sample in the 'Tool' reference induces a circular motion in the X,Y plan. We assume that the X axis is made by the 2 following points: the center of the circle and the original sample position. To calculate the radius, after this circular motion, you must provide: - theta: angle (in deg) on this circle from the the original sample position. - dy: dy displacement in Y axis, from the original sample position to this new position. hxp100_dxy Usage: hxp100_dxy (theta,rr) From an original sample positions, a rotation of the sample in the 'Tool' reference induces a circular motion in the X,Y plan. We assume that the X axis is made by the 2 following points: the center of the circle and the original sample position. This macro calculates the dx and dy displacement to do on the sample to send it back to its original sample position. You must provide: - theta: present angle (deg) on this circle, from the original sample position. hxp100_setradius Usage: hxp100_setradius (radius) set the radius hxp100_showradius Usage: hxp100_showradius () shows the radius hxp100_adjustZ Usage: hxp100_adjustZ Adjust Z of Tool coordinate by moving the rotation X or Y. Needs that hxp100_list has been run before (for motor names definition). rotation put in Work system !!!! hxp100_adjustY Usage: hxp100_adjustY Adjust Y of Tool coordinate by moving the rotation X or Z. Needs that hxp100_list has been run before (for motor names definition). rotation put in Work system !!!! hxp100_adjustX Usage: hxp100_adjustX Adjust X of Tool coordinate by moving the rotation Y or Z. Needs that hxp100_list has been run before (for motor names definition). rotation put in Work system !!!! hxp100_list Usage: hxp100_list <mne_x> <mne_y> <mne_z> <mne_rotx> <mne_roty> <mne_rotz> Gives the list of motors for the hexapode. if (whatis("HXP_nb") == 0) {HXP_nb = 0} | ||||||
Internal Macros: | ||||||
Usage: hxp100_config(num,type,p1,p2,p3) MACRO MOTOR: Called by spec after reading the config file hxp100_waitforanswer Usage: hxp100_waitforanswer (nbtryy) after a sock_put, wait for an answer. to be used if the answer is a single item. - maximum of 'nbtry' tries of sock_get reading - returns 0 if OK, -1 if NOT OK but responding, -2 if not responding - if responding, sets HXP_SOCK_ANSWER and HXP_SOCK_ERR | ||||||
|