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
a2363a85
"git@gitlab.esss.lu.se:krisztianloki/ess-opis.git" did not exist on "2ec2eead3057588fab19d868e4ee5db2d4efc98a"
Commit
a2363a85
authored
19 years ago
by
Florian Pose
Browse files
Options
Downloads
Patches
Plain Diff
Beispiel-Echtzeitcode angepasst.
parent
46a3b472
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
+11
-10
11 additions, 10 deletions
mini/mini.c
rt/msr_module.c
+3
-3
3 additions, 3 deletions
rt/msr_module.c
with
14 additions
and
13 deletions
mini/mini.c
+
11
−
10
View file @
a2363a85
...
@@ -27,17 +27,16 @@ struct timer_list timer;
...
@@ -27,17 +27,16 @@ struct timer_list timer;
ec_master_t
*
master
=
NULL
;
ec_master_t
*
master
=
NULL
;
ec_domain_t
*
domain1
=
NULL
;
ec_domain_t
*
domain1
=
NULL
;
// Prozessdaten
// Datenfelder
uint8_t
*
dig_out1
;
void
*
r_ssi
;
uint16_t
*
ssi_value
;
void
*
r_inc
;
uint16_t
*
inc_value
;
uint32_t
angle0
;
// Kanle
uint32_t
k_angle
,
k_pos
;
ec_field_init_t
domain1_fields
[]
=
{
ec_field_init_t
domain1_fields
[]
=
{
{(
void
**
)
&
dig_out1
,
"2"
,
"Beckhoff"
,
"EL2004"
,
ec_opvalue
,
0
,
1
},
{
&
r_ssi
,
"1"
,
"Beckhoff"
,
"EL5001"
,
ec_ipvalue
,
0
,
1
},
{(
void
**
)
&
ssi_value
,
"3"
,
"Beckhoff"
,
"EL5001"
,
ec_ipvalue
,
0
,
1
},
{
&
r_inc
,
"0:3"
,
"Beckhoff"
,
"EL5101"
,
ec_ipvalue
,
0
,
1
},
{(
void
**
)
&
inc_value
,
"0:4"
,
"Beckhoff"
,
"EL5101"
,
ec_ipvalue
,
0
,
1
},
{}
{}
};
};
...
@@ -50,14 +49,16 @@ void run(unsigned long data)
...
@@ -50,14 +49,16 @@ void run(unsigned long data)
// Prozessdaten lesen und schreiben
// Prozessdaten lesen und schreiben
EtherCAT_rt_domain_xio
(
domain1
);
EtherCAT_rt_domain_xio
(
domain1
);
angle0
=
(
uint32_t
)
*
inc_value
;
k_angle
=
EC_READ_U16
(
r_inc
);
k_pos
=
EC_READ_U32
(
r_ssi
);
if
(
counter
)
{
if
(
counter
)
{
counter
--
;
counter
--
;
}
}
else
{
else
{
counter
=
ABTASTFREQUENZ
;
counter
=
ABTASTFREQUENZ
;
printk
(
KERN_INFO
"angle0 = %i
\n
"
,
angle0
);
printk
(
KERN_INFO
"k_angle = %i
\n
"
,
k_angle
);
printk
(
KERN_INFO
"k_pos = %i
\n
"
,
k_pos
);
}
}
// Timer neu starten
// Timer neu starten
...
...
This diff is collapsed.
Click to expand it.
rt/msr_module.c
+
3
−
3
View file @
a2363a85
...
@@ -59,8 +59,8 @@ uint32_t k_angle;
...
@@ -59,8 +59,8 @@ uint32_t k_angle;
uint32_t
k_pos
;
uint32_t
k_pos
;
ec_field_init_t
domain1_fields
[]
=
{
ec_field_init_t
domain1_fields
[]
=
{
{
(
void
**
)
&
r_ssi
,
"1"
,
"Beckhoff"
,
"EL5001"
,
ec_ipvalue
,
0
,
1
},
{
&
r_ssi
,
"1"
,
"Beckhoff"
,
"EL5001"
,
ec_ipvalue
,
0
,
1
},
{
(
void
**
)
&
r_inc
,
"0:3"
,
"Beckhoff"
,
"EL5101"
,
ec_ipvalue
,
0
,
1
},
{
&
r_inc
,
"0:3"
,
"Beckhoff"
,
"EL5101"
,
ec_ipvalue
,
0
,
1
},
{}
{}
};
};
...
@@ -172,7 +172,7 @@ int __init init_rt_module(void)
...
@@ -172,7 +172,7 @@ int __init init_rt_module(void)
printk
(
KERN_ERR
"Could not read SSI version!
\n
"
);
printk
(
KERN_ERR
"Could not read SSI version!
\n
"
);
goto
out_release_master
;
goto
out_release_master
;
}
}
printk
(
KERN_INFO
"
Klemme 3
Software-version: %u
\n
"
,
version
);
printk
(
KERN_INFO
"Software-version: %u
\n
"
,
version
);
#endif
#endif
ipipe_init_attr
(
&
attr
);
ipipe_init_attr
(
&
attr
);
...
...
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