示例#1
0
文件: PyANC350.py 项目: Laukei/guilab
	def getStatus(self, axis):
		'''
		determines the status of the selected axis. result: bit0 (moving), bit1 (stop detected), bit2 (sensor error), bit3 (sensor disconnected)
		'''
		self.status = ANC350lib.Int32(0)
		ANC350lib.positionerGetStatus(self.handle,axis,ctypes.byref(self.status))
		return self.status.value
示例#2
0
文件: PyANC350.py 项目: Laukei/guilab
	def capMeasure(self, axis):
		'''
		determines the capacitance of the piezo addressed by axis
		'''
		self.status = ANC350lib.Int32(0)
		ANC350lib.positionerCapMeasure(self.handle,axis,ctypes.byref(self.status))
		return self.status.value
示例#3
0
文件: PyANC350.py 项目: Laukei/guilab
	def getStepwidth(self, axis):
		'''
		determines the step width. In case of standstill of the motor this is the calculated step width	resulting from amplitude setpoint, frequency, and motor parameters. In case of movement this is measured step width
		'''
		self.stepwdth = ANC350lib.Int32(0)
		ANC350lib.positionerGetStepwidth(self.handle,axis,ctypes.byref(self.stepwdth))
		return self.stepwdth.value
示例#4
0
文件: PyANC350.py 项目: Laukei/guilab
	def getRotCount(self, axis):
		'''
		determines actual number of rotations in case of rotary actuator
		'''
		self.rotcount = ANC350lib.Int32(0)
		ANC350lib.positionerGetRotCount(self.handle,axis,ctypes.byref(self.rotcount))
		return self.rotcount.value
示例#5
0
文件: PyANC350.py 项目: Laukei/guilab
	def getSpeed(self, axis):
		'''
		determines the actual speed. In case of standstill of this actor this is the calculated speed resulting	from amplitude setpoint, frequency, and motor parameters. In case of movement this is measured speed.
		'''
		self.spd = ANC350lib.Int32(0)
		ANC350lib.positionerGetSpeed(self.handle,axis,ctypes.byref(self.spd))
		return self.spd.value
示例#6
0
文件: PyANC350.py 项目: Laukei/guilab
	def getIntEnable(self, axis):
		'''
		determines status of internal signal generation of addressed axis. only applicable for scanner/dither axes
		'''
		self.status = ctypes.c_bool(None)
		ANC350lib.positionerGetIntEnable(self.handle,axis,ctypes.byref(self.status))
		return self.status.value
示例#7
0
文件: PyANC350.py 项目: Laukei/guilab
	def getReferenceRotCount(self, axis):
		'''
		determines actual position of addressed axis
		'''
		self.rotcount = ANC350lib.Int32(0)
		ANC350lib.positionerGetReferenceRotCount(self.handle,axis,ctypes.byref(self.rotcount))
		return self.rotcount.value
示例#8
0
文件: PyANC350.py 项目: Laukei/guilab
	def getPosition(self, axis):
		'''
		determines actual position of addressed axis
		'''
		self.pos = ANC350lib.Int32(0)
		ANC350lib.positionerGetPosition(self.handle,axis,ctypes.byref(self.pos))
		return self.pos.value
示例#9
0
文件: PyANC350.py 项目: Laukei/guilab
	def getFrequency(self, axis):
		'''
		determines the frequency in Hz
		'''
		self.freq = ANC350lib.Int32(0)
		ANC350lib.positionerGetFrequency(self.handle,axis,ctypes.byref(self.freq))
		return self.freq.value
示例#10
0
文件: PyANC350.py 项目: Laukei/guilab
	def getDcLevel(self, axis):
		'''
		determines the status actual DC level in mV
		'''
		self.dclev = ANC350lib.Int32(0)
		ANC350lib.positionerGetDcLevel(self.handle,axis,ctypes.byref(self.dclev))
		return self.dclev.value
示例#11
0
文件: PyANC350.py 项目: Laukei/guilab
	def getBandwidthLimitEnable(self, axis):
		'''
		determines status of bandwidth limiter of addressed axis. only applicable for scanner axes
		'''
		self.status = ctypes.c_bool(None)
		ANC350lib.positionerGetBandwidthLimitEnable(self.handle,axis,ctypes.byref(self.status))
		return self.status.value
示例#12
0
文件: PyANC350.py 项目: Laukei/guilab
	def getAmplitude(self, axis):
		'''
		determines the actual amplitude. In case of standstill of the actor this is the amplitude setpoint. In case of movement the amplitude set by amplitude control is determined.
		'''
		self.status = ANC350lib.Int32(0)
		ANC350lib.positionerGetAmplitude(self.handle,axis,ctypes.byref(self.status))
		return self.status.value
示例#13
0
文件: PyANC350.py 项目: Laukei/guilab
	def getAcInEnable(self, axis):
		'''
		determines status of ac input of addressed axis. only applicable for dither axes
		'''
		self.status = ctypes.c_bool(None)
		ANC350lib.positionerGetAcInEnable(self.handle,axis,ctypes.byref(self.status))
		return self.status.value
示例#14
0
文件: PyANC350.py 项目: Laukei/guilab
	def getReference(self, axis):
		'''
		determines distance of reference mark to origin
		'''
		self.pos = ANC350lib.Int32(0)
		self.validity = ctypes.c_bool(None)
		ANC350lib.positionerGetReference(self.handle,axis,ctypes.byref(self.pos),ctypes.byref(self.validity))
		return self.pos.value, self.validity.value
示例#15
0
文件: PyANC350.py 项目: Laukei/guilab
	def check(self):
		'''
		Determines number of connected positioners and their respective hardware IDs
		'''
		self.posinf = ANC350lib.PositionerInfo() #create PositionerInfo Struct
		self.numconnected = ANC350lib.positionerCheck(ctypes.byref(self.posinf)) #look for positioners!
		if self.numconnected > 0:
			print self.numconnected,'ANC350 connected'
			print 'ANC350 with id:',self.posinf.id,'has locked state:',self.posinf.locked
示例#16
0
文件: PyANC350.py 项目: Laukei/guilab
	def connect(self):
		'''
		Establishes connection to first device found
		'''
		self.handle = ANC350lib.Int32(0)
		try:
			ANC350lib.positionerConnect(0,ctypes.byref(self.handle)) #0 means "first device"
			print 'connected to first positioner'
		except Exception as e:
			print 'unable to connect!'
			raise e		
示例#17
0
文件: PyANC350.py 项目: Laukei/guilab
	def triggerAxis(self, triggerno, axis):
		'''
		selects the corresponding axis for the addressed trigger. triggerno is 0-5
		'''
		ANC350lib.positionerTriggerAxis(self.handle,triggerno,axis)
示例#18
0
文件: PyANC350.py 项目: Laukei/guilab
	def clearStopDetection(self, axis):
		'''
		when .setStopDetectionSticky() is enabled, this clears the stop detection status
		'''
		ANC350lib.positionerClearStopDetection(self.handle,axis)
示例#19
0
文件: PyANC350.py 项目: Laukei/guilab
	def close(self):
		'''
		closes connection to ANC350 device
		'''
		ANC350lib.positionerClose(self.handle)
示例#20
0
文件: PyANC350.py 项目: Laukei/guilab
	def trigger(self, triggerno, lowlevel, highlevel):
		'''
		sets the trigger thresholds for the external trigger. triggerno is 0-5, lowlevel/highlevel in units of actor * 1000
		'''
		ANC350lib.positionerTrigger(self.handle,triggerno,lowlevel,highlevel)
示例#21
0
文件: PyANC350.py 项目: Laukei/guilab
	def stopMoving(self, axis):
		'''
		stops any positioning, DC level of affected axis is set to zero after stopping.
		'''
		ANC350lib.positionerStopMoving(self.handle,axis)
示例#22
0
文件: PyANC350.py 项目: Laukei/guilab
	def amplitudeControl(self, axis, mode):
		'''
		selects the type of amplitude control. The amplitude is controlled by the positioner to hold the value constant determined by the selected type of amplitude control. mode takes values 0: speed, 1: amplitude, 2: step size
		'''
		ANC350lib.positionerAmplitudeControl(self.handle,axis,mode)
示例#23
0
文件: PyANC350.py 项目: Laukei/guilab
	def bandwidthLimitEnable(self, axis, state):
		'''
		activates/deactivates the bandwidth limiter of the addressed axis. only applicable for scanner axes
		'''
		ANC350lib.positionerBandwidthLimitEnable(self.handle,axis,ctypes.c_bool(state))
示例#24
0
文件: PyANC350.py 项目: Laukei/guilab
	def updateAbsolute(self, axis, position):
		'''
		updates target position for a *running* approach. function has lower performance impact on running approach compared to .moveAbsolute(). position units are in 'unit of actor multiplied by 1000' (generally nanometres)
		'''
		ANC350lib.positionerUpdateAbsolute(self.handle,axis,position)
示例#25
0
文件: PyANC350.py 项目: Laukei/guilab
	def amplitude(self, axis, amp):
		'''
		set the amplitude setpoint in mV
		'''
		ANC350lib.positionerAmplitude(self.handle,axis,amp)
示例#26
0
文件: PyANC350.py 项目: Laukei/guilab
	def triggerPolarity(self, triggerno, polarity):
		'''
		sets the polarity of the external trigger, triggerno: 0-5, polarity: 0 low active, 1 high active
		'''
		ANC350lib.positionerTriggerPolarity(self.handle,triggerno,polarity)
示例#27
0
文件: PyANC350.py 项目: Laukei/guilab
	def triggerModeOut(self, mode):
		'''
		selects the mode of the output trigger signals. state: 0 disabled - inputs trigger nothing, 1 position - the trigger outputs reacts to the defined position ranges with the selected polarity, 2 quadrature - three pairs of trigger out signals are used to signal relative movement as AB-signals, 3 IcHaus - the trigger out signals are used to output the internal position signal of num-sensors
		'''
		ANC350lib.positionerTriggerModeOut(self.handle,mode)
示例#28
0
文件: PyANC350.py 项目: Laukei/guilab
	def acInEnable(self, axis, state):
		'''
		Activates/deactivates AC input of addressed axis; only applicable for dither axes
		'''
		ANC350lib.positionerAcInEnable(self.handle,axis,ctypes.c_bool(state))
示例#29
0
文件: PyANC350.py 项目: Laukei/guilab
	def triggerModeIn(self, mode):
		'''
		selects the mode of the input trigger signals. state: 0 disabled - inputs trigger nothing, 1 quadrature - three pairs of trigger in signals are used to accept AB-signals for relative positioning, 2 coarse - trigger in signals are used to generate coarse steps
		'''
		ANC350lib.positionerTriggerModeIn(self.handle,mode)
示例#30
0
文件: PyANC350.py 项目: Laukei/guilab
	def triggerEpsilon(self, triggerno, epsilon):
		'''
		sets the hysteresis of the external trigger. epsilon in units of actor * 1000
		'''
		ANC350lib.positionerTriggerEpsilon(self.handle,triggerno,epsilon)