#! /bin/sh # # This script reports the position of the requested motor. # # \ exec mxtclsh_script "$0" ${1+"$@"} proc main { record_list argv } { if { [ llength $argv ] != 1 } { puts stderr "" puts stderr "Usage: mt_get_position motorname" puts stderr "" exit } set motor_name [ lindex $argv 0 ] set motor [ $record_list get_record $motor_name ] set position [ $motor get_position ] set units [ $motor get_field "units" ] puts "Motor '$motor_name' position = $position $units" }