phytron

Phytron motor controllers

DESCRIPTION

The Phytron motor controllers come in a wide variety of models and firmware versions. Some firmware versions known to work with spec include the following:

IXE-A-T ALPHA Version A94 V 1.9 D-E
IXE-C-T ALPHA version 96 V 4.33 D-E
IXE-A-T ALPHA Version A96 V 1.13 D-E ZMP
IXE-C-RS 2 SMD 101
IXE-C-T ALPHA Version 97 V 5.37 D-F
IXE-IEEE Version CB 8 V 1.11
OMC/TMC V2.6_12b

spec supports GPIB and RS-232C interfaces on the Phytron controllers. Select the appropriate interface on the Device screen of the configuration editor along the following lines:

MOTORS        DEVICE   ADDR  <>MODE  NUM                           <>TYPE
   YES    /dev/ttyS0           9600    2             Phytron IXE (Serial)
   YES                    6            4               Phytron IXE (GPIB)

The corresponding entries in the config file would be:

RS_IXE  =  device_name  baud_rate  number_of_motors
GP_IXE  =  gpib_address  number_of_motors

Finding the Reference Position

The Phytron's axis initialization command "0", which searches for the negative limit switch, is sent to a specific motor when the chg_dial() function is invoked with either the "home+" or "home-" arguments. The free-axis-displacement commands, "L+" and "L-", are sent with the "lim+" and "lim-" arguments, respectively.

There is no fixed hardware signal for a home switch on the Phytron controller, but there are twelve digital inputs available on the input connector. There is also a command which will perform a relative move at the base rate until one of the inputs goes high or low or the magnitude of the move is reached. There are four parameters in this command: the direction of the move, the magnitude of the move, the binary input number and the sense of the input switch. All four parameters are set by entering a string for the home method (or "home_method" via motor_par()) optional motor parameter. The home method can be entered on the first optional-motor-parameter screen. (Get there by typing m once from the standard motor parameter screen.) The string you enter will be sent to the motor when the "home" argument is used with the "chg_dial()" function. The string is the actual command sent to the Phytron, and is of the form

SmagvEnnD

where S is a + or a - for the sign of the move, mag is the magnitude of the move (maximum of 65535 steps), nn is the input number (01 through 12) and D is the sense of the input where 0 means the motor stops if the input goes off and 1 means the motor stops if the input goes on. For example,

+200vE071

would command the motor to move no more than 200 steps in the plus direction, or until input 7 goes ON.

For compatibility with older versions of spec, generic parameter 1 (or "misc_par_1") can instead be used to hold the home-method string for the Phytron models.

Special Commands

Some Phytron models apparently cannot keep up with commands sent by the computer at full speed. One can slow down the communication between spec and the Phytron controllers with the following commands:

motor_par(motor, "rdelay" [,value])
If value is given, sets the delay before reading a response from the Phytron to value seconds, otherwise returns the current value. The default value is 0.015.
motor_par(motor, "wdelay" [,value])
If value is given, sets the delay before sending a command to the Phytron to value seconds, otherwise returns the current value. The default value is 0.015.

Only one copy of the rdelay and wdelay parameters is kept for all the Phytron controllers. The motor mnemonic motor can be associated with any of the Phytron controllers. The values for the parameters are saved in the state file, so should only need to be reset after starting fresh.

Command pass through is available using the following functions.

motor_par(motor, "send", cmd)
Sends the string cmd to the Phytron channel associated with motor.
motor_par(motor, "read", cmd)
Sends the string cmd to the Phytron channel associated with motor, as above, and returns a string containing the response.
motor_par(motor, "usend", cmd)
Sends the string cmd to the Phytron controller associated with motor.
motor_par(motor, "uread", cmd)
Sends the string cmd to the Phytron controller associated with motor, as above, and returns a string containing the response.

For example,

0.FOURC> print motor_par(tth, "read", "P20R")
240000

0.FOURC>

results in the string "\002XP20R\003\r\n" being sent to the controller. Command pass through should be used with caution to avoid interfering with the built-in programming commands spec sends to the Phytron controllers.

The following commands are also available to help with debugging:

motor_par(motor, "chan_init")
Sends the initialization strings to the specified channel. The sames commands are sent when doing hardware configuration on start up or on reconfig.
motor_par(motor, "dump")
Displays the values of Phytron parameters P01 through P10 and P12 through P17 for the channel associated with motor.