Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
etherlabmaster
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ICS Control System Infrastructure
etherlabmaster
Commits
d514439e
Commit
d514439e
authored
16 years ago
by
Florian Pose
Browse files
Options
Downloads
Patches
Plain Diff
Configure Pdos before configuring the Pdo sync managers,
to earlier detect problems with non-existing SM information.
parent
ff9f3696
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
TODO
+0
-1
0 additions, 1 deletion
TODO
documentation/graphs/fsm_slave_conf.dot
+21
-38
21 additions, 38 deletions
documentation/graphs/fsm_slave_conf.dot
master/fsm_pdo.c
+1
-1
1 addition, 1 deletion
master/fsm_pdo.c
master/fsm_slave_config.c
+36
-24
36 additions, 24 deletions
master/fsm_slave_config.c
with
58 additions
and
64 deletions
TODO
+
0
−
1
View file @
d514439e
...
...
@@ -14,7 +14,6 @@ Version 1.4.0:
* Remove ec_sync_t::assign_source?
* Repair rcethercat status.
* Debug output for all configuration functions of the application interface.
* Output warning, if there is no sync manager for a configuration.
* Abort code messages in userspace.
Future issues:
...
...
This diff is collapsed.
Click to expand it.
documentation/graphs/fsm_slave_conf.dot
+
21
−
38
View file @
d514439e
...
...
@@ -10,78 +10,61 @@ digraph slaveconf {
start
->
init
[
weight
=
10
]
init
[
fontname
=
"Helvetica"
]
//init -> init
//init -> error
init
->
enter_mbox_sync
[
fontname
=
"Helvetica"
,
label
=
"No FMMUs"
]
init
->
enter_mbox_sync
[
fontname
=
"Helvetica"
,
label
=
"No FMMUs"
]
init
->
clear_fmmus
[
weight
=
10
]
clear_fmmus
[
fontname
=
"Helvetica"
]
//clear_fmmus -> clear_fmmus
//clear_fmmus -> error
clear_fmmus
->
enter_mbox_sync
[
weight
=
10
]
enter_mbox_sync
[
shape
=
point
,
label
=
""
]
enter_mbox_sync
->
end
[
fontname
=
"Helvetica"
,
label
=
"INIT\nrequested"
]
enter_mbox_sync
->
preop
[
fontname
=
"Helvetica"
,
label
=
"No mailboxes"
]
enter_mbox_sync
[
shape
=
point
,
label
=
""
]
enter_mbox_sync
->
end
[
fontname
=
"Helvetica"
,
label
=
"INIT\nrequested"
]
enter_mbox_sync
->
preop
[
fontname
=
"Helvetica"
,
label
=
"No mailboxes"
]
enter_mbox_sync
->
mbox_sync
[
weight
=
10
]
mbox_sync
[
fontname
=
"Helvetica"
]
//mbox_sync -> mbox_sync
//mbox_sync -> error
mbox_sync
->
preop
[
weight
=
10
]
preop
[
fontname
=
"Helvetica"
]
//preop -> preop
//preop -> error
preop
->
end
[
fontname
=
"Helvetica"
,
label
=
"PREOP\nrequested"
]
preop
->
enter_safeop
[
fontname
=
"Helvetica"
,
label
=
"No slave\nconfig attached"
]
preop
->
end
[
fontname
=
"Helvetica"
,
label
=
"PREOP\nrequested"
]
preop
->
enter_safeop
[
fontname
=
"Helvetica"
,
label
=
"No slave\nconfig attached"
]
preop
->
enter_sdo_conf
[
weight
=
10
]
enter_sdo_conf
[
shape
=
point
,
label
=
""
]
enter_sdo_conf
->
enter_pdo_
sync
[
fontname
=
"Helvetica"
,
label
=
"No Sdo\nconfigur
ations
"
]
enter_sdo_conf
[
shape
=
point
,
label
=
""
]
enter_sdo_conf
->
enter_pdo_
conf
[
fontname
=
"Helvetica"
,
label
=
"No Sdo
s
\nconfigur
ed
"
]
enter_sdo_conf
->
sdo_conf
[
weight
=
10
]
sdo_conf
[
fontname
=
"Helvetica"
]
//sdo_conf -> sdo_conf
//sdo_conf -> error
sdo_conf
->
enter_pdo_sync
[
weight
=
10
]
sdo_conf
->
enter_pdo_conf
[
weight
=
10
]
enter_pdo_sync
[
shape
=
point
,
label
=
""
]
enter_pdo_sync
->
enter_safeop
[
fontname
=
"Helvetica"
,
label
=
"No Pdos"
]
enter_pdo_conf
[
shape
=
point
,
label
=
""
]
enter_pdo_conf
->
pdo_conf
[
weight
=
10
]
pdo_conf
[
fontname
=
"Helvetica"
]
pdo_conf
->
enter_pdo_sync
[
weight
=
10
]
enter_pdo_sync
[
shape
=
point
,
label
=
""
]
enter_pdo_sync
->
enter_fmmu
[
fontname
=
"Helvetica"
,
label
=
"No Pdo SMs"
]
enter_pdo_sync
->
pdo_sync
[
weight
=
10
]
pdo_sync
[
fontname
=
"Helvetica"
]
//pdo_sync -> pdo_sync
//pdo_sync -> error
pdo_sync
->
pdo_conf
[
weight
=
10
]
pdo_conf
[
fontname
=
"Helvetica"
]
//pdo_conf -> pdo_conf
//pdo_conf -> error
pdo_conf
->
enter_fmmu
[
weight
=
10
]
pdo_sync
->
enter_fmmu
[
weight
=
10
]
enter_fmmu
[
shape
=
point
,
label
=
""
]
enter_fmmu
->
enter_safeop
[
fontname
=
"Helvetica"
,
label
=
"No FMMUs\n
to
configure"
]
enter_fmmu
->
enter_safeop
[
fontname
=
"Helvetica"
,
label
=
"No FMMUs\nconfigure
d
"
]
enter_fmmu
->
fmmu
[
weight
=
10
]
fmmu
[
fontname
=
"Helvetica"
]
//fmmu -> fmmu
//fmmu -> error
fmmu
->
enter_safeop
[
weight
=
10
]
enter_safeop
[
shape
=
point
,
label
=
""
]
enter_safeop
->
safeop
[
weight
=
10
]
safeop
[
fontname
=
"Helvetica"
]
//safeop -> safeop
//safeop -> error
safeop
->
end
[
fontname
=
"Helvetica"
,
label
=
"SAFEOP\nrequested"
]
safeop
->
end
[
fontname
=
"Helvetica"
,
label
=
"SAFEOP\nrequested"
]
safeop
->
op
[
weight
=
10
]
op
[
fontname
=
"Helvetica"
]
//op -> op
//op -> error
op
->
end
[
weight
=
10
]
op
->
end
// [weight=10]
end
[
fontname
=
"Helvetica"
]
}
This diff is collapsed.
Click to expand it.
master/fsm_pdo.c
+
1
−
1
View file @
d514439e
...
...
@@ -413,7 +413,7 @@ void ec_fsm_pdo_conf_action_next_sync(
if
(
!
(
fsm
->
sync
=
ec_slave_get_sync
(
fsm
->
slave
,
fsm
->
sync_index
)))
{
if
(
!
list_empty
(
&
fsm
->
pdos
.
list
))
EC_WARN
(
"Pdos configured for SM%u, but slave %u does not "
"provide
a
sync manager
configur
ation!
\n
"
,
"provide
the
sync manager
inform
ation!
\n
"
,
fsm
->
sync_index
,
fsm
->
slave
->
ring_position
);
continue
;
}
...
...
This diff is collapsed.
Click to expand it.
master/fsm_slave_config.c
+
36
−
24
View file @
d514439e
...
...
@@ -61,6 +61,7 @@ void ec_fsm_slave_config_state_op(ec_fsm_slave_config_t *);
void
ec_fsm_slave_config_enter_mbox_sync
(
ec_fsm_slave_config_t
*
);
void
ec_fsm_slave_config_enter_preop
(
ec_fsm_slave_config_t
*
);
void
ec_fsm_slave_config_enter_sdo_conf
(
ec_fsm_slave_config_t
*
);
void
ec_fsm_slave_config_enter_pdo_conf
(
ec_fsm_slave_config_t
*
);
void
ec_fsm_slave_config_enter_pdo_sync
(
ec_fsm_slave_config_t
*
);
void
ec_fsm_slave_config_enter_fmmu
(
ec_fsm_slave_config_t
*
);
void
ec_fsm_slave_config_enter_safeop
(
ec_fsm_slave_config_t
*
);
...
...
@@ -440,7 +441,7 @@ void ec_fsm_slave_config_enter_sdo_conf(
// No CoE configuration to be applied?
if
(
list_empty
(
&
slave
->
config
->
sdo_configs
))
{
// skip Sdo configuration
ec_fsm_slave_config_enter_pdo_
sync
(
fsm
);
ec_fsm_slave_config_enter_pdo_
conf
(
fsm
);
return
;
}
...
...
@@ -482,6 +483,39 @@ void ec_fsm_slave_config_state_sdo_conf(
}
// All Sdos are now configured.
ec_fsm_slave_config_enter_pdo_conf
(
fsm
);
}
/*****************************************************************************/
/** PDO_CONF entry function.
*/
void
ec_fsm_slave_config_enter_pdo_conf
(
ec_fsm_slave_config_t
*
fsm
/**< slave state machine */
)
{
// Start configuring Pdos
ec_fsm_pdo_start_configuration
(
fsm
->
fsm_pdo
,
fsm
->
slave
);
fsm
->
state
=
ec_fsm_slave_config_state_pdo_conf
;
fsm
->
state
(
fsm
);
// execute immediately
}
/*****************************************************************************/
/** Slave configuration state: PDO_CONF.
*/
void
ec_fsm_slave_config_state_pdo_conf
(
ec_fsm_slave_config_t
*
fsm
/**< slave state machine */
)
{
if
(
ec_fsm_pdo_exec
(
fsm
->
fsm_pdo
))
return
;
if
(
!
ec_fsm_pdo_success
(
fsm
->
fsm_pdo
))
{
EC_WARN
(
"Pdo configuration failed on slave %u.
\n
"
,
fsm
->
slave
->
ring_position
);
}
ec_fsm_slave_config_enter_pdo_sync
(
fsm
);
}
...
...
@@ -509,7 +543,7 @@ void ec_fsm_slave_config_enter_pdo_sync(
if
(
slave
->
sii
.
sync_count
<=
offset
)
{
// no Pdo sync managers to configure
ec_fsm_slave_config_enter_
safeop
(
fsm
);
ec_fsm_slave_config_enter_
fmmu
(
fsm
);
return
;
}
...
...
@@ -565,28 +599,6 @@ void ec_fsm_slave_config_state_pdo_sync(
return
;
}
// Start configuring Pdos
ec_fsm_pdo_start_configuration
(
fsm
->
fsm_pdo
,
fsm
->
slave
);
fsm
->
state
=
ec_fsm_slave_config_state_pdo_conf
;
fsm
->
state
(
fsm
);
// execute immediately
}
/*****************************************************************************/
/** Slave configuration state: PDO_CONF.
*/
void
ec_fsm_slave_config_state_pdo_conf
(
ec_fsm_slave_config_t
*
fsm
/**< slave state machine */
)
{
if
(
ec_fsm_pdo_exec
(
fsm
->
fsm_pdo
))
return
;
if
(
!
ec_fsm_pdo_success
(
fsm
->
fsm_pdo
))
{
EC_WARN
(
"Pdo configuration failed on slave %u.
\n
"
,
fsm
->
slave
->
ring_position
);
}
ec_fsm_slave_config_enter_fmmu
(
fsm
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment