Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
961dd9ac
Commit
961dd9ac
authored
Sep 22, 2016
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PSS9000 error count incrementation modified
parent
1389cbf7
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
231 additions
and
203 deletions
+231
-203
ssabox/lib/rt/src/os_linux/rt_io_m_ai_ai32up.c
ssabox/lib/rt/src/os_linux/rt_io_m_ai_ai32up.c
+16
-12
ssabox/lib/rt/src/os_linux/rt_io_m_ai_hvai32.c
ssabox/lib/rt/src/os_linux/rt_io_m_ai_hvai32.c
+16
-11
ssabox/lib/rt/src/os_linux/rt_io_m_ao_hvao4.c
ssabox/lib/rt/src/os_linux/rt_io_m_ao_hvao4.c
+16
-12
ssabox/lib/rt/src/os_linux/rt_io_m_co_pi24bo.c
ssabox/lib/rt/src/os_linux/rt_io_m_co_pi24bo.c
+16
-12
ssabox/lib/rt/src/os_linux/rt_io_m_di_dix2.c
ssabox/lib/rt/src/os_linux/rt_io_m_di_dix2.c
+16
-12
ssabox/lib/rt/src/os_linux/rt_io_m_do_hvdo32.c
ssabox/lib/rt/src/os_linux/rt_io_m_do_hvdo32.c
+16
-12
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_aiup.c
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_aiup.c
+16
-12
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_aoup.c
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_aoup.c
+16
-12
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_co.c
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_co.c
+16
-12
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_di.c
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_di.c
+16
-12
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_do.c
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_do.c
+16
-13
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_mioup.c
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_mioup.c
+38
-38
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_pidup.c
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_pidup.c
+17
-33
No files found.
ssabox/lib/rt/src/os_linux/rt_io_m_ai_ai32up.c
View file @
961dd9ac
...
...
@@ -76,7 +76,8 @@ typedef struct {
int
Qbus_fp
;
unsigned
int
bfb_item
;
int
ScanCount
[
IO_MAXCHAN
];
pwr_tTime
ErrTime
;
unsigned
int
ErrReset
;
unsigned
int
ErrScanCnt
;
}
io_sLocal
;
static
pwr_tStatus
AiRangeToCoef
(
...
...
@@ -155,6 +156,10 @@ static pwr_tStatus IoCardInit (
chanp
++
;
}
local
->
ErrReset
=
1
.
0
/
ctx
->
ScanTime
+
0
.
5
;
if
(
local
->
ErrReset
<
2
)
local
->
ErrReset
=
2
;
return
1
;
}
...
...
@@ -202,7 +207,6 @@ static pwr_tStatus IoCardRead (
int
sts
;
qbus_io_read
rb
;
int
bfb_error
=
0
;
pwr_tTime
now
;
local
=
(
io_sLocal
*
)
cp
->
Local
;
op
=
(
pwr_sClass_Ai_AI32uP
*
)
cp
->
op
;
...
...
@@ -290,16 +294,7 @@ static pwr_tStatus IoCardRead (
}
#endif
/* Increase error count and check error limits */
time_GetTime
(
&
now
);
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
{
/* Ignore if some time has expired */
if
(
now
.
tv_sec
-
local
->
ErrTime
.
tv_sec
<
600
)
op
->
ErrorCount
++
;
}
else
op
->
ErrorCount
++
;
local
->
ErrTime
=
now
;
if
(
op
->
ErrorCount
==
op
->
ErrorSoftLimit
)
{
errh_Error
(
"IO Error soft limit reached on card '%s'"
,
cp
->
Name
);
...
...
@@ -346,6 +341,15 @@ static pwr_tStatus IoCardRead (
}
chanp
++
;
}
/* Fix for qbus errors */
local
->
ErrScanCnt
++
;
if
(
local
->
ErrScanCnt
>=
local
->
ErrReset
)
{
local
->
ErrScanCnt
=
0
;
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
op
->
ErrorCount
--
;
}
return
1
;
}
...
...
ssabox/lib/rt/src/os_linux/rt_io_m_ai_hvai32.c
View file @
961dd9ac
...
...
@@ -76,7 +76,8 @@ typedef struct {
unsigned
int
Address
;
int
Qbus_fp
;
int
ScanCount
[
IO_MAXCHAN
];
pwr_tTime
ErrTime
;
unsigned
int
ErrReset
;
unsigned
int
ErrScanCnt
;
}
io_sLocal
;
static
pwr_tStatus
AiRangeToCoef
(
...
...
@@ -151,6 +152,11 @@ static pwr_tStatus IoCardInit (
AiRangeToCoef
(
chanp
);
chanp
++
;
}
local
->
ErrReset
=
1
.
0
/
ctx
->
ScanTime
+
0
.
5
;
if
(
local
->
ErrReset
<
2
)
local
->
ErrReset
=
2
;
return
1
;
}
...
...
@@ -198,7 +204,6 @@ static pwr_tStatus IoCardRead (
qbus_io_read
rb
;
qbus_io_write
wb
;
int
timeout
;
pwr_tTime
now
;
local
=
(
io_sLocal
*
)
cp
->
Local
;
op
=
(
pwr_sClass_Ai_HVAI32
*
)
cp
->
op
;
...
...
@@ -261,16 +266,7 @@ static pwr_tStatus IoCardRead (
}
#endif
/* Increase error count and check error limits */
time_GetTime
(
&
now
);
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
{
/* Ignore if some time has expired */
if
(
now
.
tv_sec
-
local
->
ErrTime
.
tv_sec
<
600
)
op
->
ErrorCount
++
;
}
else
op
->
ErrorCount
++
;
local
->
ErrTime
=
now
;
if
(
op
->
ErrorCount
==
op
->
ErrorSoftLimit
)
{
errh_Error
(
"IO Error soft limit reached on card '%s'"
,
cp
->
Name
);
...
...
@@ -325,6 +321,15 @@ static pwr_tStatus IoCardRead (
}
chanp
++
;
}
/* Fix for qbus errors */
local
->
ErrScanCnt
++
;
if
(
local
->
ErrScanCnt
>=
local
->
ErrReset
)
{
local
->
ErrScanCnt
=
0
;
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
op
->
ErrorCount
--
;
}
return
1
;
}
...
...
ssabox/lib/rt/src/os_linux/rt_io_m_ao_hvao4.c
View file @
961dd9ac
...
...
@@ -77,7 +77,8 @@ typedef struct {
pwr_tFloat32
OldValue
[
IO_MAXCHAN
];
pwr_tBoolean
OldTestOn
[
IO_MAXCHAN
];
int
WriteFirst
;
pwr_tTime
ErrTime
;
unsigned
int
ErrReset
;
unsigned
int
ErrScanCnt
;
}
io_sLocal
;
static
pwr_tStatus
AoRangeToCoef
(
...
...
@@ -163,6 +164,10 @@ static pwr_tStatus IoCardInit (
chanp
++
;
}
local
->
ErrReset
=
1
.
0
/
ctx
->
ScanTime
+
0
.
5
;
if
(
local
->
ErrReset
<
2
)
local
->
ErrReset
=
2
;
return
1
;
}
...
...
@@ -212,7 +217,6 @@ static pwr_tStatus IoCardWrite (
pwr_tFloat32
rawvalue
;
qbus_io_write
wb
;
int
sts
;
pwr_tTime
now
;
local
=
(
io_sLocal
*
)
cp
->
Local
;
op
=
(
pwr_sClass_Ao_HVAO4
*
)
cp
->
op
;
...
...
@@ -287,16 +291,7 @@ static pwr_tStatus IoCardWrite (
}
#endif
/* Increase error count and check error limits */
time_GetTime
(
&
now
);
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
{
/* Ignore if some time has expired */
if
(
now
.
tv_sec
-
local
->
ErrTime
.
tv_sec
<
600
)
op
->
ErrorCount
++
;
}
else
op
->
ErrorCount
++
;
local
->
ErrTime
=
now
;
if
(
op
->
ErrorCount
==
op
->
ErrorSoftLimit
)
{
errh_Error
(
"IO Error soft limit reached on card '%s'"
,
cp
->
Name
);
...
...
@@ -322,6 +317,15 @@ static pwr_tStatus IoCardWrite (
}
if
(
local
->
WriteFirst
)
local
->
WriteFirst
--
;
/* Fix for qbus errors */
local
->
ErrScanCnt
++
;
if
(
local
->
ErrScanCnt
>=
local
->
ErrReset
)
{
local
->
ErrScanCnt
=
0
;
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
op
->
ErrorCount
--
;
}
return
1
;
}
...
...
ssabox/lib/rt/src/os_linux/rt_io_m_co_pi24bo.c
View file @
961dd9ac
...
...
@@ -81,7 +81,8 @@ typedef struct {
unsigned
int
bfb_item
;
pwr_tInt32
OldValue
[
IO_MAXCHAN
];
int
FirstScan
[
IO_MAXCHAN
];
pwr_tTime
ErrTime
;
unsigned
int
ErrReset
;
unsigned
int
ErrScanCnt
;
}
io_sLocal
;
static
pwr_tStatus
IoCardInit
(
...
...
@@ -175,6 +176,10 @@ static pwr_tStatus IoCardInit (
}
local
->
ErrReset
=
1
.
0
/
ctx
->
ScanTime
+
0
.
5
;
if
(
local
->
ErrReset
<
2
)
local
->
ErrReset
=
2
;
return
1
;
}
...
...
@@ -223,7 +228,6 @@ static pwr_tStatus IoCardRead (
qbus_io_read
rb
;
qbus_io_write
wb
;
io_sRackLocal
*
r_local
=
(
io_sRackLocal
*
)(
rp
->
Local
);
pwr_tTime
now
;
local
=
(
io_sLocal
*
)
cp
->
Local
;
op
=
(
pwr_sClass_Co_PI24BO
*
)
cp
->
op
;
...
...
@@ -346,16 +350,7 @@ static pwr_tStatus IoCardRead (
if
(
sts1
==
-
1
||
sts2
==
-
1
)
{
/* Increase error count and check error limits */
time_GetTime
(
&
now
);
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
{
/* Ignore if some time has expired */
if
(
now
.
tv_sec
-
local
->
ErrTime
.
tv_sec
<
600
)
op
->
ErrorCount
++
;
}
else
op
->
ErrorCount
++
;
local
->
ErrTime
=
now
;
if
(
op
->
ErrorCount
==
op
->
ErrorSoftLimit
)
{
errh_Error
(
"IO Error soft limit reached on card '%s'"
,
cp
->
Name
);
...
...
@@ -446,6 +441,15 @@ static pwr_tStatus IoCardRead (
}
local
->
FirstScan
[
i
]
=
0
;
}
/* Fix for qbus errors */
local
->
ErrScanCnt
++
;
if
(
local
->
ErrScanCnt
>=
local
->
ErrReset
)
{
local
->
ErrScanCnt
=
0
;
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
op
->
ErrorCount
--
;
}
return
1
;
}
...
...
ssabox/lib/rt/src/os_linux/rt_io_m_di_dix2.c
View file @
961dd9ac
...
...
@@ -78,7 +78,8 @@ typedef struct {
void
*
Data
[
16
];
pwr_tBoolean
Found
;
}
Filter
[
2
];
pwr_tTime
ErrTime
;
unsigned
int
ErrReset
;
unsigned
int
ErrScanCnt
;
}
io_sLocal
;
static
pwr_tStatus
IoCardInit
(
...
...
@@ -114,6 +115,10 @@ static pwr_tStatus IoCardInit (
local
->
Filter
[
i
].
Data
,
ctx
->
ScanTime
);
}
local
->
ErrReset
=
1
.
0
/
ctx
->
ScanTime
+
0
.
5
;
if
(
local
->
ErrReset
<
2
)
local
->
ErrReset
=
2
;
return
1
;
}
...
...
@@ -169,7 +174,6 @@ static pwr_tStatus IoCardRead (
int
sts
;
qbus_io_read
rb
;
int
bfb_error
=
0
;
pwr_tTime
now
;
pwr_sClass_Di_DIX2
*
op
=
(
pwr_sClass_Di_DIX2
*
)
cp
->
op
;
int
words
=
op
->
MaxNoOfChannels
<=
16
?
1
:
2
;
...
...
@@ -238,16 +242,7 @@ static pwr_tStatus IoCardRead (
if
(
sts
<=
0
)
{
/* Increase error count and check error limits */
time_GetTime
(
&
now
);
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
{
/* Ignore if some time has expired */
if
(
now
.
tv_sec
-
local
->
ErrTime
.
tv_sec
<
600
)
op
->
ErrorCount
++
;
}
else
op
->
ErrorCount
++
;
local
->
ErrTime
=
now
;
if
(
op
->
ErrorCount
==
op
->
ErrorSoftLimit
)
errh_Error
(
"IO Error soft limit reached on card '%s'"
,
cp
->
Name
);
...
...
@@ -270,6 +265,15 @@ static pwr_tStatus IoCardRead (
/* Move data to valuebase */
io_DiUnpackWord
(
cp
,
data
,
convmask
,
i
);
}
/* Fix for qbus errors */
local
->
ErrScanCnt
++
;
if
(
local
->
ErrScanCnt
>=
local
->
ErrReset
)
{
local
->
ErrScanCnt
=
0
;
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
op
->
ErrorCount
--
;
}
return
1
;
}
...
...
ssabox/lib/rt/src/os_linux/rt_io_m_do_hvdo32.c
View file @
961dd9ac
...
...
@@ -76,7 +76,8 @@ typedef struct {
void
*
Data
[
16
];
pwr_tBoolean
Found
;
}
Filter
[
2
];
pwr_tTime
ErrTime
;
unsigned
int
ErrReset
;
unsigned
int
ErrScanCnt
;
}
io_sLocal
;
static
pwr_tStatus
IoCardInit
(
...
...
@@ -114,6 +115,10 @@ static pwr_tStatus IoCardInit (
local
->
Filter
[
i
].
Data
,
ctx
->
ScanTime
);
}
local
->
ErrReset
=
1
.
0
/
ctx
->
ScanTime
+
0
.
5
;
if
(
local
->
ErrReset
<
2
)
local
->
ErrReset
=
2
;
return
1
;
}
...
...
@@ -167,7 +172,6 @@ static pwr_tStatus IoCardWrite (
int
i
;
qbus_io_write
wb
;
int
sts
;
pwr_tTime
now
;
pwr_sClass_Do_HVDO32
*
op
=
(
pwr_sClass_Do_HVDO32
*
)
cp
->
op
;
int
words
=
op
->
MaxNoOfChannels
<=
16
?
1
:
2
;
...
...
@@ -246,16 +250,7 @@ static pwr_tStatus IoCardWrite (
}
#endif
/* Increase error count and check error limits */
time_GetTime
(
&
now
);
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
{
/* Ignore if some time has expired */
if
(
now
.
tv_sec
-
local
->
ErrTime
.
tv_sec
<
600
)
op
->
ErrorCount
++
;
}
else
op
->
ErrorCount
++
;
local
->
ErrTime
=
now
;
if
(
op
->
ErrorCount
==
op
->
ErrorSoftLimit
)
{
errh_Error
(
"IO Error soft limit reached on card '%s'"
,
cp
->
Name
);
...
...
@@ -273,6 +268,15 @@ static pwr_tStatus IoCardWrite (
continue
;
}
}
/* Fix for qbus errors */
local
->
ErrScanCnt
++
;
if
(
local
->
ErrScanCnt
>=
local
->
ErrReset
)
{
local
->
ErrScanCnt
=
0
;
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
op
->
ErrorCount
--
;
}
return
1
;
}
...
...
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_aiup.c
View file @
961dd9ac
...
...
@@ -73,7 +73,8 @@ typedef struct {
unsigned
int
Address
;
int
Qbus_fp
;
int
ScanCount
[
IO_MAXCHAN
];
pwr_tTime
ErrTime
;
unsigned
int
ErrReset
;
unsigned
int
ErrScanCnt
;
}
io_sLocal
;
static
pwr_tStatus
AiRangeToCoef
(
...
...
@@ -150,6 +151,10 @@ static pwr_tStatus IoCardInit (
chanp
++
;
}
local
->
ErrReset
=
1
.
0
/
ctx
->
ScanTime
+
0
.
5
;
if
(
local
->
ErrReset
<
2
)
local
->
ErrReset
=
2
;
return
1
;
}
...
...
@@ -197,7 +202,6 @@ static pwr_tStatus IoCardRead (
int
sts
;
qbus_io_read
rb
;
int
bfb_error
=
0
;
pwr_tTime
now
;
local
=
(
io_sLocal
*
)
cp
->
Local
;
op
=
(
pwr_sClass_Ssab_BaseACard
*
)
cp
->
op
;
...
...
@@ -286,16 +290,7 @@ static pwr_tStatus IoCardRead (
}
#endif
/* Increase error count and check error limits */
time_GetTime
(
&
now
);
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
{
/* Ignore if some time has expired */
if
(
now
.
tv_sec
-
local
->
ErrTime
.
tv_sec
<
600
)
op
->
ErrorCount
++
;
}
else
op
->
ErrorCount
++
;
local
->
ErrTime
=
now
;
if
(
op
->
ErrorCount
==
op
->
ErrorSoftLimit
)
{
errh_Error
(
"IO Error soft limit reached on card '%s'"
,
cp
->
Name
);
...
...
@@ -345,6 +340,15 @@ static pwr_tStatus IoCardRead (
}
chanp
++
;
}
/* Fix for qbus errors */
local
->
ErrScanCnt
++
;
if
(
local
->
ErrScanCnt
>=
local
->
ErrReset
)
{
local
->
ErrScanCnt
=
0
;
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
op
->
ErrorCount
--
;
}
return
1
;
}
...
...
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_aoup.c
View file @
961dd9ac
...
...
@@ -76,7 +76,8 @@ typedef struct {
pwr_tFloat32
OldValue
[
IO_MAXCHAN
];
pwr_tBoolean
OldTestOn
[
IO_MAXCHAN
];
int
WriteFirst
;
pwr_tTime
ErrTime
;
unsigned
int
ErrReset
;
unsigned
int
ErrScanCnt
;
int
FirstScan
;
pwr_tBoolean
CheckWrite
[
IO_MAXCHAN
];
}
io_sLocal
;
...
...
@@ -167,6 +168,10 @@ static pwr_tStatus IoCardInit (
chanp
++
;
}
local
->
ErrReset
=
1
.
0
/
ctx
->
ScanTime
+
0
.
5
;
if
(
local
->
ErrReset
<
2
)
local
->
ErrReset
=
2
;
return
1
;
}
...
...
@@ -216,7 +221,6 @@ static pwr_tStatus IoCardWrite (
pwr_tFloat32
rawvalue
;
qbus_io_write
wb
;
int
sts
;
pwr_tTime
now
;
int
bfb_error
=
0
;
pwr_sClass_Ssab_RemoteRack
*
rrp
;
int
remote
;
...
...
@@ -339,16 +343,7 @@ static pwr_tStatus IoCardWrite (
}
#endif
/* Increase error count and check error limits */
time_GetTime
(
&
now
);
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
{
/* Ignore if some time has expired */
if
(
now
.
tv_sec
-
local
->
ErrTime
.
tv_sec
<
600
)
op
->
ErrorCount
++
;
}
else
op
->
ErrorCount
++
;
local
->
ErrTime
=
now
;
if
(
op
->
ErrorCount
==
op
->
ErrorSoftLimit
)
{
errh_Error
(
"IO Error soft limit reached on card '%s'"
,
cp
->
Name
);
...
...
@@ -376,6 +371,15 @@ static pwr_tStatus IoCardWrite (
local
->
WriteFirst
--
;
if
(
local
->
FirstScan
)
local
->
FirstScan
=
0
;
/* Fix for qbus errors */
local
->
ErrScanCnt
++
;
if
(
local
->
ErrScanCnt
>=
local
->
ErrReset
)
{
local
->
ErrScanCnt
=
0
;
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
op
->
ErrorCount
--
;
}
return
1
;
}
...
...
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_co.c
View file @
961dd9ac
...
...
@@ -78,7 +78,8 @@ typedef struct {
int
Qbus_fp
;
pwr_tInt32
OldValue
[
IO_MAXCHAN
];
int
FirstScan
[
IO_MAXCHAN
];
pwr_tTime
ErrTime
;
unsigned
int
ErrReset
;
unsigned
int
ErrScanCnt
;
}
io_sLocal
;
static
pwr_tStatus
IoCardInit
(
...
...
@@ -172,6 +173,10 @@ static pwr_tStatus IoCardInit (
}
local
->
ErrReset
=
1
.
0
/
ctx
->
ScanTime
+
0
.
5
;
if
(
local
->
ErrReset
<
2
)
local
->
ErrReset
=
2
;
return
1
;
}
...
...
@@ -220,7 +225,6 @@ static pwr_tStatus IoCardRead (
qbus_io_read
rb
;
qbus_io_write
wb
;
io_sRackLocal
*
r_local
=
(
io_sRackLocal
*
)(
rp
->
Local
);
pwr_tTime
now
;
local
=
(
io_sLocal
*
)
cp
->
Local
;
op
=
(
pwr_sClass_Ssab_CO4uP
*
)
cp
->
op
;
...
...
@@ -334,16 +338,7 @@ static pwr_tStatus IoCardRead (
#endif
/* Increase error count and check error limits */
time_GetTime
(
&
now
);
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
{
/* Ignore if some time has expired */
if
(
now
.
tv_sec
-
local
->
ErrTime
.
tv_sec
<
600
)
op
->
ErrorCount
++
;
}
else
op
->
ErrorCount
++
;
local
->
ErrTime
=
now
;
if
(
op
->
ErrorCount
==
op
->
ErrorSoftLimit
)
{
errh_Error
(
"IO Error soft limit reached on card '%s'"
,
cp
->
Name
);
...
...
@@ -434,6 +429,15 @@ static pwr_tStatus IoCardRead (
}
local
->
FirstScan
[
i
]
=
0
;
}
/* Fix for qbus errors */
local
->
ErrScanCnt
++
;
if
(
local
->
ErrScanCnt
>=
local
->
ErrReset
)
{
local
->
ErrScanCnt
=
0
;
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
op
->
ErrorCount
--
;
}
return
1
;
}
...
...
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_di.c
View file @
961dd9ac
...
...
@@ -76,7 +76,8 @@ typedef struct {
void
*
Data
[
16
];
pwr_tBoolean
Found
;
}
Filter
[
2
];
pwr_tTime
ErrTime
;
unsigned
int
ErrReset
;
unsigned
int
ErrScanCnt
;
}
io_sLocal
;
static
pwr_tStatus
IoCardInit
(
...
...
@@ -110,6 +111,10 @@ static pwr_tStatus IoCardInit (
local
->
Filter
[
i
].
Data
,
ctx
->
ScanTime
);
}
local
->
ErrReset
=
1
.
0
/
ctx
->
ScanTime
+
0
.
5
;
if
(
local
->
ErrReset
<
2
)
local
->
ErrReset
=
2
;
return
1
;
}
...
...
@@ -164,7 +169,6 @@ static pwr_tStatus IoCardRead (
int
sts
;
qbus_io_read
rb
;
int
bfb_error
=
0
;
pwr_tTime
now
;
local
=
(
io_sLocal
*
)
cp
->
Local
;
op
=
(
pwr_sClass_Ssab_BaseDiCard
*
)
cp
->
op
;
...
...
@@ -236,16 +240,7 @@ static pwr_tStatus IoCardRead (
/* Error handling for local Qbus-I/O */
{
/* Increase error count and check error limits */
time_GetTime
(
&
now
);
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
{
/* Ignore if some time has expired */
if
(
now
.
tv_sec
-
local
->
ErrTime
.
tv_sec
<
600
)
op
->
ErrorCount
++
;
}
else
op
->
ErrorCount
++
;
local
->
ErrTime
=
now
;
if
(
op
->
ErrorCount
==
op
->
ErrorSoftLimit
)
{
errh_Error
(
"IO Error soft limit reached on card '%s'"
,
cp
->
Name
);
...
...
@@ -273,6 +268,15 @@ static pwr_tStatus IoCardRead (
/* Move data to valuebase */
io_DiUnpackWord
(
cp
,
data
,
convmask
,
i
);
}
/* Fix for qbus errors */
local
->
ErrScanCnt
++
;
if
(
local
->
ErrScanCnt
>=
local
->
ErrReset
)
{
local
->
ErrScanCnt
=
0
;
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
op
->
ErrorCount
--
;
}
return
1
;
}
...
...
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_do.c
View file @
961dd9ac
...
...
@@ -77,7 +77,8 @@ typedef struct {
void
*
Data
[
16
];
pwr_tBoolean
Found
;
}
Filter
[
2
];
pwr_tTime
ErrTime
;
unsigned
int
ErrReset
;
unsigned
int
ErrScanCnt
;
int
FirstScan
;
}
io_sLocal
;
...
...
@@ -116,6 +117,10 @@ static pwr_tStatus IoCardInit (
local
->
Filter
[
i
].
Data
,
ctx
->
ScanTime
);
}
local
->
ErrReset
=
1
.
0
/
ctx
->
ScanTime
+
0
.
5
;
if
(
local
->
ErrReset
<
2
)
local
->
ErrReset
=
2
;
return
1
;
}
...
...
@@ -168,7 +173,6 @@ static pwr_tStatus IoCardWrite (
int
i
;
qbus_io_write
wb
;
int
sts
;
pwr_tTime
now
;
int
bfb_error
=
0
;
pwr_sClass_Ssab_RemoteRack
*
rrp
;
...
...
@@ -274,17 +278,7 @@ static pwr_tStatus IoCardWrite (
if
(
sts
==
-
1
)
{
/* Increase error count and check error limits */
time_GetTime
(
&
now
);
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
{
/* Ignore if some time has expired */
if
(
now
.
tv_sec
-
local
->
ErrTime
.
tv_sec
<
600
)
op
->
ErrorCount
++
;
}
else
op
->
ErrorCount
++
;
local
->
ErrTime
=
now
;
if
(
op
->
ErrorCount
==
op
->
ErrorSoftLimit
)
{
errh_Error
(
"IO Error soft limit reached on card '%s'"
,
cp
->
Name
);
...
...
@@ -304,6 +298,15 @@ static pwr_tStatus IoCardWrite (
}
if
(
local
->
FirstScan
)
local
->
FirstScan
=
0
;
/* Fix for qbus errors */
local
->
ErrScanCnt
++
;
if
(
local
->
ErrScanCnt
>=
local
->
ErrReset
)
{
local
->
ErrScanCnt
=
0
;
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
op
->
ErrorCount
--
;
}
return
1
;
}
...
...
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_mioup.c
View file @
961dd9ac
/*
* Proview $Id$
* Copyright (C) 2005 SSAB Oxelsund AB.
* Proview Open Source Process Control.
* Copyright (C) 2005-2016 SSAB EMEA AB.
*
* This file is part of Proview.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
...
...
@@ -13,8 +15,23 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* along with Proview. If not, see <http://www.gnu.org/licenses/>
*
* Linking Proview statically or dynamically with other modules is
* making a combined work based on Proview. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* Proview give you permission to, from the build function in the
* Proview Configurator, combine Proview with modules generated by the
* Proview PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of Proview (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
*/
/* rt_io_m_ssab_mioup.c -- io methods for ssab cards. */
...
...
@@ -64,7 +81,8 @@ typedef struct {
pwr_tFloat32
OldValue
[
IO_MAXCHAN
];
pwr_tBoolean
OldTestOn
[
IO_MAXCHAN
];
int
WriteFirst
;
pwr_tTime
ErrTime
;
unsigned
int
ErrReset
;
unsigned
int
ErrScanCnt
;
}
io_sLocal
;
static
pwr_tStatus
AoRangeToCoef
(
...
...
@@ -264,6 +282,11 @@ static pwr_tStatus IoCardInit (
chanp
++
;
}
local
->
ErrReset
=
1
.
0
/
ctx
->
ScanTime
+
0
.
5
;
if
(
local
->
ErrReset
<
2
)
local
->
ErrReset
=
2
;
return
1
;
}
...
...
@@ -312,7 +335,6 @@ static pwr_tStatus IoCardRead (
qbus_io_read
rb
;
qbus_io_write
writeb
;
int
bfb_error
=
0
;
pwr_tTime
now
;
local
=
(
io_sLocal
*
)
cp
->
Local
;
op
=
(
pwr_sClass_Ssab_BaseMCard
*
)
cp
->
op
;
...
...
@@ -405,16 +427,7 @@ static pwr_tStatus IoCardRead (
/* Error handling for local Qbus-I/O */
{
/* Increase error count and check error limits */
time_GetTime
(
&
now
);
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
{
/* Ignore if some time has expired */
if
(
now
.
tv_sec
-
local
->
ErrTime
.
tv_sec
<
600
)
op
->
ErrorCount
++
;
}
else
op
->
ErrorCount
++
;
local
->
ErrTime
=
now
;
if
(
op
->
ErrorCount
==
op
->
ErrorSoftLimit
)
{
errh_Error
(
"IO Error soft limit reached on card '%s'"
,
cp
->
Name
);
...
...
@@ -487,7 +500,6 @@ static pwr_tStatus IoCardWrite (
pwr_tFloat32
rawvalue
;
qbus_io_write
writeb
;
int
sts
;
pwr_tTime
now
;
pwr_tUInt16
invmask
;
pwr_tUInt16
testmask
;
pwr_tUInt16
testvalue
;
...
...
@@ -563,16 +575,7 @@ static pwr_tStatus IoCardWrite (
{
/* Exceptionhandler was called */
/* Increase error count and check error limits */
time_GetTime
(
&
now
);
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
{
/* Ignore if some time has expired */
if
(
now
.
tv_sec
-
local
->
ErrTime
.
tv_sec
<
600
)
op
->
ErrorCount
++
;
}
else
op
->
ErrorCount
++
;
local
->
ErrTime
=
now
;
if
(
op
->
ErrorCount
==
op
->
ErrorSoftLimit
)
{
errh_Error
(
"IO Error soft limit reached on card '%s'"
,
cp
->
Name
);
...
...
@@ -642,17 +645,7 @@ static pwr_tStatus IoCardWrite (
if
(
sts
==
-
1
)
{
/* Increase error count and check error limits */
time_GetTime
(
&
now
);
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
{
/* Ignore if some time has expired */
if
(
now
.
tv_sec
-
local
->
ErrTime
.
tv_sec
<
600
)
op
->
ErrorCount
++
;
}
else
op
->
ErrorCount
++
;
local
->
ErrTime
=
now
;
if
(
op
->
ErrorCount
==
op
->
ErrorSoftLimit
)
{
errh_Error
(
"IO Error soft limit reached on card '%s'"
,
cp
->
Name
);
...
...
@@ -668,6 +661,13 @@ static pwr_tStatus IoCardWrite (
}
}
/* Fix for qbus errors */
local
->
ErrScanCnt
++
;
if
(
local
->
ErrScanCnt
>=
local
->
ErrReset
)
{
local
->
ErrScanCnt
=
0
;
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
op
->
ErrorCount
--
;
}
return
1
;
}
...
...
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_pidup.c
View file @
961dd9ac
...
...
@@ -163,7 +163,8 @@ typedef struct {
unsigned
short
stat_ind
;
unsigned
short
ran_ind
;
unsigned
short
init
;
pwr_tTime
ErrTime
;
unsigned
int
ErrReset
;
unsigned
int
ErrScanCnt
;
unsigned
short
Valid
;
}
io_sLocal
;
...
...
@@ -251,6 +252,10 @@ static pwr_tStatus IoCardInit (
local
->
stat_ind
=
((
char
*
)
&
local
->
Stat
-
(
char
*
)
local
)
/
2
;
local
->
ran_ind
=
((
char
*
)
&
local
->
AoRange
-
(
char
*
)
local
)
/
2
;
local
->
ErrReset
=
1
.
0
/
ctx
->
ScanTime
+
0
.
5
;
if
(
local
->
ErrReset
<
2
)
local
->
ErrReset
=
2
;
return
1
;
}
...
...
@@ -291,7 +296,6 @@ static pwr_tStatus IoCardRead (
card_stat
c_stat
;
unsigned
short
*
datap
;
unsigned
short
diff
;
pwr_tTime
now
;
local
=
(
io_sLocal
*
)
cp
->
Local
;
op
=
(
pwr_sClass_Ssab_PIDuP
*
)
cp
->
op
;
...
...
@@ -317,16 +321,7 @@ static pwr_tStatus IoCardRead (
if
(
sts
==
-
1
)
{
/* Increase error count and check error limits */
time_GetTime
(
&
now
);
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
{
/* Ignore if some time has expired */
if
(
now
.
tv_sec
-
local
->
ErrTime
.
tv_sec
<
600
)
op
->
ErrorCount
++
;
}
else
op
->
ErrorCount
++
;
local
->
ErrTime
=
now
;
if
(
op
->
ErrorCount
==
op
->
ErrorSoftLimit
)
{
errh_Error
(
"IO Error soft limit reached on card '%s'"
,
cp
->
Name
);
...
...
@@ -377,7 +372,6 @@ static pwr_tStatus IoCardWrite (
pwr_sClass_Ssab_PIDuP
*
op
;
int
ii
;
int
sts
;
pwr_tTime
now
;
unsigned
short
diff
;
card_dyn
c_dyn
;
card_par
c_par
;
...
...
@@ -526,16 +520,7 @@ static pwr_tStatus IoCardWrite (
if
(
sts
==
-
1
)
{
/* Increase error count and check error limits */
time_GetTime
(
&
now
);
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
{
/* Ignore if some time has expired */
if
(
now
.
tv_sec
-
local
->
ErrTime
.
tv_sec
<
600
)
op
->
ErrorCount
++
;
}
else
op
->
ErrorCount
++
;
local
->
ErrTime
=
now
;
if
(
op
->
ErrorCount
==
op
->
ErrorSoftLimit
)
{
errh_Error
(
"IO Error soft limit reached on card '%s'"
,
cp
->
Name
);
...
...
@@ -577,16 +562,7 @@ static pwr_tStatus IoCardWrite (
if
(
sts
==
-
1
)
{
/* Increase error count and check error limits */
time_GetTime
(
&
now
);
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
{
/* Ignore if some time has expired */
if
(
now
.
tv_sec
-
local
->
ErrTime
.
tv_sec
<
600
)
op
->
ErrorCount
++
;
}
else
op
->
ErrorCount
++
;
local
->
ErrTime
=
now
;
if
(
op
->
ErrorCount
==
op
->
ErrorSoftLimit
)
{
errh_Error
(
"IO Error soft limit reached on card '%s'"
,
cp
->
Name
);
...
...
@@ -626,6 +602,14 @@ static pwr_tStatus IoCardWrite (
return
IO__ERRDEVICE
;
}
/* Fix for qbus errors */
local
->
ErrScanCnt
++
;
if
(
local
->
ErrScanCnt
>=
local
->
ErrReset
)
{
local
->
ErrScanCnt
=
0
;
if
(
op
->
ErrorCount
>
op
->
ErrorSoftLimit
)
op
->
ErrorCount
--
;
}
return
1
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment