\documentclass{book}
\usepackage{times}
\usepackage{vmargin}
\usepackage{graphicx}
\usepackage{ifthen}
\usepackage{varwidth}
\usepackage{tabularx}

\setpapersize{USletter}
\setmargrb{2.5cm}{2.9cm}{2.7cm}{2.9cm}

% Use small fonts for verbatim environments.
%
% The following mysterious magic sets that up.
%
% FIXME: Investigate using the listing package instead.
%
\makeatletter
\g@addto@macro\@verbatim\small
\makeatother

\def\linkrecordfields{See \textit{Common record field definitions}}
\def\linkainputfields{See \textit{Common analog input field definitions}}
\def\linkaoutputfields{See \textit{Common analog output field definitions}}
\def\linkdinputfields{See \textit{Common digital input field definitions}}
\def\linkdoutputfields{See \textit{Common digital output field definitions}}
\def\linkmotorfields{See \textit{Common motor field definitions}}

%%%

\def\MxLinkAnalogZinputFields{See \textit{Common Analog Input Field Definitions}}
\def\MxLinkAnalogZoutputFields{See \textit{Common Analog Output Field Definitions}}
\def\MxLinkAreaZdetectorFields{See \textit{Common Area Detector Field Definitions}}
\def\MxLinkDigitalZinputFields{See \textit{Common Digital Input Field Definitions}}
\def\MxLinkDigitalZoutputFields{See \textit{Common Digital Output Field Definitions}}
\def\MxLinkCamacFields{See \textit{Common CAMAC Field Definitions}}
\def\MxLinkControllerFields{See \textit{Common Record Field Definitions}}
\def\MxLinkEpicsZvariableFields{See \textit{Common EPICS Variable Field Definitions}}
\def\MxLinkGpibFields{See \textit{Common GPIB Field Definitions}}
\def\MxLinkMcaFields{See \textit{Common MCA Field Definitions}}
\def\MxLinkMceFields{See \textit{Common MCE Field Definitions}}
\def\MxLinkMcsFields{See \textit{Common MCS Field Definitions}}
\def\MxLinkMotorFields{See \textit{Common Motor Field Definitions}}
\def\MxLinkPmacFields{See \textit{Common PMAC Variable Field Definitions}}
\def\MxLinkRelayFields{See \textit{Common Relay Field Definitions}}
\def\MxLinkRsCDCFields{See \textit{Common RS-232 Field Definitions}}
\def\MxLinkScalerFields{See \textit{Common Scaler Field Definitions}}
\def\MxLinkTimerFields{See \textit{Common Timer Field Definitions}}
\def\MxLinkVmeFields{See \textit{Common VME Field Definitions}}

%----------------------------------------------------------------------

\begin{document}

\input mx_output
\input mx_macros

\input driver_tables_linux
\input driver_tables_powerpmac
\input driver_tables_win32

\title{MX Driver Reference Manual}
\author{William M.\ Lavender}

\date{November 7, 2013}
\maketitle

\input dr_license

\tableofcontents

\input dr_introduction

\input dr_record

\chapter{Amplifiers}

  \section{APS ADCMOD2}
  \section{APS QuadEM}
  \section{Keithley 428}
  \section{Keithley 2000}
  \section{Keithley 2400}
  \section{Keithley 2700}
  \section{Network Amplifier}
  \input dr_icplus
  \section{Pyramid Technical Consultants I404 Electrometer}
  \section{SCIPE Amplifier}
  \section{Soft Amplifier}
  \section{SRS SIM983 Scaling Amplifier}
  \section{SRS SR-570}
  \section{UDT Tramp}

\chapter{Analog I/O}

  \section{APS ADCMOD2 Analog I/O}
  \section{Blu-Ice Ion Chamber}
  \section{Crossbow Technology CXTILT02 Inclinometer}
  \section{Data Track Tracker Analog I/O}
  \input dr_epics_ainput
  \input dr_epics_aoutput
  \section{Kinetic Systems 3112 Analog Output}
  \section{Kinetic Systems 3512 Analog Input}
  \section{MODBUS Analog I/O}
  \section{Multichannel Analog Input Function}
  \section{Network Analog I/O}
  \section{Newport Electronics Iseries Analog I/O}
  \section{Newport Electronics P6000A Analog Input}
  \section{Oxford Instruments ILM (Intelligent Level Meter)}
  \section{Pfeiffer TPG 261/262 Vacuum Gauge Controller}
  \section{Prairie Digital Model 45 Analog I/O}
  \section{Soft Analog I/O}
  \input dr_spellman_df3
  \input dr_sr630
  \section{SRS SIM980 Analog Input}
  \section{Systron Donner M107 DC Voltage Source}
  \section{Velleman K8055 Analog I/O}
  \section{Wago 750 Series MODBUS Analog Output}
  \section{Motor Controller Analog I/O}
  \section{Other Controller Type Analog I/O}

\chapter{Area Detector}

  \section{Blu-Ice Area Detector}
  \section{Dexela/Aviex PCCD Series Detectors}
  \input dr_epics_area_detector
  \input dr_epics_ccd
  \section{MarCCD Area Detector}
  \section{MarCCD Server Socket Program}
  \section{Network Area Detector}
  \section{RDI Taurus}
  \section{RDI Xineos GigE}
  \section{Soft Area Detector}

\chapter{Autoscale Devices}

  \section{Autoscale Amplifier}
  \section{Autoscale Filter}
  \section{Autoscale Filter and Amplifier}
  \section{Related Devices}
    \subsection{Autoscale Scaler}
    \input dr_gain_tracking_scaler

\chapter{Counter/Timers}

  \input dr_am9513
  \section{Area Detector Timer}
  \section{Black Cat Systems GM-xx}
  \section{Blu-Ice Timer}
  \section{DSP QS450 or Kinetic Systems 3610}
  \input dr_epics_scaler
  \input dr_epics_timer
  \section{Function Generator Scaler}
  \section{Interval Timer}
  \section{Joerger VSC8/16}
  \section{MCA Timer}
  \section{MCS Timer}
  \section{Network Scaler}
  \section{Network Timer}
  \section{Ortec 974}
  \section{Prairie Digital Model 45}
  \section{PFCU Shutter Timer}
  \section{Radix Databox Scaler/Timer}
  \section{RTC-018}
  \section{SCIPE Scaler}
  \section{SCIPE Timer}
  \section{Soft Scaler}
  \section{Soft Timer}
  \section{Spec Scaler}
  \section{Spec Timer}
  \section{Velleman K8055 Counter/Timer}
  \section{XIA DXP Timer}
  \section{XIA Handel Timer}
  \newpage
  \section{Pseudoscalers}
    \subsection{Autoscale Related Pseudoscalers}
    \subsection{MCA Related Pseudoscalers}
    \subsection{MCS Scaler}
    \subsection{Scaler Function}
  \section{Pseudotimers}
    \input dr_timer_fanout

\chapter{Digital I/O}

  \input dr_ainput_as_dinput
  \input dr_aoutput_as_doutput
  \section{Bit I/O}
  \section{CM-17A Digital Output}
  \section{Data Track Tracker Digital I/O}
  \input dr_epics_dinput
  \input dr_epics_doutput
  \section{Intel 8255}
  \section{Keyboard Emulated Digital Input}
  \section{Kinetic Systems 3063}
  \section{Linux Parport}
  \section{MODBUS Digital I/O}
  \section{Motorola MC6821}
  \section{Network Digital I/O}
  \section{PC Parallel Port}
  \section{PFCU Filter Summary Digital Output}
  \section{Port I/O Digital I/O}
  \section{Prairie Digital Model 45 Digital I/O}
  \section{Relay as Digital Output}
  \section{SCIPE Digital I/O}
  \section{Soft Digital I/O}
  \section{Velleman K8055 Digital I/O}
  \section{VME Digital I/O}
  \section{Wago 750 Series MODBUS Digital Output}
  \section{Motor Controller Digital I/O}
  \section{Other Controller Type Digital I/O}

\chapter{Encoder}

  \section{Kinetic Systems 3640}

\chapter{Goniostat/Diffractometer Tables}

  \input dr_adc_table

\input dr_motor

    \input dr_acs_mcu2
    \input dr_aerotech_u500
    \input dr_am9513_motor
    \input dr_animatics_smartmotor
    \input dr_aps_id
    \input dr_bluice_motor
    \input dr_bruker_d8
    \input dr_compumotor
    \input dr_dac_motor
    \input dr_deltatau_pmac
    \input dr_deltatau_powerpmac
    \input dr_disabled_motor
    \input dr_dsp_e500
    \input dr_epics_motor
    \input dr_epics_pmac_biocat
    \input dr_epics_pmac_tc
    \input dr_ims_mdrive
    \input dr_ims_panther
    \input dr_joerger_smc24
    \input dr_kohzu_sc
    \input dr_lakeshore_330
    \subsection{Linkam T9X Cooling System Controllers}
    \input dr_mar_desktop_beamline
    \input dr_mclennan
    \input dr_mclennan_pm304
    \input dr_ni_pc_step
    \input dr_ni_valuemotion
    \input dr_network_motor
    \input dr_newport
    \input dr_newport_picomotor
    \input dr_nsls_mmc32
    \subsection{nuLogic PC-Step}
    \input dr_oss_uglide
    \input dr_oxcryo_cryostream_600
    \input dr_oxinst_cryojet
    \input dr_oxinst_itc503
    \subsection{Pan-Tilt-Zoom Motor}
    \subsection{Phidget Stepper (old version)}
    \subsection{Physik Instrumente E662 Piezo Controller}
    \input dr_pontech
    \subsection{Prairie Digital Model 40}
    \subsection{Precision MicroControl MCAPI-based Motor Controllers}
    \input dr_prodex_vme58
    \subsection{Radix Databox}
    \subsection{Scientific Instruments 9650 Temperature Controller}
    \subsection{SCIPE Motor}
    \subsection{Soft Motor}
    \subsection{Spec Motor}
    \input dr_src_mono
    \subsection{SRS SIM960 PID Controller}
    \subsection{Velmex VP9000}
    \input dr_xia_hsc1

  \section{Pseudomotors}
    \input dr_pseudomotors

    \input dr_adsc_two_theta
    \input dr_aframe_detector_motor
    \subsection{BioCAT Mirror Positioner}
    \subsection{Cubic Spline}
    \subsection{Delta}
    \subsection{Elapsed Time}
    \subsection{Energy}
    \subsection{Gated Backlash}
    \subsection{Limited Move}
    \input dr_linear_function
    \input dr_monochromator
    \subsection{Polynomial}
    \input dr_qmotor
    \subsection{Record Field Motor}
    \subsection{Segmented Move}
    \input dr_slit
    \subsection{Table Motor}
    \input dr_tangent_arm
    \subsection{Theta-Two Theta}
    \subsection{Translation}
    \subsection{Wavelength}
    \subsection{Wavenumber}
    \input dr_xafs_wavenumber

\chapter{Multichannel Analog Input}

  \section{Keithley 2700}
  \section{Network Multichannel Analog Input}
  \section{Oxford Danfysik QBPM}

\chapter{Multichannel Analyzers}

  \input dr_epics_mca
  \section{Monte Carlo Simulated MCA}
  \section{Network MCA}
  \section{Ortec UMCBI (Trump)}
  \section{R{\"o}ntec RCL-22 MCA}
  \section{Soft MCA}
  \section{X-Ray Instrumentation Associates (XIA)}
  \section{MCA Associated Records}
    \subsection{MCA Alternate Time}
    \subsection{MCA Channel}
    \subsection{MCA Region of Interest Integral}
    \subsection{MCA Value}

\chapter{Multichannel Encoders}

  \section{MCS Elapsed Time Multichannel Encoder}
  \section{MCS Multichannel Encoder}
  \section{Network Multichannel Encoder}
  \section{PMAC Multichannel Encoder}
  \section{Radix Databox Multichannel Encoder}

\chapter{Multichannel Scalers}

  \input dr_epics_mcs
  \section{Network MCS}
  \section{Radix Databox MCS}
  \section{Scaler Function MCS}
  \section{Soft MCS}
  \section{Struck SIS3801}
  \section{X-ray Instrumentation Associates MCS}

\chapter{Pan-Tilt-Zoom Controllers}

  \section{Hitachi KP-D20A/B}
  \section{Network PTZ}
  \section{Panasonic KX-DP702}
  \section{Sony VISCA}

\chapter{Pulse Generator}

  \section{Digital Output-based Pulse Generator}
  \section{Network Pulse Generator}
  \section{Prairie Digital Model 45 Pulse Generator}
  \section{Struck SIS3801}
  \section{Struck SIS3807}

\chapter{Relays}

  \section{Binary Relay}
  \section{Blind Relay}
  \section{Blu-Ice Shutter}
  \section{Generic Relay}
  \section{MarCCD Shutter}
  \section{MarDTB Shutter}
  \section{Network Relay}
  \section{PFCU Filter and Shutter}
  \section{Pulsed Relay}

\chapter{Sample Changers}

  \section{Network Sample Changer}
  \section{Sercat ALS Robot}
  \section{Soft Sample Changer}

\chapter{Single Channel Analyzers}

  \section{Network SCA}
  \section{Oxford Danfysik Cyberstar X1000}
  \section{Soft SCA}

\chapter{Video Input Devices}

  \section{DALSA Sapera LT}
  \section{EPIX XCLIB}
  \section{Network Video Input}
  \section{Pleora iPORT}
  \section{Soft Video Input}
  \section{Video4Linux 2}

\chapter{Waveform Output}

  \section{BK Precision 912x Waveform Generator}
  \section{Network Waveform Output}

\chapter{CAMAC}

  \section{DSP6001}
  \input dr_epics_camac
  \section{ESONE}
  \section{Soft CAMAC}

\chapter{Camera Link}

  \section{Camera Link API}
  \section{EPIX Camera Link}
  \section{Soft Camera Link}

\chapter{GPIB}

  \input dr_epics_gpib
  \section{Iotech Micro488EX GPIB}
  \section{Keithley 500-SERIAL}
  \section{Linux GPIB}
  \input dr_llp_gpib
  \section{National Instruments GPIB}
  \section{Network GPIB}
  \section{Prologix GPIB}

\chapter{MODBUS}

  \section{MODBUS Serial RTU}
  \section{MODBUS/TCP}

\chapter{Port I/O}

  \input dr_driverlinx_portio
  \section{MSDOS Port I/O}
  \section{Linux iopl() and ioperm() drivers}
  \section{Linux portio driver}
  \section{VxWorks Port I/O}

\chapter{RS-232}

  \section{Camera Link}
  \input dr_epics_rs232
  \section{MSDOS COM}
  \section{Fossil}
  \section{Kinetic Systems KS3344}
  \section{Network RS-232}
  \section{Soft RS-232}
  \section{Spec Command}
  \section{SRS SIM900 Port}
  \section{TCP Socket}
  \section{Telnet}
  \section{Unix TTY}
  \section{VMS Terminal}
  \section{VxWorks RS-232}
  \section{Wago 750 Serial Port}
  \section{Win32 COM Port}

\chapter{USB}

  \section{Libusb 0.1}

\chapter{VME}

  \input dr_epics_vme
  \section{Mmap VME}
  \section{National Instruments VXI Memacc}
  \section{RTEMS VME}
  \section{Struck SIS-1100 and SIS-3100}
  \section{VxWorks VME}

\chapter{Variables}

  \section{Blu-Ice Variables}
  \input dr_epics_timeout
  \input dr_epics_variables
  \section{File I/O Variables}
  \section{Inline Variables}
  \section{MX Local Field Variables}
  \section{MX Network Variables}
  \section{PMAC Variables}
  \section{Spec Variables}
  \section{Calculation Variables}
    \subsection{APS Topup Time to Inject}
    \subsection{APS Topup Interlock}
    \subsection{Mathop Variables}
    \subsection{Polynomial}
    \subsection{Position Select}
  \section{Other Variables}
    \subsection{BioCAT ``Toast'' Joystick}
    \subsection{Indirect String}

\chapter{Special Drivers}

  \section{External Command}

\chapter{Servers}

  \section{Blu-Ice Servers}
  \section{TCP/IP Servers}
  \section{Unix Domain Socket Servers}

\chapter{Scans}

  \section{Linear Scans}
    \subsection{Input Scans}
    \subsection{Motor Scans}
    \subsection{Pseudomotor Scans}
    \subsection{Slit Scans}
    \subsection{Theta-Two Theta Scans}
  \section{List Scans}
    \subsection{File List Scans}
  \section{XAFS Scans}
  \section{Quick Scans \textit{(also known as Fast or Slew Scans)}}
    \subsection{MCS Quick Scans}
    \subsection{APS Insertion Device Quick Scans}
  \section{Area Detector Scans}
    \subsection{Wedge Scan}
  \section{Area Detector Sequences}
  
\chapter{Interfaces to Other Control Systems}

  \section{Blu-Ice}
    \subsection{Blu-Ice Command}
    \subsection{Blu-Ice Operation}
  \section{EPICS}
  \section{SCIPE}
  \section{Spec}

\end{document}

