Added scaffolding for velocity mode
Added records to support detection of the current operation mode (position or velocity), whether one is allowed to change between the two and a record to actually change between the two. Also added a doMoveVelocity method which should be implemented by derived drivers if they support velocity mode.
This commit is contained in:
@@ -347,3 +347,37 @@ record(waveform, "$(INSTR)$(M):EncoderType") {
|
||||
field(NELM, "80")
|
||||
field(SCAN, "I/O Intr")
|
||||
}
|
||||
|
||||
# Motors can operate either in position mode (0) or velocity mode (1). If the
|
||||
# mode is stored within the controller, the driver writes the corresponding mode
|
||||
# value into this record. If not, motors are always assumed to operate in
|
||||
# position mode.
|
||||
record(longin, "$(INSTR)$(M):Mode")
|
||||
{
|
||||
field(DTYP, "asynInt32")
|
||||
field(INP, "@asyn($(CONTROLLER),$(AXIS)) MOTOR_MODE")
|
||||
field(SCAN, "I/O Intr")
|
||||
field(PINI, "NO")
|
||||
field(VAL, "0")
|
||||
}
|
||||
|
||||
# Motors can operate either in position mode (0) or velocity mode (1). If it is
|
||||
# possible to switch between the two, this record has a value of 1, otherwise
|
||||
# its value is 0.
|
||||
record(longin, "$(INSTR)$(M):CanSetMode")
|
||||
{
|
||||
field(DTYP, "asynInt32")
|
||||
field(INP, "@asyn($(CONTROLLER),$(AXIS)) MOTOR_CAN_SET_MODE")
|
||||
field(SCAN, "I/O Intr")
|
||||
field(PINI, "NO")
|
||||
field(VAL, "$(CANSETMODE=0)")
|
||||
}
|
||||
|
||||
# Set the operation mode of the motor to position mode (0) or velocity mode (1).
|
||||
# If CanSetMode is 0, the mode cannot be changed and writing to this record
|
||||
# will have no effect.
|
||||
record(longout, "$(INSTR)$(M):SetMode") {
|
||||
field(DTYP, "asynInt32")
|
||||
field(OUT, "@asyn($(CONTROLLER),$(AXIS),1) MOTOR_SET_MODE")
|
||||
field(PINI, "NO")
|
||||
}
|
||||
Reference in New Issue
Block a user