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
b38c9521
Commit
b38c9521
authored
Jul 15, 2013
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Powerlink CN server added
parent
8418ca20
Changes
16
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
3856 additions
and
29 deletions
+3856
-29
otherio/exe/rt_powerlink/src/rt_powerlink.c
otherio/exe/rt_powerlink/src/rt_powerlink.c
+6
-0
otherio/exe/rt_powerlink_cn/src/os_templ/hw_templ/makefile
otherio/exe/rt_powerlink_cn/src/os_templ/hw_templ/makefile
+15
-0
otherio/exe/rt_powerlink_cn/src/os_templ/link_rule.mk
otherio/exe/rt_powerlink_cn/src/os_templ/link_rule.mk
+9
-0
otherio/exe/rt_powerlink_cn/src/rt_powerlink_cn.c
otherio/exe/rt_powerlink_cn/src/rt_powerlink_cn.c
+135
-0
otherio/exp/powerlink/src/README
otherio/exp/powerlink/src/README
+18
-0
otherio/exp/powerlink/src/objdict.h
otherio/exp/powerlink/src/objdict.h
+2249
-0
otherio/lib/rt/src/os_linux/rt_io_m_epl.h
otherio/lib/rt/src/os_linux/rt_io_m_epl.h
+12
-0
otherio/lib/rt/src/os_linux/rt_io_m_epl_cnserver.c
otherio/lib/rt/src/os_linux/rt_io_m_epl_cnserver.c
+982
-0
otherio/lib/rt/src/os_linux/rt_io_m_epl_cnservermodule.c
otherio/lib/rt/src/os_linux/rt_io_m_epl_cnservermodule.c
+120
-0
otherio/lib/rt/src/os_linux/rt_io_m_epl_mn.c
otherio/lib/rt/src/os_linux/rt_io_m_epl_mn.c
+10
-18
otherio/lib/rt/src/rt_io_otherio.meth
otherio/lib/rt/src/rt_io_otherio.meth
+2
-0
otherio/lib/wb/src/wb_c_epl_mn.cpp
otherio/lib/wb/src/wb_c_epl_mn.cpp
+1
-1
otherio/wbl/mcomp/src/otherio.wb_load
otherio/wbl/mcomp/src/otherio.wb_load
+273
-4
src/lib/rt/src/rt_io_bus.c
src/lib/rt/src/rt_io_bus.c
+8
-0
src/tools/pwre/src/os_linux/pwre_configure.sh
src/tools/pwre/src/os_linux/pwre_configure.sh
+14
-4
wb/exp/wb/src/pwr_wb_palette.cnf
wb/exp/wb/src/pwr_wb_palette.cnf
+2
-2
No files found.
otherio/exe/rt_powerlink/src/rt_powerlink.c
View file @
b38c9521
...
@@ -90,6 +90,12 @@ int main()
...
@@ -90,6 +90,12 @@ int main()
exit
(
sts
);
exit
(
sts
);
}
}
sts
=
gdh_GetClassList
(
pwr_cClass_Epl_CNServer
,
&
oid
);
if
(
ODD
(
sts
))
{
system
(
"rt_powerlink_cn &"
);
exit
(
0
);
}
// Get Powerlink handler object
// Get Powerlink handler object
sts
=
io_get_plhandler_object
(
&
plhp
,
&
oid
);
sts
=
io_get_plhandler_object
(
&
plhp
,
&
oid
);
if
(
EVEN
(
sts
))
{
if
(
EVEN
(
sts
))
{
...
...
otherio/exe/rt_powerlink_cn/src/os_templ/hw_templ/makefile
0 → 100644
View file @
b38c9521
include
$(pwre_dir_symbols)
-include
$(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq
($($(type_name)_generic_mk),)
-include
$(pwre_kroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq
($($(type_name)_generic_mk),)
include
$(pwre_kroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include
../../special.mk
-include
../special.mk
-include
special.mk
otherio/exe/rt_powerlink_cn/src/os_templ/link_rule.mk
0 → 100644
View file @
b38c9521
ifndef
link_rule_mk
link_rule_mk
:=
1
link
=
$(ldxx)
$(explinkflags)
$(domap)
-o
$(export_exe)
\
$(export_obj)
$(pwr_eobj)
/rt_io_user.o
\
$(pwre_conf_libdir)
$(pwre_conf_libpwrrt)
$(pwre_conf_lib)
\
-lpwr_usbio_dummy
-lpwr_usb_dummy
-lpwr_cifx_dummy
-lpwr_nodave_dummy
\
$(pwre_conf_libpwrprofibus)
$(pwre_conf_libpwrpowerlinkcn)
-lpcap
endif
otherio/exe/rt_powerlink_cn/src/rt_powerlink_cn.c
0 → 100644
View file @
b38c9521
/*
* Proview Open Source Process Control.
* Copyright (C) 2005-2012 SSAB EMEA AB.
*
* This file is part of Proview.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Proview. If not, see <http://www.gnu.org/licenses/>
*
* Linking Proview statically or dynamically with other modules is
* making a combined work based on Proview. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* Proview give you permission to, from the build function in the
* Proview Configurator, combine Proview with modules generated by the
* Proview PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of Proview (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
**/
#include "pwr.h"
#include "rt_io_msg.h"
#include "rt_pwr_msg.h"
#include "rt_gdh.h"
#include "rt_io_base.h"
#include "rt_errh.h"
#include "rt_aproc.h"
#include "pwr_basecomponentclasses.h"
#include "pwr_otherioclasses.h"
// Test for CN build
#include "Epl.h"
tEplKernel
EplApiSetCdcFilename
(
char
*
pszCdcFilename_p
)
{
return
0
;
}
pwr_tStatus
io_get_plhandler_object
(
pwr_sClass_EplHandler
**
o
,
pwr_tObjid
*
roid
)
{
pwr_tStatus
sts
;
pwr_tObjid
oid
;
// Get EplHandler object
sts
=
gdh_GetClassList
(
pwr_cClass_EplHandler
,
&
oid
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
gdh_ObjidToPointer
(
oid
,
(
void
*
)
o
);
if
(
EVEN
(
sts
))
return
sts
;
if
(
roid
!=
NULL
)
*
roid
=
oid
;
return
IO__SUCCESS
;
}
int
main
()
{
pwr_tStatus
sts
;
io_tCtx
io_ctx
;
float
ctime
=
1
;
pwr_sClass_EplHandler
*
plhp
;
pwr_tOid
oid
;
struct
timespec
tim1
,
tim2
;
// Make connection to error handler
errh_Init
(
"pwr_powerlink"
,
errh_eAnix_powerlink
);
errh_SetStatus
(
PWR__SRVSTARTUP
);
// Make connection to realtime database
sts
=
gdh_Init
(
"rt_powerlink"
);
if
(
EVEN
(
sts
))
{
errh_Fatal
(
"rt_powerlink aborted, gdh_Init failed
\n
%m"
,
sts
);
errh_SetStatus
(
PWR__SRVTERM
);
exit
(
sts
);
}
// Get Powerlink handler object
sts
=
io_get_plhandler_object
(
&
plhp
,
&
oid
);
if
(
EVEN
(
sts
))
{
errh_SetStatus
(
0
);
errh_Info
(
"rt_powerlink terminated, no EplHandler object found"
);
exit
(
sts
);
}
// Create context and call init functions of all agent,
// rack and cardobjects
sts
=
io_init
(
io_mProcess_Powerlink
,
pwr_cNObjid
,
&
io_ctx
,
1
,
ctime
);
if
(
EVEN
(
sts
))
{
errh_SetStatus
(
PWR__SRVTERM
);
errh_Fatal
(
"rt_powerlink aborted, io_init() failed
\n
%m"
,
sts
);
exit
(
sts
);
}
tim1
.
tv_sec
=
0
;
tim1
.
tv_nsec
=
(
plhp
->
CycleTime
)
*
1000000000L
;
aproc_TimeStamp
(
plhp
->
CycleTime
,
5
.
0
);
errh_SetStatus
(
PWR__SRUN
);
aproc_RegisterObject
(
oid
);
// Call IoAgentRead() IoAgentWrite() IoCardRead() IoCardWrite()
// IoModuleRead() IoModuleWrite() forever
for
(;;)
{
sts
=
io_read
(
io_ctx
);
sts
=
io_write
(
io_ctx
);
nanosleep
(
&
tim1
,
&
tim2
);
aproc_TimeStamp
(
plhp
->
CycleTime
,
5
.
0
);
}
}
otherio/exp/powerlink/src/README
0 → 100644
View file @
b38c9521
Instructions to build openPOWERLINK for Proview:
Define enviroment variable epl to the root of the openPOWERLINK
installation
> export epl=/usr/local/openPOWERLINK-Vx.x.x
Copy otherio/exp/powerlink/src/objdict.h to $epl/ObjDicts/CiA401_CN/.
Create one build directory for MN (build) and one for CN (buildcn)
> mkdir $epl/build
> mkdir $epl/buildcn
Go to $epl/build and build for MN, then go to $epl/buildcn and build for CN.
Execute 'pwre configure' and check powerlink includes and archives are found,
and finally build Proview.
otherio/exp/powerlink/src/objdict.h
0 → 100644
View file @
b38c9521
This source diff could not be displayed because it is too large. You can
view the blob
instead.
otherio/lib/rt/src/os_linux/rt_io_m_epl.h
View file @
b38c9521
...
@@ -55,4 +55,16 @@ typedef struct {
...
@@ -55,4 +55,16 @@ typedef struct {
struct
timespec
tpe
,
tps
;
struct
timespec
tpe
,
tps
;
}
io_sLocalEpl_CN
;
}
io_sLocalEpl_CN
;
typedef
struct
{
int
byte_ordering
;
int
float_representation
;
struct
timespec
tpe
,
tps
;
int
input_area_size
;
int
output_area_size
;
void
*
input_area
;
void
*
output_area
;
void
*
tmp_area
;
short
inputResetEnabled
;
}
io_sLocalEpl_CNServer
;
#endif
#endif
otherio/lib/rt/src/os_linux/rt_io_m_epl_cnserver.c
0 → 100644
View file @
b38c9521
This diff is collapsed.
Click to expand it.
otherio/lib/rt/src/os_linux/rt_io_m_epl_cnservermodule.c
0 → 100644
View file @
b38c9521
/*
* Proview Open Source Process Control.
* Copyright (C) 2005-2012 SSAB EMEA AB.
*
* This file is part of Proview.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Proview. If not, see <http://www.gnu.org/licenses/>
*
* Linking Proview statically or dynamically with other modules is
* making a combined work based on Proview. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* Proview give you permission to, from the build function in the
* Proview Configurator, combine Proview with modules generated by the
* Proview PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of Proview (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
**/
#include "pwr.h"
#include "pwr_basecomponentclasses.h"
#include "rt_io_base.h"
#include "rt_io_card_init.h"
#include "rt_io_card_close.h"
#include "rt_io_card_read.h"
#include "rt_io_card_write.h"
#include "rt_io_msg.h"
#include "pwr_otherioclasses.h"
/*----------------------------------------------------------------------------*\
Init method for the Powerlink module
\*----------------------------------------------------------------------------*/
static
pwr_tStatus
IoCardInit
(
io_tCtx
ctx
,
io_sAgent
*
ap
,
io_sRack
*
rp
,
io_sCard
*
cp
)
{
return
IO__SUCCESS
;
}
/*----------------------------------------------------------------------------*\
Read method for the Powerlink module
\*----------------------------------------------------------------------------*/
static
pwr_tStatus
IoCardRead
(
io_tCtx
ctx
,
io_sAgent
*
ap
,
io_sRack
*
rp
,
io_sCard
*
cp
)
{
return
IO__SUCCESS
;
}
/*----------------------------------------------------------------------------*\
Write method for the Powerlink module
\*----------------------------------------------------------------------------*/
static
pwr_tStatus
IoCardWrite
(
io_tCtx
ctx
,
io_sAgent
*
ap
,
io_sRack
*
rp
,
io_sCard
*
cp
)
{
return
IO__SUCCESS
;
}
/*----------------------------------------------------------------------------*\
Close method for the Powerlink module
\*----------------------------------------------------------------------------*/
static
pwr_tStatus
IoCardClose
(
io_tCtx
ctx
,
io_sAgent
*
ap
,
io_sRack
*
rp
,
io_sCard
*
cp
)
{
return
IO__SUCCESS
;
}
/*----------------------------------------------------------------------------*\
Every method to be exported to the workbench should be registred here.
\*----------------------------------------------------------------------------*/
pwr_dExport
pwr_BindIoMethods
(
Epl_CNServerModule
)
=
{
pwr_BindIoMethod
(
IoCardInit
),
pwr_BindIoMethod
(
IoCardRead
),
pwr_BindIoMethod
(
IoCardWrite
),
pwr_BindIoMethod
(
IoCardClose
),
pwr_NullMethod
};
otherio/lib/rt/src/os_linux/rt_io_m_epl_mn.c
View file @
b38c9521
...
@@ -147,15 +147,6 @@ tEplKernel PUBLIC AppCbEvent(
...
@@ -147,15 +147,6 @@ tEplKernel PUBLIC AppCbEvent(
io_sAgent
*
pUserArg_p
);
io_sAgent
*
pUserArg_p
);
tEplKernel
PUBLIC
AppCbSync
(
void
);
tEplKernel
PUBLIC
AppCbSync
(
void
);
pwr_tStatus
io_bus_card_init_pl
(
io_tCtx
ctx
,
io_sCard
*
cp
,
unsigned
int
*
input_area_offset
,
unsigned
int
*
input_area_chansize
,
unsigned
int
*
output_area_offset
,
unsigned
int
*
output_area_chansize
,
pwr_tByteOrderingEnum
byte_order
);
/*----------------------------------------------------------------------------*\
/*----------------------------------------------------------------------------*\
Init method for the Powerlink module
Init method for the Powerlink module
...
@@ -281,13 +272,14 @@ static pwr_tStatus IoAgentInit (io_tCtx ctx, io_sAgent *ap) {
...
@@ -281,13 +272,14 @@ static pwr_tStatus IoAgentInit (io_tCtx ctx, io_sAgent *ap) {
struct
sched_param
schedParam
;
struct
sched_param
schedParam
;
// adjust process priority
// adjust process priority
if
(
nice
(
-
20
)
==
-
1
)
// push nice level in case we have no RTPreempt
// push nice level in case we have no RTPreempt
{
if
(
nice
(
-
20
)
==
-
1
)
{
errh_Error
(
"%s() couldn't set nice value! (%s)"
,
__func__
,
strerror
(
errno
));
errh_Error
(
"%s() couldn't set nice value! (%s)"
,
__func__
,
strerror
(
errno
));
}
}
schedParam
.
__sched_priority
=
MAIN_THREAD_PRIORITY
;
//schedParam.sched_priority = MIN(sched_get_priority_max(SCHED_FIFO),
if
(
pthread_setschedparam
(
pthread_self
(),
SCHED_RR
,
&
schedParam
)
!=
0
)
// sched_get_priority_min(SCHED_FIFO) + op->Priority);
{
schedParam
.
__sched_priority
=
op
->
Priority
;
if
(
pthread_setschedparam
(
pthread_self
(),
SCHED_RR
,
&
schedParam
)
!=
0
)
{
errh_Error
(
"%s() couldn't set thread scheduling parameters! %d"
,
__func__
,
schedParam
.
__sched_priority
);
errh_Error
(
"%s() couldn't set thread scheduling parameters! %d"
,
__func__
,
schedParam
.
__sched_priority
);
}
}
...
...
otherio/lib/rt/src/rt_io_otherio.meth
View file @
b38c9521
...
@@ -30,4 +30,6 @@ Nodave_PLC
...
@@ -30,4 +30,6 @@ Nodave_PLC
Nodave_Transaction
Nodave_Transaction
Epl_MN
Epl_MN
Epl_Module
Epl_Module
Epl_CNServer
Epl_CNServerModule
#endif
#endif
\ No newline at end of file
otherio/lib/wb/src/wb_c_epl_mn.cpp
View file @
b38c9521
...
@@ -61,7 +61,7 @@ static pwr_tStatus Configure (
...
@@ -61,7 +61,7 @@ static pwr_tStatus Configure (
ldh_sMenuCall
*
ip
ldh_sMenuCall
*
ip
)
)
{
{
pwr_tCmd
cmd
=
"openCONFIGURATOR"
;
pwr_tCmd
cmd
=
"
export HOME=$pwrp_login;
openCONFIGURATOR"
;
system
(
cmd
);
system
(
cmd
);
...
...
otherio/wbl/mcomp/src/otherio.wb_load
View file @
b38c9521
This diff is collapsed.
Click to expand it.
src/lib/rt/src/rt_io_bus.c
View file @
b38c9521
...
@@ -269,6 +269,7 @@ pwr_tStatus io_bus_card_init( io_tCtx ctx,
...
@@ -269,6 +269,7 @@ pwr_tStatus io_bus_card_init( io_tCtx ctx,
if
(
chan_di
->
Number
==
0
)
{
if
(
chan_di
->
Number
==
0
)
{
*
input_area_offset
+=
*
input_area_chansize
;
*
input_area_offset
+=
*
input_area_chansize
;
*
input_area_chansize
=
GetChanSize
(
chan_di
->
Representation
);
*
input_area_chansize
=
GetChanSize
(
chan_di
->
Representation
);
chanp
->
size
=
*
input_area_chansize
;
}
}
if
(
!
chanp
->
sop
)
if
(
!
chanp
->
sop
)
continue
;
continue
;
...
@@ -278,6 +279,7 @@ pwr_tStatus io_bus_card_init( io_tCtx ctx,
...
@@ -278,6 +279,7 @@ pwr_tStatus io_bus_card_init( io_tCtx ctx,
chanp
->
offset
=
*
input_area_offset
;
chanp
->
offset
=
*
input_area_offset
;
chanp
->
mask
=
1
<<
chan_di
->
Number
;
chanp
->
mask
=
1
<<
chan_di
->
Number
;
chanp
->
size
=
*
input_area_chansize
;
if
(
byte_order
==
pwr_eByteOrderingEnum_BigEndian
)
{
if
(
byte_order
==
pwr_eByteOrderingEnum_BigEndian
)
{
if
(
chan_di
->
Representation
==
pwr_eDataRepEnum_Bit16
)
if
(
chan_di
->
Representation
==
pwr_eDataRepEnum_Bit16
)
chanp
->
mask
=
swap16
(
(
unsigned
short
)
chanp
->
mask
);
chanp
->
mask
=
swap16
(
(
unsigned
short
)
chanp
->
mask
);
...
@@ -415,6 +417,7 @@ pwr_tStatus io_bus_card_init( io_tCtx ctx,
...
@@ -415,6 +417,7 @@ pwr_tStatus io_bus_card_init( io_tCtx ctx,
if
(
chan_do
->
Number
==
0
)
{
if
(
chan_do
->
Number
==
0
)
{
*
output_area_offset
+=
*
output_area_chansize
;
*
output_area_offset
+=
*
output_area_chansize
;
*
output_area_chansize
=
GetChanSize
(
chan_do
->
Representation
);
*
output_area_chansize
=
GetChanSize
(
chan_do
->
Representation
);
chanp
->
size
=
*
output_area_chansize
;
}
}
if
(
!
chanp
->
sop
)
if
(
!
chanp
->
sop
)
continue
;
continue
;
...
@@ -424,6 +427,7 @@ pwr_tStatus io_bus_card_init( io_tCtx ctx,
...
@@ -424,6 +427,7 @@ pwr_tStatus io_bus_card_init( io_tCtx ctx,
chanp
->
offset
=
*
output_area_offset
;
chanp
->
offset
=
*
output_area_offset
;
chanp
->
mask
=
1
<<
chan_do
->
Number
;
chanp
->
mask
=
1
<<
chan_do
->
Number
;
chanp
->
size
=
*
output_area_chansize
;
if
(
byte_order
==
pwr_eByteOrderingEnum_BigEndian
)
{
if
(
byte_order
==
pwr_eByteOrderingEnum_BigEndian
)
{
if
(
chan_do
->
Representation
==
pwr_eDataRepEnum_Bit16
)
if
(
chan_do
->
Representation
==
pwr_eDataRepEnum_Bit16
)
chanp
->
mask
=
swap16
(
(
unsigned
short
)
chanp
->
mask
);
chanp
->
mask
=
swap16
(
(
unsigned
short
)
chanp
->
mask
);
...
@@ -473,6 +477,7 @@ pwr_tStatus io_bus_card_init( io_tCtx ctx,
...
@@ -473,6 +477,7 @@ pwr_tStatus io_bus_card_init( io_tCtx ctx,
if
(
chan_d
->
Number
==
0
)
{
if
(
chan_d
->
Number
==
0
)
{
*
input_area_offset
+=
*
input_area_chansize
;
*
input_area_offset
+=
*
input_area_chansize
;
*
input_area_chansize
=
GetChanSize
(
chan_d
->
Representation
);
*
input_area_chansize
=
GetChanSize
(
chan_d
->
Representation
);
chanp
->
size
=
*
input_area_chansize
;
}
}
if
(
!
chanp
->
sop
)
if
(
!
chanp
->
sop
)
continue
;
continue
;
...
@@ -482,6 +487,7 @@ pwr_tStatus io_bus_card_init( io_tCtx ctx,
...
@@ -482,6 +487,7 @@ pwr_tStatus io_bus_card_init( io_tCtx ctx,
chanp
->
offset
=
*
input_area_offset
;
chanp
->
offset
=
*
input_area_offset
;
chanp
->
mask
=
1
<<
chan_d
->
Number
;
chanp
->
mask
=
1
<<
chan_d
->
Number
;
chanp
->
size
=
*
input_area_chansize
;
if
(
byte_order
==
pwr_eByteOrderingEnum_BigEndian
)
{
if
(
byte_order
==
pwr_eByteOrderingEnum_BigEndian
)
{
if
(
chan_d
->
Representation
==
pwr_eDataRepEnum_Bit16
)
if
(
chan_d
->
Representation
==
pwr_eDataRepEnum_Bit16
)
chanp
->
mask
=
swap16
(
(
unsigned
short
)
chanp
->
mask
);
chanp
->
mask
=
swap16
(
(
unsigned
short
)
chanp
->
mask
);
...
@@ -494,6 +500,7 @@ pwr_tStatus io_bus_card_init( io_tCtx ctx,
...
@@ -494,6 +500,7 @@ pwr_tStatus io_bus_card_init( io_tCtx ctx,
if
(
chan_d
->
Number
==
0
)
{
if
(
chan_d
->
Number
==
0
)
{
*
output_area_offset
+=
*
output_area_chansize
;
*
output_area_offset
+=
*
output_area_chansize
;
*
output_area_chansize
=
GetChanSize
(
chan_d
->
Representation
);
*
output_area_chansize
=
GetChanSize
(
chan_d
->
Representation
);
chanp
->
size
=
*
output_area_chansize
;
}
}
if
(
!
chanp
->
sop
)
if
(
!
chanp
->
sop
)
continue
;
continue
;
...
@@ -503,6 +510,7 @@ pwr_tStatus io_bus_card_init( io_tCtx ctx,
...
@@ -503,6 +510,7 @@ pwr_tStatus io_bus_card_init( io_tCtx ctx,
chanp
->
offset
=
*
output_area_offset
;
chanp
->
offset
=
*
output_area_offset
;
chanp
->
mask
=
1
<<
chan_d
->
Number
;
chanp
->
mask
=
1
<<
chan_d
->
Number
;
chanp
->
size
=
*
output_area_chansize
;
if
(
byte_order
==
pwr_eByteOrderingEnum_BigEndian
)
{
if
(
byte_order
==
pwr_eByteOrderingEnum_BigEndian
)
{
if
(
chan_d
->
Representation
==
pwr_eDataRepEnum_Bit16
)
if
(
chan_d
->
Representation
==
pwr_eDataRepEnum_Bit16
)
chanp
->
mask
=
swap16
(
(
unsigned
short
)
chanp
->
mask
);
chanp
->
mask
=
swap16
(
(
unsigned
short
)
chanp
->
mask
);
...
...
src/tools/pwre/src/os_linux/pwre_configure.sh
View file @
b38c9521
...
@@ -142,9 +142,15 @@ pwre_config_check_lib()
...
@@ -142,9 +142,15 @@ pwre_config_check_lib()
fi
fi
if
test
$libfound
-eq
0
;
then
if
test
$libfound
-eq
0
;
then
if
test
$4
==
"powerlink"
;
then
lib_path
=
$libdir
elif
test
$4
==
"powerlinkcn"
;
then
lib_path
=
$libdir
else
lib_array[
$lib_cnt
]=
$libdir
lib_array[
$lib_cnt
]=
$libdir
lib_cnt
=
$((
lib_cnt+1
))
lib_cnt
=
$((
lib_cnt+1
))
fi
fi
fi
lib
=
${
file
##/*/lib
}
lib
=
${
file
##/*/lib
}
if
test
$4
==
"gtk"
;
then
if
test
$4
==
"gtk"
;
then
...
@@ -162,7 +168,9 @@ pwre_config_check_lib()
...
@@ -162,7 +168,9 @@ pwre_config_check_lib()
elif
test
$4
==
"libusb"
;
then
elif
test
$4
==
"libusb"
;
then
conf_lib
=
$conf_lib
" -lusb-1.0"
conf_lib
=
$conf_lib
" -lusb-1.0"
elif
test
$4
==
"powerlink"
;
then
elif
test
$4
==
"powerlink"
;
then
conf_libpowerlink
=
$conf_libpowerlink
" -l
${
lib
%.*
}
"
conf_libpowerlink
=
$conf_libpowerlink
" -L
$lib_path
-l
${
lib
%.*
}
"
elif
test
$4
==
"powerlinkcn"
;
then
conf_libpowerlinkcn
=
$conf_libpowerlinkcn
" -L
$lib_path
-l
${
lib
%.*
}
"
else
else
conf_lib
=
$conf_lib
" -l
${
lib
%%.*
}
"
conf_lib
=
$conf_lib
" -l
${
lib
%%.*
}
"
fi
fi
...
@@ -433,6 +441,7 @@ else
...
@@ -433,6 +441,7 @@ else
pwre_config_check_lib libpnioif PNAK lib pnak 1
"/usr/lib/libpnioif.a:/usr/local/lib/libpnioif.a"
pwre_config_check_lib libpnioif PNAK lib pnak 1
"/usr/lib/libpnioif.a:/usr/local/lib/libpnioif.a"
pwre_config_check_lib libusb LIBUSB lib libusb 1
"/usr/lib/libusb-1.0.so:/usr/lib/
$hwpl
-linux-
$gnu
/libusb-1.0.so"
pwre_config_check_lib libusb LIBUSB lib libusb 1
"/usr/lib/libusb-1.0.so:/usr/lib/
$hwpl
-linux-
$gnu
/libusb-1.0.so"
pwre_config_check_lib powerlink POWERLINK lib powerlink 1
"
$epl
/build/Examples/X86/Generic/powerlink_user_lib/libpowerlink.a"
pwre_config_check_lib powerlink POWERLINK lib powerlink 1
"
$epl
/build/Examples/X86/Generic/powerlink_user_lib/libpowerlink.a"
pwre_config_check_lib powerlinkcn POWERLINKCN lib powerlinkcn 1
"
$epl
/buildcn/Examples/X86/Generic/powerlink_user_lib/libpowerlink.a"
pwre_config_check_include mq MQ 0
"/usr/local/dmq/include/p_entry.h"
pwre_config_check_include mq MQ 0
"/usr/local/dmq/include/p_entry.h"
pwre_config_check_include wmq WMQ 1
"/opt/mqm/inc/cmqc.h"
pwre_config_check_include wmq WMQ 1
"/opt/mqm/inc/cmqc.h"
...
@@ -465,6 +474,7 @@ else
...
@@ -465,6 +474,7 @@ else
echo
"export pwre_conf_libpwrotherio=
\"
-lpwr_usbio_dummy -lpwr_usb_dummy -lpwr_cifx_dummy -lpwr_nodave_dummy -lpwr_epl_dummy
\"
"
>>
$cfile
echo
"export pwre_conf_libpwrotherio=
\"
-lpwr_usbio_dummy -lpwr_usb_dummy -lpwr_cifx_dummy -lpwr_nodave_dummy -lpwr_epl_dummy
\"
"
>>
$cfile
echo
"export pwre_conf_libpwrprofibus=
\"
-lpwr_pnak_dummy
\"
"
>>
$cfile
echo
"export pwre_conf_libpwrprofibus=
\"
-lpwr_pnak_dummy
\"
"
>>
$cfile
echo
"export pwre_conf_libpwrpowerlink=
\"
$conf_libpowerlink
\"
"
>>
$cfile
echo
"export pwre_conf_libpwrpowerlink=
\"
$conf_libpowerlink
\"
"
>>
$cfile
echo
"export pwre_conf_libpwrpowerlinkcn=
\"
$conf_libpowerlinkcn
\"
"
>>
$cfile
echo
"export pwre_conf_libpwrxtt=
\"
-lpwr_xtt -lpwr_ge -lpwr_cow -lpwr_flow -lpwr_glow
\"
"
>>
$cfile
echo
"export pwre_conf_libpwrxtt=
\"
-lpwr_xtt -lpwr_ge -lpwr_cow -lpwr_flow -lpwr_glow
\"
"
>>
$cfile
echo
"export pwre_conf_libpwrxttgtk=
\"
-lpwr_xtt_gtk -lpwr_ge_gtk -lpwr_cow_gtk -lpwr_flow_gtk -lpwr_glow_gtk
\"
"
>>
$cfile
echo
"export pwre_conf_libpwrxttgtk=
\"
-lpwr_xtt_gtk -lpwr_ge_gtk -lpwr_cow_gtk -lpwr_flow_gtk -lpwr_glow_gtk
\"
"
>>
$cfile
echo
"export pwre_conf_libpwrxttmotif=
\"
-lpwr_xtt_motif -lpwr_ge_motif -lpwr_cow_motif -lpwr_flow_motif -lpwr_glow_motif
\"
"
>>
$cfile
echo
"export pwre_conf_libpwrxttmotif=
\"
-lpwr_xtt_motif -lpwr_ge_motif -lpwr_cow_motif -lpwr_flow_motif -lpwr_glow_motif
\"
"
>>
$cfile
...
...
wb/exp/wb/src/pwr_wb_palette.cnf
View file @
b38c9521
...
@@ -332,8 +332,8 @@ palette NavigatorPalette
...
@@ -332,8 +332,8 @@ palette NavigatorPalette
class EPl_Module
class EPl_Module
menu Server
menu Server
{
{
class Epl_Server
class Epl_
CN
Server
class Epl_ServerModule
class Epl_
CN
ServerModule
}
}
}
}
menu Profibus
menu Profibus
...
...
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