Commit 12161cc9 authored by Claes Sjofors's avatar Claes Sjofors

Ssab IO ao, write every scan

parent 68dcd0c1
......@@ -70,7 +70,6 @@ typedef struct {
int Qbus_fp;
pwr_tFloat32 OldValue[IO_MAXCHAN];
pwr_tBoolean OldTestOn[IO_MAXCHAN];
int WriteFirst;
unsigned int ErrReset;
unsigned int ErrScanCnt;
} io_sLocal;
......@@ -136,8 +135,6 @@ static pwr_tStatus IoCardInit(
errh_Info("Init of ao card '%s'", cp->Name);
/* Write the first 50 loops */
local->WriteFirst = 50;
cp->Local = local;
/* Caluclate polycoeff */
......@@ -205,9 +202,6 @@ static pwr_tStatus IoCardWrite(
cop = (pwr_sClass_ChanAo*)chanp->cop;
sop = (pwr_sClass_Ao*)chanp->sop;
if (!feqf(*(pwr_tFloat32*)chanp->vbp, local->OldValue[i])
|| local->WriteFirst > 0 || cop->CalculateNewCoef || fixout
|| cop->TestOn || local->OldTestOn[i] != cop->TestOn) {
if (fixout)
value = cop->FixedOutValue;
else if (cop->TestOn)
......@@ -263,12 +257,10 @@ static pwr_tStatus IoCardWrite(
continue;
} else
local->OldValue[i] = value;
}
local->OldTestOn[i] = cop->TestOn;
chanp++;
}
if (local->WriteFirst)
local->WriteFirst--;
/* Fix for qbus errors */
local->ErrScanCnt++;
......
......@@ -69,7 +69,6 @@ typedef struct {
unsigned int bfb_item;
pwr_tFloat32 OldValue[IO_MAXCHAN];
pwr_tBoolean OldTestOn[IO_MAXCHAN];
int WriteFirst;
unsigned int ErrReset;
unsigned int ErrScanCnt;
int FirstScan;
......@@ -139,8 +138,6 @@ static pwr_tStatus IoCardInit(
errh_Info("Init of ao card '%s'", cp->Name);
/* Write the first 50 loops */
local->WriteFirst = 50;
cp->Local = local;
/* Caluclate polycoeff */
......@@ -254,9 +251,6 @@ static pwr_tStatus IoCardWrite(
}
/* Convert and write */
if (!feqf(*(pwr_tFloat32*)chanp->vbp, local->OldValue[i])
|| local->WriteFirst > 0 || cop->CalculateNewCoef || fixout
|| cop->TestOn || local->OldTestOn[i] != cop->TestOn) {
if (fixout)
value = cop->FixedOutValue;
else if (cop->TestOn)
......@@ -321,12 +315,10 @@ static pwr_tStatus IoCardWrite(
continue;
} else
local->OldValue[i] = value;
}
local->OldTestOn[i] = cop->TestOn;
chanp++;
}
if (local->WriteFirst)
local->WriteFirst--;
if (local->FirstScan)
local->FirstScan = 0;
......
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