proc diffractometerTest_initialize {} { } proc diffractometerTest_start { } { #Bring motor positions into this namespace variable sample_x variable sample_y variable sample_z #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 wait_for_devices gonio_phi #move the sample motors a little bit move sample_x by 0.01 move sample_y by 0.01 move sample_z by 0.01 #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 move sample_y to $starty move sample_z to $startz #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] }