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
09d072f4
Commit
09d072f4
authored
Mar 10, 2011
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support for IO board Hilscher cifX added
parent
15911f49
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
1137 additions
and
174 deletions
+1137
-174
otherio/lib/rt/src/os_linux/rt_io_m_hilscher_cifx.h
otherio/lib/rt/src/os_linux/rt_io_m_hilscher_cifx.h
+22
-0
otherio/lib/rt/src/os_linux/rt_io_m_hilscher_cifx_master.c
otherio/lib/rt/src/os_linux/rt_io_m_hilscher_cifx_master.c
+365
-0
otherio/lib/rt/src/os_linux/rt_io_m_hilscher_cifx_module.c
otherio/lib/rt/src/os_linux/rt_io_m_hilscher_cifx_module.c
+62
-0
otherio/lib/rt/src/os_linux/rt_io_m_mb_module.c
otherio/lib/rt/src/os_linux/rt_io_m_mb_module.c
+2
-2
otherio/lib/rt/src/os_linux/rt_io_m_mb_tcp_servermodule.c
otherio/lib/rt/src/os_linux/rt_io_m_mb_tcp_servermodule.c
+2
-2
otherio/lib/rt/src/os_linux/rt_io_m_usb_agent.c
otherio/lib/rt/src/os_linux/rt_io_m_usb_agent.c
+1
-1
otherio/lib/rt/src/rt_io_otherio.meth
otherio/lib/rt/src/rt_io_otherio.meth
+2
-0
otherio/wbl/mcomp/src/otherio.wb_load
otherio/wbl/mcomp/src/otherio.wb_load
+394
-5
profibus/lib/rt/src/os_linux/rt_io_m_pb_module.c
profibus/lib/rt/src/os_linux/rt_io_m_pb_module.c
+4
-4
profibus/lib/rt/src/os_linux/rt_io_m_pnmodule.cpp
profibus/lib/rt/src/os_linux/rt_io_m_pnmodule.cpp
+4
-4
src/doc/man/en_us/man_dg.dat
src/doc/man/en_us/man_dg.dat
+2
-2
src/lib/rt/src/rt_io_base.c
src/lib/rt/src/rt_io_base.c
+15
-8
src/lib/rt/src/rt_io_base.h
src/lib/rt/src/rt_io_base.h
+96
-94
src/lib/rt/src/rt_io_bus.c
src/lib/rt/src/rt_io_bus.c
+126
-18
src/lib/rt/src/rt_io_bus.h
src/lib/rt/src/rt_io_bus.h
+21
-17
src/tools/pwre/src/os_linux/pwre_configure.sh
src/tools/pwre/src/os_linux/pwre_configure.sh
+3
-1
src/wbl/pwrb/src/pwrb_c_max.wb_load
src/wbl/pwrb/src/pwrb_c_max.wb_load
+8
-8
src/wbl/pwrb/src/pwrb_c_min.wb_load
src/wbl/pwrb/src/pwrb_c_min.wb_load
+8
-8
No files found.
otherio/lib/rt/src/os_linux/rt_io_m_hilscher_cifx.h
0 → 100644
View file @
09d072f4
typedef
struct
{
unsigned
long
channel
;
unsigned
long
board
;
CIFXHANDLE
chan
;
unsigned
int
diag_cnt
;
unsigned
int
diag_interval
;
unsigned
int
dev_init
;
unsigned
int
dev_init_cnt
;
unsigned
int
dev_init_limit
;
int
input_area_size
;
int
output_area_size
;
void
*
input_area
;
void
*
output_area
;
}
io_sLocalHilscher_cifX_Master
;
typedef
struct
{
int
byte_ordering
;
int
float_representation
;
}
io_sLocalHilscher_cifX_Device
;
otherio/lib/rt/src/os_linux/rt_io_m_hilscher_cifx_master.c
0 → 100644
View file @
09d072f4
This diff is collapsed.
Click to expand it.
otherio/lib/rt/src/os_linux/rt_io_m_hilscher_cifx_module.c
0 → 100644
View file @
09d072f4
/*
* Proview $Id$
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* 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 the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* rt_io_m_hilscher_cifx_module.c -- I/O methods for class Hilscher_cifX_Module. */
#include "pwr.h"
#include "pwr_basecomponentclasses.h"
#include "pwr_otherioclasses.h"
#include "co_cdh.h"
#include "rt_io_base.h"
#include "rt_io_bus.h"
#include "rt_io_card_init.h"
#include "rt_io_card_close.h"
#include "rt_io_msg.h"
#if defined PWRE_CONF_CIFX
static
pwr_tStatus
IoCardInit
(
io_tCtx
ctx
,
io_sAgent
*
ap
,
io_sRack
*
rp
,
io_sCard
*
cp
)
{
return
IO__SUCCESS
;
}
static
pwr_tStatus
IoCardClose
(
io_tCtx
ctx
,
io_sAgent
*
ap
,
io_sRack
*
rp
,
io_sCard
*
cp
)
{
return
IO__SUCCESS
;
}
#else
static
pwr_tStatus
IoCardInit
(
io_tCtx
ctx
,
io_sAgent
*
ap
,
io_sRack
*
rp
,
io_sCard
*
cp
)
{
return
IO__RELEASEBUILD
;}
static
pwr_tStatus
IoCardClose
(
io_tCtx
ctx
,
io_sAgent
*
ap
,
io_sRack
*
rp
,
io_sCard
*
cp
)
{
return
IO__RELEASEBUILD
;}
#endif
/* Every method should be registred here. */
pwr_dExport
pwr_BindIoMethods
(
Hilscher_cifX_Module
)
=
{
pwr_BindIoMethod
(
IoCardInit
),
pwr_BindIoMethod
(
IoCardClose
),
pwr_NullMethod
};
otherio/lib/rt/src/os_linux/rt_io_m_mb_module.c
View file @
09d072f4
...
...
@@ -101,7 +101,7 @@ static pwr_tStatus IoCardRead (
}
if
(
slave
->
Status
==
MB__NORMAL
)
{
io_card_read
(
ctx
,
rp
,
cp
,
local
->
input_area
,
NULL
,
pwr_eByteOrderingEnum_BigEndian
,
pwr_eFloatRepEnum_FloatIntel
);
io_
bus_
card_read
(
ctx
,
rp
,
cp
,
local
->
input_area
,
NULL
,
pwr_eByteOrderingEnum_BigEndian
,
pwr_eFloatRepEnum_FloatIntel
);
}
// printf("Method Modbus_Module-IoCardRead\n");
return
IO__SUCCESS
;
...
...
@@ -142,7 +142,7 @@ static pwr_tStatus IoCardWrite (
}
if
(
slave
->
Status
==
MB__NORMAL
)
{
io_card_write
(
ctx
,
cp
,
local
->
output_area
,
pwr_eByteOrderingEnum_BigEndian
,
pwr_eFloatRepEnum_FloatIntel
);
io_
bus_
card_write
(
ctx
,
cp
,
local
->
output_area
,
pwr_eByteOrderingEnum_BigEndian
,
pwr_eFloatRepEnum_FloatIntel
);
}
// printf("Method Modbus_Module-IoCardWrite\n");
return
IO__SUCCESS
;
...
...
otherio/lib/rt/src/os_linux/rt_io_m_mb_tcp_servermodule.c
View file @
09d072f4
...
...
@@ -98,7 +98,7 @@ static pwr_tStatus IoCardRead (
if
(
server
->
Status
==
MB__NORMAL
)
{
thread_MutexLock
(
&
local_server
->
mutex
);
io_card_read
(
ctx
,
rp
,
cp
,
local
->
input_area
,
NULL
,
pwr_eByteOrderingEnum_BigEndian
,
pwr_eFloatRepEnum_FloatIntel
);
io_
bus_
card_read
(
ctx
,
rp
,
cp
,
local
->
input_area
,
NULL
,
pwr_eByteOrderingEnum_BigEndian
,
pwr_eFloatRepEnum_FloatIntel
);
thread_MutexUnlock
(
&
local_server
->
mutex
);
}
...
...
@@ -133,7 +133,7 @@ static pwr_tStatus IoCardWrite (
if
(
server
->
Status
==
MB__NORMAL
)
{
thread_MutexLock
(
&
local_server
->
mutex
);
io_card_write
(
ctx
,
cp
,
local
->
output_area
,
pwr_eByteOrderingEnum_BigEndian
,
pwr_eFloatRepEnum_FloatIntel
);
io_
bus_
card_write
(
ctx
,
cp
,
local
->
output_area
,
pwr_eByteOrderingEnum_BigEndian
,
pwr_eFloatRepEnum_FloatIntel
);
thread_MutexUnlock
(
&
local_server
->
mutex
);
}
...
...
otherio/lib/rt/src/os_linux/rt_io_m_usb_agent.c
View file @
09d072f4
...
...
@@ -48,7 +48,7 @@ static pwr_tStatus IoAgentInit( io_tCtx ctx,
op
->
Status
=
IO__DUMMYBUILD
;
else
op
->
Status
=
IO__INITFAIL
;
errh_Error
(
"Init of USB agent failed '%s', error status %d"
,
ap
->
Name
,
sts
);
errh_Error
(
"Init of USB agent failed '%s', error status %d"
,
ap
->
Name
,
sts
);
local
->
libusb_ctx
=
0
;
return
op
->
Status
;
...
...
otherio/lib/rt/src/rt_io_otherio.meth
View file @
09d072f4
...
...
@@ -12,4 +12,6 @@ GPIO_Module
Maxim_DS18B20
USB_Agent
Velleman_K8055_Board
Hilscher_cifX_Master
Hilscher_cifX_Module
#endif
\ No newline at end of file
otherio/wbl/mcomp/src/otherio.wb_load
View file @
09d072f4
This diff is collapsed.
Click to expand it.
profibus/lib/rt/src/os_linux/rt_io_m_pb_module.c
View file @
09d072f4
...
...
@@ -87,8 +87,8 @@ static pwr_tStatus IoCardRead (
/* on all inputs. Default StallAction is ResetInputs which means that */
/* all inputs will be zeroed */
io_card_read
(
ctx
,
rp
,
cp
,
local
->
input_area
,
slave
->
Diag
,
slave
->
ByteOrdering
,
slave
->
FloatRepresentation
);
io_
bus_
card_read
(
ctx
,
rp
,
cp
,
local
->
input_area
,
slave
->
Diag
,
slave
->
ByteOrdering
,
slave
->
FloatRepresentation
);
// printf("Method Pb_Module-IoCardRead\n");
return
IO__SUCCESS
;
...
...
@@ -116,8 +116,8 @@ static pwr_tStatus IoCardWrite (
op
->
Status
=
slave
->
Status
;
if
(
op
->
Status
==
PB__NORMAL
)
{
io_card_write
(
ctx
,
cp
,
local
->
output_area
,
slave
->
ByteOrdering
,
slave
->
FloatRepresentation
);
io_
bus_
card_write
(
ctx
,
cp
,
local
->
output_area
,
slave
->
ByteOrdering
,
slave
->
FloatRepresentation
);
}
// printf("Method Pb_Module-IoCardWrite\n");
return
IO__SUCCESS
;
...
...
profibus/lib/rt/src/os_linux/rt_io_m_pnmodule.cpp
View file @
09d072f4
...
...
@@ -88,8 +88,8 @@ static pwr_tStatus IoCardRead (
/* on all inputs. Default StallAction is ResetInputs which means that */
/* all inputs will be zeroed */
io_card_read
(
ctx
,
rp
,
cp
,
local
->
input_area
,
0
,
slave
->
ByteOrdering
,
slave
->
FloatRepresentation
);
io_
bus_
card_read
(
ctx
,
rp
,
cp
,
local
->
input_area
,
0
,
slave
->
ByteOrdering
,
slave
->
FloatRepresentation
);
return
IO__SUCCESS
;
}
...
...
@@ -116,8 +116,8 @@ static pwr_tStatus IoCardWrite (
op
->
Status
=
slave
->
Status
;
if
(
op
->
Status
==
PB__NORMAL
)
{
io_card_write
(
ctx
,
cp
,
local
->
output_area
,
slave
->
ByteOrdering
,
slave
->
FloatRepresentation
);
io_
bus_
card_write
(
ctx
,
cp
,
local
->
output_area
,
slave
->
ByteOrdering
,
slave
->
FloatRepresentation
);
}
// printf("Method Pb_Module-IoCardWrite\n");
return
IO__SUCCESS
;
...
...
src/doc/man/en_us/man_dg.dat
View file @
09d072f4
...
...
@@ -178,7 +178,7 @@ a realtime database, rtdb. The transfer from the Workbench to rtdb is done with
loadfiles, files that are generated from the Workbench and contains all its objects.
<h1>Control program
Proview offers a graphical programming language in w
it
ch logic, Grafcet sequences and control
Proview offers a graphical programming language in w
hi
ch logic, Grafcet sequences and control
loops is programmed. It is named the PLC program. Also the PLC program is a part of the object
tree. It is configured by placing specific program objects, PlcPgm, in the Plant hierarchy.
When opening a PlcPgm you enter the Plc Editor, in which the graphical programming is preformed.
...
...
@@ -7393,7 +7393,7 @@ IndError in the main object, and color the symbol yellow or red, or flashing red
are set.
<image> ced_fig20.gif
<b>The grahic symbol is drawn in Ge wit
c
h HostObject default dynamic.
<b>The grahic symbol is drawn in Ge with HostObject default dynamic.
...
...
src/lib/rt/src/rt_io_base.c
View file @
09d072f4
...
...
@@ -2541,7 +2541,8 @@ pwr_tStatus io_init (
{
if
(
rp
->
Process
&
process
)
{
if
(
rp
->
Init
!=
NULL
)
if
(
rp
->
Init
!=
NULL
&&
!
rp
->
MethodDisabled
)
{
sts
=
(
rp
->
Init
)
(
*
ctx
,
ap
,
rp
);
if
(
EVEN
(
sts
))
return
sts
;
...
...
@@ -2551,7 +2552,8 @@ pwr_tStatus io_init (
}
for
(
cp
=
rp
->
cardlist
;
cp
!=
NULL
;
cp
=
cp
->
next
)
{
if
(
cp
->
Init
!=
NULL
)
if
(
cp
->
Init
!=
NULL
&&
!
cp
->
MethodDisabled
)
{
sts
=
(
cp
->
Init
)
(
*
ctx
,
ap
,
rp
,
cp
);
if
(
EVEN
(
sts
))
return
sts
;
...
...
@@ -2670,7 +2672,8 @@ pwr_tStatus io_read(
for
(
rp
=
ap
->
racklist
;
rp
!=
NULL
;
rp
=
rp
->
next
)
{
if
(
rp
->
Process
&
ctx
->
Process
&&
rp
->
Action
&
io_mAction_Read
)
rp
->
Action
&
io_mAction_Read
&&
!
rp
->
MethodDisabled
)
{
if
(
rp
->
scan_interval_cnt
<=
1
)
{
...
...
@@ -2684,7 +2687,8 @@ pwr_tStatus io_read(
for
(
cp
=
rp
->
cardlist
;
cp
!=
NULL
;
cp
=
cp
->
next
)
{
if
(
cp
->
Action
&
io_mAction_Read
)
if
(
cp
->
Action
&
io_mAction_Read
&&
!
cp
->
MethodDisabled
)
{
if
(
cp
->
scan_interval_cnt
<=
1
)
{
...
...
@@ -2728,7 +2732,7 @@ pwr_tStatus io_write(
{
for
(
cp
=
rp
->
cardlist
;
cp
!=
NULL
;
cp
=
cp
->
next
)
{
if
(
cp
->
Action
&
io_mAction_Write
)
if
(
cp
->
Action
&
io_mAction_Write
&&
!
cp
->
MethodDisabled
)
{
if
(
cp
->
scan_interval_cnt
<=
1
)
{
...
...
@@ -2741,7 +2745,8 @@ pwr_tStatus io_write(
}
}
if
(
rp
->
Process
&
ctx
->
Process
&&
rp
->
Action
&
io_mAction_Write
)
rp
->
Action
&
io_mAction_Write
&&
!
rp
->
MethodDisabled
)
{
if
(
rp
->
scan_interval_cnt
<=
1
)
{
...
...
@@ -2803,7 +2808,8 @@ pwr_tStatus io_swap(
for
(
rp
=
ap
->
racklist
;
rp
!=
NULL
;
rp
=
rp
->
next
)
{
if
(
rp
->
Action
&
io_mAction_Swap
)
if
(
rp
->
Action
&
io_mAction_Swap
&&
!
rp
->
MethodDisabled
)
{
if
(
rp
->
scan_interval_cnt
<=
1
)
{
...
...
@@ -2817,7 +2823,8 @@ pwr_tStatus io_swap(
for
(
cp
=
rp
->
cardlist
;
cp
!=
NULL
;
cp
=
cp
->
next
)
{
if
(
cp
->
Action
&
io_mAction_Swap
)
if
(
cp
->
Action
&
io_mAction_Swap
&&
!
cp
->
MethodDisabled
)
{
if
(
cp
->
scan_interval_cnt
<=
1
)
{
...
...
src/lib/rt/src/rt_io_base.h
View file @
09d072f4
...
...
@@ -66,122 +66,124 @@ extern pwr_tBoolean io_fatal_error;
typedef
enum
{
io_eType_Node
,
io_eType_Agent
,
io_eType_Rack
,
io_eType_Card
io_eType_Node
,
io_eType_Agent
,
io_eType_Rack
,
io_eType_Card
}
io_eType
;
typedef
enum
{
io_mAction_None
=
0
,
io_mAction_Read
=
1
<<
0
,
io_mAction_Write
=
1
<<
1
,
io_mAction_Swap
=
1
<<
2
io_mAction_None
=
0
,
io_mAction_Read
=
1
<<
0
,
io_mAction_Write
=
1
<<
1
,
io_mAction_Swap
=
1
<<
2
}
io_mAction
;
typedef
enum
{
io_mProcess_None
=
0
,
io_mProcess_Plc
=
1
<<
0
,
io_mProcess_IoComm
=
1
<<
1
,
io_mProcess_Profibus
=
1
<<
2
,
io_mProcess_User
=
1
<<
3
,
io_mProcess_All
=
~
0
io_mProcess_None
=
0
,
io_mProcess_Plc
=
1
<<
0
,
io_mProcess_IoComm
=
1
<<
1
,
io_mProcess_Profibus
=
1
<<
2
,
io_mProcess_User
=
1
<<
3
,
io_mProcess_All
=
~
0
}
io_mProcess
;
typedef
struct
{
void
*
cop
;
/* Pointer to channel object */
pwr_tDlid
ChanDlid
;
/* Dlid for pointer to channel */
pwr_sAttrRef
ChanAref
;
/* AttrRef for channel */
void
*
sop
;
/* Pointer to signal object */
pwr_tDlid
SigDlid
;
/* Dlid for pointer to signal */
pwr_sAttrRef
SigAref
;
/* AttrRef for signal */
void
*
vbp
;
/* Pointer to valuebase for signal */
void
*
abs_vbp
;
/* Pointer to absvaluebase (Co only) */
pwr_tClassId
ChanClass
;
/* Class of channel object */
pwr_tClassId
SigClass
;
/* Class of signal object */
pwr_tUInt32
size
;
/* Size of channel in byte */
pwr_tUInt32
offset
;
/* Offset to channel in card */
pwr_tUInt32
mask
;
/* Mask for bit oriented channels */
pwr_tUInt32
udata
;
/* User defined data */
void
*
cop
;
/* Pointer to channel object */
pwr_tDlid
ChanDlid
;
/* Dlid for pointer to channel */
pwr_sAttrRef
ChanAref
;
/* AttrRef for channel */
void
*
sop
;
/* Pointer to signal object */
pwr_tDlid
SigDlid
;
/* Dlid for pointer to signal */
pwr_sAttrRef
SigAref
;
/* AttrRef for signal */
void
*
vbp
;
/* Pointer to valuebase for signal */
void
*
abs_vbp
;
/* Pointer to absvaluebase (Co only) */
pwr_tClassId
ChanClass
;
/* Class of channel object */
pwr_tClassId
SigClass
;
/* Class of signal object */
pwr_tUInt32
size
;
/* Size of channel in byte */
pwr_tUInt32
offset
;
/* Offset to channel in card */
pwr_tUInt32
mask
;
/* Mask for bit oriented channels */
pwr_tUInt32
udata
;
/* User defined data */
}
io_sChannel
;
typedef
struct
s_Card
{
pwr_tClassId
Class
;
/* Class of card object */
pwr_tObjid
Objid
;
/* Objid of card object */
pwr_tOName
Name
;
/* Full name of card object */
io_mAction
Action
;
/* Type of method defined (Read/Write)*/
io_mProcess
Process
;
/* Process number */
pwr_tStatus
(
*
Init
)
();
/* Init method */
pwr_tStatus
(
*
Close
)
();
/* Close method */
pwr_tStatus
(
*
Read
)
();
/* Read method */
pwr_tStatus
(
*
Write
)
();
/* Write method */
pwr_tStatus
(
*
Swap
)
();
/* Write method */
pwr_tAddress
*
op
;
/* Pointer to card object */
pwr_tDlid
Dlid
;
/* Dlid for card object pointer */
pwr_tUInt32
size
;
/* Size of card data area in byte */
pwr_tUInt32
offset
;
/* Offset to card data area in rack */
int
scan_interval
;
/* Interval between scans */
int
scan_interval_cnt
;
/* Counter to detect next time to scan */
int
AgentControlled
;
/* TRUE if kontrolled by agent */
int
ChanListSize
;
/* Size of chanlist */
io_sChannel
*
chanlist
;
/* Array of channel structures */
void
*
Local
;
/* Pointer to method defined data structure */
struct
s_Card
*
next
;
/* Next card */
pwr_tClassId
Class
;
/* Class of card object */
pwr_tObjid
Objid
;
/* Objid of card object */
pwr_tOName
Name
;
/* Full name of card object */
io_mAction
Action
;
/* Type of method defined (Read/Write)*/
io_mProcess
Process
;
/* Process number */
pwr_tStatus
(
*
Init
)
();
/* Init method */
pwr_tStatus
(
*
Close
)
();
/* Close method */
pwr_tStatus
(
*
Read
)
();
/* Read method */
pwr_tStatus
(
*
Write
)
();
/* Write method */
pwr_tStatus
(
*
Swap
)
();
/* Swap method */
pwr_tAddress
*
op
;
/* Pointer to card object */
pwr_tDlid
Dlid
;
/* Dlid for card object pointer */
pwr_tUInt32
size
;
/* Size of card data area in byte */
pwr_tUInt32
offset
;
/* Offset to card data area in rack */
int
scan_interval
;
/* Interval between scans */
int
scan_interval_cnt
;
/* Counter to detect next time to scan */
int
AgentControlled
;
/* TRUE if kontrolled by agent */
int
ChanListSize
;
/* Size of chanlist */
io_sChannel
*
chanlist
;
/* Array of channel structures */
void
*
Local
;
/* Pointer to method defined data structure */
int
MethodDisabled
;
/* Card method disabled */
struct
s_Card
*
next
;
/* Next card */
}
io_sCard
;
typedef
struct
s_Rack
{
pwr_tClassId
Class
;
/* Class of rack object */
pwr_tObjid
Objid
;
/* Objid of rack object */
pwr_tOName
Name
;
/* Full name of rack object */
io_mAction
Action
;
/* Type of method defined (Read/Write)*/
io_mProcess
Process
;
/* Process number */
pwr_tStatus
(
*
Init
)
();
/* Init method */
pwr_tStatus
(
*
Close
)
();
/* Close method */
pwr_tStatus
(
*
Read
)
();
/* Read method */
pwr_tStatus
(
*
Write
)
();
/* Write method */
pwr_tStatus
(
*
Swap
)
();
/* Swap method */
void
*
op
;
/* Pointer to rack object */
pwr_tDlid
Dlid
;
/* Dlid fr rack object pointer */
pwr_tUInt32
size
;
/* Size of rack data area in byte */
pwr_tUInt32
offset
;
/* Offset to rack data area in agent */
int
scan_interval
;
/* Interval between scans */
int
scan_interval_cnt
;
/* Counter to detect next time to scan */
int
AgentControlled
;
/* TRUE if kontrolled by agent */
io_sCard
*
cardlist
;
/* List of card structures */
void
*
Local
;
/* Pointer to method defined data structure */
struct
s_Rack
*
next
;
/* Next rack */
pwr_tClassId
Class
;
/* Class of rack object */
pwr_tObjid
Objid
;
/* Objid of rack object */
pwr_tOName
Name
;
/* Full name of rack object */
io_mAction
Action
;
/* Type of method defined (Read/Write)*/
io_mProcess
Process
;
/* Process number */
pwr_tStatus
(
*
Init
)
();
/* Init method */
pwr_tStatus
(
*
Close
)
();
/* Close method */
pwr_tStatus
(
*
Read
)
();
/* Read method */
pwr_tStatus
(
*
Write
)
();
/* Write method */
pwr_tStatus
(
*
Swap
)
();
/* Swap method */
void
*
op
;
/* Pointer to rack object */
pwr_tDlid
Dlid
;
/* Dlid fr rack object pointer */
pwr_tUInt32
size
;
/* Size of rack data area in byte */
pwr_tUInt32
offset
;
/* Offset to rack data area in agent */
int
scan_interval
;
/* Interval between scans */
int
scan_interval_cnt
;
/* Counter to detect next time to scan */
int
AgentControlled
;
/* TRUE if kontrolled by agent */
io_sCard
*
cardlist
;
/* List of card structures */
void
*
Local
;
/* Pointer to method defined data structure */
int
MethodDisabled
;
/* Rack method disabled */
struct
s_Rack
*
next
;
/* Next rack */
}
io_sRack
;
typedef
struct
s_Agent
{
pwr_tClassId
Class
;
/* Class of agent object */
pwr_tObjid
Objid
;
/* Objid of agent object */
pwr_tOName
Name
;
/* Full name of agent object */
io_mAction
Action
;
/* Type of method defined (Read/Write)*/
io_mProcess
Process
;
/* Process number */
pwr_tStatus
(
*
Init
)
();
/* Init method */
pwr_tStatus
(
*
Close
)
();
/* Close method */
pwr_tStatus
(
*
Read
)
();
/* Read method */
pwr_tStatus
(
*
Write
)
();
/* Write method */
pwr_tStatus
(
*
Swap
)
();
/* Write
method */
void
*
op
;
/* Pointer to agent object */
pwr_tDlid
Dlid
;
/* Dlid for agent object pointer */
int
scan_interval
;
/* Interval between scans */
int
scan_interval_cnt
;
/* Counter to detect next time to scan */
io_sRack
*
racklist
;
/* List of rack structures */
void
*
Local
;
/* Pointer to method defined data structure */
struct
s_Agent
*
next
;
/* Next agent */
pwr_tClassId
Class
;
/* Class of agent object */
pwr_tObjid
Objid
;
/* Objid of agent object */
pwr_tOName
Name
;
/* Full name of agent object */
io_mAction
Action
;
/* Type of method defined (Read/Write)*/
io_mProcess
Process
;
/* Process number */
pwr_tStatus
(
*
Init
)
();
/* Init method */
pwr_tStatus
(
*
Close
)
();
/* Close method */
pwr_tStatus
(
*
Read
)
();
/* Read method */
pwr_tStatus
(
*
Write
)
();
/* Write method */
pwr_tStatus
(
*
Swap
)
();
/* Swap
method */
void
*
op
;
/* Pointer to agent object */
pwr_tDlid
Dlid
;
/* Dlid for agent object pointer */
int
scan_interval
;
/* Interval between scans */
int
scan_interval_cnt
;
/* Counter to detect next time to scan */
io_sRack
*
racklist
;
/* List of rack structures */
void
*
Local
;
/* Pointer to method defined data structure */
struct
s_Agent
*
next
;
/* Next agent */
}
io_sAgent
;
struct
io_sCtx
{
io_sAgent
*
agentlist
;
/* List of agent structures */
io_mProcess
Process
;
/* Callers process number */
pwr_tObjid
Thread
;
/* Callers thread objid */
int
RelativVector
;
/* Used by plc */
pwr_sNode
*
Node
;
/* Pointer to node object */
pwr_sClass_IOHandler
*
IOHandler
;
/* Pointer to IO Handler object */
float
ScanTime
;
/* Scantime supplied by caller */
io_tSupCtx
SupCtx
;
/* Context for supervise object lists */
io_sAgent
*
agentlist
;
/* List of agent structures */
io_mProcess
Process
;
/* Callers process number */
pwr_tObjid
Thread
;
/* Callers thread objid */
int
RelativVector
;
/* Used by plc */
pwr_sNode
*
Node
;
/* Pointer to node object */
pwr_sClass_IOHandler
*
IOHandler
;
/* Pointer to IO Handler object */
float
ScanTime
;
/* Scantime supplied by caller */
io_tSupCtx
SupCtx
;
/* Context for supervise object lists */
};
/*----------------------------------------------------------------------------*\
...
...
src/lib/rt/src/rt_io_bus.c
View file @
09d072f4
...
...
@@ -180,18 +180,129 @@ static void ConvertAi ( io_tCtx ctx,
}
/*----------------------------------------------------------------------------*\
Initialization of a
i signals and channels
.
Initialization of a
bus card
.
\*----------------------------------------------------------------------------*/
void
io_card_read
(
io_tCtx
ctx
,
io_sRack
*
rp
,
io_sCard
*
cp
,
void
*
input_area
,
void
*
diag_area
,
pwr_tByteOrderingEnum
byte_order
,
pwr_tFloatRepEnum
float_rep
)
pwr_tStatus
io_bus_card_init
(
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
)
{
int
i
;
for
(
i
=
0
;
i
<
cp
->
ChanListSize
;
i
++
)
{
io_sChannel
*
chanp
=
&
cp
->
chanlist
[
i
];
if
(
!
chanp
->
sop
)
continue
;
switch
(
chanp
->
ChanClass
)
{
case
pwr_cClass_ChanDi
:
{
pwr_sClass_ChanDi
*
chan_di
=
(
pwr_sClass_ChanDi
*
)
chanp
->
cop
;
if
(
chan_di
->
Number
==
0
)
{
*
input_area_offset
+=
*
input_area_chansize
;
*
input_area_chansize
=
GetChanSize
(
chan_di
->
Representation
);
}
chanp
->
offset
=
*
input_area_offset
;
chanp
->
mask
=
1
<<
chan_di
->
Number
;
if
(
byte_order
==
pwr_eByteOrderingEnum_BigEndian
)
{
if
(
chan_di
->
Representation
==
pwr_eDataRepEnum_Bit16
)
chanp
->
mask
=
swap16
(
(
unsigned
short
)
chanp
->
mask
);
else
if
(
chan_di
->
Representation
==
pwr_eDataRepEnum_Bit32
)
chanp
->
mask
=
swap32
(
chanp
->
mask
);
}
break
;
}
case
pwr_cClass_ChanAi
:
{
pwr_sClass_ChanAi
*
chan_ai
=
(
pwr_sClass_ChanAi
*
)
chanp
->
cop
;
*
input_area_offset
+=
*
input_area_chansize
;
*
input_area_chansize
=
GetChanSize
(
chan_ai
->
Representation
);
chanp
->
offset
=
*
input_area_offset
;
chanp
->
size
=
*
input_area_chansize
;
chanp
->
mask
=
0
;
io_AiRangeToCoef
(
chanp
);
break
;
}
case
pwr_cClass_ChanAit
:
{
pwr_sClass_ChanAit
*
chan_ai
=
(
pwr_sClass_ChanAit
*
)
chanp
->
cop
;
*
input_area_offset
+=
*
input_area_chansize
;
*
input_area_chansize
=
GetChanSize
(
chan_ai
->
Representation
);
chanp
->
offset
=
*
input_area_offset
;
chanp
->
size
=
*
input_area_chansize
;
chanp
->
mask
=
0
;
io_AiRangeToCoef
(
chanp
);
break
;
}
case
pwr_cClass_ChanIi
:
{
pwr_sClass_ChanIi
*
chan_ii
=
(
pwr_sClass_ChanIi
*
)
chanp
->
cop
;
*
input_area_offset
+=
*
input_area_chansize
;
*
input_area_chansize
=
GetChanSize
(
chan_ii
->
Representation
);
chanp
->
offset
=
*
input_area_offset
;
chanp
->
size
=
*
input_area_chansize
;
chanp
->
mask
=
0
;
break
;
}
case
pwr_cClass_ChanDo
:
{
pwr_sClass_ChanDo
*
chan_do
=
(
pwr_sClass_ChanDo
*
)
chanp
->
cop
;
if
(
chan_do
->
Number
==
0
)
{
*
output_area_offset
+=
*
output_area_chansize
;
*
output_area_chansize
=
GetChanSize
(
chan_do
->
Representation
);
}
chanp
->
offset
=
*
output_area_offset
;
chanp
->
mask
=
1
<<
chan_do
->
Number
;
if
(
byte_order
==
pwr_eByteOrderingEnum_BigEndian
)
{
if
(
chan_do
->
Representation
==
pwr_eDataRepEnum_Bit16
)
chanp
->
mask
=
swap16
(
(
unsigned
short
)
chanp
->
mask
);
else
if
(
chan_do
->
Representation
==
pwr_eDataRepEnum_Bit32
)
chanp
->
mask
=
swap32
(
chanp
->
mask
);
}
break
;
}
case
pwr_cClass_ChanAo
:
{
pwr_sClass_ChanAo
*
chan_ao
=
(
pwr_sClass_ChanAo
*
)
chanp
->
cop
;
*
output_area_offset
+=
*
output_area_chansize
;
*
output_area_chansize
=
GetChanSize
(
chan_ao
->
Representation
);
chanp
->
offset
=
*
output_area_offset
;
chanp
->
size
=
*
output_area_chansize
;
chanp
->
mask
=
0
;
io_AoRangeToCoef
(
chanp
);
break
;
}
case
pwr_cClass_ChanIo
:
{
pwr_sClass_ChanIo
*
chan_io
=
(
pwr_sClass_ChanIo
*
)
chanp
->
cop
;
*
output_area_offset
+=
*
output_area_chansize
;
*
output_area_chansize
=
GetChanSize
(
chan_io
->
Representation
);
chanp
->
offset
=
*
output_area_offset
;
chanp
->
size
=
*
output_area_chansize
;
chanp
->
mask
=
0
;
break
;
}
}
}
return
IO__SUCCESS
;
}
/*----------------------------------------------------------------------------*\
Read method for bus-card
\*----------------------------------------------------------------------------*/
void
io_bus_card_read
(
io_tCtx
ctx
,
io_sRack
*
rp
,
io_sCard
*
cp
,
void
*
input_area
,
void
*
diag_area
,
pwr_tByteOrderingEnum
byte_order
,
pwr_tFloatRepEnum
float_rep
)
{
io_sChannel
*
chanp
;
pwr_sClass_ChanDi
*
chan_di
;
...
...
@@ -485,14 +596,11 @@ void io_card_read(
\*----------------------------------------------------------------------------*/
void
io_card_write
(
io_tCtx
ctx
,
io_sCard
*
cp
,
void
*
output_area
,
pwr_tByteOrderingEnum
byte_order
,
pwr_tFloatRepEnum
float_rep
)
void
io_bus_card_write
(
io_tCtx
ctx
,
io_sCard
*
cp
,
void
*
output_area
,
pwr_tByteOrderingEnum
byte_order
,
pwr_tFloatRepEnum
float_rep
)
{
io_sChannel
*
chanp
;
...
...
src/lib/rt/src/rt_io_bus.h
View file @
09d072f4
...
...
@@ -65,23 +65,27 @@ unsigned short swap16(unsigned short in);
unsigned
int
swap32
(
unsigned
int
in
);
void
io_card_read
(
io_tCtx
ctx
,
io_sRack
*
rp
,
io_sCard
*
cp
,
void
*
input_area
,
void
*
diag_area
,
pwr_tByteOrderingEnum
byte_order
,
pwr_tFloatRepEnum
float_rep
);
void
io_card_write
(
io_tCtx
ctx
,
io_sCard
*
cp
,
void
*
output_area
,
pwr_tByteOrderingEnum
byte_order
,
pwr_tFloatRepEnum
float_rep
);
pwr_tStatus
io_bus_card_init
(
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
);
void
io_bus_card_read
(
io_tCtx
ctx
,
io_sRack
*
rp
,
io_sCard
*
cp
,
void
*
input_area
,
void
*
diag_area
,
pwr_tByteOrderingEnum
byte_order
,
pwr_tFloatRepEnum
float_rep
);
void
io_bus_card_write
(
io_tCtx
ctx
,
io_sCard
*
cp
,
void
*
output_area
,
pwr_tByteOrderingEnum
byte_order
,
pwr_tFloatRepEnum
float_rep
);
#ifdef __cplusplus
}
...
...
src/tools/pwre/src/os_linux/pwre_configure.sh
View file @
09d072f4
...
...
@@ -116,7 +116,7 @@ pwre_config_check_lib()
elif
test
$4
==
"wmq"
;
then
conf_libwmq
=
$conf_libwmq
" -l
${
lib
%.*
}
"
else
conf_lib
=
$conf_lib
" -l
${
lib
%.*
}
"
conf_lib
=
$conf_lib
" -l
${
lib
%
%
.*
}
"
fi
elif
test
$3
==
"gtk"
;
then
conf_libgtk
=
$conf_libgtk
"
\\\`
pkg-config --libs gtk+-2.0
\\\`
"
...
...
@@ -318,6 +318,7 @@ else
pwre_config_check_lib wmq WMQ lib wmq 1 /usr/lib/libmqic.so
pwre_config_check_lib libpnioif PNAK lib lib 1 /usr/lib/libpnioif.a:/usr/local/lib/libpnioif.a
pwre_config_check_lib libusb LIBUSB lib lib 1 /usr/lib/libusb-1.0.so
pwre_config_check_lib libcifx LIBCIFX lib lib 1 /usr/lib/libcifx.so.1
pwre_config_check_lib librt LIBRT lib lib 0 /usr/lib/librt.so:/usr/lib/librt.a
pwre_config_check_lib libfl LIBFL lib lib 0 /usr/lib/libfl.so:/usr/lib/libfl.a
pwre_config_check_lib libX11 LIBX11 lib lib 0 /usr/lib/libX11.so
...
...
@@ -329,6 +330,7 @@ else
pwre_config_check_include jni JNI 1
$jdk
/include/jni.h
pwre_config_check_include jni JNI 0
$jdk
/include/linux/jni_md.h
pwre_config_check_include wmq WMQ 1 /opt/mqm/inc/cmqc.h
pwre_config_check_include cifx CIFX 1 /usr/local/include/cifx/cifxlinux.h
export
pwre_conf_alsa
=
1
...
...
src/wbl/pwrb/src/pwrb_c_max.wb_load
View file @
09d072f4
...
...
@@ -41,7 +41,7 @@ SObject pwrb:Class
Attr StructName = "Max"
EndBody
!/**
!
Integer
input.
!
Analog
input.
!*/
Object In1 $Input 1
Body SysBody
...
...
@@ -51,7 +51,7 @@ SObject pwrb:Class
EndBody
EndObject
!/**
!
Integer
input.
!
Analog
input.
!*/
Object In2 $Input 2
Body SysBody
...
...
@@ -61,7 +61,7 @@ SObject pwrb:Class
EndBody
EndObject
!/**
!
Integer
input.
!
Analog
input.
!*/
Object In3 $Input 3
Body SysBody
...
...
@@ -71,7 +71,7 @@ SObject pwrb:Class
EndBody
EndObject
!/**
!
Integer
input.
!
Analog
input.
!*/
Object In4 $Input 4
Body SysBody
...
...
@@ -81,7 +81,7 @@ SObject pwrb:Class
EndBody
EndObject
!/**
!
Integer
input.
!
Analog
input.
!*/
Object In5 $Input 5
Body SysBody
...
...
@@ -91,7 +91,7 @@ SObject pwrb:Class
EndBody
EndObject
!/**
!
Integer
input.
!
Analog
input.
!*/
Object In6 $Input 6
Body SysBody
...
...
@@ -101,7 +101,7 @@ SObject pwrb:Class
EndBody
EndObject
!/**
!
Integer
input.
!
Analog
input.
!*/
Object In7 $Input 7
Body SysBody
...
...
@@ -111,7 +111,7 @@ SObject pwrb:Class
EndBody
EndObject
!/**
!
Integer
input.
!
Analog
input.
!*/
Object In8 $Input 8
Body SysBody
...
...
src/wbl/pwrb/src/pwrb_c_min.wb_load
View file @
09d072f4
...
...
@@ -41,7 +41,7 @@ SObject pwrb:Class
Attr StructName = "Min"
EndBody
!/**
!
Integer
input.
!
Analog
input.
!*/
Object In1 $Input 1
Body SysBody
...
...
@@ -51,7 +51,7 @@ SObject pwrb:Class
EndBody
EndObject
!/**
!
Integer
input.
!
Analog
input.
!*/
Object In2 $Input 2
Body SysBody
...
...
@@ -61,7 +61,7 @@ SObject pwrb:Class
EndBody
EndObject
!/**
!
Integer
input.
!
Analog
input.
!*/
Object In3 $Input 3
Body SysBody
...
...
@@ -71,7 +71,7 @@ SObject pwrb:Class
EndBody
EndObject
!/**
!
Integer
input.
!
Analog
input.
!*/
Object In4 $Input 4
Body SysBody
...
...
@@ -81,7 +81,7 @@ SObject pwrb:Class
EndBody
EndObject
!/**
!
Integer
input.
!
Analog
input.
!*/
Object In5 $Input 5
Body SysBody
...
...
@@ -91,7 +91,7 @@ SObject pwrb:Class
EndBody
EndObject
!/**
!
Integer
input.
!
Analog
input.
!*/
Object In6 $Input 6
Body SysBody
...
...
@@ -101,7 +101,7 @@ SObject pwrb:Class
EndBody
EndObject
!/**
!
Integer
input.
!
Analog
input.
!*/
Object In7 $Input 7
Body SysBody
...
...
@@ -111,7 +111,7 @@ SObject pwrb:Class
EndBody
EndObject
!/**
!
Integer
input.
!
Analog
input.
!*/
Object In8 $Input 8
Body SysBody
...
...
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