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
f403dbdc
Commit
f403dbdc
authored
May 07, 2007
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No re-initialization of Profiboard and slaves when there is a restart
parent
5be188fe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
5 deletions
+20
-5
profibus/lib/rt/src/os_linux/rt_io_m_pb_profiboard.c
profibus/lib/rt/src/os_linux/rt_io_m_pb_profiboard.c
+20
-5
No files found.
profibus/lib/rt/src/os_linux/rt_io_m_pb_profiboard.c
View file @
f403dbdc
/*
* Proview $Id: rt_io_m_pb_profiboard.c,v 1.
9 2007-04-30 09:41:53
claes Exp $
* Proview $Id: rt_io_m_pb_profiboard.c,v 1.
10 2007-05-07 12:19:44
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -582,6 +582,10 @@ static pwr_tStatus IoAgentInit (
pwr_sClass_Pb_DP_Slave
*
sop
;
char
name
[
196
];
struct
timespec
rqtp
=
{
0
,
20000000
};
// 20 ms
int
retry
;
count
=
0
;
/* Allocate area for local data structure */
...
...
@@ -598,6 +602,11 @@ static pwr_tStatus IoAgentInit (
/* Initialize interface */
if
(
ctx
->
Node
->
Restarts
>
0
)
{
nanosleep
(
&
rqtp
,
NULL
);
}
errh_Info
(
"Initializing interface for Profibus DP Master %s"
,
ap
->
Name
);
sts
=
profi_init
(
hDevice
,
(
unsigned
char
)
op
->
BusNumber
-
1
,
0
,
0
);
if
(
sts
!=
E_OK
)
...
...
@@ -631,6 +640,7 @@ static pwr_tStatus IoAgentInit (
if
(
ctx
->
Node
->
Restarts
==
0
)
{
retry
=
0
;
while
(
!
ok
)
{
op
->
Status
=
PB__NOTINIT
;
...
...
@@ -641,6 +651,11 @@ static pwr_tStatus IoAgentInit (
if
(
!
sts
)
{
op
->
Status
=
PB__INITFAIL
;
errh_Error
(
"ERROR config Profibus DP Master %s - %s"
,
ap
->
Name
,
"fmb set configuration"
);
retry
++
;
if
(
retry
<
2
)
{
nanosleep
(
&
rqtp
,
NULL
);
continue
;
}
return
IO__ERRINIDEVICE
;
}
...
...
@@ -711,8 +726,8 @@ static pwr_tStatus IoAgentInit (
}
/* End - While !ok */
}
/* End - Initialization only if not restart */
else
{
/* Move to STOP mode, this will fix the DPRAM layout */
/*
else {
Move to STOP mode, this will fix the DPRAM layout
sts = dp_act_param_loc(hDevice, DP_OP_MODE_STOP);
if (sts != E_OK) {
...
...
@@ -720,7 +735,7 @@ static pwr_tStatus IoAgentInit (
errh_Error( "ERROR config Profibus DP Master %s - %s", ap->Name, "act param loc to STOPPED");
return IO__ERRINIDEVICE;
}
}
}
*/
}
else
op
->
Status
=
PB__DISABLED
;
...
...
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