Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
677a962d
Commit
677a962d
authored
Jul 12, 2005
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New io design
parent
8219a622
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
724 additions
and
105 deletions
+724
-105
src/lib/rt/src/os_linux/rt_io_m_pb_dp_slave.c
src/lib/rt/src/os_linux/rt_io_m_pb_dp_slave.c
+15
-1
src/lib/rt/src/os_linux/rt_io_m_pb_module.c
src/lib/rt/src/os_linux/rt_io_m_pb_module.c
+517
-4
src/lib/rt/src/os_linux/rt_io_m_ssab_aiup.c
src/lib/rt/src/os_linux/rt_io_m_ssab_aiup.c
+3
-2
src/lib/rt/src/os_linux/rt_io_m_ssab_aoup.c
src/lib/rt/src/os_linux/rt_io_m_ssab_aoup.c
+3
-2
src/lib/rt/src/os_linux/rt_io_m_ssab_co.c
src/lib/rt/src/os_linux/rt_io_m_ssab_co.c
+2
-2
src/lib/rt/src/os_linux/rt_io_pb_locals.h
src/lib/rt/src/os_linux/rt_io_pb_locals.h
+1
-1
src/lib/rt/src/rt_io_base.c
src/lib/rt/src/rt_io_base.c
+183
-93
No files found.
src/lib/rt/src/os_linux/rt_io_m_pb_dp_slave.c
View file @
677a962d
...
...
@@ -25,6 +25,7 @@
#include "rt_errh.h"
#include "co_cdh.h"
#include "rt_io_profiboard.h"
#include "rt_pb_msg.h"
/*----------------------------------------------------------------------------*\
...
...
@@ -47,8 +48,10 @@ static pwr_tStatus IoRackInit (
pwr_sClass_Pb_Ao
*
aop
;
pwr_sClass_Pb_Ii
*
iip
;
pwr_sClass_Pb_Io
*
iop
;
pwr_sClass_Pb_Module
*
mp
;
char
name
[
196
];
pwr_tStatus
sts
;
pwr_tCid
cid
;
sts
=
gdh_ObjidToName
(
rp
->
Objid
,
(
char
*
)
&
name
,
sizeof
(
name
),
cdh_mNName
);
errh_Info
(
"Init of Profibus DP Slave and modules %s"
,
name
);
...
...
@@ -68,7 +71,10 @@ static pwr_tStatus IoRackInit (
local_card
->
input_area
=
(
void
*
)
&
(
op
->
Inputs
);
local_card
->
output_area
=
(
void
*
)
&
(
op
->
Outputs
);
switch
(
cardp
->
Class
)
{
cid
=
cardp
->
Class
;
while
(
ODD
(
gdh_GetSuperClass
(
cid
,
&
cid
,
cardp
->
Objid
)))
;
switch
(
cid
)
{
case
pwr_cClass_Pb_Di
:
dip
=
(
pwr_sClass_Pb_Di
*
)
cardp
->
op
;
...
...
@@ -117,6 +123,14 @@ static pwr_tStatus IoRackInit (
output_counter
+=
iop
->
BytesOfOutput
;
iop
->
Status
=
PB_MODULE_STATE_OPERATE
;
break
;
case
pwr_cClass_Pb_Module
:
mp
=
(
pwr_sClass_Pb_Module
*
)
cardp
->
op
;
// iop->OffsetOutputs = output_counter;
// iop->BytesOfOutput = iop->NumberOfChannels * iop->BytesPerChannel;
// output_counter += iop->BytesOfOutput;
mp
->
Status
=
PB__SUCCESS
;
break
;
}
op
->
NumberModules
++
;
...
...
src/lib/rt/src/os_linux/rt_io_m_pb_module.c
View file @
677a962d
This diff is collapsed.
Click to expand it.
src/lib/rt/src/os_linux/rt_io_m_ssab_aiup.c
View file @
677a962d
...
...
@@ -113,7 +113,8 @@ static pwr_tStatus IoCardInit (
chanp
=
cp
->
chanlist
;
for
(
i
=
0
;
i
<
cp
->
ChanListSize
;
i
++
)
{
AiRangeToCoef
(
chanp
);
if
(
chanp
->
sop
)
AiRangeToCoef
(
chanp
);
chanp
++
;
}
...
...
@@ -168,7 +169,7 @@ static pwr_tStatus IoCardRead (
chanp
=
&
cp
->
chanlist
[
0
];
for
(
i
=
0
;
i
<
cp
->
ChanListSize
;
i
++
)
{
if
(
!
chanp
->
cop
)
if
(
!
chanp
->
cop
||
!
chanp
->
sop
)
{
chanp
++
;
continue
;
...
...
src/lib/rt/src/os_linux/rt_io_m_ssab_aoup.c
View file @
677a962d
...
...
@@ -125,7 +125,8 @@ static pwr_tStatus IoCardInit (
chanp
=
cp
->
chanlist
;
for
(
i
=
0
;
i
<
cp
->
ChanListSize
;
i
++
)
{
AoRangeToCoef
(
chanp
);
if
(
chanp
->
sop
)
AoRangeToCoef
(
chanp
);
chanp
++
;
}
...
...
@@ -186,7 +187,7 @@ static pwr_tStatus IoCardWrite (
chanp
=
&
cp
->
chanlist
[
0
];
for
(
i
=
0
;
i
<
cp
->
ChanListSize
;
i
++
)
{
if
(
!
chanp
->
cop
)
if
(
!
chanp
->
cop
||
!
chanp
->
sop
)
{
chanp
++
;
continue
;
...
...
src/lib/rt/src/os_linux/rt_io_m_ssab_co.c
View file @
677a962d
...
...
@@ -78,7 +78,7 @@ static pwr_tStatus IoCardInit (
/* Configure card */
for
(
i
=
0
;
i
<
op
->
MaxNoOfCounters
;
i
++
)
{
if
(
!
cp
->
chanlist
[
i
].
cop
)
if
(
!
cp
->
chanlist
[
i
].
cop
||
!
cp
->
chanlist
[
i
].
sop
)
continue
;
wr_data_p
=
(
pwr_tUInt32
*
)
&
wr_data
;
...
...
@@ -182,7 +182,7 @@ static pwr_tStatus IoCardRead (
for
(
i
=
0
;
i
<
op
->
MaxNoOfCounters
;
i
++
)
{
if
(
!
cp
->
chanlist
[
i
].
cop
)
if
(
!
cp
->
chanlist
[
i
].
cop
||
!
cp
->
chanlist
[
i
].
sop
)
continue
;
if
(
op
->
ConvMask
&
(
1
<<
i
))
...
...
src/lib/rt/src/os_linux/rt_io_pb_locals.h
View file @
677a962d
#define IO_MAXCHAN
32
#define IO_MAXCHAN
96
#define PB_MODULE_STATE_NOTINIT 0
#define PB_MODULE_STATE_OPERATE 1
...
...
src/lib/rt/src/rt_io_base.c
View file @
677a962d
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment