Commit 6f0a4d1a authored by kpetersn's avatar kpetersn
Browse files

Added readback values for ramp limit and ramp rate

parent dd762e96
......@@ -23,6 +23,17 @@ record(ao, "$(P)$(T):rampLimit")
field(VAL, "22.0")
}
record(ai, "$(P)$(T):rampLimit_RBV")
{
field(DTYP, "asynFloat64")
field(INP, "@asyn($(PORT),$(ADDR))RAMP_LIMIT_IN_VALUE")
field(PINI, "YES")
field(LINR, "NO CONVERSION")
field(PREC, "4")
field(EGU, "Celsius")
field(SCAN, "Passive")
}
record(ao, "$(P)$(T):rampRate")
{
field(DTYP, "asynFloat64")
......@@ -35,11 +46,22 @@ record(ao, "$(P)$(T):rampRate")
field(VAL, "20.0")
}
record(ai, "$(P)$(T):rampRate_RBV")
{
field(DTYP, "asynFloat64")
field(INP, "@asyn($(PORT),$(ADDR))RAMP_RATE_IN_VALUE")
field(PINI, "YES")
field(LINR, "NO CONVERSION")
field(PREC, "4")
field(EGU, "Deg C / min")
field(SCAN, "Passive")
}
record(ai, "$(P)$(T):heaterPower_RBV")
{
field(DTYP, "asynFloat64")
field(INP, "@asyn($(PORT),$(ADDR))HEATER_POWER_IN_VALUE")
#field(PINI, "YES")
field(PINI, "YES")
field(LINR, "NO CONVERSION")
field(PREC, "4")
field(EGU, "Watts")
......
......@@ -22,7 +22,9 @@ Linkam::Linkam(const char *portName, const char *serialPort) : asynPortDriver(po
createParam(temperatureInValueString, asynParamFloat64, &temperatureInValue_);
createParam(rampLimitOutValueString, asynParamFloat64, &rampLimitOutValue_);
createParam(rampLimitInValueString, asynParamFloat64, &rampLimitInValue_);
createParam(rampRateOutValueString, asynParamFloat64, &rampRateOutValue_);
createParam(rampRateInValueString, asynParamFloat64, &rampRateInValue_);
createParam(heaterPowerInValueString, asynParamFloat64, &heaterPowerInValue_);
createParam(heatingOutValueString, asynParamInt32, &heatingOutValue_);
......@@ -125,6 +127,16 @@ asynStatus Linkam::readFloat64(asynUser *pasynUser, epicsFloat64 *value)
// Read the temperature from the controller
status = readTemperature(value);
} else if (function == rampLimitInValue_) {
// Read the ramp limit from the controller
status = readRampLimit(value);
} else if (function == rampRateInValue_) {
// Read the ramp rate from the controller
status = readRampRate(value);
} else if (function == heaterPowerInValue_) {
// Read the temperature from the controller
......@@ -153,7 +165,33 @@ asynStatus Linkam::readTemperature(epicsFloat64 *value)
asynPrint(this->pasynUserSelf, ASYN_TRACEIO_DRIVER,
"%s:%s, port %s, value = %lf\n",
driverName, functionName, this->portName, temperatureRbv_);
driverName, functionName, this->portName, *value);
return asynSuccess;
}
asynStatus Linkam::readRampLimit(epicsFloat64 *value)
{
static const char *functionName = "readRampLimit";
*value = GetValue(u32Heater1LimitRW);
asynPrint(this->pasynUserSelf, ASYN_TRACEIO_DRIVER,
"%s:%s, port %s, value = %lf\n",
driverName, functionName, this->portName, *value);
return asynSuccess;
}
asynStatus Linkam::readRampRate(epicsFloat64 *value)
{
static const char *functionName = "readRampRate";
*value = GetValue(u32Heater1RateRW);
asynPrint(this->pasynUserSelf, ASYN_TRACEIO_DRIVER,
"%s:%s, port %s, value = %lf\n",
driverName, functionName, this->portName, *value);
return asynSuccess;
}
......
......@@ -21,7 +21,9 @@ static const char *driverName = "Linkam";
* They are used by asyn clients, including standard asyn device support */
#define temperatureInValueString "TEMPERATURE_IN_VALUE" /* asynFloat64 r/o */
#define rampLimitOutValueString "RAMP_LIMIT_OUT_VALUE" /* asynFloat64 r/w */
#define rampLimitInValueString "RAMP_LIMIT_IN_VALUE" /* asynFloat64 r/o */
#define rampRateOutValueString "RAMP_RATE_OUT_VALUE" /* asynFloat64 r/w */
#define rampRateInValueString "RAMP_RATE_IN_VALUE" /* asynFloat64 r/o */
#define heaterPowerInValueString "HEATER_POWER_IN_VALUE" /* asynFloat64 r/o */
#define heatingOutValueString "HEATING_OUT_VALUE" /* asynInt32 r/w */
......@@ -43,7 +45,9 @@ public:
protected:
int temperatureInValue_;
int rampLimitOutValue_;
int rampLimitInValue_;
int rampRateOutValue_;
int rampRateInValue_;
int heaterPowerInValue_;
int heatingOutValue_;
#define FIRST_LINKAM_PARAM temperatureInValue_;
......@@ -51,6 +55,8 @@ protected:
private:
asynStatus readTemperature(epicsFloat64 *value);
asynStatus readRampLimit(epicsFloat64 *value);
asynStatus readRampRate(epicsFloat64 *value);
asynStatus setRampLimit(epicsFloat64 value);
asynStatus setRampRate(epicsFloat64 value);
asynStatus readHeaterPower(epicsFloat64 *value);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment