#pragma rtGlobals=1 // Use modern global access method. set_ca_addr_list("") Macro BeamStatus() Silent 1 set_ca_addr_list("") Variable current=ezca_get("BL33:srCurrent") if (current > 0) print num2str(ezca_get("BL33:srCurrent"))+" mA with "+num2str(ezca_get("S:SRlifeTimeHrsCC"))+" hours lifetime" print "UNICAT ID is at "+num2str(ezca_get("ID33:Gap.VAL"))+" mm which is "+num2str(ezca_get("ID33:Energy.VAL"))+" keV" else print "No Beam" endif Variable i=2 // OPS:message1 is the machine operators do PrintEzCAStrings ("OPS:message"+num2istr(i)) i += 1 while(i<16) Variable mono,white mono = ezca_get("33id:plc:monoShutter") // 0=open, 1=closed white = ezca_get("FE:33:ID:FEshutter") // 1=open, 0=closed print "White shutter is "+SelectString(white, "Closed", "Open")+" and Mono shutter is "+SelectString(mono, "Closed", "Open") End Function PrintEzCAStrings(val) String val String str // = ezca_get_string (val) if (char2num(str[0,0])>=32) print str endif return 0 End Macro WakeUpForBeam() Variable mode=0 do Sleep /C=0/S 5 mode = ezca_get("S:ActualMode") while(mode!=4) Variable i=0 do if (exists("speak")==3) speak("wake up") else beep endif Sleep /C=5/S 3 i += 1 while (i<8) EndMacro