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
962afb16
Commit
962afb16
authored
May 31, 2011
by
Claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cifx dummy archive added
parent
e7083f64
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
533 additions
and
103 deletions
+533
-103
otherio/lib/cifx_dummy/src/cifx_dummy_functions.c
otherio/lib/cifx_dummy/src/cifx_dummy_functions.c
+42
-0
otherio/lib/cifx_dummy/src/os_templ/hw_templ/makefile
otherio/lib/cifx_dummy/src/os_templ/hw_templ/makefile
+15
-0
otherio/lib/rt/src/os_linux/rt_io_m_hilscher_cifx_pncontroller.cpp
...ib/rt/src/os_linux/rt_io_m_hilscher_cifx_pncontroller.cpp
+152
-101
otherio/wbl/mcomp/src/otherio.wb_load
otherio/wbl/mcomp/src/otherio.wb_load
+314
-0
profibus/lib/rt/src/os_linux/rt_io_pn_locals.h
profibus/lib/rt/src/os_linux/rt_io_pn_locals.h
+3
-2
profibus/wbl/mcomp/src/profibus.wb_load
profibus/wbl/mcomp/src/profibus.wb_load
+7
-0
No files found.
otherio/lib/cifx_dummy/src/cifx_dummy_functions.c
0 → 100644
View file @
962afb16
/*
Dummy for libcifx.a
*/
#include <stdint.h>
typedef
void
*
CIFXHANDLE
;
typedef
struct
{
char
p
[
10
];
}
CIFX_PACKET
;
struct
CIFX_LINUX_INIT
{
char
p
[
10
];
};
int32_t
cifXDriverInit
(
const
struct
CIFX_LINUX_INIT
*
init_params
)
{
return
-
1
;}
int32_t
xSysdeviceOpen
(
CIFXHANDLE
hDriver
,
char
*
szBoard
,
CIFXHANDLE
*
phSysdevice
)
{
return
-
1
;}
int32_t
xSysdeviceInfo
(
CIFXHANDLE
hSysdevice
,
uint32_t
ulCmd
,
uint32_t
ulSize
,
void
*
pvInfo
)
{
return
-
1
;}
int32_t
xChannelCommonStatusBlock
(
CIFXHANDLE
hChannel
,
uint32_t
ulCmd
,
uint32_t
ulOffset
,
uint32_t
ulDataLen
,
void
*
pvData
)
{
return
-
1
;}
int32_t
xChannelHostState
(
CIFXHANDLE
hChannel
,
uint32_t
ulCmd
,
uint32_t
*
pulState
,
uint32_t
ulTimeout
)
{
return
-
1
;}
int32_t
xChannelBusState
(
CIFXHANDLE
hChannel
,
uint32_t
ulCmd
,
uint32_t
*
pulState
,
uint32_t
ulTimeout
)
{
return
-
1
;}
int32_t
xDriverOpen
(
CIFXHANDLE
*
phDriver
)
{
return
-
1
;}
int32_t
xChannelOpen
(
CIFXHANDLE
hDriver
,
char
*
szBoard
,
uint32_t
ulChannel
,
CIFXHANDLE
*
phChannel
)
{
return
-
1
;
}
int32_t
xChannelReset
(
CIFXHANDLE
hChannel
,
uint32_t
ulResetMode
,
uint32_t
ulTimeout
)
{
return
-
1
;
}
int32_t
xDriverEnumBoards
(
CIFXHANDLE
hDriver
,
uint32_t
ulBoard
,
uint32_t
ulSize
,
void
*
pvBoardInfo
)
{
return
-
1
;}
int32_t
xDriverEnumChannels
(
CIFXHANDLE
hDriver
,
uint32_t
ulBoard
,
uint32_t
ulChannel
,
uint32_t
ulSize
,
void
*
pvChannelInfo
)
{
return
-
1
;
}
int32_t
xChannelPutPacket
(
CIFXHANDLE
hChannel
,
CIFX_PACKET
*
ptSendPkt
,
uint32_t
ulTimeout
)
{
return
-
1
;}
int32_t
xChannelGetPacket
(
CIFXHANDLE
hChannel
,
uint32_t
ulSize
,
CIFX_PACKET
*
ptRecvPkt
,
uint32_t
ulTimeout
)
{
return
-
1
;
}
int32_t
xChannelIORead
(
CIFXHANDLE
hChannel
,
uint32_t
ulAreaNumber
,
uint32_t
ulOffset
,
uint32_t
ulDataLen
,
void
*
pvData
,
uint32_t
ulTimeout
)
{
return
-
1
;}
int32_t
xDriverGetErrorDescription
(
int32_t
lError
,
char
*
szBuffer
,
uint32_t
ulBufferLen
)
{
return
-
1
;}
int32_t
xChannelIOWrite
(
CIFXHANDLE
hChannel
,
uint32_t
ulAreaNumber
,
uint32_t
ulOffset
,
uint32_t
ulDataLen
,
void
*
pvData
,
uint32_t
ulTimeout
)
{
return
-
1
;}
int32_t
xDriverClose
(
CIFXHANDLE
hDriver
)
{
return
-
1
;}
otherio/lib/cifx_dummy/src/os_templ/hw_templ/makefile
0 → 100644
View file @
962afb16
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/lib/rt/src/os_linux/rt_io_m_hilscher_cifx_pncontroller.cpp
View file @
962afb16
...
...
@@ -43,7 +43,6 @@
#include "rt_io_agent_close.h"
#include "rt_io_agent_read.h"
#include "rt_io_agent_write.h"
#include "rt_io_pn_locals.h"
#include "rt_io_msg.h"
#include "rt_pb_msg.h"
...
...
@@ -65,6 +64,7 @@
#include "PNM_PNIOAPCTL_Public.h"
#include "PNM_PNIOAPCFG_Public.h"
#include "rt_io_pn_locals.h"
#include "rt_io_m_hilscher_cifx.h"
#include "rt_pn_gsdml_data.h"
...
...
@@ -249,6 +249,7 @@ static pwr_tStatus IoAgentInit( io_tCtx ctx,
channelinfo
.
bFWMonth
,
channelinfo
.
bFWDay
);
}
#if 0
// Register application
RCX_REGISTER_APP_REQ_T regapp = {{0}};
RCX_REGISTER_APP_CNF_T regapp_cnf = {{0}};
...
...
@@ -268,6 +269,7 @@ static pwr_tStatus IoAgentInit( io_tCtx ctx,
!cmd_check( op, ap, regapp_cnf.tHead.ulCmd, RCX_REGISTER_APP_CNF) ||
!status_check( op, ap, regapp_cnf.tHead.ulSta, "Register Application"))
return IO__INITFAIL;
#endif
RCX_LOCK_UNLOCK_CONFIG_REQ_T
unlock
=
{{
0
}};
RCX_LOCK_UNLOCK_CONFIG_CNF_T
unlock_cnf
=
{{
0
}};
...
...
@@ -283,7 +285,7 @@ static pwr_tStatus IoAgentInit( io_tCtx ctx,
if
(
!
status_check
(
op
,
ap
,
sts
,
"xChannelPutPacket"
))
return
IO__INITFAIL
;
sts
=
xChannelGetPacket
(
local
->
chan
,
sizeof
(
unlock_cnf
),
(
CIFX_PACKET
*
)
&
unlock_cnf
,
20
);
sts
=
xChannelGetPacket
(
local
->
chan
,
sizeof
(
unlock_cnf
),
(
CIFX_PACKET
*
)
&
unlock_cnf
,
20
000
);
if
(
!
status_check
(
op
,
ap
,
sts
,
"xChannelGetPacket"
)
||
!
cmd_check
(
op
,
ap
,
unlock_cnf
.
tHead
.
ulCmd
,
RCX_LOCK_UNLOCK_CONFIG_CNF
)
||
!
status_check
(
op
,
ap
,
unlock_cnf
.
tHead
.
ulSta
,
"Unlock channel"
))
...
...
@@ -401,20 +403,18 @@ static pwr_tStatus IoAgentInit( io_tCtx ctx,
io_sRack
*
rp
;
io_sCard
*
cp
;
int
dev_cnt
=
0
;
for
(
rp
=
ap
->
racklist
;
rp
;
rp
=
rp
->
next
)
{
io_sPnRackLocal
*
rp_local
;
dev_cnt
++
;
rp_local
=
(
io_sPnRackLocal
*
)
calloc
(
1
,
sizeof
(
io_sPnRackLocal
));
rp
->
Local
=
rp_local
;
for
(
cp
=
rp
->
cardlist
;
cp
;
cp
=
cp
->
next
)
cp
->
Local
=
calloc
(
1
,
sizeof
(
io_sPnCardLocal
));
// Read device xml-file
t_addr
ipaddress
;
t_addr
subnetmask
;
unsigned
char
macaddr
[
6
];
GsdmlDeviceData
*
dev_data
;
dev_data
=
new
GsdmlDeviceData
;
pwr_tFileName
fname
;
...
...
@@ -428,66 +428,89 @@ static pwr_tStatus IoAgentInit( io_tCtx ctx,
return
IO__INITFAIL
;
}
// PNM_IOD
rp_local
->
userdata
=
dev_data
;
}
// PNM_IOD
PNM_APCFG_CFG_IOD_REQ_T
*
iod_config
=
(
PNM_APCFG_CFG_IOD_REQ_T
*
)
calloc
(
1
,
sizeof
(
*
iod_config
)
+
(
dev_cnt
-
1
)
*
sizeof
(
iod_config
->
tData
.
atData
));
PNM_APCFG_CFG_IOD_CNF_T
iod_config_cnf
=
{{
0
}};
iod_config
->
tHead
.
ulDest
=
HOST_TO_LE32
(
PNM_APPLICATION
);
iod_config
->
tHead
.
ulLen
=
HOST_TO_LE32
(
sizeof
(
iod_config
->
tData
)
+
(
dev_cnt
-
1
)
*
sizeof
(
iod_config
->
tData
.
atData
));
iod_config
->
tHead
.
ulId
=
HOST_TO_LE32
(
msg_id
++
);
iod_config
->
tHead
.
ulCmd
=
HOST_TO_LE32
(
PNM_APCTL_CMD_SET_CONFIG_IOD_REQ
);
iod_config
->
tHead
.
ulSrc
=
HOST_TO_LE32
(
PN_SRC
);
iod_config
->
tHead
.
ulSrcId
=
HOST_TO_LE32
(
PN_SRCID
);
iod_config
->
tData
.
tSubHead
.
ulTrCntrId
=
1
;
iod_config
->
tData
.
tSubHead
.
ulTrDevId
=
0
;
iod_config
->
tData
.
tSubHead
.
ulTrApId
=
0
;
iod_config
->
tData
.
tSubHead
.
ulTrModId
=
0
;
iod_config
->
tData
.
tSubHead
.
ulTrSubModId
=
0
;
iod_config
->
tData
.
tSubHead
.
ulTrIdCnt
=
dev_cnt
;
device
=
0
;
for
(
rp
=
ap
->
racklist
;
rp
;
rp
=
rp
->
next
)
{
t_addr
ipaddress
;
t_addr
subnetmask
;
io_sPnRackLocal
*
rp_local
=
(
io_sPnRackLocal
*
)
rp
->
Local
;
GsdmlDeviceData
*
dev_data
=
(
GsdmlDeviceData
*
)
rp_local
->
userdata
;
sscanf
(
dev_data
->
ip_address
,
"%hhu.%hhu.%hhu.%hhu"
,
&
ipaddress
.
b
[
3
],
&
ipaddress
.
b
[
2
],
&
ipaddress
.
b
[
1
],
&
ipaddress
.
b
[
0
]);
sscanf
(
dev_data
->
subnet_mask
,
"%hhu.%hhu.%hhu.%hhu"
,
&
subnetmask
.
b
[
3
],
&
subnetmask
.
b
[
2
],
&
subnetmask
.
b
[
1
],
&
subnetmask
.
b
[
0
]);
PNM_APCFG_CFG_IOD_REQ_T
iod_config
=
{{
0
}};
PNM_APCFG_CFG_IOD_CNF_T
iod_config_cnf
=
{{
0
}};
memset
(
&
iod_config
,
0
,
sizeof
(
iod_config
));
iod_config
.
tHead
.
ulDest
=
HOST_TO_LE32
(
PNM_APPLICATION
);
iod_config
.
tHead
.
ulLen
=
HOST_TO_LE32
(
sizeof
(
iod_config
.
tData
));
iod_config
.
tHead
.
ulId
=
HOST_TO_LE32
(
msg_id
++
);
iod_config
.
tHead
.
ulCmd
=
HOST_TO_LE32
(
PNM_APCTL_CMD_SET_CONFIG_IOD_REQ
);
iod_config
.
tHead
.
ulSrc
=
HOST_TO_LE32
(
PN_SRC
);
iod_config
.
tHead
.
ulSrcId
=
HOST_TO_LE32
(
PN_SRCID
);
iod_config
.
tData
.
tSubHead
.
ulTrCntrId
=
1
;
iod_config
.
tData
.
tSubHead
.
ulTrDevId
=
0
;
iod_config
.
tData
.
tSubHead
.
ulTrApId
=
0
;
iod_config
.
tData
.
tSubHead
.
ulTrModId
=
0
;
iod_config
.
tData
.
tSubHead
.
ulTrSubModId
=
0
;
iod_config
.
tData
.
tSubHead
.
ulTrIdCnt
=
1
;
iod_config
.
tData
.
atData
[
0
].
ulTrId
=
device
+
1
;
iod_config
.
tData
.
atData
[
0
].
ulFlags
=
PNM_APCFG_IOD_FLAG_IOD_ACTIVE
;
strncpy
(
(
char
*
)
iod_config
.
tData
.
atData
[
0
].
abNameOfStation
,
dev_data
->
device_name
,
sizeof
(
iod_config
.
tData
.
atData
[
0
].
abNameOfStation
));
iod_config
.
tData
.
atData
[
0
].
usNameOfStationLen
=
strlen
((
char
*
)
iod_config
.
tData
.
atData
[
0
].
abNameOfStation
);
iod_config
.
tData
.
atData
[
0
].
usVendorID
=
dev_data
->
vendor_id
;
iod_config
.
tData
.
atData
[
0
].
usDeviceID
=
dev_data
->
device_id
;
iod_config
.
tData
.
atData
[
0
].
ulIPAddr
=
ipaddress
.
m
;
iod_config
.
tData
.
atData
[
0
].
ulNetworkMask
=
subnetmask
.
m
;
iod_config
.
tData
.
atData
[
0
].
ulGatewayAddr
=
0
;
iod_config
.
tData
.
atData
[
0
].
ulArUuidData1
=
device
+
1
;
iod_config
.
tData
.
atData
[
0
].
usArUuidData2
=
device
+
1
;
iod_config
.
tData
.
atData
[
0
].
usArUuidData3
=
device
+
1
;
iod_config
.
tData
.
atData
[
0
].
usARType
=
PNIO_API_AR_TYPE_SINGLE
;
iod_config
.
tData
.
atData
[
0
].
ulARProp
=
PNIO_API_AR_PROP_SUPERVISOR_NONE
|
iod_config
->
tData
.
atData
[
device
].
ulTrId
=
device
+
1
;
iod_config
->
tData
.
atData
[
device
].
ulFlags
=
PNM_APCFG_IOD_FLAG_IOD_ACTIVE
;
strncpy
(
(
char
*
)
iod_config
->
tData
.
atData
[
device
].
abNameOfStation
,
dev_data
->
device_name
,
sizeof
(
iod_config
->
tData
.
atData
[
device
].
abNameOfStation
));
iod_config
->
tData
.
atData
[
device
].
usNameOfStationLen
=
strlen
((
char
*
)
iod_config
->
tData
.
atData
[
device
].
abNameOfStation
);
iod_config
->
tData
.
atData
[
device
].
usVendorID
=
dev_data
->
vendor_id
;
iod_config
->
tData
.
atData
[
device
].
usDeviceID
=
dev_data
->
device_id
;
iod_config
->
tData
.
atData
[
device
].
ulIPAddr
=
ipaddress
.
m
;
iod_config
->
tData
.
atData
[
device
].
ulNetworkMask
=
subnetmask
.
m
;
iod_config
->
tData
.
atData
[
device
].
ulGatewayAddr
=
0
;
iod_config
->
tData
.
atData
[
device
].
ulArUuidData1
=
device
+
1
;
iod_config
->
tData
.
atData
[
device
].
usArUuidData2
=
device
+
1
;
iod_config
->
tData
.
atData
[
device
].
usArUuidData3
=
device
+
1
;
iod_config
->
tData
.
atData
[
device
].
usARType
=
PNIO_API_AR_TYPE_SINGLE
;
iod_config
->
tData
.
atData
[
device
].
ulARProp
=
PNIO_API_AR_PROP_SUPERVISOR_NONE
|
PNIO_API_AR_PROP_STATE_PRIMARY
|
PNIO_API_AR_PROP_SINGLE_AR
|
(
1
<<
4
)
|
(
1
<<
5
);
iod_config
.
tData
.
atData
[
0
].
usAlarmCRType
=
PNIO_API_ALCR_TYPE_ALARM
;
iod_config
.
tData
.
atData
[
0
].
ulAlarmCRProp
=
PNIO_API_ALCR_PROP_PRIO_DEFAULT
;
iod_config
.
tData
.
atData
[
0
].
usAlarmCRVLANID
=
0
;
iod_config
.
tData
.
atData
[
0
].
ulIPFlags
=
0
;
iod_config
.
tData
.
atData
[
0
].
usRTATimeoutFact
=
1
;
iod_config
.
tData
.
atData
[
0
].
usRTARetries
=
PNIO_API_RTA_RETRIES_MIN
;
iod_config
.
tData
.
atData
[
0
].
usObjUUIDInst
=
dev_data
->
instance
;
iod_config
->
tData
.
atData
[
device
].
usAlarmCRType
=
PNIO_API_ALCR_TYPE_ALARM
;
iod_config
->
tData
.
atData
[
device
].
ulAlarmCRProp
=
PNIO_API_ALCR_PROP_PRIO_DEFAULT
;
iod_config
->
tData
.
atData
[
device
].
usAlarmCRVLANID
=
0
;
iod_config
->
tData
.
atData
[
device
].
ulIPFlags
=
0
;
iod_config
->
tData
.
atData
[
device
].
usRTATimeoutFact
=
1
;
iod_config
->
tData
.
atData
[
device
].
usRTARetries
=
PNIO_API_RTA_RETRIES_MIN
;
iod_config
->
tData
.
atData
[
device
].
usObjUUIDInst
=
dev_data
->
instance
;
sts
=
xChannelPutPacket
(
local
->
chan
,
(
CIFX_PACKET
*
)
&
iod_config
,
10
);
if
(
!
status_check
(
op
,
ap
,
sts
,
"xChannelPutPacket"
))
return
IO__INITFAIL
;
device
++
;
}
sts
=
xChannelGetPacket
(
local
->
chan
,
sizeof
(
iod_config_cnf
),
(
CIFX_PACKET
*
)
&
iod_config_cnf
,
20
);
if
(
!
status_check
(
op
,
ap
,
sts
,
"xChannelGetPacket"
)
||
!
cmd_check
(
op
,
ap
,
iod_config_cnf
.
tHead
.
ulCmd
,
PNM_APCTL_CMD_SET_CONFIG_IOD_CNF
)
||
!
status_check
(
op
,
ap
,
pnm_config_cnf
.
tHead
.
ulSta
,
"Device Config"
))
return
IO__INITFAIL
;
sts
=
xChannelPutPacket
(
local
->
chan
,
(
CIFX_PACKET
*
)
iod_config
,
10
);
if
(
!
status_check
(
op
,
ap
,
sts
,
"xChannelPutPacket"
))
return
IO__INITFAIL
;
sts
=
xChannelGetPacket
(
local
->
chan
,
sizeof
(
iod_config_cnf
),
(
CIFX_PACKET
*
)
&
iod_config_cnf
,
20
);
if
(
!
status_check
(
op
,
ap
,
sts
,
"xChannelGetPacket"
)
||
!
cmd_check
(
op
,
ap
,
iod_config_cnf
.
tHead
.
ulCmd
,
PNM_APCTL_CMD_SET_CONFIG_IOD_CNF
)
||
!
status_check
(
op
,
ap
,
pnm_config_cnf
.
tHead
.
ulSta
,
"Device Config"
))
return
IO__INITFAIL
;
device
=
0
;
for
(
rp
=
ap
->
racklist
;
rp
;
rp
=
rp
->
next
)
{
// Read device xml-file
io_sPnRackLocal
*
rp_local
=
(
io_sPnRackLocal
*
)
rp
->
Local
;
GsdmlDeviceData
*
dev_data
=
(
GsdmlDeviceData
*
)
rp_local
->
userdata
;
unsigned
char
macaddr
[
6
];
// PNM_IOCR
// Calculate data length
...
...
@@ -567,7 +590,6 @@ static pwr_tStatus IoAgentInit( io_tCtx ctx,
free
(
iocr_config
);
// PNM_IOD_AP
PNM_APCFG_CFG_AP_REQ_T
ap_config
=
{{
0
}};
...
...
@@ -889,6 +911,9 @@ static pwr_tStatus IoAgentInit( io_tCtx ctx,
}
delete
dev_data
;
rp_local
->
userdata
=
0
;
device
++
;
}
...
...
@@ -936,6 +961,26 @@ static pwr_tStatus IoAgentInit( io_tCtx ctx,
return
IO__INITFAIL
;
// Register application
RCX_REGISTER_APP_REQ_T
regapp
=
{{
0
}};
RCX_REGISTER_APP_CNF_T
regapp_cnf
=
{{
0
}};
regapp
.
tHead
.
ulDest
=
HOST_TO_LE32
(
PNM_APPLICATION
);
regapp
.
tHead
.
ulLen
=
0
;
regapp
.
tHead
.
ulCmd
=
HOST_TO_LE32
(
RCX_REGISTER_APP_REQ
);
regapp
.
tHead
.
ulSrc
=
HOST_TO_LE32
(
PN_SRC
);
regapp
.
tHead
.
ulSrcId
=
HOST_TO_LE32
(
PN_SRCID
);
sts
=
xChannelPutPacket
(
local
->
chan
,
(
CIFX_PACKET
*
)
&
regapp
,
1000
);
if
(
!
status_check
(
op
,
ap
,
sts
,
"xChannelPutPacket"
))
return
IO__INITFAIL
;
sts
=
xChannelGetPacket
(
local
->
chan
,
sizeof
(
regapp_cnf
),
(
CIFX_PACKET
*
)
&
regapp_cnf
,
10000
);
if
(
!
status_check
(
op
,
ap
,
sts
,
"xChannelGetPacket"
)
||
!
cmd_check
(
op
,
ap
,
regapp_cnf
.
tHead
.
ulCmd
,
RCX_REGISTER_APP_CNF
)
||
!
status_check
(
op
,
ap
,
regapp_cnf
.
tHead
.
ulSta
,
"Register Application"
))
return
IO__INITFAIL
;
// Create input/output area
local
->
input_area_size
=
input_dpm_offset
;
local
->
output_area_size
=
output_dpm_offset
;
...
...
@@ -1036,15 +1081,49 @@ static pwr_tStatus IoAgentRead( io_tCtx ctx, io_sAgent *ap)
else
local
->
diag_cnt
++
;
// Read input area
if
(
local
->
input_area_size
)
{
sts
=
xChannelIORead
(
local
->
chan
,
0
,
0
,
local
->
input_area_size
,
local
->
input_area
,
10
);
op
->
Status
=
sts
;
if
(
sts
==
CIFX_NO_ERROR
)
{
if
(
local
->
dev_init
)
local
->
dev_init
=
0
;
}
else
{
if
(
sts
==
CIFX_DEV_NO_COM_FLAG
&&
local
->
dev_init
&&
local
->
dev_init_cnt
<
local
->
dev_init_limit
)
local
->
dev_init_cnt
++
;
else
{
xDriverGetErrorDescription
(
sts
,
op
->
ErrorStr
,
sizeof
(
op
->
ErrorStr
));
op
->
ErrorCount
++
;
}
}
if
(
op
->
ErrorCount
==
op
->
ErrorSoftLimit
&&
!
local
->
softlimit_logged
)
{
errh_Error
(
"IO Error soft limit reached on agent '%s'"
,
ap
->
Name
);
local
->
softlimit_logged
=
1
;
}
if
(
op
->
ErrorCount
>=
op
->
ErrorHardLimit
)
{
ctx
->
Node
->
EmergBreakTrue
=
1
;
return
IO__ERRDEVICE
;
}
}
// Get Alarm or Diag
int
msg_size
=
500
;
APIOC_ALARM_IND_T
*
msg
=
(
APIOC_ALARM_IND_T
*
)
calloc
(
1
,
msg_size
);
sts
=
xChannelGetPacket
(
local
->
chan
,
msg_size
,
(
CIFX_PACKET
*
)
msg
,
0
);
if
(
sts
==
CIFX_NO_ERROR
)
{
CIFX_PACKET
*
msg
=
(
CIFX_PACKET
*
)
calloc
(
1
,
sizeof
(
CIFX_PACKET
));
sts
=
xChannelGetPacket
(
local
->
chan
,
sizeof
(
*
msg
),
msg
,
0
);
if
(
sts
!=
CIFX_NO_ERROR
)
{
if
(
!
(
sts
==
CIFX_DEV_GET_TIMEOUT
||
sts
==
CIFX_DEV_GET_NO_PACKET
))
printf
(
"Diag msg status 0x%08x
\n
"
,
sts
);
}
else
{
printf
(
"Diag message ?
\n
"
);
if
(
msg
->
tHead
.
ulCmd
==
PNIO_APCTL_CMD_APPL_ALARM_IND
)
{
switch
(
((
TLR_PACKET_HEADER_T
*
)
msg
)
->
ulCmd
)
{
case
PNIO_APCTL_CMD_APPL_ALARM_IND
:
{
// Response, return the package
APIOC_ALARM_RSP_T
alarm_rsp
=
{{
0
}};
...
...
@@ -1054,8 +1133,8 @@ static pwr_tStatus IoAgentRead( io_tCtx ctx, io_sAgent *ap)
alarm_rsp
.
tHead
.
ulCmd
=
HOST_TO_LE32
(
PNIO_APCTL_CMD_APPL_ALARM_RSP
);
alarm_rsp
.
tHead
.
ulSrc
=
HOST_TO_LE32
(
PN_SRC
);
alarm_rsp
.
tHead
.
ulSrcId
=
HOST_TO_LE32
(
PN_SRCID
);
alarm_rsp
.
tData
.
ulHandle
=
msg
->
tData
.
ulHandle
;
alarm_rsp
.
tData
.
usAlarmSpecifier
=
msg
->
tData
.
usAlarmSpecifier
;
alarm_rsp
.
tData
.
ulHandle
=
((
APIOC_ALARM_IND_T
*
)
msg
)
->
tData
.
ulHandle
;
alarm_rsp
.
tData
.
usAlarmSpecifier
=
((
APIOC_ALARM_IND_T
*
)
msg
)
->
tData
.
usAlarmSpecifier
;
sts
=
xChannelPutPacket
(
local
->
chan
,
(
CIFX_PACKET
*
)
&
alarm_rsp
,
10
);
printf
(
"Alarm ind
\n
"
);
...
...
@@ -1069,8 +1148,8 @@ static pwr_tStatus IoAgentRead( io_tCtx ctx, io_sAgent *ap)
alarm_ack
.
tHead
.
ulCmd
=
HOST_TO_LE32
(
PNIO_APCTL_CMD_APPL_ALARM_ACK_CNF
);
alarm_ack
.
tHead
.
ulSrc
=
HOST_TO_LE32
(
PN_SRC
);
alarm_ack
.
tHead
.
ulSrcId
=
HOST_TO_LE32
(
PN_SRCID
);
alarm_ack
.
tData
.
ulHandle
=
msg
->
tData
.
ulHandle
;
alarm_ack
.
tData
.
usAlarmSpecifier
=
msg
->
tData
.
usAlarmSpecifier
;
alarm_ack
.
tData
.
ulHandle
=
((
APIOC_ALARM_IND_T
*
)
msg
)
->
tData
.
ulHandle
;
alarm_ack
.
tData
.
usAlarmSpecifier
=
((
APIOC_ALARM_IND_T
*
)
msg
)
->
tData
.
usAlarmSpecifier
;
alarm_ack
.
tData
.
usReserved
=
0
;
sts
=
xChannelPutPacket
(
local
->
chan
,
(
CIFX_PACKET
*
)
&
alarm_ack
,
10
);
...
...
@@ -1082,8 +1161,9 @@ static pwr_tStatus IoAgentRead( io_tCtx ctx, io_sAgent *ap)
printf
(
"Status 0x%08x
\n
"
,
alarm_ack_cnf
.
tHead
.
ulSta
);
}
}
break
;
}
else
if
(
msg
->
tHead
.
ulCmd
==
PNIO_APCTL_CMD_APPL_DIAG_DATA_IND
)
{
case
PNIO_APCTL_CMD_APPL_DIAG_DATA_IND
:
{
// Response, return the package
APIOC_DIAG_DATA_RSP_T
diag_data_rsp
=
{{
0
}};
...
...
@@ -1098,44 +1178,15 @@ static pwr_tStatus IoAgentRead( io_tCtx ctx, io_sAgent *ap)
sts
=
xChannelPutPacket
(
local
->
chan
,
(
CIFX_PACKET
*
)
&
diag_data_rsp
,
10
);
printf
(
"Diag data
\n
"
);
break
;
}
default:
printf
(
"Unexpected cmd received: %u
\n
"
,
((
TLR_PACKET_HEADER_T
*
)
msg
)
->
ulCmd
);
}
else
printf
(
"Unexpected cmd received: %u
\n
"
,
msg
->
tHead
.
ulCmd
);
}
else
{
// printf( "Diag msg status 0x%08x\n", sts);
}
free
(
msg
);
// Read input area
if
(
local
->
input_area_size
)
{
sts
=
xChannelIORead
(
local
->
chan
,
0
,
0
,
local
->
input_area_size
,
local
->
input_area
,
10
);
op
->
Status
=
sts
;
if
(
sts
==
CIFX_NO_ERROR
)
{
if
(
local
->
dev_init
)
local
->
dev_init
=
0
;
}
else
{
if
(
sts
==
CIFX_DEV_NO_COM_FLAG
&&
local
->
dev_init
&&
local
->
dev_init_cnt
<
local
->
dev_init_limit
)
local
->
dev_init_cnt
++
;
else
{
xDriverGetErrorDescription
(
sts
,
op
->
ErrorStr
,
sizeof
(
op
->
ErrorStr
));
op
->
ErrorCount
++
;
}
}
if
(
op
->
ErrorCount
==
op
->
ErrorSoftLimit
&&
!
local
->
softlimit_logged
)
{
errh_Error
(
"IO Error soft limit reached on agent '%s'"
,
ap
->
Name
);
local
->
softlimit_logged
=
1
;
}
if
(
op
->
ErrorCount
>=
op
->
ErrorHardLimit
)
{
ctx
->
Node
->
EmergBreakTrue
=
1
;
return
IO__ERRDEVICE
;
}
}
return
IO__SUCCESS
;
}
...
...
otherio/wbl/mcomp/src/otherio.wb_load
View file @
962afb16
...
...
@@ -2775,6 +2775,14 @@ Volume OtherIO $ClassVolume 0.0.250.10
EndBody
EndObject
EndObject
!/**
! @Version 1.0
! @Group IO
! @Summary Diagnosis data for Hilscher cifX board.
! Diagnosis data for Hilscher cifX board.
!
! The object is usually an internal object in a cifX board object.
!*/
Object Hilscher_cifX_Diag $ClassDef 20 04-MAR-2011 14:16:20.12
Body SysBody 04-MAR-2011 14:15:45.77
Attr Editor = 0
...
...
@@ -2786,6 +2794,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr StructName = "Hilscher_cifX_Diag"
Attr NextAix = "_X17"
EndBody
!/**
! Board device number.
!*/
Object DeviceNumber $Attribute 3 04-MAR-2011 14:29:58.06
Body SysBody 11-MAR-2011 10:01:35.56
Attr PgmName = "DeviceNumber"
...
...
@@ -2793,6 +2804,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! Board serial number.
!*/
Object SerialNumber $Attribute 4 04-MAR-2011 14:30:15.60
Body SysBody 11-MAR-2011 10:01:42.88
Attr PgmName = "SerialNumber"
...
...
@@ -2800,6 +2814,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! Loaded firmware.
!*/
Object FirmwareName $Attribute 15 11-MAR-2011 11:13:13.95
Body SysBody 11-MAR-2011 11:13:29.65
Attr PgmName = "FirmwareName"
...
...
@@ -2807,6 +2824,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$String40"
EndBody
EndObject
!/**
! Firmware version and date.
!*/
Object FirmwareVersion $Attribute 16 11-MAR-2011 11:13:42.31
Body SysBody 11-MAR-2011 11:13:32.93
Attr PgmName = "FirmwareVersion"
...
...
@@ -2814,6 +2834,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$String40"
EndBody
EndObject
!/**
! System error.
!*/
Object SystemError $Attribute 5 04-MAR-2011 14:30:29.02
Body SysBody 11-MAR-2011 10:01:48.67
Attr PgmName = "SystemError"
...
...
@@ -2821,6 +2844,12 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! System status.
! The status is displayed in decimal form, and have to be converted
! to hexadecimal form to be identified in the cifX manual.
! 0 is sucess status.
!*/
Object SystemStatus $Attribute 6 04-MAR-2011 14:31:01.22
Body SysBody 11-MAR-2011 10:01:55.81
Attr PgmName = "SystemStatus"
...
...
@@ -2828,6 +2857,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! Time since firmware start.
!*/
Object TimeSinceStart $Attribute 7 11-MAR-2011 09:53:27.01
Body SysBody 11-MAR-2011 10:02:03.22
Attr PgmName = "TimeSinceStart"
...
...
@@ -2835,6 +2867,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$DeltaTime"
EndBody
EndObject
!/**
! CPU load of cifX board.
!*/
Object CpuLoad $Attribute 8 11-MAR-2011 09:53:50.36
Body SysBody 11-MAR-2011 10:02:09.47
Attr PgmName = "CpuLoad"
...
...
@@ -2842,6 +2877,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$Float32"
EndBody
EndObject
!/**
! Communcation state.
!*/
Object CommState $Attribute 9 11-MAR-2011 09:54:28.93
Body SysBody 11-MAR-2011 10:02:14.79
Attr PgmName = "CommState"
...
...
@@ -2849,6 +2887,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "OtherIO:Type-Hilscher_cifX_CommStateEnum"
EndBody
EndObject
!/**
! Communication error.
!*/
Object CommError $Attribute 10 11-MAR-2011 09:54:46.70
Body SysBody 11-MAR-2011 10:02:19.62
Attr PgmName = "CommError"
...
...
@@ -2856,6 +2897,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! Error count.
!*/
Object ErrorCount $Attribute 11 11-MAR-2011 09:55:06.60
Body SysBody 11-MAR-2011 10:02:24.52
Attr PgmName = "ErrorCount"
...
...
@@ -2863,6 +2907,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! Number of configured slaves.
!*/
Object ConfigSlaves $Attribute 12 11-MAR-2011 09:55:20.72
Body SysBody 11-MAR-2011 10:02:29.55
Attr PgmName = "ConfigSlaves"
...
...
@@ -2870,6 +2917,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! Number of active slaves.
!*/
Object ActiveSlaves $Attribute 13 11-MAR-2011 09:55:28.90
Body SysBody 11-MAR-2011 10:02:38.38
Attr PgmName = "ActiveSlaves"
...
...
@@ -2877,6 +2927,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! Slave state. Indicates if any slave has reported warning or failure.
!*/
Object SlaveState $Attribute 14 11-MAR-2011 09:55:39.61
Body SysBody 11-MAR-2011 10:10:14.15
Attr PgmName = "SlaveState"
...
...
@@ -2884,6 +2937,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "OtherIO:Type-Hilscher_cifX_SlaveStateEnum"
EndBody
EndObject
!/**
! Host state.
!*/
Object HostState $Attribute 1 04-MAR-2011 14:17:52.72
Body SysBody 11-MAR-2011 10:17:10.58
Attr PgmName = "HostState"
...
...
@@ -2891,6 +2947,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrb:Type-ReadyNotReadyEnum"
EndBody
EndObject
!/**
! Bus state.
!*/
Object BusState $Attribute 2 04-MAR-2011 14:17:45.36
Body SysBody 11-MAR-2011 10:03:59.20
Attr PgmName = "BusState"
...
...
@@ -2904,6 +2963,25 @@ Volume OtherIO $ClassVolume 0.0.250.10
EndBody
EndObject
EndObject
!/**
! @Version 1.0
! @Group IO
! @Summary Hilscher cifX Profinet controller.
! Agent object for a Hilscher cifX board with Profnet controller
! firmware.
!
! The object is configured as a child to the node object.
! The devices on the Profinet bus are configured as children to
! the PnController object. These object should be of class PnDevice
! or of a subclass of PnDevice. The devices are configured with the
! Profinet configurator.
!
! The Alias attribute has to correspond to the alias setting for the
! driver configuration for the board in the device.conf file.
!
! @b See also
! @classlink PnDevice profibus_pndevice.html
!*/
Object Hilscher_cifX_PnController $ClassDef 24 23-MAY-2011 11:01:53.65
Body SysBody 23-MAY-2011 11:01:37.07
Attr Editor = 0
...
...
@@ -2915,78 +2993,132 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr StructName = "Hilscher_cifX_PnController"
Attr NextAix = "_X31"
EndBody
!/**
! Optional description.
!*/
Object Description $Attribute 14 23-MAY-2011 11:01:37.07
Body SysBody 23-MAY-2011 11:01:37.07
Attr PgmName = "Description"
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! Specification of the board.
!*/
Object Specification $Attribute 15 23-MAY-2011 11:01:37.07
Body SysBody 23-MAY-2011 11:01:37.07
Attr PgmName = "Specification"
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! Datasheet URL.
!*/
Object DataSheet $Attribute 16 23-MAY-2011 11:01:37.07
Body SysBody 23-MAY-2011 11:01:37.07
Attr PgmName = "DataSheet"
Attr TypeRef = "pwrs:Type-$URL"
EndBody
EndObject
!/**
! IP address for the controller.
!*/
Object IP_Address $Attribute 27 24-MAY-2011 08:21:37.53
Body SysBody 24-MAY-2011 08:21:12.63
Attr PgmName = "IP_Address"
Attr TypeRef = "pwrs:Type-$String32"
EndBody
EndObject
!/**
! Subnet mask for the controller.
!*/
Object SubnetMask $Attribute 28 24-MAY-2011 08:21:57.03
Body SysBody 24-MAY-2011 08:23:57.17
Attr PgmName = "SubnetMask"
Attr TypeRef = "pwrs:Type-$String40"
EndBody
EndObject
!/**
! Device name for controller.
!*/
Object DeviceName $Attribute 29 24-MAY-2011 08:22:20.62
Body SysBody 24-MAY-2011 08:24:00.64
Attr PgmName = "DeviceName"
Attr TypeRef = "pwrs:Type-$String40"
EndBody
EndObject
!/**
! Device type.
!*/
Object DeviceType $Attribute 30 24-MAY-2011 08:22:25.89
Body SysBody 24-MAY-2011 08:24:03.36
Attr PgmName = "DeviceType"
Attr TypeRef = "pwrs:Type-$String40"
EndBody
EndObject
!/**
! The alias attribute is used to identify the board.
! It should correspond to the alias setting in the device.conf file.
!*/
Object Alias $Attribute 17 23-MAY-2011 11:01:37.07
Body SysBody 23-MAY-2011 11:01:37.07
Attr PgmName = "Alias"
Attr TypeRef = "pwrs:Type-$String40"
EndBody
EndObject
!/**
! Channel. Only channel 0 is implemented.
!*/
Object Channel $Attribute 18 23-MAY-2011 11:01:37.07
Body SysBody 23-MAY-2011 11:01:37.07
Attr PgmName = "Channel"
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! Controller status.
! The status is displayed in decimal form and has to be converted
! to hexadecimal form to be identified in the cifX manual.
! A description is dislayed in the ErrorStr attribute.
! 0 is sucess status.
!*/
Object Status $Attribute 19 23-MAY-2011 11:01:37.07
Body SysBody 23-MAY-2011 11:01:37.07
Attr PgmName = "Status"
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! @Summary Process that handles the module. Plc(1), rt_io_comm(2) or application process(4).
! Process that handles the module.
!
! 1: The module is read by the plc process, and is handled by a specific
! thread in the plc, which is specified in the ThreadObject attribute.
! 2: The module is read by the rt_io_comm process.
! 4: The module is handled by an application program.
!*/
Object Process $Attribute 20 23-MAY-2011 11:01:37.07
Body SysBody 23-MAY-2011 11:01:37.07
Attr PgmName = "Process"
Attr TypeRef = "pwrb:Type-IoProcessMask"
EndBody
EndObject
!/**
! @Summary Plc thread that handles the card.
! The PlcThread object of the plc thread that handles the card.
! The card is read with the scantime of the thread.
!*/
Object ThreadObject $Attribute 21 23-MAY-2011 11:01:37.07
Body SysBody 23-MAY-2011 11:01:37.07
Attr PgmName = "ThreadObject"
Attr TypeRef = "pwrs:Type-$Objid"
EndBody
EndObject
!/**
! Error counter, incremented for every failed read or write operation of the card.
! When the error counter reaches ErrorSoftLimit, a message is sent to the console log.
! When it reaches ErrorHardLimit, all IO handling is aborted.
!*/
Object ErrorCount $Attribute 22 23-MAY-2011 11:01:37.07
Body SysBody 23-MAY-2011 11:01:37.07
Attr PgmName = "ErrorCount"
...
...
@@ -2994,24 +3126,36 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! Text string for an error status.
!*/
Object ErrorStr $Attribute 23 23-MAY-2011 11:01:37.07
Body SysBody 23-MAY-2011 11:01:37.07
Attr PgmName = "ErrorStr"
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! Value of the error counter, when a message is sent to the console log.
!*/
Object ErrorSoftLimit $Attribute 24 23-MAY-2011 11:01:37.07
Body SysBody 23-MAY-2011 11:01:37.07
Attr PgmName = "ErrorSoftLimit"
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! Value of the error counter, when all IO handling is aborted.
!*/
Object ErrorHardLimit $Attribute 25 23-MAY-2011 11:01:37.07
Body SysBody 23-MAY-2011 11:01:37.07
Attr PgmName = "ErrorHardLimit"
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! Diagnosis data.
!*/
Object Diag $Attribute 26 23-MAY-2011 11:01:37.07
Body SysBody 23-MAY-2011 11:01:37.07
Attr PgmName = "Diag"
...
...
@@ -3074,6 +3218,34 @@ Volume OtherIO $ClassVolume 0.0.250.10
EndBody
EndObject
EndObject
!/**
! @Version 1.0
! @Group IO
! @Summary Hilscher cifX Master.
! Agent object for a Hilscher cifX board configured with SYCON.net.
!
! The Hilsher cifX boards supports CANopen, CC-Link, DeviceNet, EtherCAT,
! EtherNet/IP, Modbus TCP, Powerlink, Profibus, Profinet and Sercos III.
!
! The bus devices are configured in SYSCON.net configurator on Windows.
! The configution is export to a configuration file, that is copied to
! the process station.
!
! The Alias attribute has to correspond to the alias setting for the
! driver configuration for the board in the device.conf file.
!
! The object is configured as a child to the node object.
! The slaves or devices on the bus are configured as children to
! the Master object. These object should be of class Hilscher_cifX_Device.
! The modules of the devices are configures as children to these and should
! be of class Hilscher_cifX_Module. Below the module objects, channels are
! configured that describes the input and output area for the module.
! The size and offset in the area have to match the SYCON.net configuration.
!
! @b See also
! @classlink Hilscher_cifX_Device otherio_hilscher_cifx_device.html
! @classlink Hilscher_cifX_Module otherio_hilscher_cifx_module.html
!*/
Object Hilscher_cifX_Master $ClassDef 17 23-FEB-2011 15:22:46.32
Body SysBody 23-FEB-2011 14:03:13.10
Attr Editor = 0
...
...
@@ -3085,48 +3257,85 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr StructName = "Hilscher_cifX_Master"
Attr NextAix = "_X14"
EndBody
!/**
! Optional description.
!*/
Object Description $Attribute 1 23-FEB-2011 13:53:04.77
Body SysBody 23-FEB-2011 13:53:04.77
Attr PgmName = "Description"
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! Specification of the board.
!*/
Object Specification $Attribute 12 09-MAR-2011 17:28:57.42
Body SysBody 09-MAR-2011 17:28:57.42
Attr PgmName = "Specification"
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! Datasheet URL.
!*/
Object DataSheet $Attribute 13 09-MAR-2011 17:28:57.42
Body SysBody 09-MAR-2011 17:28:57.42
Attr PgmName = "DataSheet"
Attr TypeRef = "pwrs:Type-$URL"
EndBody
EndObject
!/**
! The alias attribute is used to identify the board.
! It should correspond to the alias setting in the device.conf file.
!*/
Object Alias $Attribute 4 23-FEB-2011 13:53:17.54
Body SysBody 23-FEB-2011 13:53:27.97
Attr PgmName = "Alias"
Attr TypeRef = "pwrs:Type-$String40"
EndBody
EndObject
!/**
! Channel. Only channel 0 is implemented.
!*/
Object Channel $Attribute 5 23-FEB-2011 13:53:43.84
Body SysBody 23-FEB-2011 13:53:53.75
Attr PgmName = "Channel"
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! Controller status.
! The status is displayed in decimal form and has to be converted
! to hexadecimal form to be identified in the cifX manual.
! A description is dislayed in the ErrorStr attribute.
! 0 is sucess status.
!*/
Object Status $Attribute 11 07-MAR-2011 09:01:35.86
Body SysBody 07-MAR-2011 09:01:37.24
Attr PgmName = "Status"
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! @Summary Process that handles the module. Plc(1), rt_io_comm(2) or application process(4).
! Process that handles the module.
!
! 1: The module is read by the plc process, and is handled by a specific
! thread in the plc, which is specified in the ThreadObject attribute.
! 2: The module is read by the rt_io_comm process.
! 4: The module is handled by an application program.
!*/
Object Process $Attribute 2 23-FEB-2011 13:53:04.77
Body SysBody 23-FEB-2011 13:53:04.77
Attr PgmName = "Process"
Attr TypeRef = "pwrb:Type-IoProcessMask"
EndBody
EndObject
!/**
! @Summary Plc thread that handles the card.
! The PlcThread object of the plc thread that handles the card.
! The card is read with the scantime of the thread.
!*/
Object ThreadObject $Attribute 3 23-FEB-2011 13:53:04.77
Body SysBody 23-FEB-2011 13:53:04.77
Attr PgmName = "ThreadObject"
...
...
@@ -3145,6 +3354,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! Text string for an error status.
!*/
Object ErrorStr $Attribute 6 07-MAR-2011 09:01:18.62
Body SysBody 07-MAR-2011 09:01:19.70
Attr PgmName = "ErrorStr"
...
...
@@ -3169,6 +3381,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! Diagnosis data.
!*/
Object Diag $Attribute 7 04-MAR-2011 14:19:32.00
Body SysBody 04-MAR-2011 14:19:50.47
Attr PgmName = "Diag"
...
...
@@ -3227,6 +3442,21 @@ Volume OtherIO $ClassVolume 0.0.250.10
EndBody
EndObject
EndObject
!/**
! @Version 1.0
! @Group IO
! @Summary Hilscher cifX Device.
! Rack object for a Hilscher cifX device configured with SYCON.net.
!
! The object is configured as a child to a Hilscher_cifX_Master object.
! Module object of class Hilscher_cifX_Module are configured as childern
! to the device object. Below the module objects, channels are configured
! that describes the input and output area for the module.
!
! @b See also
! @classlink Hilscher_cifX_Master otherio_hilscher_cifx_master.html
! @classlink Hilscher_cifX_Module otherio_hilscher_cifx_module.html
!*/
Object Hilscher_cifX_Device $ClassDef 18 23-FEB-2011 15:23:00.07
Body SysBody 23-FEB-2011 14:03:06.90
Attr Editor = 0
...
...
@@ -3238,36 +3468,65 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr StructName = "Hilscher_cifX_Device"
Attr NextAix = "_X17"
EndBody
!/**
! Optional description.
!*/
Object Description $Attribute 6 23-FEB-2011 14:01:08.18
Body SysBody 23-FEB-2011 14:01:08.18
Attr PgmName = "Description"
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! Byte ordering of the device.
!*/
Object ByteOrdering $Attribute 15 09-MAR-2011 17:31:00.41
Body SysBody 09-MAR-2011 17:31:17.44
Attr PgmName = "ByteOrdering"
Attr TypeRef = "pwrb:Type-ByteOrderingEnum"
EndBody
EndObject
!/**
! Float representation of the device.
!*/
Object FloatRepresentation $Attribute 16 09-MAR-2011 17:32:02.70
Body SysBody 09-MAR-2011 17:33:34.38
Attr PgmName = "FloatRepresentation"
Attr TypeRef = "pwrb:Type-FloatRepEnum"
EndBody
EndObject
!/**
! @Summary Process that handles the module. Plc(1), rt_io_comm(2) or application process(4).
! Process that handles the module.
!
! 1: The module is read by the plc process, and is handled by a specific
! thread in the plc, which is specified in the ThreadObject attribute.
! 2: The module is read by the rt_io_comm process.
! 4: The module is handled by an application program.
!*/
Object Process $Attribute 9 23-FEB-2011 14:01:08.18
Body SysBody 23-FEB-2011 14:01:08.18
Attr PgmName = "Process"
Attr TypeRef = "pwrb:Type-IoProcessMask"
EndBody
EndObject
!/**
! @Summary Plc thread that handles the card.
! The PlcThread object of the plc thread that handles the card.
! The card is read with the scantime of the thread.
!*/
Object ThreadObject $Attribute 10 23-FEB-2011 14:01:08.18
Body SysBody 23-FEB-2011 14:01:08.18
Attr PgmName = "ThreadObject"
Attr TypeRef = "pwrs:Type-$Objid"
EndBody
EndObject
!/**
! Offset for the device in the input area. The offset and size are
! calculated at runtime startup and is dependent on the channel
! configuration.
! The offset and size has to match the offset in the SYCON.net configuration.
!*/
Object InputAreaOffset $Attribute 11 04-MAR-2011 10:18:56.35
Body SysBody 04-MAR-2011 10:19:17.94
Attr PgmName = "InputAreaOffset"
...
...
@@ -3275,6 +3534,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! Size for the device in the input area.
!*/
Object InputAreaSize $Attribute 12 04-MAR-2011 10:19:46.95
Body SysBody 04-MAR-2011 10:19:37.75
Attr PgmName = "InputAreaSize"
...
...
@@ -3282,6 +3544,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! Offset in the output area.
!*/
Object OutputAreaOffset $Attribute 13 04-MAR-2011 10:20:07.15
Body SysBody 04-MAR-2011 10:19:58.64
Attr PgmName = "OutputAreaOffset"
...
...
@@ -3289,6 +3554,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! Size for the device in the output area.
!*/
Object OutputAreaSize $Attribute 14 04-MAR-2011 10:20:18.60
Body SysBody 04-MAR-2011 10:19:58.64
Attr PgmName = "OutputAreaSize"
...
...
@@ -3323,6 +3591,20 @@ Volume OtherIO $ClassVolume 0.0.250.10
EndBody
EndObject
EndObject
!/**
! @Version 1.0
! @Group IO
! @Summary Hilscher cifX Module.
! Card object for a Hilscher cifX device configured with SYCON.net.
!
! The object is configured as a child to a Hilscher_cifX_Device object.
! Below the module objects, channels are configured that describes the input
! and output area for the module.
!
! @b See also
! @classlink Hilscher_cifX_Master otherio_hilscher_cifx_master.html
! @classlink Hilscher_cifX_Device otherio_hilscher_cifx_device.html
!*/
Object Hilscher_cifX_Module $ClassDef 19 23-FEB-2011 15:23:13.31
Body SysBody 23-FEB-2011 14:02:55.28
Attr Editor = 0
...
...
@@ -3334,24 +3616,47 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr StructName = "Hilscher_cifX_Module"
Attr NextAix = "_X15"
EndBody
!/**
! Optional description.
!*/
Object Description $Attribute 6 23-FEB-2011 14:02:24.06
Body SysBody 23-FEB-2011 14:02:24.06
Attr PgmName = "Description"
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! @Summary Process that handles the module. Plc(1), rt_io_comm(2) or application process(4).
! Process that handles the module.
!
! 1: The module is read by the plc process, and is handled by a specific
! thread in the plc, which is specified in the ThreadObject attribute.
! 2: The module is read by the rt_io_comm process.
! 4: The module is handled by an application program.
!*/
Object Process $Attribute 9 23-FEB-2011 14:02:24.06
Body SysBody 23-FEB-2011 14:02:24.06
Attr PgmName = "Process"
Attr TypeRef = "pwrb:Type-IoProcessMask"
EndBody
EndObject
!/**
! @Summary Plc thread that handles the card.
! The PlcThread object of the plc thread that handles the card.
! The card is read with the scantime of the thread.
!*/
Object ThreadObject $Attribute 10 23-FEB-2011 14:02:24.06
Body SysBody 23-FEB-2011 14:02:24.06
Attr PgmName = "ThreadObject"
Attr TypeRef = "pwrs:Type-$Objid"
EndBody
EndObject
!/**
! Offset for the module in the input area. The offset and size are
! calculated at runtime startup and is dependent on the channel
! configuration.
! The offset and size has to match the offset in the SYCON.net configuration.
!*/
Object InputAreaOffset $Attribute 11 04-MAR-2011 10:20:33.79
Body SysBody 04-MAR-2011 10:20:33.79
Attr PgmName = "InputAreaOffset"
...
...
@@ -3359,6 +3664,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! Size for the module in the input area.
!*/
Object InputAreaSize $Attribute 12 04-MAR-2011 10:20:33.79
Body SysBody 04-MAR-2011 10:20:33.79
Attr PgmName = "InputAreaSize"
...
...
@@ -3366,6 +3674,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! Offset in the output area.
!*/
Object OutputAreaOffset $Attribute 13 04-MAR-2011 10:20:33.79
Body SysBody 04-MAR-2011 10:20:33.79
Attr PgmName = "OutputAreaOffset"
...
...
@@ -3373,6 +3684,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32"
EndBody
EndObject
!/**
! Size for the module in the output area.
!*/
Object OutputAreaSize $Attribute 14 04-MAR-2011 10:20:33.79
Body SysBody 04-MAR-2011 10:20:33.79
Attr PgmName = "OutputAreaSize"
...
...
profibus/lib/rt/src/os_linux/rt_io_pn_locals.h
View file @
962afb16
...
...
@@ -25,8 +25,9 @@
typedef
struct
_io_sPnRackLocal
{
unsigned
short
bytes_of_input
;
unsigned
short
bytes_of_output
;
unsigned
char
*
inputs
;
unsigned
char
*
outputs
;
unsigned
char
*
inputs
;
unsigned
char
*
outputs
;
void
*
userdata
;
}
io_sPnRackLocal
;
typedef
struct
_io_sPnCardLocal
{
...
...
profibus/wbl/mcomp/src/profibus.wb_load
View file @
962afb16
...
...
@@ -2808,6 +2808,9 @@ Volume Profibus $ClassVolume 0.0.250.7
! @Group IO
! @Summary Defines that a Profinet controller stack is installed.
! Configures a Profinet controller stack.
!
! @b See also
! @classlink PnDevice profibus_pndevice.html
!*/
Object PnControllerSoftingPNAK $ClassDef 15 21-APR-2009 13:41:08.17
Body SysBody 21-APR-2009 13:41:08.17
...
...
@@ -2912,6 +2915,10 @@ Volume Profibus $ClassVolume 0.0.250.7
! @Group IO
! @Summary Configures one Profinet device.
! Configures one Profinet device.
!
! @b See also
! @classlink PnControllerSoftingPNAK profibus_pncontrollersoftingpnak.html
! @classlink Hilscher_cifX_PnController otherio_hilscher_cifx_pncontroller.html
!*/
Object PnDevice $ClassDef 16 21-APR-2009 13:41:08.17
Body SysBody 21-APR-2009 13:41:08.17
...
...
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