Prototype for v0.2

This commit is contained in:
2024-12-04 13:39:36 +01:00
parent e967e65d33
commit 2e2c24238b
3 changed files with 14 additions and 27 deletions

View File

@ -1,5 +1,7 @@
# Encoder type
record(waveform, "$(P)$(M):Encoder_Type") {
# Read out the encoder type in human-readable form. The output numbers can be
# interpreted as ASCII.
# This record is coupled to the parameter library via motorEnable_ -> MOTOR_ENABLE.
record(waveform, "$(INSTR)$(M):Encoder_Type") {
field(DTYP, "asynOctetRead")
field(INP, "@asyn($(CONTROLLER),$(AXIS),1) ENCODER_TYPE")
field(FTVL, "CHAR")
@ -7,15 +9,21 @@ record(waveform, "$(P)$(M):Encoder_Type") {
field(SCAN, "I/O Intr")
}
# reread encoder
record(longout, "$(P)$(M):Reread_Encoder") {
# Trigger a rereading of the encoder. This action is sometimes necessary for
# absolute encoders after enabling them. For incremental encoders, this is a no-op.
# This record is coupled to the parameter library via rereadEncoderPosition_ -> REREAD_ENCODER_POSITION.
record(longout, "$(INSTR)$(M):Reread_Encoder") {
field(DTYP, "asynInt32")
field(OUT, "@asyn($(CONTROLLER),$(AXIS),1) REREAD_ENCODER_POSITION")
field(PINI, "NO")
}
# reread encoder
record(longout, "$(P)$(M):Read_Config") {
# The pmacV3 driver reads certain configuration parameters (such as the velocity
# and the acceleration) directly from the MCU. This reading procedure is performed
# once at IOC startup during atFirstPoll. However, it can be triggered manually
# by setting this record value to 1.
# This record is coupled to the parameter library via readConfig_ -> READ_CONFIG.
record(longout, "$(INSTR)$(M):Read_Config") {
field(DTYP, "asynInt32")
field(OUT, "@asyn($(CONTROLLER),$(AXIS),1) READ_CONFIG")
field(PINI, "NO")

View File

@ -405,16 +405,6 @@ asynStatus pmacv3Controller::writeRead(int axisNo, const char *command,
return asynSuccess;
}
asynStatus pmacv3Controller::readInt32(asynUser *pasynUser, epicsInt32 *value) {
if (pasynUser->reason == motorCanDisable_) {
// By default, motors cannot be disabled
*value = 1;
return asynSuccess;
} else {
return sinqController::readInt32(pasynUser, value);
}
}
asynStatus pmacv3Controller::writeInt32(asynUser *pasynUser, epicsInt32 value) {
int function = pasynUser->reason;

View File

@ -50,17 +50,6 @@ class pmacv3Controller : public sinqController {
*/
pmacv3Axis *getAxis(int axisNo);
/**
* @brief Overloaded function of sinqController
*
* The function is overloaded to read the canDisable property.
*
* @param pasynUser Specify the axis via the asynUser
* @param value Read-out value
* @return asynStatus
*/
asynStatus readInt32(asynUser *pasynUser, epicsInt32 *value);
/**
* @brief Overloaded function of sinqController
*