def set_safe_states(iDevIdx,iSlotID): sepia.laser_soft_lock_on(iDevIdx,iSlotID) ## turns the laser soft lock on sepia.set_laser_intensity(0,iDevIdx) #sets the intensity to 0% ## TODO: Need to fix the frequencies in safepysepia and also need to check the numbers for internal and external triggers. sepia.set_laser_frequency(6,iDevIdx) ##sets the frequency to external trigger need to check this rs.SetRSChannel(0) ##sets the relay box to channel 0 (default channel) sepia.close(iDevIdx) rs.Execute() ##executes the relay switch channel
## START OF THE PROGRAM ################################################################################################# ## TODO: Need a while loop looking for communication from ORCA ##Initialisation steps iDevIdx,iModuleType,iSlotID = sepia.initialise() #Initialise the Sepia 2 box ## TODO: Need to check the relay switch here ## TODO: Need to check connections and error status and send to ORCA set_safe_states(iDevIdx,iSlotID) ##sets all the laser components to their safe states print here iDevIdx,iModuleType,iSlotID = sepia.initialise() #Initialise the Sepia 2 box sepia.laser_soft_lock_on(iDevIdx,iSlotID) print "here" check_safe_states(iDevIdx,iSlotID) ##checks all devices are in their safe states print "here check safe states" #setting up the relay box rs.SetRSChannel(4) ##sets the relay channel to 1 sepia.close(iDevIdx) rs.Execute() ##executes the relay switch channel iDevIdx,iModuleType,iSlotID = sepia.initialise() #Initialise the Sepia 2 box sepia.laser_soft_lock_on(iDevIdx,iSlotID) ##set parameters stage ## these numbers need to integers