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
4257b840
Commit
4257b840
authored
19 years ago
by
Florian Pose
Browse files
Options
Downloads
Patches
Plain Diff
Kleinere Korrekturen an rt und mini.
parent
a6254642
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mini/mini.c
+2
-19
2 additions, 19 deletions
mini/mini.c
rt/msr_module.c
+3
-3
3 additions, 3 deletions
rt/msr_module.c
with
5 additions
and
22 deletions
mini/mini.c
+
2
−
19
View file @
4257b840
...
...
@@ -20,11 +20,7 @@
ec_master_t
*
master
=
NULL
;
ec_slave_t
*
s_in
,
*
s_out
;
int
value
;
int
dig1
;
struct
timer_list
timer
;
unsigned
long
last_start_jiffies
;
ec_slave_init_t
slaves
[]
=
{
// Zeiger, Index, Herstellername, Produktname, Domne
...
...
@@ -38,20 +34,13 @@ ec_slave_init_t slaves[] = {
void
run
(
unsigned
long
data
)
{
static
int
ms
=
0
;
static
unsigned
long
int
k
=
0
;
static
int
firstrun
=
1
;
ms
++
;
ms
%=
1000
;
// Klemmen-IO
EC_WRITE_EL20XX
(
s_out
,
3
,
EC_READ_EL31XX
(
s_in
,
0
)
<
0
);
// Prozessdaten lesen und schreiben
rdtscl
(
k
);
EtherCAT_rt_domain_xio
(
master
,
1
,
100
);
firstrun
=
0
;
// Timer neu starten
timer
.
expires
+=
HZ
/
1000
;
add_timer
(
&
timer
);
}
...
...
@@ -67,8 +56,6 @@ int __init init_mini_module(void)
goto
out_return
;
}
//EtherCAT_rt_debug_level(master, 2);
if
(
EtherCAT_rt_register_slave_list
(
master
,
slaves
,
SLAVE_COUNT
))
{
printk
(
KERN_ERR
"Could not register slaves!
\n
"
);
goto
out_release_master
;
...
...
@@ -86,13 +73,9 @@ int __init init_mini_module(void)
init_timer
(
&
timer
);
timer
.
function
=
run
;
timer
.
data
=
0
;
timer
.
expires
=
jiffies
+
10
;
// Das erste Mal sofort feuern
last_start_jiffies
=
timer
.
expires
;
add_timer
(
&
timer
);
printk
(
"Initialised sample thread.
\n
"
);
printk
(
KERN_INFO
"=== Minimal EtherCAT environment started. ===
\n
"
);
return
0
;
...
...
This diff is collapsed.
Click to expand it.
rt/msr_module.c
+
3
−
3
View file @
4257b840
...
...
@@ -58,9 +58,9 @@ double value;
int
dig1
;
ec_slave_init_t
slaves
[]
=
{
{
&
s_in1
,
1
,
"Beckhoff"
,
"EL3102"
,
0
},
{
&
s_out1
,
8
,
"Beckhoff"
,
"EL2004"
,
0
},
{
&
s_out2
,
9
,
"Beckhoff"
,
"EL2004"
,
0
},
{
&
s_in1
,
1
,
"Beckhoff"
,
"EL3102"
,
0
},
{
&
s_out1
,
8
,
"Beckhoff"
,
"EL2004"
,
0
},
{
&
s_out2
,
9
,
"Beckhoff"
,
"EL2004"
,
0
},
{
&
s_out3
,
10
,
"Beckhoff"
,
"EL2004"
,
0
}
};
...
...
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