next up previous contents 5
Next: Test Diffractometer Operation Script Up: Example code listings in Previous: Example code listings in   Contents


Test Diffractometer BLU-ICE Script

#store the current positions of the sample motors
set startx $sample_x
set starty $sample_y
set startz $sample_z

#initialize our phi variable
set phi 0
while {$phi < 360} {

	log $phi

	#test the next position of phi
	move gonio_phi to $phi deg
	wait_for_devices gonio_phi
	
	#move the sample motors a little bit
	move sample_x by 0.01 mm
	move sample_y by 0.01 mm
	move sample_z by 0.01 mm
	
	#wait for the motors to finish the move
	wait_for_devices sample_x sample_y sample_z
	
	#move the sample motors back to start
	move sample_x to $startx mm
	move sample_y to $starty mm
	move sample_z to $startz mm
	
	#wait for the motors to finish moving back
	wait_for_devices sample_x sample_y sample_z

	#move our phi variable
	set phi [expr $phi + 0.1]
}



Scott McPhillips 2011-07-06