Commit 0fec516d authored by Ezekiel Dohmen's avatar Ezekiel Dohmen
Browse files

Merge branch '327_duotone_calc_fix' into 'branch-4.2'

Update duotone time to higher resolution

See merge request !412
parents c377b368 5e1c1d9c
......@@ -374,7 +374,7 @@ text {
height=15
}
monitor {
chan="SITE_NAME:SYSTEM_NAME-DCU_NODE_ID_DUOTONE_TIME"
chan="SITE_NAME:SYSTEM_NAME-DCU_NODE_ID_DUOTONE_TIME_FLOAT"
clr=35
bclr=14
}
......
......@@ -343,7 +343,7 @@ text {
height=15
}
monitor {
chan="SITE_NAME:SYSTEM_NAME-DCU_NODE_ID_DUOTONE_TIME"
chan="SITE_NAME:SYSTEM_NAME-DCU_NODE_ID_DUOTONE_TIME_FLOAT"
clr=35
bclr=14
}
......@@ -1479,7 +1479,7 @@ rectangle {
}
"dynamic attribute" {
clr="alarm"
chan="SITE_NAME:SYSTEM_NAME-DCU_NODE_ID_DUOTONE_TIME"
chan="SITE_NAME:SYSTEM_NAME-DCU_NODE_ID_DUOTONE_TIME_FLOAT"
}
}
"text update" {
......
......@@ -5930,7 +5930,7 @@ text {
height=17
}
monitor {
chan="X2:FEC-110_DUOTONE_TIME"
chan="X2:FEC-110_DUOTONE_TIME_FLOAT"
clr=0
bclr=14
}
......
......@@ -1387,6 +1387,7 @@ if($iopModel > -1)
print OUTH "\tint dacDtTime;\n";
print OUTH "\tint irigbTime;\n";
print EPICS "OUTVARIABLE FEC\_$dcuId\_DUOTONE_TIME epicsOutput.dtTime int ao 0\n";
print EPICS "OUTVARIABLE FEC\_$dcuId\_DUOTONE_TIME_DAC epicsOutput.dacDtTime int ao 0\n";
$irighihi = 15 + 9;
$irighigh = 15 + 3;
......@@ -1443,6 +1444,16 @@ print EPICS "OUTVARIABLE FEC\_$dcuId\_START_GPS epicsOutput.startgpstime int ao
print OUTH "\tint fe_status;\n";
print EPICS "OUTVARIABLE FEC\_$dcuId\_FE_STATUS epicsOutput.fe_status int ao 0\n";
if($iopModel > -1)
{
# floating point version of DUOTONE_DacKillTime
# down here because doubles need to be at end.
print OUTH "\tdouble dtTimeFloat;\n";
print EPICS "OUTVARIABLE FEC\_$dcuId\_DUOTONE_TIME_FLOAT epicsOutput.dtTimeFloat double ao 0 field(PREC, \"3\")\n";
}
print EPICS "DUMMY FEC\_$dcuId\_UPTIME_DAY int ao 0\n";
print EPICS "DUMMY FEC\_$dcuId\_UPTIME_HOUR int ao 0\n";
print EPICS "DUMMY FEC\_$dcuId\_UPTIME_MINUTE int ao 0\n";
......
......@@ -279,7 +279,7 @@ sub createGdsMedm
$medmdata .= ("CDS::medmGen::medmGenText") -> ($xpos,$ypos,$width,$height,"DT/TIME 0",$ecolors{black});
# Add ADC Duotone Monitor
$xpos = 75; $ypos = 268; $width = 35; $height = 15;
$medmdata .= ("CDS::medmGen::medmGenTextMon") -> ($xpos,$ypos,$width,$height,"$ifo\:FEC-$dcuid\_DUOTONE_TIME",$ecolors{white},$ecolors{black},"alarm");
$medmdata .= ("CDS::medmGen::medmGenTextMon") -> ($xpos,$ypos,$width,$height,"$ifo\:FEC-$dcuid\_DUOTONE_TIME_FLOAT",$ecolors{white},$ecolors{black},"alarm");
# Add IRIG-B Monitor
$xpos = 115; $ypos = 268; $width = 35; $height = 15;
$medmdata .= ("CDS::medmGen::medmGenTextMon") -> ($xpos,$ypos,$width,$height,"$ifo\:FEC-$dcuid\_IRIGB_TIME",$ecolors{white},$ecolors{black},"alarm");
......
......@@ -768,7 +768,9 @@ fe_start_controller( void* arg )
{
duotoneTime =
duotime( DT_SAMPLE_CNT, dt_diag.meanAdc, dt_diag.adc );
pLocalEpics->epicsOutput.dtTime = duotoneTime;
pLocalEpics->epicsOutput.dtTimeFloat = (double)duotoneTime;
pLocalEpics->epicsOutput.dtTime = (int)duotoneTime;
if ( ( ( duotoneTime < MIN_DT_DIAG_VAL ) ||
( duotoneTime > MAX_DT_DIAG_VAL ) ) )
feStatus |= FE_ERROR_TIMING;
......
......@@ -224,7 +224,7 @@ char fp[ 64 * 1024 ];
#define DT_SAMPLE_OFFSET 6
#define DT_SAMPLE_CNT 12
#define MAX_DT_DIAG_VAL 6
#define MIN_DT_DIAG_VAL 5
#define MIN_DT_DIAG_VAL 4
// HOUSEKEEPING CYCLE DEFS
// 1Hz Jobs triggered by cycleNum count in controller code
......
Supports Markdown
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