################################################################################ # # DW 01/12/00 # Macro to open and close the shutter. # # Modification history: # # DW 08/28/00 Insert showshutter to display shutter status # DW 05/14/01 Insert shutter C and D # ################################################################################ # def shutter ' if ($# == 1) { setshutter $1 } showshutter ' def shutter ' if ($# == 0) { showshutter exit } else { if ($# != 1) { print "Usage: shutter open \nor: shutter close" exit } else { local _1 _1 = "$1" if (_1 == "open") { epics_put("6ida1:AcO4",1) sleep(0.2) epics_put("6ida1:AcO4",0) } else if (_1 == "close") { epics_put("6ida1:AcO3",1) sleep(0.2) epics_put("6ida1:AcO3",0) } else { print "Use open or close as argument!" exit } } } sleep(1.) showshutter ' def idbshutter ' if ($# != 1) { print "Usage: idbshutter open \nor: idbshutter close" exit } else { local _1 _1 = "$1" if (_1 == "open") { epics_put("6ida1:AcO6",1) sleep(0.2) epics_put("6ida1:AcO6",0) } else if (_1 == "close") { epics_put("6ida1:AcO5",1) sleep(0.2) epics_put("6ida1:AcO5",0) } else { print "Use open or close as argument!" exit } } sleep(1.) showshutter ' def iddshutter ' if ($# != 1) { print "Usage: iddshutter open \nor: iddshutter close" exit } else { local _1 _1 = "$1" if (_1 == "open") { epics_put("6ida1:AcO8",1) sleep(0.2) epics_put("6ida1:AcO8",0) } else if (_1 == "close") { epics_put("6ida1:AcO7",1) sleep(0.2) epics_put("6ida1:AcO7",0) } else { print "Use open or close as argument!" exit } } sleep(1.) showshutter ' #def setshutter ' # if ($# != 1) { # print "Usage: setscreen in \nor: setscreen out" # exit # } else { # local _1 # _1 = "$1" # if (_1 == "in") { # epics_put("6ida1:Avme9440_O_1",0) # } else if (_1 == "out") { # epics_put("6ida1:Avme9440_O_1",1) # } else { # print "Use in or out as argument!" # exit # } # } #' # def showshutter ' local _1 _1 = epics_get("6ida1:AcI0") printf("Front End shutter is %s\n",_1) _1 = epics_get("6ida1:AcI1") printf(" 6ID-B shutter is %s\n",_1) _1 = epics_get("6ida1:AcI2") printf(" 6ID-C shutter is %s\n",_1) _1 = epics_get("6ida1:AcI3") printf(" 6ID-D shutter is %s\n",_1) '