Axis layer¶
-
class
icepap.axis.
IcePAPAxis
(ctrl, axis_nr)¶ The IcePAP axis class contains the common IcePAP ASCii API for any IcePAP axis. The methods here implemented correspond to those at the axis level.
-
abort
()¶ Abort the current movement (IcePAP user manual pag. 46).
-
property
acctime
¶ Get the acceleration time (see get_acceleration method).
- Returns
float
-
property
acctime_default
¶ Get the default acceleration time (see get_acceleration method).
- Returns
float
-
property
acctime_steps
¶ Get the acceleration in steps distances (see get_acceleration method).
- Returns
float
-
property
active
¶ Get if the axis is active (IcePAP user manual pag. 47).
- Returns
bool
-
property
addr
¶ Get the axis number (IcePAP user manual pag. 49).
- Returns
int
-
property
alarm
¶ Get if the axis is in alarm condition (IcePAP user manual pag. 50).
- Returns
[bool, str]
-
property
auxps
¶ Get if the auxiliary power supply is ON (IcePAP user manual pag. 52).
- Returns
bool
-
blink
(secs)¶ Blink the driver status led for a given amount of time (Icepap user manual pag. 53).
- Parameters
secs – number of second to blink.
-
cjog
(vel)¶ Set jog velocity in configuration mode.
- Parameters
vel – float
-
clear_ecam_table
()¶ Clean the electronic cam table (Icepap user manual pag. 65).
-
clear_list_table
()¶ Clean the position list table (Icepap user manual pag. 87).
-
clear_parametric_table
()¶ Clean the parametric trajectory table.
-
cmove
(pos)¶ Start absolute movement in configuration mode (IcePAP user manual pag.58).
- Parameters
pos – float
-
property
config
¶ Get the identifier of the last valid configuration. To change the configuration use set_config method (IcePAP user manual pag. 59).
- Returns
str
-
property
cswitch
¶ Get the limit switches configuration (IcePAP user manual pag. 60).
- Returns
str
-
ctrlrst
()¶ Reset control encoder value.
-
property
ecam
¶ Get the electronic cam mode (IcePAP user manual pag. 64).
- Returns
str
-
property
enc
¶ Read the axis nominal position pointer (IcePAP user manual pag. 108).
- Returns
int
-
property
enc_absenc
¶ Read the absenc register (IcePAP user manual pag. 108).
- Returns
int
-
property
enc_ctrlenc
¶ Read the ctrlenc register (IcePAP user manual pag. 108).
- Returns
int
-
property
enc_encin
¶ Read the encin register (IcePAP user manual pag. 108).
- Returns
int
-
property
enc_inpos
¶ Read the inpos register (IcePAP user manual pag. 108).
- Returns
int
-
property
enc_motor
¶ Read the motor register (IcePAP user manual pag. 108).
- Returns
int
-
property
enc_shftenc
¶ Read the shftenc register (IcePAP user manual pag. 108).
- Returns
int
-
property
enc_sync
¶ Read the sync register (IcePAP user manual pag. 108).
- Returns
int
-
property
enc_tgtenc
¶ Read the tgtenc register (IcePAP user manual pag. 108).
- Returns
int
-
esync
()¶ Synchronize internal position registers.
-
get_acceleration
(atype='')¶ Read the acceleration time (IcePAP user manual pag. 48).
- Returns
float [seconds]
-
get_cfg
(parameter='')¶ Get the current configuration for one or all parameters (IcePAP user manual pag. 54).
- Parameters
parameter – str (optional)
- Returns
dict
-
get_cfginfo
(parameter='')¶ Get the configuration type for one or all parameters.
- Parameters
parameter – str (optional)
- Returns
dict
-
get_ecam_table
(dtype='FLOAT')¶ Get the position table loaded on the electronic cam table (IcePAP user manual pag. 65).
- Parameters
dtype – str
- Returns
[float]
-
get_enc
(register)¶ Read the position register in encoder step (IcePAP user manual pag. 68).
- Parameters
register – str
- Returns
int
-
get_home_encoder
(register='AXIS')¶ Return the home value latched on encoder register. (IcePAP user manual page 82, v1.0c).
- Parameters
register – str
- Returns
int
-
get_home_position
(register='AXIS')¶ Return the home value latched on the position register. (IcePAP user manual page 83, v1.0c).
- Parameters
register – str
- Returns
int
-
get_list_table
(dtype='FLOAT')¶ Get the position list table (IcePAP user manual pag. 87).
- Parameters
dtype – str
- Returns
[float]
-
get_parametric_table
()¶ Get the parametric table.
- Returns
[[float]] ([parameter], [position], [slope])
-
get_parval
(parameter)¶ Get the motor position for a parameter value.
- Parameters
parameter – float
- Returns
float
-
get_pos
(register)¶ Read the position register in axis units (IcePAP user manual pag. 108).
- Parameters
register – str
- Returns
int
-
get_srch_encoder
(register='AXIS')¶ Return the search value latched on encoder register. (IcePAP user manual page 130, v1.0c).
- Parameters
register – str
- Returns
int
-
get_srch_position
(register='AXIS')¶ Return the search value latched on the position register. (IcePAP user manual page 131, v1.0c).
- Parameters
register – str
- Returns
int
-
get_velocity
(vtype='')¶ Get the velocity (IcePAP user manual pag. 143).
- Parameters
vtype – str
- Returns
float [steps per second]
-
home
(mode=1)¶ Start home signal search sequence (Icepap user manual pag. 76).
- Parameters
mode – int [-1, 0, 1]
-
property
homestat
¶ Return the homing procedure status (IcePAP user manual pag. 79).
- Returns
[str(state), int(direction)]
-
property
id
¶ Get hardware ID and the serial number (Icepap user manual pag. 80).
- Returns
(str HW ID, str SN)
-
property
indexer
¶ Get the indexer signal source used for the axis indexer (IcePAP user manual pag. 81).
- Returns
str
-
property
infoa
¶ Get the InfoA configuration (Icepap user manual pag. 82).
- Returns
(str, str) [Signal, Polarity]
-
property
infob
¶ Get the InfoB configuration (Icepap user manual pag. 82).
- Returns
(str, str) [Signal, Polarity]
-
property
infoc
¶ Get the InfoC configuration (Icepap user manual pag. 82).
- Returns
(str, str) [Signal, Polarity]
-
jog
(veloctiy)¶ Start the jog mode at the given velocity (IcePAP user manual pag. 85).
- Parameters
veloctiy – float
-
property
jog_velocity
¶ Get the current jog velocity.
- Returns
float
-
meas
(parameter)¶ Return a measured value for the parameter (IcePAP user manual pag. 89).
- Parameters
parameter – str
- Returns
float
-
property
meas_i
¶ Measured value of the motor current (IcePAP user manual pag. 89).
- Returns
float
-
property
meas_ia
¶ Measured value of the phase a current (IcePAP user manual pag. 89).
- Returns
float
-
property
meas_ib
¶ Measured value of the phase b current (IcePAP user manual pag. 89).
- Returns
float
-
property
meas_ic
¶ Measured value of the phase c current (IcePAP user manual pag. 89).
- Returns
float
-
property
meas_r
¶ Measured value of the motor resistance (IcePAP user manual pag. 89).
- Returns
float
-
property
meas_ra
¶ Measured value of the phase a resistance (IcePAP user manual pag. 89).
- Returns
float
-
property
meas_rb
¶ Measured value of the phase b resistance (IcePAP user manual pag. 89).
- Returns
float
-
property
meas_rc
¶ Measured value of the phase c resistance (IcePAP user manual pag. 89).
- Returns
float
-
property
meas_rt
¶ Measured value of the power supply temperature (IcePAP user manual pag. 89).
- Returns
float
-
property
meas_t
¶ Measured value of the board temperature (IcePAP user manual pag. 89).
- Returns
float
-
property
meas_vcc
¶ Measured value of the main power supply (IcePAP user manual pag. 89).
- Returns
float
-
property
meas_vm
¶ Measured value of the motor voltage (IcePAP user manual pag. 89).
- Returns
float
-
property
mode
¶ Return the current mode of the axis: CONFIG, OPER, PROG, TEST, FAIL (IcePAP user manual pag. 91).
- Returns
str
-
move
(position)¶ Start absolute movement (IcePAP user manual pag. 92).
- Parameters
position – int
-
movel
(lpos)¶ Start postion list movement (IcePAP user manual pag. 93).
- Parameters
lpos – int
-
movep
(pos)¶ Start axis movement to a parameter value.
- Parameters
pos – float
-
property
name
¶ Get the axis name (Icepap user manual pag. 95).
- Returns
str
-
property
outpaux
¶ Get the OutPAux configuration (Icepap user manual pag. 97).
- Returns
(str, str) [Signal, Polarity]
-
property
outpos
¶ Get the OutPos configuration (Icepap user manual pag. 98)
- Returns
(str, str) [Signal, Polarity]
-
property
paracct
¶ Get the parametric acceleration time (IcePAP user manual pag. 99).
- Returns
float
-
property
parpos
¶ Get the position on parametric units (IcePAP user manual pag. 103).
- Returns
float
-
property
parvel
¶ Get the parametric axis velocity (IcePAP user manual pag. 104).
- Returns
float
-
property
pcloop
¶ Read if the position close loop is enabled (IcePAP user manual pag. 105).
- Returns
bool
-
pmove
(pos)¶ Start parametric movement (IcePAP user manual pag. 106).
- Parameters
pos – float
-
property
pos
¶ Read the axis nominal position pointer (IcePAP user manual pag. 108).
- Returns
int
-
property
pos_absenc
¶ Read the absenc register (IcePAP user manual pag. 108).
- Returns
int
-
property
pos_ctrlenc
¶ Read the ctrlenc register (IcePAP user manual pag. 108).
- Returns
int
-
property
pos_encin
¶ Read the encin register (IcePAP user manual pag. 108).
- Returns
int
-
property
pos_inpos
¶ Read the inpos register (IcePAP user manual pag. 108).
- Returns
int
-
property
pos_motor
¶ Read the motor register (IcePAP user manual pag. 108).
- Returns
int
-
property
pos_shftenc
¶ Read the shftenc register (IcePAP user manual pag. 108).
- Returns
int
-
property
pos_sync
¶ Read the sync register (IcePAP user manual pag. 108).
- Returns
int
-
property
pos_tgtenc
¶ Read the tgtenc register (IcePAP user manual pag. 108).
- Returns
int
-
property
post
¶ Get the result of the power-on self test. Zero means there were not errors (IcePAP user manual pag. 110).
- Returns
int
-
property
power
¶ Get if the axis is ON (IcePAP user manual pag. 111).
- Returns
bool
-
print_commands
()¶ Get the allows commands (IcePAP user manual pag. 75).
-
ptrack
(signal, mode='FULL')¶ Start parametric tracking mode (IcePAP user manual pag. 114).
- Parameters
signal – str
mode – str
-
rmove
(position)¶ Start absolute relative movement (IcePAP user manual pag. 140).
- Parameters
position – int
-
send_cmd
(cmd)¶ Wrapper to add the axis number.
- Parameters
cmd – Command without axis number
- Returns
[str]
-
set_acceleration
(value)¶ Set the acceleration time (IcePAP user manual pag. 48).
- Parameters
value – float
-
set_cfg
(*args)¶ Set the configuration of a parameter or change to Default/Expert configuration (IcePAP user manual pag. 54).
set_cfg(‘Active’, ‘YES’, ‘NVOLT’, ‘48’,…)
- Parameters
args – str: parameter, value or (‘Default’)
-
set_config
(config='')¶ Set configuration (IcePAP user manual pag. 59).
- Parameters
config – str
-
set_ecam_table
(lpos, source='AXIS', dtype='FLOAT')¶ Load the position list to the electronic cam table. The maximum memory size of the table is 81908 bytes. After to load the electronic cam is ON (IcePAP user manual pag. 65).
- Parameters
lpos – [float]
source – str
dtype – str
-
set_enc
(register, value)¶ Set the position register in encoder step (IcePAP user manual pag. 68).
- Parameters
register – str
value – int
-
set_list_table
(lpos, cyclic=False, dtype='FLOAT')¶ Load a position list table (Icepap user manual pag. 87).
- Parameters
lpos – [float]
cyclic – bool
dtype – str
-
set_parametric_table
(lparam, lpos, lslope=None, mode='SPLINE', param_type='FLOAT', pos_type='DWORD', slope_type='FLOAT')¶ Method to set the parametric trajectory data (IcePAP user manual pag. 100).
- Parameters
lparam – [float]
lpos – [int]
lslope – [float]
mode – str [Linear, Spline, Cyclic]’
param_type – str (Global Definitions in icepap.vdatalib)
pos_type – str (Global Definitions in icepap.vdatalib)
slope_type – str (Global Definitions in icepap.vdatalib)
-
set_pos
(register, value)¶ Set the position register in axis units (IcePAP user manual pag. 108).
- Parameters
register – str
value – int
-
set_velocity
(value)¶ Set the velocity (IcePAP user manual pag. 143).
- Parameters
value – float
- Returns
float [steps per second]
-
srch
(signal, edge_type, direction)¶ Start search sequence. (IcePAP user manual page 129, v1.0c).
- Parameters
signal – str [‘LIM-‘, ‘LIM+’, ‘HOME’, ‘ENCAUX’, ‘INPAUX’]
edge_type – str [‘POSEDGE’, ‘NEGEDGE’]
direction – int [-1, 1]
-
property
srchstat
¶ Return the homing procedure status. (IcePAP user manual page 132, v1.0c).
- Returns
[str(state), int(direction)]
-
property
state
¶ Read the axis status and return a util.State object.
- Returns
State
-
property
state_5vpower
¶ Check if the auxiliary power is On.
- Returns
bool
-
property
state_alive
¶ Check if the alive flag is active.
- Returns
bool
-
property
state_disable_code
¶ Return the disable code.
- Returns
int
-
property
state_disable_str
¶ Return the disable string.
- Returns
str
-
property
state_disabled
¶ Check if the disable flag is active.
- Returns
bool
-
property
state_indexer_code
¶ Return the indexer code.
- Returns
int
-
property
state_indexer_str
¶ Return the indexer string.
- Returns
str
-
property
state_info_code
¶ Return the info code.
- Returns
int
-
property
state_inhome
¶ Chekc if the home flag is active.
- Returns
bool
-
property
state_limit_negative
¶ Check if the flag limit_negative is active.
- Returns
bool
-
property
state_limit_positive
¶ Check if the flag limit_positive is active.
- Returns
bool
-
property
state_mode_code
¶ Return the current mode.
- Returns
int
-
property
state_mode_str
¶ Return the current mode.
- Returns
str
-
property
state_moving
¶ Check if the moving flag is active.
- Returns
bool
-
property
state_outofwin
¶ Check if the outofwin flag is active.
- Returns
bool
-
property
state_poweron
¶ Check if the flag poweron is active.
- Returns
bool
-
property
state_present
¶ Check if the present flag is active.
- Returns
bool
-
property
state_ready
¶ Check if the ready flag is active.
- Returns
bool
-
property
state_settling
¶ Check if the settling flag is active.
- Returns
bool
-
property
state_stop_code
¶ Return the stop code.
- Returns
int
-
property
state_stop_str
¶ Return the stop string.
- Returns
str
-
property
state_verserr
¶ Check if the vererr flag is active.
- Returns
bool
-
property
state_warning
¶ Check if the warning flag is active.
- Returns
bool
-
property
status
¶ Return axis status word 32-bits (IcePAP user manual pag. 128).
- Returns
int
-
stop
()¶ Stop the current movement with a normal deceleration ramp (IcePAP user manual pag. 129).
-
property
stopcode
¶ Return axis stop code word 16-bits (IcePAP user manual pag. 130).
- Returns
int
-
property
syncaux
¶ Get the SyncAux configuration (Icepap user manual pag. 82).
- Returns
(str, str) [Signal, Polarity]
-
property
syncpos
¶ Get the SyncPos configuration (Icepap user manual pag. 134).
- Returns
(str, str) [Signal, Polarity]
-
track
(signal, mode='FULL')¶ Start position tracking mode (IcePAP user manual pag. 139).
- Parameters
signal – str
mode – str
-
umove
(position)¶ Start absolute updated movement (IcePAP user manual pag. 140).
- Parameters
position – int
-
property
velocity
¶ Read the nominal velocity (see get_velocity method).
- Returns
float
-
property
velocity_current
¶ Read the default velocity (see get_velocity method).
- Returns
float
-
property
velocity_default
¶ Read the default velocity (see get_velocity method).
- Returns
float
-
property
velocity_max
¶ Read the maximum velocity (see get_velocity method).
- Returns
float
-
property
velocity_min
¶ Read the minimum velocity (see get_velocity method).
- Returns
float
-
property
ver
¶ Get the version of the all driver modules: Driver, DSP, FPGA, PCB, IO (IcePAP user manual pag. 144).
- Returns
dict{module: (ver, date)}
-
property
vstatus
¶ Return the axis status as multi-line verbose answer (IcePAP user manual pag. 146).
- Returns
str
-
property
vstopcode
¶ Return the message corresponding to the last motion’s stop code (IcePAP user manual pag. 147).
- Returns
str
-
property
warning
¶ Return a list of string describing warning conditions (IcePAP user manual pag. 150).
- Returns
[str]
-
property
wtemp
¶ Get the set temperature warning value (IcePAP user manual pag. 151).
- Returns
float
-