Skip to content

i05 - add waittime device #431

Open
Open

Description

@oliwenmandiamond

Add waittime device. I cannot seem to find it within i05 localstation, but it is a common scannable within GDA. It's very simple, add to dodal.devices.waittime.py and make a Device that is Movable but the move just calls await asyncio.sleep(time). However, we need the can syntax to support moving to this position for the scan.

Activity

  1. changed the title [-]`waittime`[/-] [+]i05 - add `waittime` device[/+] on Oct 22, 2026
  2. oliwenmandiamond commented on Nov 10, 2026

    @oliwenmandiamond
    CollaboratorAuthor

    been to the beamline, the object uses gdascripts.pd.time_pds.waittimeClass2

    class waittimeClass2(ScannableMotionBase):
    	'''waittimeClass - waits for elapsed time. Use as dummy counter in scans etc'''
    	
    	def __init__(self, name):
    		self.setName(name);
    		self.setInputNames(['Time'])
    		self.Units=['sec'];
    		self.setOutputFormat(['%6.2f'])
    		self.setLevel(7)
    		self.timer=tictoc()
    		self.waitfortime=0
    		self.currenttime=self.timer()
    
    	def rawAsynchronousMoveTo(self,waittime):
    		self.currenttime=self.timer()
    		self.waitfortime=self.currenttime+waittime
    
    	def rawGetPosition(self):
    		return 0.
    
    	def isBusy(self):
    		if self.timer()<self.waitfortime:
    			return 1
    		else:
    			return 0

    We can achieve this in dodal using soft signal for the time to wait and should be the hinted signal. It should implement Movable protocol and sleeps for x amount of time of soft signal. It should be Triggerable and also sleep for x amount of time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions