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
12143ba3
Commit
12143ba3
authored
19 years ago
by
Florian Pose
Browse files
Options
Downloads
Patches
Plain Diff
Bugfix: Größerer Puffer für CoE-Daten beim SDO upload.
parent
8ed78d37
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
master/canopen.c
+6
-6
6 additions, 6 deletions
master/canopen.c
rt/msr_module.c
+2
-2
2 additions, 2 deletions
rt/msr_module.c
with
8 additions
and
8 deletions
master/canopen.c
+
6
−
6
View file @
12143ba3
...
@@ -103,21 +103,21 @@ int ecrt_slave_sdo_read(ec_slave_t *slave, /**< EtherCAT-Slave */
...
@@ -103,21 +103,21 @@ int ecrt_slave_sdo_read(ec_slave_t *slave, /**< EtherCAT-Slave */
uint32_t
*
value
/**< Speicher fr gel. Wert */
uint32_t
*
value
/**< Speicher fr gel. Wert */
)
)
{
{
uint8_t
data
[
0x0
A
];
uint8_t
data
[
0x
2
0
];
size_t
rec_size
;
size_t
rec_size
;
EC_WRITE_U16
(
data
,
0x2000
);
// Number (0), Service
(
SDO request
)
EC_WRITE_U16
(
data
,
0x2000
);
// Number (0), Service
=
SDO request
EC_WRITE_U8
(
data
+
2
,
0x1
<<
1
|
0x2
<<
5
);
// Exp
., U
pload request
EC_WRITE_U8
(
data
+
2
,
0x1
<<
1
|
0x2
<<
5
);
// Exp
edited u
pload request
EC_WRITE_U16
(
data
+
3
,
sdo_index
);
EC_WRITE_U16
(
data
+
3
,
sdo_index
);
EC_WRITE_U8
(
data
+
5
,
sdo_subindex
);
EC_WRITE_U8
(
data
+
5
,
sdo_subindex
);
if
(
ec_slave_mailbox_send
(
slave
,
0x03
,
data
,
6
))
return
-
1
;
if
(
ec_slave_mailbox_send
(
slave
,
0x03
,
data
,
6
))
return
-
1
;
rec_size
=
6
;
rec_size
=
0x20
;
if
(
ec_slave_mailbox_receive
(
slave
,
0x03
,
data
,
&
rec_size
))
return
-
1
;
if
(
ec_slave_mailbox_receive
(
slave
,
0x03
,
data
,
&
rec_size
))
return
-
1
;
if
(
EC_READ_U16
(
data
)
>>
12
==
0x02
&&
// SDO request
if
(
EC_READ_U16
(
data
)
>>
12
==
0x02
&&
// SDO request
EC_READ_U8
(
data
+
2
)
>>
5
==
0x04
)
{
// Abort SDO transf
.
req
.
EC_READ_U8
(
data
+
2
)
>>
5
==
0x04
)
{
// Abort SDO transf
er
req
uest
EC_ERR
(
"SDO upload of 0x%04X:%X aborted on slave %i.
\n
"
,
EC_ERR
(
"SDO upload of 0x%04X:%X aborted on slave %i.
\n
"
,
sdo_index
,
sdo_subindex
,
slave
->
ring_position
);
sdo_index
,
sdo_subindex
,
slave
->
ring_position
);
ec_canopen_abort_msg
(
EC_READ_U32
(
data
+
6
));
ec_canopen_abort_msg
(
EC_READ_U32
(
data
+
6
));
...
...
This diff is collapsed.
Click to expand it.
rt/msr_module.c
+
2
−
2
View file @
12143ba3
...
@@ -225,7 +225,7 @@ int __init init_rt_module(void)
...
@@ -225,7 +225,7 @@ int __init init_rt_module(void)
//ecrt_master_debug(master, 0);
//ecrt_master_debug(master, 0);
#if
0
#if
1
if
(
ecrt_master_sdo_read
(
master
,
"1"
,
0x100A
,
1
,
&
version
))
{
if
(
ecrt_master_sdo_read
(
master
,
"1"
,
0x100A
,
1
,
&
version
))
{
printk
(
KERN_ERR
"Could not read SSI version!
\n
"
);
printk
(
KERN_ERR
"Could not read SSI version!
\n
"
);
goto
out_deactivate
;
goto
out_deactivate
;
...
@@ -233,7 +233,7 @@ int __init init_rt_module(void)
...
@@ -233,7 +233,7 @@ int __init init_rt_module(void)
printk
(
KERN_INFO
"Software-version: %u
\n
"
,
version
);
printk
(
KERN_INFO
"Software-version: %u
\n
"
,
version
);
#endif
#endif
#if
0
#if
1
if
(
ecrt_master_sdo_write
(
master
,
"1"
,
0x4061
,
1
,
0
,
1
)
||
if
(
ecrt_master_sdo_write
(
master
,
"1"
,
0x4061
,
1
,
0
,
1
)
||
ecrt_master_sdo_write
(
master
,
"1"
,
0x4061
,
2
,
1
,
1
)
||
ecrt_master_sdo_write
(
master
,
"1"
,
0x4061
,
2
,
1
,
1
)
||
ecrt_master_sdo_write
(
master
,
"1"
,
0x4061
,
3
,
1
,
1
)
||
ecrt_master_sdo_write
(
master
,
"1"
,
0x4061
,
3
,
1
,
1
)
||
...
...
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