Changeset 1112
- Timestamp:
- Sep 17, 2012 9:46:02 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
specdomain/trunk/src/specdomain/macros/test-battery.mac
r1070 r1112 7 7 * sample file to test sphinx documentation of SPEC macro files 8 8 9 This file contains SPEC macro fragments to test various 9 This file contains SPEC macro fragments to test various 10 10 parts of the SPHINX documentation builder. 11 11 """ … … 25 25 common/shutter 26 26 ============== 27 27 28 28 NAME 29 29 shutter.mac 30 30 31 31 SUMMARY 32 32 Commands to control a fast photon shutter. 33 33 34 34 DESCRIPTION 35 35 The macro causes the fast photon shutter to be opened immediately prior to … … 37 37 delay time assures that the shutter is fully open before issuing the 38 38 count command. 39 39 40 40 The photon shutter is controlled via an EPICS binary output channel, and 41 41 the shutter status is optionally monitored via a binary input channel (in 42 42 which case the delay time is not used, but the monitor signal is used to 43 43 check for completion of the opening process). 44 44 45 45 AUTHOR 46 46 Christian M. Schlepuetz (CS, cschlep) 47 47 48 48 CREATION DATE 49 49 2004/11/06 50 50 51 51 COPYRIGHT 52 52 Copyright 2006-2011 by the above authors (see AUTHOR/AUTHORS) 53 53 54 54 This program is free software: you can redistribute it and/or modify 55 55 it under the terms of the GNU General Public License as published by 56 56 the Free Software Foundation, either version 3 of the License, or 57 57 (at your option) any later version. 58 58 59 59 This program is distributed in the hope that it will be useful, 60 60 but WITHOUT ANY WARRANTY; without even the implied warranty of 61 61 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 62 62 GNU General Public License for more details. 63 63 64 64 You should have received a copy of the GNU General Public License 65 65 along with this program. If not, see http://www.gnu.org/licenses/. 66 66 67 67 VERSION:: 68 68 69 69 $. Date: 2010-11-04 19:06:06 -0400 (Thu, 04 Nov 2010) $ 70 70 $. Author: cschlep $ 71 71 $. URL: file:///data/svn/software/spec/trunk/common/shutter.mac $ 72 72 $. Revision: 17 $ 73 73 74 74 DEPENDENCIES 75 75 Chained macro definitions affected by this macro: 76 76 77 77 - user_precount 78 78 - user_getcounts 79 79 - cleanup_always 80 80 81 81 HISTORY 82 82 2004/11/06 (CS): 83 84 - modified the first original version to comply with naming and format 83 84 - modified the first original version to comply with naming and format 85 85 conventions 86 86 - implemented help-file support and wrote help texts. 87 87 2010/03/30 (CS): 88 88 - added the following global variables to make macro more easily portable:: 89 89 90 90 SHUTTER_CONTROL_PV # EPICS PV name for the shutter control (bo) 91 91 SHUTTER_CONTROL_OPEN # EPICS control value for open shutter … … 96 96 SHUTTER_IS_ON # flag for automatic shutter control 97 97 SHUTTER_SLEEP_TIME # SPEC sleep time after opening shutter 98 98 99 99 2010/07/23 (CS): 100 100 - added SVN keywords (replacing CVS keywords) 101 101 102 102 2011/12/19 (CS): 103 103 - reformatted code documentation to work with ROBODoc 104 104 - added shutter_setup with following internal macros: 105 105 106 106 * _shutter_print_setup 107 107 * _shutter_set_option 108 108 * _clear_screen 109 109 110 110 - replaced SHUTTER_STATUS* with SHUTTER_MONITOR* 111 111 - replaced global variables _OPEN with _OPEN_VAL and … … 122 122 123 123 # EPICS PV of the binary output which controls the shutter 124 124 125 125 global SHUTTER_CONTROL_PV 126 126 SHUTTER_CONTROL_PV = "X04SA-ES3-SC:FPS" … … 134 134 # EPICS PV of the binary input which monitors the state of the shutter 135 135 # if SHUTTER_MONITOR_PV = "", no monitoring is performed 136 136 137 137 global SHUTTER_MONITOR_PV 138 138 SHUTTER_MONITOR_PV = "" … … 163 163 """ 164 164 sh_help, shutter_help: Displays the shutter help text. 165 165 166 166 usage:: 167 167 168 168 > sh_help 169 169 170 170 .. note:: 171 171 The help text is generated by simply displaying the text file … … 214 214 ' 215 215 216 # cleanup macro for ^C usage 217 rdef _cleanup3 \'resetUSAXS\' 218 rdef _cleanup3 \'\' 219 cdef("Fheader", fheader, "UCOL", 0x20) 220 rdef Flabel \'""\' 216 # cleanup macros for ^C usage 217 rdef _cleanup3 \'resetUSAXS\' 218 rdef _cleanup3 \'\' 219 cdef("Fheader", fheader, "UCOL", 0x20) 220 rdef Flabel \'""\' 221 222 223 # rdef of a macro function with no arguments 224 #: open the shutter before an exposure 225 rdef shutter_user_precount_func() \'{shutter_open}; \' 226 227 #: Add :spec:rdef:`shutter_user_precount_func()` to :spec:cdef:`user_precount` 228 cdef("user_precount", "{shutter_user_precount_func()}; ", "shutter_key") 229 230 # rdef of a macro function with two arguments 231 rdef maximum_value(a, b) '{ 232 """ 233 Return the larger of two values. 234 235 """ 236 237 return a > b ? a : b 238 }' 239 240 #: Remove :spec:rdef:`shutter_user_precount_func()` from :spec:cdef:`user_precount` 241 cdef("user_precount", "", "shutter_key", "delete") 221 242 222 243 #============================================================================== … … 234 255 global MULTI_IMGS # useful 8-ID's IMM fileformat; currently not used 235 256 236 #: twice the ratio of a circle's circumference to its diameter 257 #: twice the ratio of a circle's circumference to its diameter 237 258 constant TWO_PI 6.283 238 259 local _newspaper #: don't expect to see new ones … … 263 284 #============================================================================== 264 285 265 266 286 """End of $Id$"""
Note: See TracChangeset
for help on using the changeset viewer.