Commit f1120168 authored by kpetersn's avatar kpetersn
Browse files

Added lnpSpeed_RBV

parent 605fb10b
......@@ -66,6 +66,8 @@ record(ai, "$(P)$(T):heaterPower_RBV")
field(PINI, "YES")
field(LINR, "NO CONVERSION")
field(PREC, "4")
field(HOPR, 100.0)
field(LOPR, 0.0)
field(EGU, "Watts")
field(SCAN, "Passive")
}
......@@ -104,6 +106,19 @@ record(longout, "$(P)$(T):lnpSpeed")
field(EGU, "%")
}
record(ai, "$(P)$(T):lnpSpeed_RBV")
{
field(DTYP, "asynFloat64")
field(INP, "@asyn($(PORT),$(ADDR))LNP_SPEED_IN_VALUE")
field(PINI, "YES")
field(LINR, "NO CONVERSION")
field(PREC, "4")
field(HOPR, 100)
field(LOPR, 0)
field(EGU, "%")
field(SCAN, "Passive")
}
record(longin, "$(P)$(T):controllerConfig_RBV")
{
field(DTYP, "asynInt32")
......
......@@ -2,4 +2,5 @@ $(P)$(T):rampLimit
$(P)$(T):rampRate
$(P)$(T):heating
$(P)$(T):temperature_RBV.SCAN
$(P)$(T):heaterPower_RBV.SCAN
\ No newline at end of file
$(P)$(T):heaterPower_RBV.SCAN
$(P)$(T):lnpSpeed_RBV.SCAN
......@@ -5,10 +5,10 @@ file {
}
display {
object {
x=378
y=148
x=2310
y=92
width=560
height=310
height=340
}
clr=14
bclr=4
......@@ -336,7 +336,7 @@ composite {
"related display" {
object {
x=445
y=275
y=305
width=100
height=25
}
......@@ -364,7 +364,7 @@ text {
text {
object {
x=15
y=235
y=250
width=200
height=25
}
......@@ -389,7 +389,7 @@ menu {
"text entry" {
object {
x=220
y=235
y=265
width=160
height=25
}
......@@ -401,3 +401,32 @@ menu {
limits {
}
}
"text update" {
object {
x=220
y=235
width=160
height=25
}
monitor {
chan="$(P)$(T):lnpSpeed_RBV"
clr=14
bclr=4
}
format="string"
limits {
}
}
menu {
object {
x=385
y=235
width=160
height=25
}
control {
chan="$(P)$(T):lnpSpeed_RBV.SCAN"
clr=14
bclr=4
}
}
......@@ -4,10 +4,10 @@
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>378</x>
<y>148</y>
<x>2310</x>
<y>92</y>
<width>560</width>
<height>310</height>
<height>340</height>
</rect>
</property>
<property name="styleSheet">
......@@ -857,7 +857,7 @@ border-radius: 2px;
<property name="geometry">
<rect>
<x>445</x>
<y>275</y>
<y>305</y>
<width>100</width>
<height>25</height>
</rect>
......@@ -958,7 +958,7 @@ border-radius: 2px;
<property name="geometry">
<rect>
<x>15</x>
<y>235</y>
<y>250</y>
<width>200</width>
<height>25</height>
</rect>
......@@ -1001,7 +1001,7 @@ border-radius: 2px;
<property name="geometry">
<rect>
<x>220</x>
<y>235</y>
<y>265</y>
<width>160</width>
<height>25</height>
</rect>
......@@ -1048,6 +1048,90 @@ border-radius: 2px;
<enum>decimal</enum>
</property>
</widget>
<widget class="caLineEdit" name="caLineEdit_5">
<property name="geometry">
<rect>
<x>220</x>
<y>235</y>
<width>160</width>
<height>25</height>
</rect>
</property>
<property name="fontScaleMode">
<enum>caLineEdit::WidthAndHeight</enum>
</property>
<property name="channel">
<string>$(P)$(T):lnpSpeed_RBV</string>
</property>
<property name="foreground">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</property>
<property name="background">
<color alpha="255">
<red>187</red>
<green>187</green>
<blue>187</blue>
</color>
</property>
<property name="limitsMode">
<enum>caLineEdit::Channel</enum>
</property>
<property name="limitsMode">
<enum>caLineEdit::Channel</enum>
</property>
<property name="precisionMode">
<enum>caLineEdit::Channel</enum>
</property>
<property name="minValue">
<double>0.0</double>
</property>
<property name="maxValue">
<double>1.0</double>
</property>
<property name="alignment">
<set>Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="formatType">
<enum>string</enum>
</property>
<property name="colorMode">
<enum>caLineEdit::Static</enum>
</property>
</widget>
<widget class="caMenu" name="caMenu_3">
<property name="geometry">
<rect>
<x>385</x>
<y>235</y>
<width>160</width>
<height>25</height>
</rect>
</property>
<property name="channel">
<string>$(P)$(T):lnpSpeed_RBV.SCAN</string>
</property>
<property name="foreground">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</property>
<property name="background">
<color alpha="255">
<red>187</red>
<green>187</green>
<blue>187</blue>
</color>
</property>
<property name="colorMode">
<enum>caMenu::Static</enum>
</property>
</widget>
<zorder>caLabel_0</zorder>
<zorder>caLabel_1</zorder>
<zorder>caLabel_2</zorder>
......@@ -1071,6 +1155,8 @@ border-radius: 2px;
<zorder>caRelatedDisplay_0</zorder>
<zorder>caMenu_2</zorder>
<zorder>caTextEntry_2</zorder>
<zorder>caLineEdit_5</zorder>
<zorder>caMenu_3</zorder>
</widget>
</widget>
</ui>
\ No newline at end of file
......@@ -157,24 +157,29 @@ asynStatus Linkam::readFloat64(asynUser *pasynUser, epicsFloat64 *value)
if (function == temperatureInValue_) {
// Read the temperature from the controller
// Read the temperature from the controller (Celsius)
status = readTemperature(value);
} else if (function == rampLimitInValue_) {
// Read the ramp limit from the controller
// Read the ramp limit from the controller (Celsius)
status = readRampLimit(value);
} else if (function == rampRateInValue_) {
// Read the ramp rate from the controller
// Read the ramp rate from the controller (C/min)
status = readRampRate(value);
} else if (function == heaterPowerInValue_) {
// Read the temperature from the controller
// Read the temperature from the controller (Watts)
status = readHeaterPower(value);
} else if (function == lnpSpeedInValue_) {
// Read the LN Pump speed from the controller (0-100%)
status = readLnpSpeed(value);
} else {
status = asynPortDriver::readFloat64(pasynUser,value);
}
......@@ -245,7 +250,22 @@ asynStatus Linkam::readHeaterPower(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::readLnpSpeed(epicsFloat64 *value)
{
static const char *functionName = "readLnpSpeed";
this->lock();
*value = GetValue(u32Heater1LnpSpeedR);
this->unlock();
asynPrint(this->pasynUserSelf, ASYN_TRACEIO_DRIVER,
"%s:%s, port %s, value = %lf\n",
driverName, functionName, this->portName, *value);
return asynSuccess;
}
......@@ -355,12 +375,12 @@ asynStatus Linkam::writeInt32(asynUser *pasynUser, epicsInt32 value)
} else if (function == lnpModeOutValue_) {
// Set Manual/Auto LNP mode
status = setLnpMode(pasynUser, value);
status = setLnpMode(value);
} else if (function == lnpSpeedOutValue_) {
// Set LN pump speed (0-100%)
status = setLnpSpeed(pasynUser, value);
status = setLnpSpeed(value);
}
......@@ -394,7 +414,7 @@ asynStatus Linkam::setHeating(epicsInt32 value)
return (status) ? asynSuccess : asynError;
}
asynStatus Linkam::setLnpMode(asynUser *pasynUser, epicsInt32 value)
asynStatus Linkam::setLnpMode(epicsInt32 value)
{
bool status;
static const char *functionName = "setLnpMode";
......@@ -412,7 +432,7 @@ asynStatus Linkam::setLnpMode(asynUser *pasynUser, epicsInt32 value)
} else {
status = false;
asynPrint(pasynUser, ASYN_TRACE_ERROR,
asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR,
"%s:%s, port %s, ERROR setting LNP Mode: stageLnpAuto_ = %d\n",
driverName, functionName, this->portName, stageLnpAuto_);
}
......@@ -424,7 +444,7 @@ asynStatus Linkam::setLnpMode(asynUser *pasynUser, epicsInt32 value)
} else {
status = false;
asynPrint(pasynUser, ASYN_TRACE_ERROR,
asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR,
"%s:%s, port %s, ERROR setting LNP Mode: stageLnpManual_ = %d\n",
driverName, functionName, this->portName, stageLnpManual_);
}
......@@ -432,7 +452,7 @@ asynStatus Linkam::setLnpMode(asynUser *pasynUser, epicsInt32 value)
} else {
status = false;
asynPrint(pasynUser, ASYN_TRACE_ERROR,
asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR,
"%s:%s, port %s, ERROR setting LNP Mode: controllerLnpReady_ = %d\n",
driverName, functionName, this->portName, controllerLnpReady_);
}
......@@ -449,7 +469,7 @@ asynStatus Linkam::setLnpMode(asynUser *pasynUser, epicsInt32 value)
return (status) ? asynSuccess : asynError;
}
asynStatus Linkam::setLnpSpeed(asynUser *pasynUser, epicsInt32 value)
asynStatus Linkam::setLnpSpeed(epicsInt32 value)
{
bool status;
static const char *functionName = "setLnpSpeed";
......@@ -465,14 +485,14 @@ asynStatus Linkam::setLnpSpeed(asynUser *pasynUser, epicsInt32 value)
} else {
status = false;
asynPrint(pasynUser, ASYN_TRACE_ERROR,
asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR,
"%s:%s, port %s, ERROR setting LNP Speed: stageLnpManual_ = %d\n",
driverName, functionName, this->portName, stageLnpManual_);
}
} else {
status = false;
asynPrint(pasynUser, ASYN_TRACE_ERROR,
asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR,
"%s:%s, port %s, ERROR setting LNP Speed: controllerLnpReady_ = %d\n",
driverName, functionName, this->portName, controllerLnpReady_);
}
......
......@@ -11,10 +11,11 @@ static const char *driverName = "Linkam";
#define MAX_CONTROLLERS 1
// eVALUETYPE Enumeration
#define u32Heater1TempR 0
#define u32Heater1RateRW 1
#define u32Heater1LimitRW 2
#define u32Heater1PowerR 3
#define u32Heater1TempR 0
#define u32Heater1RateRW 1
#define u32Heater1LimitRW 2
#define u32Heater1PowerR 3
#define u32Heater1LnpSpeedR 4
// eSTAGECONFIG Enumeration
#define u64StandardStage 0
......@@ -53,6 +54,7 @@ static const char *driverName = "Linkam";
#define heatingOutValueString "HEATING_OUT_VALUE" /* asynInt32 r/w */
#define lnpModeOutValueString "LNP_MODE_OUT_VALUE" /* asynInt32 r/w */
#define lnpSpeedOutValueString "LNP_SPEED_OUT_VALUE" /* asynInt32 r/w */
#define lnpSpeedInValueString "LNP_SPEED_IN_VALUE" /* asynInt32 r/o */
#define controllerConfigInValueString "CONTROLLER_CONFIG_IN_VALUE" /* asynInt32 r/o */
#define controllerErrorInValueString "CONTROLLER_ERROR_IN_VALUE" /* asynInt32 r/o */
#define controllerStatusInValueString "CONTROLLER_STATUS_IN_VALUE" /* asynInt32 r/o */
......@@ -84,6 +86,7 @@ protected:
int heatingOutValue_;
int lnpModeOutValue_;
int lnpSpeedOutValue_;
int lnpSpeedInValue_;
int controllerConfigInValue_;
int controllerErrorInValue_;
int controllerStatusInValue_;
......@@ -99,8 +102,9 @@ private:
asynStatus setRampRate(epicsFloat64 value);
asynStatus readHeaterPower(epicsFloat64 *value);
asynStatus setHeating(epicsInt32 value);
asynStatus setLnpMode(asynUser *pasynUser, epicsInt32 value);
asynStatus setLnpSpeed(asynUser *pasynUser, epicsInt32 value);
asynStatus setLnpMode(epicsInt32 value);
asynStatus setLnpSpeed(epicsInt32 value);
asynStatus readLnpSpeed(epicsFloat64 *value);
asynStatus readControllerConfig();
asynStatus readControllerError();
asynStatus readControllerStatus();
......
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