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
41cc152a
Commit
41cc152a
authored
19 years ago
by
Florian Pose
Browse files
Options
Downloads
Patches
Plain Diff
EL5101-Inkrementalgeberklemme hinzugefügt.
parent
08340450
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
include/EtherCAT_si.h
+23
-8
23 additions, 8 deletions
include/EtherCAT_si.h
master/types.c
+14
-1
14 additions, 1 deletion
master/types.c
with
37 additions
and
9 deletions
include/EtherCAT_si.h
+
23
−
8
View file @
41cc152a
...
@@ -17,12 +17,6 @@
...
@@ -17,12 +17,6 @@
/*****************************************************************************/
/*****************************************************************************/
#define EC_READ_EL31XX(SLAVE, CHANNEL) \
((short int) ((EC_PROC_DATA(SLAVE)[(CHANNEL) * 3 + 2] << 8) | \
EC_PROC_DATA(SLAVE)[(CHANNEL) * 3 + 1]))
/*****************************************************************************/
#define EC_WRITE_EL20XX(SLAVE, CHANNEL, VALUE) \
#define EC_WRITE_EL20XX(SLAVE, CHANNEL, VALUE) \
do { \
do { \
if (VALUE) EC_PROC_DATA(SLAVE)[0] |= (1 << (CHANNEL)); \
if (VALUE) EC_PROC_DATA(SLAVE)[0] |= (1 << (CHANNEL)); \
...
@@ -31,6 +25,12 @@
...
@@ -31,6 +25,12 @@
/*****************************************************************************/
/*****************************************************************************/
#define EC_READ_EL31XX(SLAVE, CHANNEL) \
((short int) ((EC_PROC_DATA(SLAVE)[(CHANNEL) * 3 + 2] << 8) | \
EC_PROC_DATA(SLAVE)[(CHANNEL) * 3 + 1]))
/*****************************************************************************/
#define EC_WRITE_EL41XX(SLAVE, CHANNEL, VALUE) \
#define EC_WRITE_EL41XX(SLAVE, CHANNEL, VALUE) \
do { \
do { \
EC_PROC_DATA(SLAVE)[(CHANNEL) * 3 + 1] = ((VALUE) & 0xFF00) >> 8; \
EC_PROC_DATA(SLAVE)[(CHANNEL) * 3 + 1] = ((VALUE) & 0xFF00) >> 8; \
...
@@ -39,15 +39,30 @@
...
@@ -39,15 +39,30 @@
/*****************************************************************************/
/*****************************************************************************/
#define EC_READ_EL5001(SLAVE) \
#define EC_CONF_EL5001_BAUD (0x4067)
#define EC_READ_EL5001_STATE(SLAVE) \
((unsigned char) EC_PROC_DATA(SLAVE)[0])
#define EC_READ_EL5001_VALUE(SLAVE) \
((unsigned int) (EC_PROC_DATA(SLAVE)[1] | \
((unsigned int) (EC_PROC_DATA(SLAVE)[1] | \
(EC_PROC_DATA(SLAVE)[2] << 8) | \
(EC_PROC_DATA(SLAVE)[2] << 8) | \
(EC_PROC_DATA(SLAVE)[3] << 16) | \
(EC_PROC_DATA(SLAVE)[3] << 16) | \
(EC_PROC_DATA(SLAVE)[4] << 24)))
(EC_PROC_DATA(SLAVE)[4] << 24)))
#define EC_READ_EL5001_STATE(SLAVE) \
/*****************************************************************************/
#define EC_READ_EL5101_STATE(SLAVE) \
((unsigned char) EC_PROC_DATA(SLAVE)[0])
((unsigned char) EC_PROC_DATA(SLAVE)[0])
#define EC_READ_EL5101_VALUE(SLAVE) \
((unsigned int) (EC_PROC_DATA(SLAVE)[1] | \
(EC_PROC_DATA(SLAVE)[2] << 8)))
#define EC_READ_EL5101_LATCH(SLAVE) \
((unsigned int) (EC_PROC_DATA(SLAVE)[3] | \
(EC_PROC_DATA(SLAVE)[4] << 8)))
/*****************************************************************************/
/*****************************************************************************/
/* Emacs-Konfiguration
/* Emacs-Konfiguration
...
...
This diff is collapsed.
Click to expand it.
master/types.c
+
14
−
1
View file @
41cc152a
...
@@ -40,6 +40,9 @@ unsigned char sm2_41xx[] = {0x00, 0x10, 0x04, 0x00, 0x24, 0x00, 0x01, 0x00};
...
@@ -40,6 +40,9 @@ unsigned char sm2_41xx[] = {0x00, 0x10, 0x04, 0x00, 0x24, 0x00, 0x01, 0x00};
unsigned
char
sm2_5001
[]
=
{
0x00
,
0x10
,
0x04
,
0x00
,
0x24
,
0x00
,
0x01
,
0x00
};
unsigned
char
sm2_5001
[]
=
{
0x00
,
0x10
,
0x04
,
0x00
,
0x24
,
0x00
,
0x01
,
0x00
};
unsigned
char
sm3_5001
[]
=
{
0x00
,
0x11
,
0x05
,
0x00
,
0x20
,
0x00
,
0x01
,
0x00
};
unsigned
char
sm3_5001
[]
=
{
0x00
,
0x11
,
0x05
,
0x00
,
0x20
,
0x00
,
0x01
,
0x00
};
unsigned
char
sm2_5101
[]
=
{
0x00
,
0x10
,
0x03
,
0x00
,
0x24
,
0x00
,
0x01
,
0x00
};
unsigned
char
sm3_5101
[]
=
{
0x00
,
0x11
,
0x05
,
0x00
,
0x20
,
0x00
,
0x01
,
0x00
};
/*
/*
Konfigurationen der Memory-Management-Units
Konfigurationen der Memory-Management-Units
...
@@ -69,6 +72,9 @@ unsigned char fmmu0_41xx[] = {0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07,
...
@@ -69,6 +72,9 @@ unsigned char fmmu0_41xx[] = {0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07,
unsigned
char
fmmu0_5001
[]
=
{
0x00
,
0x00
,
0x00
,
0x00
,
0x05
,
0x00
,
0x00
,
0x07
,
unsigned
char
fmmu0_5001
[]
=
{
0x00
,
0x00
,
0x00
,
0x00
,
0x05
,
0x00
,
0x00
,
0x07
,
0x00
,
0x11
,
0x00
,
0x01
,
0x01
,
0x00
,
0x00
,
0x00
};
0x00
,
0x11
,
0x00
,
0x01
,
0x01
,
0x00
,
0x00
,
0x00
};
unsigned
char
fmmu0_5101
[]
=
{
0x00
,
0x00
,
0x00
,
0x00
,
0x05
,
0x00
,
0x00
,
0x07
,
0x00
,
0x11
,
0x00
,
0x01
,
0x01
,
0x00
,
0x00
,
0x00
};
/*****************************************************************************/
/*****************************************************************************/
/* Klemmen-Objekte */
/* Klemmen-Objekte */
...
@@ -127,6 +133,12 @@ ec_slave_type_t Beckhoff_EL5001 =
...
@@ -127,6 +133,12 @@ ec_slave_type_t Beckhoff_EL5001 =
EC_MAILBOX_SLAVE
,
sm0_multi
,
sm1_multi
,
sm2_5001
,
sm3_5001
,
fmmu0_5001
,
5
EC_MAILBOX_SLAVE
,
sm0_multi
,
sm1_multi
,
sm2_5001
,
sm3_5001
,
fmmu0_5001
,
5
};
};
ec_slave_type_t
Beckhoff_EL5101
=
{
"Beckhoff"
,
"EL5101"
,
"Incremental Encoder Interface"
,
EC_MAILBOX_SLAVE
,
sm0_multi
,
sm1_multi
,
sm2_5101
,
sm3_5101
,
fmmu0_5101
,
5
};
/*****************************************************************************/
/*****************************************************************************/
/**
/**
...
@@ -147,7 +159,8 @@ ec_slave_ident_t slave_idents[] =
...
@@ -147,7 +159,8 @@ ec_slave_ident_t slave_idents[] =
{
0x00000002
,
0x0C5A3052
,
&
Beckhoff_EL3162
},
{
0x00000002
,
0x0C5A3052
,
&
Beckhoff_EL3162
},
{
0x00000002
,
0x10063052
,
&
Beckhoff_EL4102
},
{
0x00000002
,
0x10063052
,
&
Beckhoff_EL4102
},
{
0x00000002
,
0x10243052
,
&
Beckhoff_EL4132
},
{
0x00000002
,
0x10243052
,
&
Beckhoff_EL4132
},
{
0x00000002
,
0x13893052
,
&
Beckhoff_EL5001
}
{
0x00000002
,
0x13893052
,
&
Beckhoff_EL5001
},
{
0x00000002
,
0x13ED3052
,
&
Beckhoff_EL5101
}
};
};
unsigned
int
slave_ident_count
=
sizeof
(
slave_idents
)
unsigned
int
slave_ident_count
=
sizeof
(
slave_idents
)
...
...
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