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
e14d1bc8
Commit
e14d1bc8
authored
May 31, 2011
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of claes@pwrcvs:/data1/git/pwr
parents
3b338359
9a50a70f
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1276 additions
and
413 deletions
+1276
-413
misc/lib/misc/src/misc_plc.c
misc/lib/misc/src/misc_plc.c
+25
-6
misc/mmi/misc/src/misc_pingpong_settings.pwg
misc/mmi/misc/src/misc_pingpong_settings.pwg
+1
-1
misc/mmi/misc/src/pwr_c_misc_pingpong.pwg
misc/mmi/misc/src/pwr_c_misc_pingpong.pwg
+695
-300
misc/wbl/misc/src/miscellaneous.wb_load
misc/wbl/misc/src/miscellaneous.wb_load
+22
-3
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.
misc/lib/misc/src/misc_plc.c
View file @
e14d1bc8
...
...
@@ -21,6 +21,7 @@
#include <math.h>
#include <stdlib.h>
#include <float.h>
#include "pwr.h"
#include "pwr_baseclasses.h"
#include "pwr_miscellaneousclasses.h"
...
...
@@ -29,6 +30,7 @@
#include "co_time.h"
#define BASE_SPEED 10
#define MAX_ANGLE 60
static
float
my_random
()
{
static
unsigned
int
seed
=
100
;
...
...
@@ -66,7 +68,7 @@ void Misc_PingPongFo_init( pwr_sClass_Misc_PingPongFo *o)
void
Misc_PingPongFo_exec
(
plc_sThread
*
tp
,
pwr_sClass_Misc_PingPongFo
*
o
)
{
pwr_sClass_Misc_PingPong
*
co
=
(
pwr_sClass_Misc_PingPong
*
)
o
->
PlcConnectP
;
if
(
!
co
)
if
(
!
co
||
fabs
(
co
->
Width
<
FLT_EPSILON
)
)
return
;
co
->
XCoordinate
+=
co
->
Speed
*
tp
->
PlcThread
->
ScanTime
*
cos
(
co
->
Direction
/
180
*
M_PI
);
...
...
@@ -100,7 +102,7 @@ void Misc_PingPongFo_exec( plc_sThread *tp, pwr_sClass_Misc_PingPongFo *o)
co
->
Direction
=
-
co
->
Direction
+
180
+
my_random
()
*
10
;
else
co
->
Direction
=
-
co
->
Direction
-
180
+
my_random
()
*
10
;
if
(
fabs
(
co
->
Direction
)
>
45
)
if
(
fabs
(
co
->
Direction
)
>
MAX_ANGLE
)
co
->
Direction
=
my_random
()
*
10
;
}
...
...
@@ -151,7 +153,7 @@ void Misc_PingPongFo_exec( plc_sThread *tp, pwr_sClass_Misc_PingPongFo *o)
co
->
Direction
=
-
co
->
Direction
+
180
+
my_random
()
*
20
;
else
co
->
Direction
=
-
co
->
Direction
-
180
+
my_random
()
*
20
;
if
(
fabs
(
co
->
Direction
)
>
45
)
if
(
fabs
(
co
->
Direction
)
>
MAX_ANGLE
)
co
->
Direction
=
my_random
()
*
10
;
co
->
Speed
=
BASE_SPEED
*
co
->
LeftLevel
*
co
->
LevelFactor
;
}
...
...
@@ -212,7 +214,8 @@ void Misc_PingPongFo_exec( plc_sThread *tp, pwr_sClass_Misc_PingPongFo *o)
break
;
}
case
pwr_eMisc_PingPongModeEnum_TwoPlayers
:
{
if
(
co
->
OldMode
!=
co
->
Mode
)
{
if
(
co
->
OldMode
!=
co
->
Mode
||
co
->
NewMatch
)
{
co
->
NewMatch
=
0
;
co
->
State
=
pwr_eMisc_PingPongStateEnum_ServeRight
;
time_GetTime
(
&
co
->
StateShiftTime
);
co
->
LeftScore
=
0
;
...
...
@@ -239,7 +242,7 @@ void Misc_PingPongFo_exec( plc_sThread *tp, pwr_sClass_Misc_PingPongFo *o)
co
->
Direction
=
-
co
->
Direction
+
180
+
my_random
()
*
20
;
else
co
->
Direction
=
-
co
->
Direction
-
180
+
my_random
()
*
20
;
if
(
fabs
(
co
->
Direction
)
>
45
)
if
(
fabs
(
co
->
Direction
)
>
MAX_ANGLE
)
co
->
Direction
=
my_random
()
*
10
;
co
->
Speed
=
BASE_SPEED
*
co
->
LeftLevel
*
co
->
LevelFactor
;
}
...
...
@@ -323,5 +326,21 @@ void Misc_PingPongFo_exec( plc_sThread *tp, pwr_sClass_Misc_PingPongFo *o)
break
;
}
}
float
height
;
if
(
fabs
(
co
->
Direction
)
<
90
)
{
if
(
co
->
XCoordinate
<
co
->
Width
*
3
/
4
)
height
=
(
1
-
co
->
XCoordinate
/
co
->
Width
*
4
/
3
);
else
height
=
((
co
->
XCoordinate
-
co
->
Width
*
3
/
4
)
/
co
->
Width
*
4
);
}
else
{
if
(
co
->
XCoordinate
<
co
->
Width
/
4
)
height
=
(
1
-
co
->
XCoordinate
/
co
->
Width
*
4
);
else
height
=
((
co
->
XCoordinate
-
co
->
Width
/
4
)
/
co
->
Width
*
4
/
3
);
}
co
->
XShadow
=
co
->
XCoordinate
+
height
*
4
;
co
->
YShadow
=
co
->
YCoordinate
+
height
*
1
;
co
->
OldMode
=
co
->
Mode
;
}
misc/mmi/misc/src/misc_pingpong_settings.pwg
View file @
e14d1bc8
...
...
@@ -1150,7 +1150,7 @@ pwr_exe:
1204 0
99
13
1302
1
1302
0
1303 3
1304 0
1305 0
...
...
misc/mmi/misc/src/pwr_c_misc_pingpong.pwg
View file @
e14d1bc8
...
...
@@ -4,14 +4,14 @@
100 11.5137
135 11.5137
101 20
102 -
47
103 -
64
102 -
103
103 -
102
104 2.15174
136 2.15174
105 100
106 -
8
107 -1
1
108 53.
6751
106 -
19
107 -1
9
108 53.
5883
109 -3.48664
110 39.285
111 -3.56335
...
...
@@ -36,7 +36,7 @@
134
22
2200 0
2201
41
2201
50
2202 pwr_c_misc_pingpong
2203 31
2205 0
...
...
@@ -1357,14 +1357,65 @@ pwr_exe:
125
2
19
1904 O
37
1900 5
3.6752
1901
-3.30175
1902
-0.545933
1903
-1.4765
1904 O
2
1900 5
0
1901
0
1902
35
1903
0
1908 0
1909 32
1910 32
1909 66
1910 66
1911 1
1915 0
1913 5
1916 2
1914 0
1918 0
1919 0
1920 0
1917 0
1921 0
1922 4
1923 0
1907 0
1906
1905
5
500 0
501 1
504 1
505 1
502
7
700 0
701 0
99
503
7
700 50
701 35
99
99
1912
28
2800 1
2801 0
2802 0
2803 0
2804 1
2805 0
2806 0
99
99
19
1904 O49
1900 28.7561
1901 25.2742
1902 35.0886
1903 0.173706
1908 0
1909 66
1910 66
1911 0
1915 0
1913 5
...
...
@@ -1374,8 +1425,8 @@ pwr_exe:
1919 0
1920 0
1917 0
1921
2
1922
2
1921
6
1922
1
1923 0
1907 0
1906
...
...
@@ -1387,31 +1438,135 @@ pwr_exe:
505 1
502
7
700
-3.12671
701
-1.4765
700
25.2742
701
0.173706
99
503
7
700
53.6752
701
-0.17370
6
700
28.3141
701
35.088
6
99
99
1912
28
2800 1.00308
2800 1.1454
2801 0
2802 -3.67494
2803 0
2804 1
2805 0
2806 0
99
99
19
1904 O40
1900 50.0274
1901 0.0868531
1902 17.6312
1903 17.1969
1908 0
1909 31
1910 31
1911 0
1915 0
1913 5
1916 2
1914 0
1918 0
1919 0
1920 0
1917 0
1921 0
1922 4
1923 0
1907 0
1906
1905
5
500 0
501 1
504 1
505 1
502
7
700 0.0868531
701 16.7626
99
503
7
700 50.0274
701 17.1969
99
99
1912
28
2800 1
2801 0
2802 0
2803 0
2804 1
2805 0.434265
2806 0
99
99
19
1904 O39
1900 25.1874
1901 24.7628
1902 35.0018
1903 0.173706
1908 0
1909 31
1910 31
1911 0
1915 0
1913 5
1916 2
1914 0
1918 0
1919 0
1920 0
1917 0
1921 0
1922 4
1923 0
1907 0
1906
1905
5
500 0
501 1
504 1
505 1
502
7
700 22.3212
701 0.0868531
99
503
7
700 23.2766
701 34.9149
99
99
1912
28
2800 0.444444
2801 0
2802
-0.165409
2802
14.8422
2803 0
2804
0.714286
2805
-0.421858
2804
1
2805
0.0868531
2806 0
99
99
35
3500
27
2703 10000
2704
10000
2704
67
2722 10000
2705
10000
2705
67
2723 10000
2706 10000
2708 0
...
...
@@ -1429,8 +1584,8 @@ pwr_exe:
2701
2700
10
1000
pwr_menubar2
1002
O25
1000
Grp46_
1002
Grp46_
1005
0
0
...
...
@@ -1464,14 +1619,14 @@ pwr_exe:
0
0
0
1006
53.5243
1007 -
3.48664
1008
-1.56335
1009 -
3.56335
1013
53.5243
1014 -
3.48664
1015
-1.56335
1016 -
3.56335
1006
1.43427
1007 -
0.565733
1008
1.1737
1009 -
0.826304
1013
1.43427
1014 -
0.565733
1015
1.1737
1016 -
0.826304
1003
0
0
...
...
@@ -1486,8 +1641,8 @@ pwr_exe:
1004
1001
7
700
-0.838163
701
-3.8316
700
0
701
0
99
1010
1011
...
...
@@ -1508,29 +1663,233 @@ pwr_exe:
99
2707
28
2800 2.07313
2800 1
2801 0
2802 2.43189
2803 0
2804 1
2805 2.34503
2806 0
99
2716 0
2718
2717
2719 0
2724 0
2727 0
2728 303
2729 9999
2721
1
100 8192
101 0
102 33619964
103 2
15
1500 $object.XShadow##Float32
1501 $object.YShadow##Float32
1505
1506
1502 0
1503 0
1504 1
1509 1
1507 1
1510 1
1508 0
99
99
99
3501
36
3600
3
300 Grp46_
301
2
24
2404 O6
2400 -0.99762
2401 -2.99762
2402 -1.17133
2403 -3.17133
2408 0
2409 47
2410 47
2411 0
2415 0
2413 5
2416 2
2414 0
2417 0
2421 0
2418 0
2419 4
2420 0
2422 0
2407 0
2406
2405
8
802 0
803 1
800 0
801 360
806 1
804
7
700 -1
701 -1
99
805
7
700 1
701 1
99
99
2412
28
2800 1
2801 0
2802 -1.99762
2803 0
2804 1
2805 -2.17133
2806 0
99
99
99
302 0
304 0
303
305 0
306
307
308 0
321 0
309 0
313 0
322 0
323 0
324 0
325 0
326 0
327 0
310 0
311 0
312
314
315 1
316 1
317 0
318 0
319 0
320 0
328 0
99
99
99
19
1904 O37
1900 53.5882
1901 -3.3886
1902 -0.0289518
1903 -1.4765
1908 0
1909 32
1910 32
1911 0
1915 0
1913 5
1916 2
1914 0
1918 0
1919 0
1920 0
1917 0
1921 2
1922 2
1923 0
1907 0
1906
1905
5
500 0
501 1
504 1
505 1
502
7
700 -3.12671
701 -1.4765
99
503
7
700 53.6752
701 -0.173706
99
99
1912
28
2800 1.00308
2801 0
2802 -0.252262
2803 0
2804 1.11111
2805 0.164055
2806 0
99
99
19
1904 O47
1900 -0.0868531
1901 -3.03986
1902 35.0886
1903 -0.173706
1908 0
1909 31
1910 31
1911 0
1915 0
1913 5
1916 2
1914 0
1918 0
1919 0
1920 0
1917 0
1921 0
1922 4
1923 0
1907 0
1906
1905
5
500 0
501 1
504 1
505 1
502
7
700 -3.03986
701 0.0868531
99
503
7
700 -0.0868531
701 35.3492
99
99
1912
28
2800 1
2801 0
2802
-3.48664
2802
0
2803 0
2804
2
2805 -
3.56335
2804
1
2805 -
0.260559
2806 0
99
2716 0
2718
2717
2719 0
2724 1
2727 0
2728 303
2729 9999
2721
1
100 1
101 1
102 33619964
103 0
99
99
27
2703 10000
...
...
@@ -1554,8 +1913,8 @@ pwr_exe:
2701
2700
10
1000 pwr_
pulldownmenu
2
1002 O2
6
1000 pwr_
menubar
2
1002 O2
5
1005
0
0
...
...
@@ -1589,17 +1948,17 @@ pwr_exe:
0
0
0
1006 5
.5
1007
2.5
1006 5
3.5243
1007
-3.48664
1008 -1.56335
1009 -3.56335
1013 5
.5
1014
2.5
1013 5
3.5243
1014
-3.48664
1015 -1.56335
1016 -3.56335
1003
0
5
0
0
0
0
...
...
@@ -1609,11 +1968,10 @@ pwr_exe:
0
0
1004
"File"
1001
7
700
3.30041
701 -
1.6502
700
-0.838163
701 -
3.8316
99
1010
1011
...
...
@@ -1634,9 +1992,9 @@ pwr_exe:
99
2707
28
2800
1
2800
2.07313
2801 0
2802
2.5
2802
-3.48664
2803 0
2804 2
2805 -3.56335
...
...
@@ -1656,85 +2014,8 @@ pwr_exe:
101 1
102 33619964
103 0
68
6800 3
6801 Settings
6833
1
100 1
101 65
102 33619964
103 0
55
5500 open graph "$pwr_exe/misc_pingpong_settings"/inst=$object
99
99
6802 Close
6834
1
100 1
101 262145
102 33619964
103 0
67
99
99
99
99
99
19
1904 O2
1900 50
1901 0
1902 35
1903 0
1908 0
1909 66
1910 66
1911 1
1915 0
1913 5
1916 2
1914 0
1918 0
1919 0
1920 0
1917 0
1921 0
1922 4
1923 0
1907 0
1906
1905
5
500 0
501 1
504 1
505 1
502
7
700 0
701 0
99
503
7
700 50
701 35
99
99
1912
28
2800 1
2801 0
2802 0
2803 0
2804 1
2805 0
2806 0
99
99
35
3500
27
2703 10000
2704 10000
...
...
@@ -1757,8 +2038,8 @@ pwr_exe:
2701
2700
10
1000
Grp11_
1002
Grp11_
1000
pwr_pulldownmenu2
1002
O26
1005
0
0
...
...
@@ -1792,17 +2073,17 @@ pwr_exe:
0
0
0
1006
0
1007 -
0.5
1008
2.
5
1009 -
2.
5
1013
0
1014 -
0.5
1015
2.
5
1016 -
2.
5
1006
1.41791
1007 -
1.58209
1008
-1.5633
5
1009 -
3.5633
5
1013
1.41791
1014 -
1.58209
1015
-1.5633
5
1016 -
3.5633
5
1003
0
0
5
0
0
0
...
...
@@ -1812,10 +2093,11 @@ pwr_exe:
0
0
1004
"File"
1001
7
700
0
701
0
700
3.30041
701
-1.6502
99
1010
1011
...
...
@@ -1838,127 +2120,62 @@ pwr_exe:
28
2800 1
2801 0
2802
0
2802
-1.58209
2803 0
2804
1
2805
0
2804
2
2805
-3.56335
2806 0
99
2716 0
2718
2717
2719 0
2724
0
2724
1
2727 0
2728 303
2729 9999
2721
1
100
8193
100
1
101 1
102 33619964
103 2
15
1500
1501 $object.LeftPos##Float32
1505
1506 $object.RacketWidth##Float32
1502 0
1503 0
1504 1
1509 1
1507 1
1510 0.2
1508 8
99
99
99
3501
36
3600
3
300 Grp11_
301
2
19
1904 O10
1900 0
1901 -0.5
1902 2.5
1903 -2.5
1908 0
1909 38
1910 38
1911 1
1915 0
1913 5
1916 2
1914 0
1918 0
1919 0
1920 0
1917 0
1921 0
1922 4
1923 0
1907 0
1906
1905
5
500 0
501 1
504 1
505 1
502
7
700 -0.5
701 -2.5
99
503
7
700 0
701 2.5
99
99
1912
28
2800 1
2801 0
2802 0
2803 0
2804 1
2805 0
2806 0
99
103 0
68
6800 7
6801 New
6833
1
100 1
101 5
102 33619964
103 0
51
5100 $object.NewMatch##Boolean
5101 1
5102 1
99
99
6802 Settings
6834
1
100 1
101 65
102 33619964
103 0
55
5500 open graph "$pwr_exe/misc_pingpong_settings"/inst=$object
99
99
6803 Close
6835
1
100 1
101 262145
102 33619964
103 0
67
99
99
302 0
304 0
303
305 0
306
307
308 0
321 0
309 0
313 0
322 0
323 0
324 0
325 0
326 0
327 0
310 0
311 0
312
314
315 1
316 1
317 0
318 0
319 0
320 0
328 0
99
99
99
...
...
@@ -1986,8 +2203,8 @@ pwr_exe:
2701
2700
10
1000 Grp1
2
_
1002 Grp1
2
_
1000 Grp1
1
_
1002 Grp1
1
_
1005
0
0
...
...
@@ -2021,12 +2238,12 @@ pwr_exe:
0
0
0
1006
50.5
1007
50
1006
0
1007
-0.5
1008 2.5
1009 -2.5
1013
50.5
1014
50
1013
0
1014
-0.5
1015 2.5
1016 -2.5
1003
...
...
@@ -2089,7 +2306,7 @@ pwr_exe:
103 2
15
1500
1501 $object.
Righ
tPos##Float32
1501 $object.
Lef
tPos##Float32
1505
1506 $object.RacketWidth##Float32
1502 0
...
...
@@ -2106,13 +2323,13 @@ pwr_exe:
36
3600
3
300 Grp1
2
_
300 Grp1
1
_
301
2
19
1904 O
8
1900
50.5
1901
50
1904 O
10
1900
0
1901
-0.5
1902 2.5
1903 -2.5
1908 0
...
...
@@ -2140,12 +2357,12 @@ pwr_exe:
505 1
502
7
700
50
700
-0.5
701 -2.5
99
503
7
700
50.5
700
0
701 2.5
99
99
...
...
@@ -3296,11 +3513,11 @@ pwr_exe:
99
99
19
1904 O
39
1900
25.1874
1901
24.7628
1902 35.
0018
1903
0.173706
1904 O
48
1900
53.0672
1901
50.1142
1902 35.
1755
1903
-0.0868529
1908 0
1909 31
1910 31
...
...
@@ -3326,36 +3543,183 @@ pwr_exe:
505 1
502
7
700
22.3212
700
-3.03986
701 0.0868531
99
503
7
700
23.2766
701 3
4.9149
700
-0.0868531
701 3
5.3492
99
99
1912
28
2800
0.444444
2800
1
2801 0
2802
14.8422
2802
53.1541
2803 0
2804 1
2805 0.0868531
2805 -0.173706
2806 0
99
99
35
3500
27
2703 10000
2704 10000
2722 10000
2705 10000
2723 10000
2706 10000
2708 0
2709 0
2710 0
2711 0
2712 0
2713 0
2714 0
2715 0
2720 0
2725 0
2726 0
2702 0
2701
2700
10
1000 Grp12_
1002 Grp12_
1005
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1006 50.5
1007 50
1008 2.5
1009 -2.5
1013 50.5
1014 50
1015 2.5
1016 -2.5
1003
0
0
0
0
0
0
0
0
0
0
1004
1001
7
700 0
701 0
99
1010
1011
1018
1019
1020
1021
1022
1023
1024
1025
1012 0
1017 9999
1027 9999
1026 33619964
1028 0
1029
99
2707
28
2800 1
2801 0
2802 0
2803 0
2804 1
2805 0
2806 0
99
2716 0
2718
2717
2719 0
2724 0
2727 0
2728 303
2729 9999
2721
1
100 8193
101 1
102 33619964
103 2
15
1500
1501 $object.RightPos##Float32
1505
1506 $object.RacketWidth##Float32
1502 0
1503 0
1504 1
1509 1
1507 1
1510 0.2
1508 8
99
99
99
3501
36
3600
3
300 Grp12_
301
2
19
1904 O
40
1900 50.
0274
1901
0.0868531
1902
17.6312
1903
17.1969
1904 O
8
1900 50.
5
1901
50
1902
2.5
1903
-2.5
1908 0
1909 3
1
1910 3
1
1911
0
1909 3
8
1910 3
8
1911
1
1915 0
1913 5
1916 2
...
...
@@ -3377,13 +3741,13 @@ pwr_exe:
505 1
502
7
700
0.0868531
701
16.7626
700
50
701
-2.5
99
503
7
700 50.
0274
701
17.1969
700 50.
5
701
2.5
99
99
1912
...
...
@@ -3393,10 +3757,41 @@ pwr_exe:
2802 0
2803 0
2804 1
2805 0
.434265
2805 0
2806 0
99
99
99
302 0
304 0
303
305 0
306
307
308 0
321 0
309 0
313 0
322 0
323 0
324 0
325 0
326 0
327 0
310 0
311 0
312
314
315 1
316 1
317 0
318 0
319 0
320 0
328 0
99
99
99
35
3500
27
...
...
misc/wbl/misc/src/miscellaneous.wb_load
View file @
e14d1bc8
...
...
@@ -121,7 +121,7 @@ Volume Miscellaneous $ClassVolume 0.0.0.9
Object RtBody $ObjBodyDef 1 08-APR-2011 08:56:23.47
Body SysBody 08-APR-2011 08:56:23.47
Attr StructName = "Misc_PingPong"
Attr NextAix = "_X3
3
"
Attr NextAix = "_X3
6
"
EndBody
!/**
! Mode idle, one player or two players.
...
...
@@ -287,6 +287,20 @@ Volume Miscellaneous $ClassVolume 0.0.0.9
Attr TypeRef = "pwrs:Type-$Float32"
EndBody
EndObject
Object XShadow $Attribute 34 25-MAY-2011 19:08:53.70
Body SysBody 25-MAY-2011 19:08:55.25
Attr PgmName = "XShadow"
Attr Flags = 1024
Attr TypeRef = "pwrs:Type-$Float32"
EndBody
EndObject
Object YShadow $Attribute 33 25-MAY-2011 19:09:01.74
Body SysBody 25-MAY-2011 19:09:02.90
Attr PgmName = "YShadow"
Attr Flags = 1024
Attr TypeRef = "pwrs:Type-$Float32"
EndBody
EndObject
!/**
! Racket width.
!*/
...
...
@@ -349,7 +363,6 @@ Volume Miscellaneous $ClassVolume 0.0.0.9
Object LeftPos $Attribute 31 25-MAY-2011 10:51:24.12
Body SysBody 25-MAY-2011 10:51:26.62
Attr PgmName = "LeftPos"
Attr Flags = 16777216
Attr TypeRef = "pwrs:Type-$Float32"
EndBody
EndObject
...
...
@@ -359,7 +372,6 @@ Volume Miscellaneous $ClassVolume 0.0.0.9
Object RightPos $Attribute 32 25-MAY-2011 10:51:37.69
Body SysBody 25-MAY-2011 10:51:39.58
Attr PgmName = "RightPos"
Attr Flags = 16777216
Attr TypeRef = "pwrs:Type-$Float32"
EndBody
EndObject
...
...
@@ -401,6 +413,13 @@ Volume Miscellaneous $ClassVolume 0.0.0.9
Attr TypeRef = "pwrs:Type-$Float32"
EndBody
EndObject
Object NewMatch $Attribute 35 26-MAY-2011 16:36:33.79
Body SysBody 26-MAY-2011 16:36:24.24
Attr PgmName = "NewMatch"
Attr Flags = 16778240
Attr TypeRef = "pwrs:Type-$Boolean"
EndBody
EndObject
Object OldMode $Attribute 22 08-APR-2011 15:09:14.47
Body SysBody 08-APR-2011 15:09:16.01
Attr PgmName = "OldMode"
...
...
otherio/lib/cifx_dummy/src/cifx_dummy_functions.c
0 → 100644
View file @
e14d1bc8
/*
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 @
e14d1bc8
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 @
e14d1bc8
...
...
@@ -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,57 +428,71 @@ static pwr_tStatus IoAgentInit( io_tCtx ctx,
return
IO__INITFAIL
;
}
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
]);
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
[
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
;
PNM_APCFG_CFG_IOD_REQ_T
iod_config
=
{{
0
}}
;
PNM_APCFG_CFG_IOD_CNF_T
iod_config_cnf
=
{{
0
}};
device
++
;
}
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
|
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
;
sts
=
xChannelPutPacket
(
local
->
chan
,
(
CIFX_PACKET
*
)
&
iod_config
,
10
);
sts
=
xChannelPutPacket
(
local
->
chan
,
(
CIFX_PACKET
*
)
iod_config
,
10
);
if
(
!
status_check
(
op
,
ap
,
sts
,
"xChannelPutPacket"
))
return
IO__INITFAIL
;
...
...
@@ -488,6 +502,15 @@ static pwr_tStatus IoAgentInit( io_tCtx ctx,
!
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
++
;
// 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
);
// 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
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
;
}
else
printf
(
"Unexpected cmd received: %u
\n
"
,
msg
->
tHead
.
ulCmd
);
default:
printf
(
"Unexpected cmd received: %u
\n
"
,
((
TLR_PACKET_HEADER_T
*
)
msg
)
->
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 @
e14d1bc8
...
...
@@ -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 @
e14d1bc8
...
...
@@ -27,6 +27,7 @@ typedef struct _io_sPnRackLocal {
unsigned
short
bytes_of_output
;
unsigned
char
*
inputs
;
unsigned
char
*
outputs
;
void
*
userdata
;
}
io_sPnRackLocal
;
typedef
struct
_io_sPnCardLocal
{
...
...
profibus/wbl/mcomp/src/profibus.wb_load
View file @
e14d1bc8
...
...
@@ -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