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
d0f0e8a0
Commit
d0f0e8a0
authored
Sep 08, 2011
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PSS9000 stall for ao card in remote rack fix
parent
26cd3135
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
29 deletions
+43
-29
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_aoup.c
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_aoup.c
+43
-29
No files found.
ssabox/lib/rt/src/os_linux/rt_io_m_ssab_aoup.c
View file @
d0f0e8a0
...
...
@@ -78,6 +78,7 @@ typedef struct {
int
WriteFirst
;
pwr_tTime
ErrTime
;
int
FirstScan
;
pwr_tBoolean
CheckWrite
[
IO_MAXCHAN
];
}
io_sLocal
;
static
pwr_tStatus
AoRangeToCoef
(
...
...
@@ -218,12 +219,15 @@ static pwr_tStatus IoCardWrite (
pwr_tTime
now
;
int
bfb_error
=
0
;
pwr_sClass_Ssab_RemoteRack
*
rrp
;
int
remote
;
local
=
(
io_sLocal
*
)
cp
->
Local
;
op
=
(
pwr_sClass_Ssab_BaseACard
*
)
cp
->
op
;
fixout
=
ctx
->
Node
->
EmergBreakTrue
&&
ctx
->
Node
->
EmergBreakSelect
==
FIXOUT
;
remote
=
!
r_local
->
Qbus_fp
&&
r_local
->
s
;
chanp
=
&
cp
->
chanlist
[
0
];
for
(
i
=
0
;
i
<
cp
->
ChanListSize
;
i
++
)
{
...
...
@@ -235,6 +239,37 @@ static pwr_tStatus IoCardWrite (
cop
=
(
pwr_sClass_ChanAo
*
)
chanp
->
cop
;
sop
=
(
pwr_sClass_Ao
*
)
chanp
->
sop
;
/* Error handling for remote rack */
if
(
remote
)
{
sts
=
0
;
if
(
local
->
CheckWrite
[
i
])
{
local
->
CheckWrite
[
i
]
=
0
;
bfbeth_get_write_status
(
r_local
,
(
pwr_tUInt16
)
(
local
->
Address
+
2
*
i
),
&
sts
);
if
(
sts
==
-
1
)
{
/* Error handling for ethernet Qbus-I/O */
rrp
=
(
pwr_sClass_Ssab_RemoteRack
*
)
rp
->
op
;
if
(
bfb_error
==
0
)
{
op
->
ErrorCount
++
;
bfb_error
=
1
;
if
(
op
->
ErrorCount
==
op
->
ErrorSoftLimit
)
errh_Error
(
"IO Error soft limit reached on card '%s'"
,
cp
->
Name
);
if
(
op
->
ErrorCount
==
op
->
ErrorHardLimit
)
errh_Error
(
"IO Error hard limit reached on card '%s', stall action %d"
,
cp
->
Name
,
rrp
->
StallAction
);
if
(
op
->
ErrorCount
>=
op
->
ErrorHardLimit
&&
rrp
->
StallAction
==
pwr_eSsabStallAction_ResetInputs
)
{
sts
=
1
;
}
if
(
op
->
ErrorCount
>=
op
->
ErrorHardLimit
&&
rrp
->
StallAction
==
pwr_eSsabStallAction_EmergencyBreak
)
{
ctx
->
Node
->
EmergBreakTrue
=
1
;
return
IO__ERRDEVICE
;
}
}
}
}
}
/* Convert and write */
if
(
*
(
pwr_tFloat32
*
)
chanp
->
vbp
!=
local
->
OldValue
[
i
]
||
local
->
WriteFirst
>
0
||
cop
->
CalculateNewCoef
||
...
...
@@ -265,47 +300,26 @@ static pwr_tStatus IoCardWrite (
sop
->
RawValue
=
rawvalue
-
0
.
5
;
data
=
sop
->
RawValue
;
#if defined(OS_ELN)
vaxc
$
establish
(
machfailwrite
);
#endif
if
(
r_local
->
Qbus_fp
!=
0
&&
r_local
->
s
==
0
)
{
if
(
!
remote
)
{
wb
.
Data
=
data
;
wb
.
Address
=
local
->
Address
+
2
*
i
;
sts
=
write
(
local
->
Qbus_fp
,
&
wb
,
sizeof
(
wb
));
}
else
{
/* Ethernet I/O, Request a write to current address */
sts
=
0
;
if
(
!
local
->
FirstScan
)
bfbeth_get_write_status
(
r_local
,
(
pwr_tUInt16
)
(
local
->
Address
+
2
*
i
),
&
sts
);
bfbeth_set_write_req
(
r_local
,
(
pwr_tUInt16
)
(
local
->
Address
+
2
*
i
),
data
);
local
->
CheckWrite
[
i
]
=
1
;
if
(
sts
==
-
1
)
{
/* Error handling for ethernet Qbus-I/O */
rrp
=
(
pwr_sClass_Ssab_RemoteRack
*
)
rp
->
op
;
if
(
bfb_error
==
0
)
{
op
->
ErrorCount
++
;
bfb_error
=
1
;
if
(
op
->
ErrorCount
==
op
->
ErrorSoftLimit
)
errh_Error
(
"IO Error soft limit reached on card '%s'"
,
cp
->
Name
);
if
(
op
->
ErrorCount
==
op
->
ErrorHardLimit
)
errh_Error
(
"IO Error hard limit reached on card '%s', stall action %d"
,
cp
->
Name
,
rrp
->
StallAction
);
if
(
op
->
ErrorCount
>=
op
->
ErrorHardLimit
&&
rrp
->
StallAction
==
pwr_eSsabStallAction_ResetInputs
)
{
sts
=
1
;
}
if
(
op
->
ErrorCount
>=
op
->
ErrorHardLimit
&&
rrp
->
StallAction
==
pwr_eSsabStallAction_EmergencyBreak
)
{
ctx
->
Node
->
EmergBreakTrue
=
1
;
return
IO__ERRDEVICE
;
}
}
if
(
sts
==
-
1
)
continue
;
}
else
if
(
sts
==
1
)
{
if
(
sts
==
1
)
{
op
->
ErrorCount
=
0
;
local
->
OldValue
[
i
]
=
value
;
local
->
OldTestOn
[
i
]
=
cop
->
TestOn
;
}
chanp
++
;
continue
;
}
/* Error handling for local rack */
if
(
sts
==
-
1
)
{
/* Exceptionhandler was called */
...
...
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