Welcome | spec | C-PLOT | Support | Users | Contact
 



Motors
Counters
MCA
Interfaces

    Hardware reference : Motors : Delta Tau PMAC/PMAC2

Delta Tau PMAC/PMAC2



Interface:
  • ISA, socket


config file

PC_PMAC = base_address memory_address number_of_motors 
HW_PMAC = host number_of_motors 
HW_PMAC = host:port number_of_motors 

edconf:   DEVICES screen
MOTORS        DEVICE   ADDR  <>MODE  NUM                           <>TYPE 
   YES        0xd000  0x280            4       Delta Tau PMAC/PMAC2 (ISA)
   YES   192.168.1.2                   8    Delta Tau PMAC/PMAC2 (Socket)
   YES     pmac:1025                   8    Delta Tau PMAC/PMAC2 (Socket)
	
On the Motors screen of the configuration editor, one can select among PMAC , PMAC_E , PMAC_S and PMAC_SE for the controller type. However, the internal support in spec currently does not do anything differently no matter which controller type is selected.

A number of optional motor parameters can be set with the configuration editor. If the parameters are not configured, spec will not change the value already contained in the motor controller memory.

The following parameters are associated with tuning the PID loop. The corresponding PMAC I variables are indicated in parenthesis.
dc_following_error (Ix11)
dc_proportional_gain (Ix30)
dc_derivative_gain (Ix31)
dc_veloc_feedforward (Ix32)
dc_integral_gain (Ix33)
dc_accel_feedforward (Ix35)
dc_integration_limit (Ix63)
For home searches, the home slew rate can be programmed from spec .
dc_home_slew_rate (Ix23)
The standard home searches "home+" , "home-" and "home" will be done at the home slew rate, if the paramter is set. Otherwise, the normal motor slew rate is used. spec will set the sign of the Ix23 parameter according to the chosen direction of search. For the limit searches "lim+ and "lim-" , the normal motor slew rate is used.

The settle-time feature implemented via software in spec is available by setting the following optional parameters.
dc_dead_band
dc_settle_time
The Delta Tau controllers are complex devices with hundreds of programmable parameters. spec programs only a handful associated with spec 's basic tasks. In order to optimize operation in particular configurations, such as with encoder, servo or dual encoder, a number of parameters need to be configured. The parameter set up can be done using utilites outside of spec , from where the the parameters should be saved to nonvolatile memory so they will already be properly configured when spec starts up. Alternatevely, parameters can be programmed through spec using the command pass-through functions described below.

The following commands and macros show how spec can initialize parameters for different controller types automatically during hardware configuration. Consult the Delta Tau documentation for the meaning and appropriate values for the parameters. Many depend on specifics of the hardware configuration.

#
# Macros to initialize PMAC motor "I" variables.
# Best to put these macros in a start-up file, such as:
#
#  SPECD/site.mac
# or
#  SPECD/site_f.mac
#
# Motors can be configured as:
#
#  PMAC    - normal stepper
#  PMAC_E  - stepper with encoder
#  PMAC_S  - servo with single encoder
#  PMAC_SE - servo with dual encoders
#
# The _pmac_init() macro sets variables that aren't set (yet)
# in the built-in support.
#
# Use built-in "config_mac" macro to make sure pmac_init gets
# run every time hardware config file is read.
cdef("config_mac", "", "pmac_init", "delete")

cdef("config_mac", "pmac_init", "pmac_init")

def pmac_init '{ local i

for (i = 0; i < MOTORS; i++) { if (!motor_par(i, "responsive")) continue; if (substr(motor_par(i, "controller"), 1, 4) == "PMAC") _pmac_init(i) } }'

def _pmac_init(mot) '{ local s, n, m local Ix02, Ix04, I7mn0, I7mn6 local pmac_Ix02[], pmac_s_Ix02[]

pmac_Ix02 = [ 1:"$78004", 2:"$7800C", 3:"$78014", 4:"$7801C", \ 5:"$78104", 6:"$7810C", 7:"$78114", 8:"$7811C" ]

pmac_s_Ix02 = [ 1:"$78002", 2:"$7800A", 3:"$78012", 4:"$7801A", \ 5:"$78102", 6:"$7810A", 7:"$78112", 8:"$7811A" ]

s = motor_par(mot, "controller") n = motor_par(mot, "channel") + 1 m = n - 1 if (s == "PMAC_E") { # stepper with encoder Ix02 = sprintf("I%d02=%s", n, pmac_Ix02[n]) I7mn0 = sprintf("I7%d%d0=7", m/4, m%4 + 1) I7mn6 = sprintf("I7%d%d6=3", m/4, m%4 + 1) } else if (s == "PMAC") { # stepper without encoder Ix02 = sprintf("I%d02=%s", n, pmac_Ix02[n]) I7mn0 = sprintf("I7%d%d0=8", m/4, m%4 + 1) I7mn6 = sprintf("I7%d%d6=3", m/4, m%4 + 1) } else if (s == "PMAC_S") { # servo with single encoder Ix02 = sprintf("I%d02=%s", n, pmac_s_Ix02[n]) I7mn0 = sprintf("I7%d%d0=3", m/4, m%4 + 1) I7mn6 = sprintf("I7%d%d6=0", m/4, m%4 + 1) } else if (s == "PMAC_SE") { # servo with dual encoder Ix02 = sprintf("I%d02=%s", n, pmac_s_Ix02[n]) Ix04 = sprintf("I%d04=\$0035%d", n, n%8 + 1) I7mn0 = sprintf("I7%d%d0=3", m/4, m%4 + 1) I7mn6 = sprintf("I7%d%d6=0", m/4, m%4 + 1) } else return(-1)

# disable motor motor_par(mot, "I0", 0)

# output address motor_par(mot, "send", Ix02)

if (Ix04) { # velocity loop feedback address motor_par(mot, "send", Ix04) # velocity loop scale factor motor_par(mot, "I09", 192) # output command limit scale motor_par(mot, "I69", 4000) } # flag mode control motor_par(mot, "I24", "\$200001")

# feedback type motor_par(mot, "send", I7mn0)

# output mode control motor_par(mot, "send", I7mn6)

# enable motor motor_par(mot, "I0", 1) return(0) }'
 

Function Reference:

motor_par(motor, "send", cmd_string)
Sends the string cmd_string to the controller associated with motor .
motor_par(motor, "read", cmd_string)
Sends the string cmd_string to the controller associated with motor , as above, and returns a string containing the response.

Top