.\" Process this man page with .\" groff -man -Tascii mxmotor.1 .\" .TH MOTOR 1 "January 2008" "MX User Manuals" .SH NAME mxmotor \- command line based user interface for MX .SH SYNOPSIS .B mxmotor [ .I options .B ] .SH DESCRIPTION .B mxmotor is the original command line based interface for the MX data acquisition and control system. It is capable of controlling all devices in an MX-based system and can run data acquisition scans as well. .SH OPTIONS .IP "-A" enables network protocol debugging. If this option is selected, each message passing between the client and the server(s) will result in a message being sent to stderr that describes the content of the message. .IP "-d debug_level" specifies the debugging level to run .B mxmotor at. The default value is 0. .IP -D requests that .B mxmotor automatically start a program debugger such as that from Visual Studio or gdb at program startup time. .IP "-f device_database_name" requests that .B mxmotor load its device database from the specified filename. In this case, .B mxmotor will attempt to save changed values to a new copy of the device database. .IP "-F device_database_name" requests that .B mxmotor load its device database from the specified filename. In this case, .B mxmotor will .B not attempt to rewrite the device database when it exits. .IP "-g global_mxmotorrc_file" specifys a script of mxmotor commands that are to be run when .B mxmotor starts up. The default value for this filename is $MXDIR/etc/startup/mxmotor.startup .IP -H tells .B mxmotor not to install its normal signal handlers. This is intended for debugging purposes. .IP -i tells .B mxmotor not to run any startup scripts when it starts. By default, .B mxmotor attempts to run the scripts $MXDIR/etc/startup/mxmotor.startup and $HOME/.mx/mxmotor.startup if they exist. .IP -n tells .B mxmotor to always save scans to the scan database without prompting. The default behavior is to always prompt the user before saving. .IP -N tells .B mxmotor to never change the saved scan database. Changes to the scan database while .B mxmotor was running will be lost when .B mxmotor exits. .IP "-p program_prompt_name" tells .B mxmotor to change the default prompt from "mxmotor>" to "program_prompt_name>". This is useful for visually identifying alternate versions of the .B mxmotor shell script that use different databases. .IP "-P default_display_precision" specifys the default for how many digits after the decimal point are to be displayed by clients. .IP "-s scan_database_name" requests that .B mxmotor load its scan database from the specified filename. In this case, .B mxmotor will attempt to save a changed version of the scan database with a new version when it exits. This is the default behavior. .IP "-S scan_database_name" requests that .B mxmotor load its scan database from the specified filename. In this case, .B mxmotor will .B not attempt to rewrite the scan database when it exits. .IP -t requests that .B mxmotor display a message when the open() routine for a given record is invoked. The resulting messages look like .nf Jul 12 14:39:20 Opening record 'keithley4'. .fi This feature is to help in determining why .B mxmotor is hanging during startup. Generally the record whose 'Opening record' message is displayed last is the record that is causing the problem. .IP -u tells .B mxmotor to configure its stdin and stdout to be unbuffered. The original intent was to make it easier to send commands to .B mxmotor over a pipe. However, the author feels that this is not a good way to write higher level programs that talk to the control system. Instead, you should use the provided Python (MP), Tcl (MxTcl), etc. scripting interfaces for higher level programs, since sending commands over a pipe to .B mxmotor is very inefficient. Furthermore, .B mxmotor is not really designed to be used in this fashion and is intended to be a user interface program. .IP -z tells .B mxmotor not to load any scan savefiles at startup time. .SH NOTES .B mxmotor is just a shell script wrapper around the real binary .B mxmotor.shared. The shell script wrapper invokes the real binary using a command line like $MXDIR/bin/mxmotor.shared -F $MXDIR/etc/mxmotor.dat -s $HOME/scan.dat $* If you wish to make available several different client databases depending on which kind of experiment you are running, the simplest way is to copy the .B mxmotor shell script to a different name and change the names of the database file it loads. If you wished to put your alternate device database in mxerxes.dat and scans in sxerxes.dat, the appropriate command line in the shell script would be $MXDIR/bin/mxmotor.shared -p mxerxes -F $MXDIR/etc/mxerxes.dat -s $HOME/sxerxes.dat $* .SH FILES The following are conventional locations for these files. The conventional value for MXDIR is /opt/mx. .IP $MXDIR/etc/mxmotor.dat - record database for MX client programs. .SH AUTHOR William Lavender