Beamline Instrument Software Support |
|
SPEC Macro documentation:
[ Macro Index |
BCU Home ]
|
ICE_TRAJ.MAC | ||||||
[ source code | installed at | configured at ] | ||||||
See other macros in category: All | ||||||
Description:
| ||||||
Documentation:
These macros allow to create and download an IcePAP trajectory. The aim is to move a set of IcePAP motors synchronously and following a pre-loaded trajectory. The trajectory is a list of positions for a given parameter value. To move over the trajectory, a macro motor has to be configured and it's position value will be the parameter value. Note that the parameter value can be inbetween parameter values loaded (the IcePAP DRIVER does interpolation). The macro motor velocity/acctime of the config are used during trajectory motion. EXAMPLE | ||||||
Macros:
Usage: icepap_traj_build trajectory type array [addr] Update a trajectory with the content of the given data array. If the trajectory does not exist, it will be created, otherwise it will be enlarged with the new data. The type describe the kind of vector data which could be "PARAMETER", "POSITION", "SLOPE" The address given is the destination DRIVER address. When giving the parameter, the address is not mandatory. Then the parameter will be used for all afterward DRIVERs. Example: icepap_traj_build mytraj1 PARAMETER mypar icepap_traj_build mytraj1 POSITION mypos 6 icepap_traj_delete Usage: icepap_traj_delete trajectory Delete a trajectory. Example: icepap_traj_delete mytraj1 icepap_traj_info Usage: icepap_traj_info trajectory Example: icepap_traj_info mytraj1 icepap_traj_load Usage: icepap_traj_load trajectory { param_motor } | { hostname [address] } Download the given trajectroy into the specified IcePAP system. If an address is given, the trajectory will be sent directly to the concerned DRIVER. Example: icepap_traj_load mytraj1 iceid321 6 icepap_traj_load mytraj1 m0 icepap_traj_sync Usage: icepap_traj_sync motor parameter_value Put all concerned real motors on the trajectory at the positions corresponding to the given parameter value. _icepap_traj_sync Usage: _icepap_traj_sync motor parameter_value Put all concerned real motors on the trajectory at the positions corresponding to the given parameter value. Returns non null if an error occured. icepap_traj_debug Usage: icepap_traj_debug verbose_level Set the verbose level of trajectory macros, 0==none | ||||||
Internal Macros: | ||||||
Usage: _icepap_traj_build (traj_name, type, array, addr, silent) Update an IcePAP trajectory, given by its name. Returns non null if an error occured. _icepap_traj_delete Usage: _icepap_traj_delete (traj_name) Delete a trajectory. _icepap_traj_load Usage: _icepap_traj_load (traj_name, hostname, addr, silent) Download a trajectroy, given by its name, into the specified IcePAP system. If the address is not 0, then the trajectory will be sent directly to a DRIVER. Returns non null if an error occured. TODO: -check that the trajectory contains only good addresses Example: _icepap_traj_load("mytraj1", "iceid321", 6) _icepap_traj_load("mytraj1", "iceid321") _icepap_traj_load("mytraj1", "m0") _icepap_change_timeout Usage: _icepap_change_timeout (hostname, timeout_ms) Change communication timeout _icepap_traj_check_ready Usage: _icepap_traj_check_ready (motor, silent) Check if the given parameter motor is ready to be moved. If silent is non null, no message will printed out. Returns 0 if not ready. _icepap_traj_read Usage: _icepap_traj_read (array_name, hostname, address, npoints, silent) Fill in the given array with the trajectory read positions read from the given IcePAP DRIVER. Note: if the requested number of points is higher that the loaded one, then the DRIVER will interpolated. _icepap_traj_bench Usage: _icepap_traj_bench traj_motor npoints FOR TESTS: Bench the trajectory load time. The motor given has to be an "icepap_traj" one with its list of real IcePAP motors concerned by the trajectory. WARNING: the macro will generate a trajectory and load it into the given IcePAP DRIVERs overwriting any previous trajectory. Example: _icepap_traj_bench m1 100 _icepap_traj_test Usage: _icepap_traj_test hostname address [traj_points_wr [traj_points_rd]] FOR TESTS: Check interpolation done by the IcePAP DRIVER on a loaded trajectory. Displays the absolute error between the interpolated trajectory and the theoritical one. WARNING: the macro will generate a trajectory and load it into the given IcePAP DRIVER overwriting any previous trajectory. The default number of points of the loaded trajectory is 100 while the default number of points of the read one is 1000. Example: _icepap_traj_test iceid321 6 _icepap_traj_test iceid321 6 100 _icepap_traj_test iceid321 6 100 1000 icepap_traj_config Usage: icepap_traj_config (num, type, p1, p2, p3) MACRO MOTOR: Called by spec after reading the config file _icepap_addr2mne Usage: _icepap_addr2mne (dev, addr) Returns the motor mne corresponding to the hardware address given. If not motor is found, the ".error." is returned. icepap_traj_par Usage: icepap_traj_par (num, key, todo, p1) MACRO MOTOR: Called by spec on motor parameters access. icepap_traj_print Usage: icepap_traj_print MACRO MOTOR: Print debug messages icepap_traj_cmd Usage: icepap_traj_cmd (num, key, p1, p2) MACRO MOTOR: Called by spec on motor operation. | ||||||
|