Commit e14d1bc8 authored by Claes Sjofors's avatar Claes Sjofors

Merge branch 'master' of claes@pwrcvs:/data1/git/pwr

parents 3b338359 9a50a70f
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <math.h> #include <math.h>
#include <stdlib.h> #include <stdlib.h>
#include <float.h>
#include "pwr.h" #include "pwr.h"
#include "pwr_baseclasses.h" #include "pwr_baseclasses.h"
#include "pwr_miscellaneousclasses.h" #include "pwr_miscellaneousclasses.h"
...@@ -29,6 +30,7 @@ ...@@ -29,6 +30,7 @@
#include "co_time.h" #include "co_time.h"
#define BASE_SPEED 10 #define BASE_SPEED 10
#define MAX_ANGLE 60
static float my_random() { static float my_random() {
static unsigned int seed = 100; static unsigned int seed = 100;
...@@ -66,7 +68,7 @@ void Misc_PingPongFo_init( pwr_sClass_Misc_PingPongFo *o) ...@@ -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) void Misc_PingPongFo_exec( plc_sThread *tp, pwr_sClass_Misc_PingPongFo *o)
{ {
pwr_sClass_Misc_PingPong *co = (pwr_sClass_Misc_PingPong *) o->PlcConnectP; pwr_sClass_Misc_PingPong *co = (pwr_sClass_Misc_PingPong *) o->PlcConnectP;
if ( !co) if ( !co || fabs(co->Width < FLT_EPSILON))
return; return;
co->XCoordinate += co->Speed * tp->PlcThread->ScanTime * cos(co->Direction/180*M_PI); 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) ...@@ -100,7 +102,7 @@ void Misc_PingPongFo_exec( plc_sThread *tp, pwr_sClass_Misc_PingPongFo *o)
co->Direction = -co->Direction + 180 + my_random() * 10; co->Direction = -co->Direction + 180 + my_random() * 10;
else else
co->Direction = -co->Direction - 180 + my_random() * 10; co->Direction = -co->Direction - 180 + my_random() * 10;
if ( fabs(co->Direction) > 45) if ( fabs(co->Direction) > MAX_ANGLE)
co->Direction = my_random() * 10; co->Direction = my_random() * 10;
} }
...@@ -151,7 +153,7 @@ void Misc_PingPongFo_exec( plc_sThread *tp, pwr_sClass_Misc_PingPongFo *o) ...@@ -151,7 +153,7 @@ void Misc_PingPongFo_exec( plc_sThread *tp, pwr_sClass_Misc_PingPongFo *o)
co->Direction = -co->Direction + 180 + my_random() * 20; co->Direction = -co->Direction + 180 + my_random() * 20;
else else
co->Direction = -co->Direction - 180 + my_random() * 20; 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->Direction = my_random() * 10;
co->Speed = BASE_SPEED * co->LeftLevel * co->LevelFactor; co->Speed = BASE_SPEED * co->LeftLevel * co->LevelFactor;
} }
...@@ -212,7 +214,8 @@ void Misc_PingPongFo_exec( plc_sThread *tp, pwr_sClass_Misc_PingPongFo *o) ...@@ -212,7 +214,8 @@ void Misc_PingPongFo_exec( plc_sThread *tp, pwr_sClass_Misc_PingPongFo *o)
break; break;
} }
case pwr_eMisc_PingPongModeEnum_TwoPlayers: { 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; co->State = pwr_eMisc_PingPongStateEnum_ServeRight;
time_GetTime( &co->StateShiftTime); time_GetTime( &co->StateShiftTime);
co->LeftScore = 0; co->LeftScore = 0;
...@@ -239,7 +242,7 @@ void Misc_PingPongFo_exec( plc_sThread *tp, pwr_sClass_Misc_PingPongFo *o) ...@@ -239,7 +242,7 @@ void Misc_PingPongFo_exec( plc_sThread *tp, pwr_sClass_Misc_PingPongFo *o)
co->Direction = -co->Direction + 180 + my_random() * 20; co->Direction = -co->Direction + 180 + my_random() * 20;
else else
co->Direction = -co->Direction - 180 + my_random() * 20; 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->Direction = my_random() * 10;
co->Speed = BASE_SPEED * co->LeftLevel * co->LevelFactor; co->Speed = BASE_SPEED * co->LeftLevel * co->LevelFactor;
} }
...@@ -323,5 +326,21 @@ void Misc_PingPongFo_exec( plc_sThread *tp, pwr_sClass_Misc_PingPongFo *o) ...@@ -323,5 +326,21 @@ void Misc_PingPongFo_exec( plc_sThread *tp, pwr_sClass_Misc_PingPongFo *o)
break; 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; co->OldMode = co->Mode;
} }
...@@ -1150,7 +1150,7 @@ pwr_exe: ...@@ -1150,7 +1150,7 @@ pwr_exe:
1204 0 1204 0
99 99
13 13
1302 1 1302 0
1303 3 1303 3
1304 0 1304 0
1305 0 1305 0
......
...@@ -4,14 +4,14 @@ ...@@ -4,14 +4,14 @@
100 11.5137 100 11.5137
135 11.5137 135 11.5137
101 20 101 20
102 -47 102 -103
103 -64 103 -102
104 2.15174 104 2.15174
136 2.15174 136 2.15174
105 100 105 100
106 -8 106 -19
107 -11 107 -19
108 53.6751 108 53.5883
109 -3.48664 109 -3.48664
110 39.285 110 39.285
111 -3.56335 111 -3.56335
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
134 134
22 22
2200 0 2200 0
2201 41 2201 50
2202 pwr_c_misc_pingpong 2202 pwr_c_misc_pingpong
2203 31 2203 31
2205 0 2205 0
...@@ -1357,14 +1357,65 @@ pwr_exe: ...@@ -1357,14 +1357,65 @@ pwr_exe:
125 125
2 2
19 19
1904 O37 1904 O2
1900 53.6752 1900 50
1901 -3.30175 1901 0
1902 -0.545933 1902 35
1903 -1.4765 1903 0
1908 0 1908 0
1909 32 1909 66
1910 32 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 1911 0
1915 0 1915 0
1913 5 1913 5
...@@ -1374,8 +1425,8 @@ pwr_exe: ...@@ -1374,8 +1425,8 @@ pwr_exe:
1919 0 1919 0
1920 0 1920 0
1917 0 1917 0
1921 2 1921 6
1922 2 1922 1
1923 0 1923 0
1907 0 1907 0
1906 1906
...@@ -1387,31 +1438,135 @@ pwr_exe: ...@@ -1387,31 +1438,135 @@ pwr_exe:
505 1 505 1
502 502
7 7
700 -3.12671 700 25.2742
701 -1.4765 701 0.173706
99 99
503 503
7 7
700 53.6752 700 28.3141
701 -0.173706 701 35.0886
99 99
99 99
1912 1912
28 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 2801 0
2802 -0.165409 2802 14.8422
2803 0 2803 0
2804 0.714286 2804 1
2805 -0.421858 2805 0.0868531
2806 0 2806 0
99 99
99 99
35
3500
27 27
2703 10000 2703 10000
2704 10000 2704 67
2722 10000 2722 10000
2705 10000 2705 67
2723 10000 2723 10000
2706 10000 2706 10000
2708 0 2708 0
...@@ -1429,8 +1584,8 @@ pwr_exe: ...@@ -1429,8 +1584,8 @@ pwr_exe:
2701 2701
2700 2700
10 10
1000 pwr_menubar2 1000 Grp46_
1002 O25 1002 Grp46_
1005 1005
0 0
0 0
...@@ -1464,14 +1619,14 @@ pwr_exe: ...@@ -1464,14 +1619,14 @@ pwr_exe:
0 0
0 0
0 0
1006 53.5243 1006 1.43427
1007 -3.48664 1007 -0.565733
1008 -1.56335 1008 1.1737
1009 -3.56335 1009 -0.826304
1013 53.5243 1013 1.43427
1014 -3.48664 1014 -0.565733
1015 -1.56335 1015 1.1737
1016 -3.56335 1016 -0.826304
1003 1003
0 0
0 0
...@@ -1486,8 +1641,8 @@ pwr_exe: ...@@ -1486,8 +1641,8 @@ pwr_exe:
1004 1004
1001 1001
7 7
700 -0.838163 700 0
701 -3.8316 701 0
99 99
1010 1010
1011 1011
...@@ -1508,29 +1663,233 @@ pwr_exe: ...@@ -1508,29 +1663,233 @@ pwr_exe:
99 99
2707 2707
28 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 2801 0
2802 -3.48664 2802 0
2803 0 2803 0
2804 2 2804 1
2805 -3.56335 2805 -0.260559
2806 0 2806 0
99 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 99
27 27
2703 10000 2703 10000
...@@ -1554,8 +1913,8 @@ pwr_exe: ...@@ -1554,8 +1913,8 @@ pwr_exe:
2701 2701
2700 2700
10 10
1000 pwr_pulldownmenu2 1000 pwr_menubar2
1002 O26 1002 O25
1005 1005
0 0
0 0
...@@ -1589,17 +1948,17 @@ pwr_exe: ...@@ -1589,17 +1948,17 @@ pwr_exe:
0 0
0 0
0 0
1006 5.5 1006 53.5243
1007 2.5 1007 -3.48664
1008 -1.56335 1008 -1.56335
1009 -3.56335 1009 -3.56335
1013 5.5 1013 53.5243
1014 2.5 1014 -3.48664
1015 -1.56335 1015 -1.56335
1016 -3.56335 1016 -3.56335
1003 1003
0 0
5 0
0 0
0 0
0 0
...@@ -1609,11 +1968,10 @@ pwr_exe: ...@@ -1609,11 +1968,10 @@ pwr_exe:
0 0
0 0
1004 1004
"File"
1001 1001
7 7
700 3.30041 700 -0.838163
701 -1.6502 701 -3.8316
99 99
1010 1010
1011 1011
...@@ -1634,9 +1992,9 @@ pwr_exe: ...@@ -1634,9 +1992,9 @@ pwr_exe:
99 99
2707 2707
28 28
2800 1 2800 2.07313
2801 0 2801 0
2802 2.5 2802 -3.48664
2803 0 2803 0
2804 2 2804 2
2805 -3.56335 2805 -3.56335
...@@ -1656,85 +2014,8 @@ pwr_exe: ...@@ -1656,85 +2014,8 @@ pwr_exe:
101 1 101 1
102 33619964 102 33619964
103 0 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
99 99
35
3500
27 27
2703 10000 2703 10000
2704 10000 2704 10000
...@@ -1757,8 +2038,8 @@ pwr_exe: ...@@ -1757,8 +2038,8 @@ pwr_exe:
2701 2701
2700 2700
10 10
1000 Grp11_ 1000 pwr_pulldownmenu2
1002 Grp11_ 1002 O26
1005 1005
0 0
0 0
...@@ -1792,17 +2073,17 @@ pwr_exe: ...@@ -1792,17 +2073,17 @@ pwr_exe:
0 0
0 0
0 0
1006 0 1006 1.41791
1007 -0.5 1007 -1.58209
1008 2.5 1008 -1.56335
1009 -2.5 1009 -3.56335
1013 0 1013 1.41791
1014 -0.5 1014 -1.58209
1015 2.5 1015 -1.56335
1016 -2.5 1016 -3.56335
1003 1003
0 0
0 5
0 0
0 0
0 0
...@@ -1812,10 +2093,11 @@ pwr_exe: ...@@ -1812,10 +2093,11 @@ pwr_exe:
0 0
0 0
1004 1004
"File"
1001 1001
7 7
700 0 700 3.30041
701 0 701 -1.6502
99 99
1010 1010
1011 1011
...@@ -1838,127 +2120,62 @@ pwr_exe: ...@@ -1838,127 +2120,62 @@ pwr_exe:
28 28
2800 1 2800 1
2801 0 2801 0
2802 0 2802 -1.58209
2803 0 2803 0
2804 1 2804 2
2805 0 2805 -3.56335
2806 0 2806 0
99 99
2716 0 2716 0
2718 2718
2717 2717
2719 0 2719 0
2724 0 2724 1
2727 0 2727 0
2728 303 2728 303
2729 9999 2729 9999
2721 2721
1 1
100 8193 100 1
101 1 101 1
102 33619964 102 33619964
103 2 103 0
15 68
1500 6800 7
1501 $object.LeftPos##Float32 6801 New
1505 6833
1506 $object.RacketWidth##Float32 1
1502 0 100 1
1503 0 101 5
1504 1 102 33619964
1509 1 103 0
1507 1 51
1510 0.2 5100 $object.NewMatch##Boolean
1508 8 5101 1
99 5102 1
99 99
99 99
3501 6802 Settings
36 6834
3600 1
3 100 1
300 Grp11_ 101 65
301 102 33619964
2 103 0
19 55
1904 O10 5500 open graph "$pwr_exe/misc_pingpong_settings"/inst=$object
1900 0 99
1901 -0.5 99
1902 2.5 6803 Close
1903 -2.5 6835
1908 0 1
1909 38 100 1
1910 38 101 262145
1911 1 102 33619964
1915 0 103 0
1913 5 67
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
99 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 99
99 99
...@@ -1986,8 +2203,8 @@ pwr_exe: ...@@ -1986,8 +2203,8 @@ pwr_exe:
2701 2701
2700 2700
10 10
1000 Grp12_ 1000 Grp11_
1002 Grp12_ 1002 Grp11_
1005 1005
0 0
0 0
...@@ -2021,12 +2238,12 @@ pwr_exe: ...@@ -2021,12 +2238,12 @@ pwr_exe:
0 0
0 0
0 0
1006 50.5 1006 0
1007 50 1007 -0.5
1008 2.5 1008 2.5
1009 -2.5 1009 -2.5
1013 50.5 1013 0
1014 50 1014 -0.5
1015 2.5 1015 2.5
1016 -2.5 1016 -2.5
1003 1003
...@@ -2089,7 +2306,7 @@ pwr_exe: ...@@ -2089,7 +2306,7 @@ pwr_exe:
103 2 103 2
15 15
1500 1500
1501 $object.RightPos##Float32 1501 $object.LeftPos##Float32
1505 1505
1506 $object.RacketWidth##Float32 1506 $object.RacketWidth##Float32
1502 0 1502 0
...@@ -2106,13 +2323,13 @@ pwr_exe: ...@@ -2106,13 +2323,13 @@ pwr_exe:
36 36
3600 3600
3 3
300 Grp12_ 300 Grp11_
301 301
2 2
19 19
1904 O8 1904 O10
1900 50.5 1900 0
1901 50 1901 -0.5
1902 2.5 1902 2.5
1903 -2.5 1903 -2.5
1908 0 1908 0
...@@ -2140,12 +2357,12 @@ pwr_exe: ...@@ -2140,12 +2357,12 @@ pwr_exe:
505 1 505 1
502 502
7 7
700 50 700 -0.5
701 -2.5 701 -2.5
99 99
503 503
7 7
700 50.5 700 0
701 2.5 701 2.5
99 99
99 99
...@@ -3296,11 +3513,11 @@ pwr_exe: ...@@ -3296,11 +3513,11 @@ pwr_exe:
99 99
99 99
19 19
1904 O39 1904 O48
1900 25.1874 1900 53.0672
1901 24.7628 1901 50.1142
1902 35.0018 1902 35.1755
1903 0.173706 1903 -0.0868529
1908 0 1908 0
1909 31 1909 31
1910 31 1910 31
...@@ -3326,36 +3543,183 @@ pwr_exe: ...@@ -3326,36 +3543,183 @@ pwr_exe:
505 1 505 1
502 502
7 7
700 22.3212 700 -3.03986
701 0.0868531 701 0.0868531
99 99
503 503
7 7
700 23.2766 700 -0.0868531
701 34.9149 701 35.3492
99 99
99 99
1912 1912
28 28
2800 0.444444 2800 1
2801 0 2801 0
2802 14.8422 2802 53.1541
2803 0 2803 0
2804 1 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 2806 0
99 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 99
3501
36
3600
3
300 Grp12_
301
2
19 19
1904 O40 1904 O8
1900 50.0274 1900 50.5
1901 0.0868531 1901 50
1902 17.6312 1902 2.5
1903 17.1969 1903 -2.5
1908 0 1908 0
1909 31 1909 38
1910 31 1910 38
1911 0 1911 1
1915 0 1915 0
1913 5 1913 5
1916 2 1916 2
...@@ -3377,13 +3741,13 @@ pwr_exe: ...@@ -3377,13 +3741,13 @@ pwr_exe:
505 1 505 1
502 502
7 7
700 0.0868531 700 50
701 16.7626 701 -2.5
99 99
503 503
7 7
700 50.0274 700 50.5
701 17.1969 701 2.5
99 99
99 99
1912 1912
...@@ -3393,10 +3757,41 @@ pwr_exe: ...@@ -3393,10 +3757,41 @@ pwr_exe:
2802 0 2802 0
2803 0 2803 0
2804 1 2804 1
2805 0.434265 2805 0
2806 0 2806 0
99 99
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 35
3500 3500
27 27
......
...@@ -121,7 +121,7 @@ Volume Miscellaneous $ClassVolume 0.0.0.9 ...@@ -121,7 +121,7 @@ Volume Miscellaneous $ClassVolume 0.0.0.9
Object RtBody $ObjBodyDef 1 08-APR-2011 08:56:23.47 Object RtBody $ObjBodyDef 1 08-APR-2011 08:56:23.47
Body SysBody 08-APR-2011 08:56:23.47 Body SysBody 08-APR-2011 08:56:23.47
Attr StructName = "Misc_PingPong" Attr StructName = "Misc_PingPong"
Attr NextAix = "_X33" Attr NextAix = "_X36"
EndBody EndBody
!/** !/**
! Mode idle, one player or two players. ! Mode idle, one player or two players.
...@@ -287,6 +287,20 @@ Volume Miscellaneous $ClassVolume 0.0.0.9 ...@@ -287,6 +287,20 @@ Volume Miscellaneous $ClassVolume 0.0.0.9
Attr TypeRef = "pwrs:Type-$Float32" Attr TypeRef = "pwrs:Type-$Float32"
EndBody EndBody
EndObject 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. ! Racket width.
!*/ !*/
...@@ -349,7 +363,6 @@ Volume Miscellaneous $ClassVolume 0.0.0.9 ...@@ -349,7 +363,6 @@ Volume Miscellaneous $ClassVolume 0.0.0.9
Object LeftPos $Attribute 31 25-MAY-2011 10:51:24.12 Object LeftPos $Attribute 31 25-MAY-2011 10:51:24.12
Body SysBody 25-MAY-2011 10:51:26.62 Body SysBody 25-MAY-2011 10:51:26.62
Attr PgmName = "LeftPos" Attr PgmName = "LeftPos"
Attr Flags = 16777216
Attr TypeRef = "pwrs:Type-$Float32" Attr TypeRef = "pwrs:Type-$Float32"
EndBody EndBody
EndObject EndObject
...@@ -359,7 +372,6 @@ Volume Miscellaneous $ClassVolume 0.0.0.9 ...@@ -359,7 +372,6 @@ Volume Miscellaneous $ClassVolume 0.0.0.9
Object RightPos $Attribute 32 25-MAY-2011 10:51:37.69 Object RightPos $Attribute 32 25-MAY-2011 10:51:37.69
Body SysBody 25-MAY-2011 10:51:39.58 Body SysBody 25-MAY-2011 10:51:39.58
Attr PgmName = "RightPos" Attr PgmName = "RightPos"
Attr Flags = 16777216
Attr TypeRef = "pwrs:Type-$Float32" Attr TypeRef = "pwrs:Type-$Float32"
EndBody EndBody
EndObject EndObject
...@@ -401,6 +413,13 @@ Volume Miscellaneous $ClassVolume 0.0.0.9 ...@@ -401,6 +413,13 @@ Volume Miscellaneous $ClassVolume 0.0.0.9
Attr TypeRef = "pwrs:Type-$Float32" Attr TypeRef = "pwrs:Type-$Float32"
EndBody EndBody
EndObject 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 Object OldMode $Attribute 22 08-APR-2011 15:09:14.47
Body SysBody 08-APR-2011 15:09:16.01 Body SysBody 08-APR-2011 15:09:16.01
Attr PgmName = "OldMode" Attr PgmName = "OldMode"
......
/*
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;}
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
...@@ -43,7 +43,6 @@ ...@@ -43,7 +43,6 @@
#include "rt_io_agent_close.h" #include "rt_io_agent_close.h"
#include "rt_io_agent_read.h" #include "rt_io_agent_read.h"
#include "rt_io_agent_write.h" #include "rt_io_agent_write.h"
#include "rt_io_pn_locals.h"
#include "rt_io_msg.h" #include "rt_io_msg.h"
#include "rt_pb_msg.h" #include "rt_pb_msg.h"
...@@ -65,6 +64,7 @@ ...@@ -65,6 +64,7 @@
#include "PNM_PNIOAPCTL_Public.h" #include "PNM_PNIOAPCTL_Public.h"
#include "PNM_PNIOAPCFG_Public.h" #include "PNM_PNIOAPCFG_Public.h"
#include "rt_io_pn_locals.h"
#include "rt_io_m_hilscher_cifx.h" #include "rt_io_m_hilscher_cifx.h"
#include "rt_pn_gsdml_data.h" #include "rt_pn_gsdml_data.h"
...@@ -249,6 +249,7 @@ static pwr_tStatus IoAgentInit( io_tCtx ctx, ...@@ -249,6 +249,7 @@ static pwr_tStatus IoAgentInit( io_tCtx ctx,
channelinfo.bFWMonth, channelinfo.bFWDay); channelinfo.bFWMonth, channelinfo.bFWDay);
} }
#if 0
// Register application // Register application
RCX_REGISTER_APP_REQ_T regapp = {{0}}; RCX_REGISTER_APP_REQ_T regapp = {{0}};
RCX_REGISTER_APP_CNF_T regapp_cnf = {{0}}; RCX_REGISTER_APP_CNF_T regapp_cnf = {{0}};
...@@ -268,6 +269,7 @@ static pwr_tStatus IoAgentInit( io_tCtx ctx, ...@@ -268,6 +269,7 @@ static pwr_tStatus IoAgentInit( io_tCtx ctx,
!cmd_check( op, ap, regapp_cnf.tHead.ulCmd, RCX_REGISTER_APP_CNF) || !cmd_check( op, ap, regapp_cnf.tHead.ulCmd, RCX_REGISTER_APP_CNF) ||
!status_check( op, ap, regapp_cnf.tHead.ulSta, "Register Application")) !status_check( op, ap, regapp_cnf.tHead.ulSta, "Register Application"))
return IO__INITFAIL; return IO__INITFAIL;
#endif
RCX_LOCK_UNLOCK_CONFIG_REQ_T unlock = {{0}}; RCX_LOCK_UNLOCK_CONFIG_REQ_T unlock = {{0}};
RCX_LOCK_UNLOCK_CONFIG_CNF_T unlock_cnf = {{0}}; RCX_LOCK_UNLOCK_CONFIG_CNF_T unlock_cnf = {{0}};
...@@ -283,7 +285,7 @@ static pwr_tStatus IoAgentInit( io_tCtx ctx, ...@@ -283,7 +285,7 @@ static pwr_tStatus IoAgentInit( io_tCtx ctx,
if ( !status_check( op, ap, sts, "xChannelPutPacket")) if ( !status_check( op, ap, sts, "xChannelPutPacket"))
return IO__INITFAIL; 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, 20000);
if ( !status_check( op, ap, sts, "xChannelGetPacket") || if ( !status_check( op, ap, sts, "xChannelGetPacket") ||
!cmd_check( op, ap, unlock_cnf.tHead.ulCmd, RCX_LOCK_UNLOCK_CONFIG_CNF) || !cmd_check( op, ap, unlock_cnf.tHead.ulCmd, RCX_LOCK_UNLOCK_CONFIG_CNF) ||
!status_check( op, ap, unlock_cnf.tHead.ulSta, "Unlock channel")) !status_check( op, ap, unlock_cnf.tHead.ulSta, "Unlock channel"))
...@@ -401,20 +403,18 @@ static pwr_tStatus IoAgentInit( io_tCtx ctx, ...@@ -401,20 +403,18 @@ static pwr_tStatus IoAgentInit( io_tCtx ctx,
io_sRack *rp; io_sRack *rp;
io_sCard *cp; io_sCard *cp;
int dev_cnt = 0;
for ( rp = ap->racklist; rp; rp = rp->next) { for ( rp = ap->racklist; rp; rp = rp->next) {
io_sPnRackLocal *rp_local; io_sPnRackLocal *rp_local;
dev_cnt++;
rp_local = (io_sPnRackLocal *) calloc( 1, sizeof(io_sPnRackLocal)); rp_local = (io_sPnRackLocal *) calloc( 1, sizeof(io_sPnRackLocal));
rp->Local = rp_local; rp->Local = rp_local;
for ( cp = rp->cardlist; cp; cp = cp->next) for ( cp = rp->cardlist; cp; cp = cp->next)
cp->Local = calloc( 1, sizeof(io_sPnCardLocal)); cp->Local = calloc( 1, sizeof(io_sPnCardLocal));
// Read device xml-file
t_addr ipaddress;
t_addr subnetmask;
unsigned char macaddr[6];
GsdmlDeviceData *dev_data; GsdmlDeviceData *dev_data;
dev_data = new GsdmlDeviceData; dev_data = new GsdmlDeviceData;
pwr_tFileName fname; pwr_tFileName fname;
...@@ -428,57 +428,71 @@ static pwr_tStatus IoAgentInit( io_tCtx ctx, ...@@ -428,57 +428,71 @@ static pwr_tStatus IoAgentInit( io_tCtx ctx,
return IO__INITFAIL; return IO__INITFAIL;
} }
rp_local->userdata = dev_data;
}
// PNM_IOD // 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", sscanf( dev_data->ip_address, "%hhu.%hhu.%hhu.%hhu",
&ipaddress.b[3], &ipaddress.b[2], &ipaddress.b[1], &ipaddress.b[0]); &ipaddress.b[3], &ipaddress.b[2], &ipaddress.b[1], &ipaddress.b[0]);
sscanf( dev_data->subnet_mask, "%hhu.%hhu.%hhu.%hhu", sscanf( dev_data->subnet_mask, "%hhu.%hhu.%hhu.%hhu",
&subnetmask.b[3], &subnetmask.b[2], &subnetmask.b[1], &subnetmask.b[0]); &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}}; device++;
PNM_APCFG_CFG_IOD_CNF_T iod_config_cnf = {{0}}; }
memset( &iod_config, 0, sizeof(iod_config)); sts = xChannelPutPacket( local->chan, (CIFX_PACKET*)iod_config, 10);
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);
if ( !status_check( op, ap, sts, "xChannelPutPacket")) if ( !status_check( op, ap, sts, "xChannelPutPacket"))
return IO__INITFAIL; return IO__INITFAIL;
...@@ -488,6 +502,15 @@ static pwr_tStatus IoAgentInit( io_tCtx ctx, ...@@ -488,6 +502,15 @@ static pwr_tStatus IoAgentInit( io_tCtx ctx,
!status_check( op, ap, pnm_config_cnf.tHead.ulSta, "Device Config")) !status_check( op, ap, pnm_config_cnf.tHead.ulSta, "Device Config"))
return IO__INITFAIL; 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 // PNM_IOCR
// Calculate data length // Calculate data length
...@@ -567,7 +590,6 @@ static pwr_tStatus IoAgentInit( io_tCtx ctx, ...@@ -567,7 +590,6 @@ static pwr_tStatus IoAgentInit( io_tCtx ctx,
free( iocr_config); free( iocr_config);
// PNM_IOD_AP // PNM_IOD_AP
PNM_APCFG_CFG_AP_REQ_T ap_config = {{0}}; PNM_APCFG_CFG_AP_REQ_T ap_config = {{0}};
...@@ -889,6 +911,9 @@ static pwr_tStatus IoAgentInit( io_tCtx ctx, ...@@ -889,6 +911,9 @@ static pwr_tStatus IoAgentInit( io_tCtx ctx,
} }
delete dev_data;
rp_local->userdata = 0;
device++; device++;
} }
...@@ -936,6 +961,26 @@ static pwr_tStatus IoAgentInit( io_tCtx ctx, ...@@ -936,6 +961,26 @@ static pwr_tStatus IoAgentInit( io_tCtx ctx,
return IO__INITFAIL; 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 // Create input/output area
local->input_area_size = input_dpm_offset; local->input_area_size = input_dpm_offset;
local->output_area_size = output_dpm_offset; local->output_area_size = output_dpm_offset;
...@@ -1036,15 +1081,49 @@ static pwr_tStatus IoAgentRead( io_tCtx ctx, io_sAgent *ap) ...@@ -1036,15 +1081,49 @@ static pwr_tStatus IoAgentRead( io_tCtx ctx, io_sAgent *ap)
else else
local->diag_cnt++; 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 ( 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"); 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 // Response, return the package
APIOC_ALARM_RSP_T alarm_rsp = {{0}}; APIOC_ALARM_RSP_T alarm_rsp = {{0}};
...@@ -1054,8 +1133,8 @@ static pwr_tStatus IoAgentRead( io_tCtx ctx, io_sAgent *ap) ...@@ -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.ulCmd = HOST_TO_LE32(PNIO_APCTL_CMD_APPL_ALARM_RSP);
alarm_rsp.tHead.ulSrc = HOST_TO_LE32(PN_SRC); alarm_rsp.tHead.ulSrc = HOST_TO_LE32(PN_SRC);
alarm_rsp.tHead.ulSrcId = HOST_TO_LE32(PN_SRCID); alarm_rsp.tHead.ulSrcId = HOST_TO_LE32(PN_SRCID);
alarm_rsp.tData.ulHandle = msg->tData.ulHandle; alarm_rsp.tData.ulHandle = ((APIOC_ALARM_IND_T *)msg)->tData.ulHandle;
alarm_rsp.tData.usAlarmSpecifier = msg->tData.usAlarmSpecifier; alarm_rsp.tData.usAlarmSpecifier = ((APIOC_ALARM_IND_T *)msg)->tData.usAlarmSpecifier;
sts = xChannelPutPacket( local->chan, (CIFX_PACKET*)&alarm_rsp, 10); sts = xChannelPutPacket( local->chan, (CIFX_PACKET*)&alarm_rsp, 10);
printf( "Alarm ind\n"); printf( "Alarm ind\n");
...@@ -1069,8 +1148,8 @@ static pwr_tStatus IoAgentRead( io_tCtx ctx, io_sAgent *ap) ...@@ -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.ulCmd = HOST_TO_LE32(PNIO_APCTL_CMD_APPL_ALARM_ACK_CNF);
alarm_ack.tHead.ulSrc = HOST_TO_LE32(PN_SRC); alarm_ack.tHead.ulSrc = HOST_TO_LE32(PN_SRC);
alarm_ack.tHead.ulSrcId = HOST_TO_LE32(PN_SRCID); alarm_ack.tHead.ulSrcId = HOST_TO_LE32(PN_SRCID);
alarm_ack.tData.ulHandle = msg->tData.ulHandle; alarm_ack.tData.ulHandle = ((APIOC_ALARM_IND_T *)msg)->tData.ulHandle;
alarm_ack.tData.usAlarmSpecifier = msg->tData.usAlarmSpecifier; alarm_ack.tData.usAlarmSpecifier = ((APIOC_ALARM_IND_T *)msg)->tData.usAlarmSpecifier;
alarm_ack.tData.usReserved = 0; alarm_ack.tData.usReserved = 0;
sts = xChannelPutPacket( local->chan, (CIFX_PACKET*)&alarm_ack, 10); sts = xChannelPutPacket( local->chan, (CIFX_PACKET*)&alarm_ack, 10);
...@@ -1082,8 +1161,9 @@ static pwr_tStatus IoAgentRead( io_tCtx ctx, io_sAgent *ap) ...@@ -1082,8 +1161,9 @@ static pwr_tStatus IoAgentRead( io_tCtx ctx, io_sAgent *ap)
printf( "Status 0x%08x\n", alarm_ack_cnf.tHead.ulSta); 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 // Response, return the package
APIOC_DIAG_DATA_RSP_T diag_data_rsp = {{0}}; APIOC_DIAG_DATA_RSP_T diag_data_rsp = {{0}};
...@@ -1098,44 +1178,15 @@ static pwr_tStatus IoAgentRead( io_tCtx ctx, io_sAgent *ap) ...@@ -1098,44 +1178,15 @@ static pwr_tStatus IoAgentRead( io_tCtx ctx, io_sAgent *ap)
sts = xChannelPutPacket( local->chan, (CIFX_PACKET*)&diag_data_rsp, 10); sts = xChannelPutPacket( local->chan, (CIFX_PACKET*)&diag_data_rsp, 10);
printf( "Diag data\n"); printf( "Diag data\n");
break;
} }
else default:
printf( "Unexpected cmd received: %u\n", msg->tHead.ulCmd); printf( "Unexpected cmd received: %u\n", ((TLR_PACKET_HEADER_T *)msg)->ulCmd);
} }
else {
// printf( "Diag msg status 0x%08x\n", sts);
} }
free(msg); 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; return IO__SUCCESS;
} }
......
...@@ -2775,6 +2775,14 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -2775,6 +2775,14 @@ Volume OtherIO $ClassVolume 0.0.250.10
EndBody EndBody
EndObject EndObject
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 Object Hilscher_cifX_Diag $ClassDef 20 04-MAR-2011 14:16:20.12
Body SysBody 04-MAR-2011 14:15:45.77 Body SysBody 04-MAR-2011 14:15:45.77
Attr Editor = 0 Attr Editor = 0
...@@ -2786,6 +2794,9 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -2786,6 +2794,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr StructName = "Hilscher_cifX_Diag" Attr StructName = "Hilscher_cifX_Diag"
Attr NextAix = "_X17" Attr NextAix = "_X17"
EndBody EndBody
!/**
! Board device number.
!*/
Object DeviceNumber $Attribute 3 04-MAR-2011 14:29:58.06 Object DeviceNumber $Attribute 3 04-MAR-2011 14:29:58.06
Body SysBody 11-MAR-2011 10:01:35.56 Body SysBody 11-MAR-2011 10:01:35.56
Attr PgmName = "DeviceNumber" Attr PgmName = "DeviceNumber"
...@@ -2793,6 +2804,9 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -2793,6 +2804,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32" Attr TypeRef = "pwrs:Type-$UInt32"
EndBody EndBody
EndObject EndObject
!/**
! Board serial number.
!*/
Object SerialNumber $Attribute 4 04-MAR-2011 14:30:15.60 Object SerialNumber $Attribute 4 04-MAR-2011 14:30:15.60
Body SysBody 11-MAR-2011 10:01:42.88 Body SysBody 11-MAR-2011 10:01:42.88
Attr PgmName = "SerialNumber" Attr PgmName = "SerialNumber"
...@@ -2800,6 +2814,9 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -2800,6 +2814,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32" Attr TypeRef = "pwrs:Type-$UInt32"
EndBody EndBody
EndObject EndObject
!/**
! Loaded firmware.
!*/
Object FirmwareName $Attribute 15 11-MAR-2011 11:13:13.95 Object FirmwareName $Attribute 15 11-MAR-2011 11:13:13.95
Body SysBody 11-MAR-2011 11:13:29.65 Body SysBody 11-MAR-2011 11:13:29.65
Attr PgmName = "FirmwareName" Attr PgmName = "FirmwareName"
...@@ -2807,6 +2824,9 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -2807,6 +2824,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$String40" Attr TypeRef = "pwrs:Type-$String40"
EndBody EndBody
EndObject EndObject
!/**
! Firmware version and date.
!*/
Object FirmwareVersion $Attribute 16 11-MAR-2011 11:13:42.31 Object FirmwareVersion $Attribute 16 11-MAR-2011 11:13:42.31
Body SysBody 11-MAR-2011 11:13:32.93 Body SysBody 11-MAR-2011 11:13:32.93
Attr PgmName = "FirmwareVersion" Attr PgmName = "FirmwareVersion"
...@@ -2814,6 +2834,9 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -2814,6 +2834,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$String40" Attr TypeRef = "pwrs:Type-$String40"
EndBody EndBody
EndObject EndObject
!/**
! System error.
!*/
Object SystemError $Attribute 5 04-MAR-2011 14:30:29.02 Object SystemError $Attribute 5 04-MAR-2011 14:30:29.02
Body SysBody 11-MAR-2011 10:01:48.67 Body SysBody 11-MAR-2011 10:01:48.67
Attr PgmName = "SystemError" Attr PgmName = "SystemError"
...@@ -2821,6 +2844,12 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -2821,6 +2844,12 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32" Attr TypeRef = "pwrs:Type-$UInt32"
EndBody EndBody
EndObject 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 Object SystemStatus $Attribute 6 04-MAR-2011 14:31:01.22
Body SysBody 11-MAR-2011 10:01:55.81 Body SysBody 11-MAR-2011 10:01:55.81
Attr PgmName = "SystemStatus" Attr PgmName = "SystemStatus"
...@@ -2828,6 +2857,9 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -2828,6 +2857,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32" Attr TypeRef = "pwrs:Type-$UInt32"
EndBody EndBody
EndObject EndObject
!/**
! Time since firmware start.
!*/
Object TimeSinceStart $Attribute 7 11-MAR-2011 09:53:27.01 Object TimeSinceStart $Attribute 7 11-MAR-2011 09:53:27.01
Body SysBody 11-MAR-2011 10:02:03.22 Body SysBody 11-MAR-2011 10:02:03.22
Attr PgmName = "TimeSinceStart" Attr PgmName = "TimeSinceStart"
...@@ -2835,6 +2867,9 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -2835,6 +2867,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$DeltaTime" Attr TypeRef = "pwrs:Type-$DeltaTime"
EndBody EndBody
EndObject EndObject
!/**
! CPU load of cifX board.
!*/
Object CpuLoad $Attribute 8 11-MAR-2011 09:53:50.36 Object CpuLoad $Attribute 8 11-MAR-2011 09:53:50.36
Body SysBody 11-MAR-2011 10:02:09.47 Body SysBody 11-MAR-2011 10:02:09.47
Attr PgmName = "CpuLoad" Attr PgmName = "CpuLoad"
...@@ -2842,6 +2877,9 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -2842,6 +2877,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$Float32" Attr TypeRef = "pwrs:Type-$Float32"
EndBody EndBody
EndObject EndObject
!/**
! Communcation state.
!*/
Object CommState $Attribute 9 11-MAR-2011 09:54:28.93 Object CommState $Attribute 9 11-MAR-2011 09:54:28.93
Body SysBody 11-MAR-2011 10:02:14.79 Body SysBody 11-MAR-2011 10:02:14.79
Attr PgmName = "CommState" Attr PgmName = "CommState"
...@@ -2849,6 +2887,9 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -2849,6 +2887,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "OtherIO:Type-Hilscher_cifX_CommStateEnum" Attr TypeRef = "OtherIO:Type-Hilscher_cifX_CommStateEnum"
EndBody EndBody
EndObject EndObject
!/**
! Communication error.
!*/
Object CommError $Attribute 10 11-MAR-2011 09:54:46.70 Object CommError $Attribute 10 11-MAR-2011 09:54:46.70
Body SysBody 11-MAR-2011 10:02:19.62 Body SysBody 11-MAR-2011 10:02:19.62
Attr PgmName = "CommError" Attr PgmName = "CommError"
...@@ -2856,6 +2897,9 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -2856,6 +2897,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32" Attr TypeRef = "pwrs:Type-$UInt32"
EndBody EndBody
EndObject EndObject
!/**
! Error count.
!*/
Object ErrorCount $Attribute 11 11-MAR-2011 09:55:06.60 Object ErrorCount $Attribute 11 11-MAR-2011 09:55:06.60
Body SysBody 11-MAR-2011 10:02:24.52 Body SysBody 11-MAR-2011 10:02:24.52
Attr PgmName = "ErrorCount" Attr PgmName = "ErrorCount"
...@@ -2863,6 +2907,9 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -2863,6 +2907,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32" Attr TypeRef = "pwrs:Type-$UInt32"
EndBody EndBody
EndObject EndObject
!/**
! Number of configured slaves.
!*/
Object ConfigSlaves $Attribute 12 11-MAR-2011 09:55:20.72 Object ConfigSlaves $Attribute 12 11-MAR-2011 09:55:20.72
Body SysBody 11-MAR-2011 10:02:29.55 Body SysBody 11-MAR-2011 10:02:29.55
Attr PgmName = "ConfigSlaves" Attr PgmName = "ConfigSlaves"
...@@ -2870,6 +2917,9 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -2870,6 +2917,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32" Attr TypeRef = "pwrs:Type-$UInt32"
EndBody EndBody
EndObject EndObject
!/**
! Number of active slaves.
!*/
Object ActiveSlaves $Attribute 13 11-MAR-2011 09:55:28.90 Object ActiveSlaves $Attribute 13 11-MAR-2011 09:55:28.90
Body SysBody 11-MAR-2011 10:02:38.38 Body SysBody 11-MAR-2011 10:02:38.38
Attr PgmName = "ActiveSlaves" Attr PgmName = "ActiveSlaves"
...@@ -2877,6 +2927,9 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -2877,6 +2927,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32" Attr TypeRef = "pwrs:Type-$UInt32"
EndBody EndBody
EndObject EndObject
!/**
! Slave state. Indicates if any slave has reported warning or failure.
!*/
Object SlaveState $Attribute 14 11-MAR-2011 09:55:39.61 Object SlaveState $Attribute 14 11-MAR-2011 09:55:39.61
Body SysBody 11-MAR-2011 10:10:14.15 Body SysBody 11-MAR-2011 10:10:14.15
Attr PgmName = "SlaveState" Attr PgmName = "SlaveState"
...@@ -2884,6 +2937,9 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -2884,6 +2937,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "OtherIO:Type-Hilscher_cifX_SlaveStateEnum" Attr TypeRef = "OtherIO:Type-Hilscher_cifX_SlaveStateEnum"
EndBody EndBody
EndObject EndObject
!/**
! Host state.
!*/
Object HostState $Attribute 1 04-MAR-2011 14:17:52.72 Object HostState $Attribute 1 04-MAR-2011 14:17:52.72
Body SysBody 11-MAR-2011 10:17:10.58 Body SysBody 11-MAR-2011 10:17:10.58
Attr PgmName = "HostState" Attr PgmName = "HostState"
...@@ -2891,6 +2947,9 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -2891,6 +2947,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrb:Type-ReadyNotReadyEnum" Attr TypeRef = "pwrb:Type-ReadyNotReadyEnum"
EndBody EndBody
EndObject EndObject
!/**
! Bus state.
!*/
Object BusState $Attribute 2 04-MAR-2011 14:17:45.36 Object BusState $Attribute 2 04-MAR-2011 14:17:45.36
Body SysBody 11-MAR-2011 10:03:59.20 Body SysBody 11-MAR-2011 10:03:59.20
Attr PgmName = "BusState" Attr PgmName = "BusState"
...@@ -2904,6 +2963,25 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -2904,6 +2963,25 @@ Volume OtherIO $ClassVolume 0.0.250.10
EndBody EndBody
EndObject EndObject
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 Object Hilscher_cifX_PnController $ClassDef 24 23-MAY-2011 11:01:53.65
Body SysBody 23-MAY-2011 11:01:37.07 Body SysBody 23-MAY-2011 11:01:37.07
Attr Editor = 0 Attr Editor = 0
...@@ -2915,78 +2993,132 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -2915,78 +2993,132 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr StructName = "Hilscher_cifX_PnController" Attr StructName = "Hilscher_cifX_PnController"
Attr NextAix = "_X31" Attr NextAix = "_X31"
EndBody EndBody
!/**
! Optional description.
!*/
Object Description $Attribute 14 23-MAY-2011 11:01:37.07 Object Description $Attribute 14 23-MAY-2011 11:01:37.07
Body SysBody 23-MAY-2011 11:01:37.07 Body SysBody 23-MAY-2011 11:01:37.07
Attr PgmName = "Description" Attr PgmName = "Description"
Attr TypeRef = "pwrs:Type-$String80" Attr TypeRef = "pwrs:Type-$String80"
EndBody EndBody
EndObject EndObject
!/**
! Specification of the board.
!*/
Object Specification $Attribute 15 23-MAY-2011 11:01:37.07 Object Specification $Attribute 15 23-MAY-2011 11:01:37.07
Body SysBody 23-MAY-2011 11:01:37.07 Body SysBody 23-MAY-2011 11:01:37.07
Attr PgmName = "Specification" Attr PgmName = "Specification"
Attr TypeRef = "pwrs:Type-$String80" Attr TypeRef = "pwrs:Type-$String80"
EndBody EndBody
EndObject EndObject
!/**
! Datasheet URL.
!*/
Object DataSheet $Attribute 16 23-MAY-2011 11:01:37.07 Object DataSheet $Attribute 16 23-MAY-2011 11:01:37.07
Body SysBody 23-MAY-2011 11:01:37.07 Body SysBody 23-MAY-2011 11:01:37.07
Attr PgmName = "DataSheet" Attr PgmName = "DataSheet"
Attr TypeRef = "pwrs:Type-$URL" Attr TypeRef = "pwrs:Type-$URL"
EndBody EndBody
EndObject EndObject
!/**
! IP address for the controller.
!*/
Object IP_Address $Attribute 27 24-MAY-2011 08:21:37.53 Object IP_Address $Attribute 27 24-MAY-2011 08:21:37.53
Body SysBody 24-MAY-2011 08:21:12.63 Body SysBody 24-MAY-2011 08:21:12.63
Attr PgmName = "IP_Address" Attr PgmName = "IP_Address"
Attr TypeRef = "pwrs:Type-$String32" Attr TypeRef = "pwrs:Type-$String32"
EndBody EndBody
EndObject EndObject
!/**
! Subnet mask for the controller.
!*/
Object SubnetMask $Attribute 28 24-MAY-2011 08:21:57.03 Object SubnetMask $Attribute 28 24-MAY-2011 08:21:57.03
Body SysBody 24-MAY-2011 08:23:57.17 Body SysBody 24-MAY-2011 08:23:57.17
Attr PgmName = "SubnetMask" Attr PgmName = "SubnetMask"
Attr TypeRef = "pwrs:Type-$String40" Attr TypeRef = "pwrs:Type-$String40"
EndBody EndBody
EndObject EndObject
!/**
! Device name for controller.
!*/
Object DeviceName $Attribute 29 24-MAY-2011 08:22:20.62 Object DeviceName $Attribute 29 24-MAY-2011 08:22:20.62
Body SysBody 24-MAY-2011 08:24:00.64 Body SysBody 24-MAY-2011 08:24:00.64
Attr PgmName = "DeviceName" Attr PgmName = "DeviceName"
Attr TypeRef = "pwrs:Type-$String40" Attr TypeRef = "pwrs:Type-$String40"
EndBody EndBody
EndObject EndObject
!/**
! Device type.
!*/
Object DeviceType $Attribute 30 24-MAY-2011 08:22:25.89 Object DeviceType $Attribute 30 24-MAY-2011 08:22:25.89
Body SysBody 24-MAY-2011 08:24:03.36 Body SysBody 24-MAY-2011 08:24:03.36
Attr PgmName = "DeviceType" Attr PgmName = "DeviceType"
Attr TypeRef = "pwrs:Type-$String40" Attr TypeRef = "pwrs:Type-$String40"
EndBody EndBody
EndObject 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 Object Alias $Attribute 17 23-MAY-2011 11:01:37.07
Body SysBody 23-MAY-2011 11:01:37.07 Body SysBody 23-MAY-2011 11:01:37.07
Attr PgmName = "Alias" Attr PgmName = "Alias"
Attr TypeRef = "pwrs:Type-$String40" Attr TypeRef = "pwrs:Type-$String40"
EndBody EndBody
EndObject EndObject
!/**
! Channel. Only channel 0 is implemented.
!*/
Object Channel $Attribute 18 23-MAY-2011 11:01:37.07 Object Channel $Attribute 18 23-MAY-2011 11:01:37.07
Body SysBody 23-MAY-2011 11:01:37.07 Body SysBody 23-MAY-2011 11:01:37.07
Attr PgmName = "Channel" Attr PgmName = "Channel"
Attr TypeRef = "pwrs:Type-$UInt32" Attr TypeRef = "pwrs:Type-$UInt32"
EndBody EndBody
EndObject 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 Object Status $Attribute 19 23-MAY-2011 11:01:37.07
Body SysBody 23-MAY-2011 11:01:37.07 Body SysBody 23-MAY-2011 11:01:37.07
Attr PgmName = "Status" Attr PgmName = "Status"
Attr TypeRef = "pwrs:Type-$UInt32" Attr TypeRef = "pwrs:Type-$UInt32"
EndBody EndBody
EndObject 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 Object Process $Attribute 20 23-MAY-2011 11:01:37.07
Body SysBody 23-MAY-2011 11:01:37.07 Body SysBody 23-MAY-2011 11:01:37.07
Attr PgmName = "Process" Attr PgmName = "Process"
Attr TypeRef = "pwrb:Type-IoProcessMask" Attr TypeRef = "pwrb:Type-IoProcessMask"
EndBody EndBody
EndObject 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 Object ThreadObject $Attribute 21 23-MAY-2011 11:01:37.07
Body SysBody 23-MAY-2011 11:01:37.07 Body SysBody 23-MAY-2011 11:01:37.07
Attr PgmName = "ThreadObject" Attr PgmName = "ThreadObject"
Attr TypeRef = "pwrs:Type-$Objid" Attr TypeRef = "pwrs:Type-$Objid"
EndBody EndBody
EndObject 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 Object ErrorCount $Attribute 22 23-MAY-2011 11:01:37.07
Body SysBody 23-MAY-2011 11:01:37.07 Body SysBody 23-MAY-2011 11:01:37.07
Attr PgmName = "ErrorCount" Attr PgmName = "ErrorCount"
...@@ -2994,24 +3126,36 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -2994,24 +3126,36 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32" Attr TypeRef = "pwrs:Type-$UInt32"
EndBody EndBody
EndObject EndObject
!/**
! Text string for an error status.
!*/
Object ErrorStr $Attribute 23 23-MAY-2011 11:01:37.07 Object ErrorStr $Attribute 23 23-MAY-2011 11:01:37.07
Body SysBody 23-MAY-2011 11:01:37.07 Body SysBody 23-MAY-2011 11:01:37.07
Attr PgmName = "ErrorStr" Attr PgmName = "ErrorStr"
Attr TypeRef = "pwrs:Type-$String80" Attr TypeRef = "pwrs:Type-$String80"
EndBody EndBody
EndObject 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 Object ErrorSoftLimit $Attribute 24 23-MAY-2011 11:01:37.07
Body SysBody 23-MAY-2011 11:01:37.07 Body SysBody 23-MAY-2011 11:01:37.07
Attr PgmName = "ErrorSoftLimit" Attr PgmName = "ErrorSoftLimit"
Attr TypeRef = "pwrs:Type-$UInt32" Attr TypeRef = "pwrs:Type-$UInt32"
EndBody EndBody
EndObject EndObject
!/**
! Value of the error counter, when all IO handling is aborted.
!*/
Object ErrorHardLimit $Attribute 25 23-MAY-2011 11:01:37.07 Object ErrorHardLimit $Attribute 25 23-MAY-2011 11:01:37.07
Body SysBody 23-MAY-2011 11:01:37.07 Body SysBody 23-MAY-2011 11:01:37.07
Attr PgmName = "ErrorHardLimit" Attr PgmName = "ErrorHardLimit"
Attr TypeRef = "pwrs:Type-$UInt32" Attr TypeRef = "pwrs:Type-$UInt32"
EndBody EndBody
EndObject EndObject
!/**
! Diagnosis data.
!*/
Object Diag $Attribute 26 23-MAY-2011 11:01:37.07 Object Diag $Attribute 26 23-MAY-2011 11:01:37.07
Body SysBody 23-MAY-2011 11:01:37.07 Body SysBody 23-MAY-2011 11:01:37.07
Attr PgmName = "Diag" Attr PgmName = "Diag"
...@@ -3074,6 +3218,34 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -3074,6 +3218,34 @@ Volume OtherIO $ClassVolume 0.0.250.10
EndBody EndBody
EndObject EndObject
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 Object Hilscher_cifX_Master $ClassDef 17 23-FEB-2011 15:22:46.32
Body SysBody 23-FEB-2011 14:03:13.10 Body SysBody 23-FEB-2011 14:03:13.10
Attr Editor = 0 Attr Editor = 0
...@@ -3085,48 +3257,85 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -3085,48 +3257,85 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr StructName = "Hilscher_cifX_Master" Attr StructName = "Hilscher_cifX_Master"
Attr NextAix = "_X14" Attr NextAix = "_X14"
EndBody EndBody
!/**
! Optional description.
!*/
Object Description $Attribute 1 23-FEB-2011 13:53:04.77 Object Description $Attribute 1 23-FEB-2011 13:53:04.77
Body SysBody 23-FEB-2011 13:53:04.77 Body SysBody 23-FEB-2011 13:53:04.77
Attr PgmName = "Description" Attr PgmName = "Description"
Attr TypeRef = "pwrs:Type-$String80" Attr TypeRef = "pwrs:Type-$String80"
EndBody EndBody
EndObject EndObject
!/**
! Specification of the board.
!*/
Object Specification $Attribute 12 09-MAR-2011 17:28:57.42 Object Specification $Attribute 12 09-MAR-2011 17:28:57.42
Body SysBody 09-MAR-2011 17:28:57.42 Body SysBody 09-MAR-2011 17:28:57.42
Attr PgmName = "Specification" Attr PgmName = "Specification"
Attr TypeRef = "pwrs:Type-$String80" Attr TypeRef = "pwrs:Type-$String80"
EndBody EndBody
EndObject EndObject
!/**
! Datasheet URL.
!*/
Object DataSheet $Attribute 13 09-MAR-2011 17:28:57.42 Object DataSheet $Attribute 13 09-MAR-2011 17:28:57.42
Body SysBody 09-MAR-2011 17:28:57.42 Body SysBody 09-MAR-2011 17:28:57.42
Attr PgmName = "DataSheet" Attr PgmName = "DataSheet"
Attr TypeRef = "pwrs:Type-$URL" Attr TypeRef = "pwrs:Type-$URL"
EndBody EndBody
EndObject 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 Object Alias $Attribute 4 23-FEB-2011 13:53:17.54
Body SysBody 23-FEB-2011 13:53:27.97 Body SysBody 23-FEB-2011 13:53:27.97
Attr PgmName = "Alias" Attr PgmName = "Alias"
Attr TypeRef = "pwrs:Type-$String40" Attr TypeRef = "pwrs:Type-$String40"
EndBody EndBody
EndObject EndObject
!/**
! Channel. Only channel 0 is implemented.
!*/
Object Channel $Attribute 5 23-FEB-2011 13:53:43.84 Object Channel $Attribute 5 23-FEB-2011 13:53:43.84
Body SysBody 23-FEB-2011 13:53:53.75 Body SysBody 23-FEB-2011 13:53:53.75
Attr PgmName = "Channel" Attr PgmName = "Channel"
Attr TypeRef = "pwrs:Type-$UInt32" Attr TypeRef = "pwrs:Type-$UInt32"
EndBody EndBody
EndObject 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 Object Status $Attribute 11 07-MAR-2011 09:01:35.86
Body SysBody 07-MAR-2011 09:01:37.24 Body SysBody 07-MAR-2011 09:01:37.24
Attr PgmName = "Status" Attr PgmName = "Status"
Attr TypeRef = "pwrs:Type-$UInt32" Attr TypeRef = "pwrs:Type-$UInt32"
EndBody EndBody
EndObject 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 Object Process $Attribute 2 23-FEB-2011 13:53:04.77
Body SysBody 23-FEB-2011 13:53:04.77 Body SysBody 23-FEB-2011 13:53:04.77
Attr PgmName = "Process" Attr PgmName = "Process"
Attr TypeRef = "pwrb:Type-IoProcessMask" Attr TypeRef = "pwrb:Type-IoProcessMask"
EndBody EndBody
EndObject 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 Object ThreadObject $Attribute 3 23-FEB-2011 13:53:04.77
Body SysBody 23-FEB-2011 13:53:04.77 Body SysBody 23-FEB-2011 13:53:04.77
Attr PgmName = "ThreadObject" Attr PgmName = "ThreadObject"
...@@ -3145,6 +3354,9 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -3145,6 +3354,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32" Attr TypeRef = "pwrs:Type-$UInt32"
EndBody EndBody
EndObject EndObject
!/**
! Text string for an error status.
!*/
Object ErrorStr $Attribute 6 07-MAR-2011 09:01:18.62 Object ErrorStr $Attribute 6 07-MAR-2011 09:01:18.62
Body SysBody 07-MAR-2011 09:01:19.70 Body SysBody 07-MAR-2011 09:01:19.70
Attr PgmName = "ErrorStr" Attr PgmName = "ErrorStr"
...@@ -3169,6 +3381,9 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -3169,6 +3381,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32" Attr TypeRef = "pwrs:Type-$UInt32"
EndBody EndBody
EndObject EndObject
!/**
! Diagnosis data.
!*/
Object Diag $Attribute 7 04-MAR-2011 14:19:32.00 Object Diag $Attribute 7 04-MAR-2011 14:19:32.00
Body SysBody 04-MAR-2011 14:19:50.47 Body SysBody 04-MAR-2011 14:19:50.47
Attr PgmName = "Diag" Attr PgmName = "Diag"
...@@ -3227,6 +3442,21 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -3227,6 +3442,21 @@ Volume OtherIO $ClassVolume 0.0.250.10
EndBody EndBody
EndObject EndObject
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 Object Hilscher_cifX_Device $ClassDef 18 23-FEB-2011 15:23:00.07
Body SysBody 23-FEB-2011 14:03:06.90 Body SysBody 23-FEB-2011 14:03:06.90
Attr Editor = 0 Attr Editor = 0
...@@ -3238,36 +3468,65 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -3238,36 +3468,65 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr StructName = "Hilscher_cifX_Device" Attr StructName = "Hilscher_cifX_Device"
Attr NextAix = "_X17" Attr NextAix = "_X17"
EndBody EndBody
!/**
! Optional description.
!*/
Object Description $Attribute 6 23-FEB-2011 14:01:08.18 Object Description $Attribute 6 23-FEB-2011 14:01:08.18
Body SysBody 23-FEB-2011 14:01:08.18 Body SysBody 23-FEB-2011 14:01:08.18
Attr PgmName = "Description" Attr PgmName = "Description"
Attr TypeRef = "pwrs:Type-$String80" Attr TypeRef = "pwrs:Type-$String80"
EndBody EndBody
EndObject EndObject
!/**
! Byte ordering of the device.
!*/
Object ByteOrdering $Attribute 15 09-MAR-2011 17:31:00.41 Object ByteOrdering $Attribute 15 09-MAR-2011 17:31:00.41
Body SysBody 09-MAR-2011 17:31:17.44 Body SysBody 09-MAR-2011 17:31:17.44
Attr PgmName = "ByteOrdering" Attr PgmName = "ByteOrdering"
Attr TypeRef = "pwrb:Type-ByteOrderingEnum" Attr TypeRef = "pwrb:Type-ByteOrderingEnum"
EndBody EndBody
EndObject EndObject
!/**
! Float representation of the device.
!*/
Object FloatRepresentation $Attribute 16 09-MAR-2011 17:32:02.70 Object FloatRepresentation $Attribute 16 09-MAR-2011 17:32:02.70
Body SysBody 09-MAR-2011 17:33:34.38 Body SysBody 09-MAR-2011 17:33:34.38
Attr PgmName = "FloatRepresentation" Attr PgmName = "FloatRepresentation"
Attr TypeRef = "pwrb:Type-FloatRepEnum" Attr TypeRef = "pwrb:Type-FloatRepEnum"
EndBody EndBody
EndObject 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 Object Process $Attribute 9 23-FEB-2011 14:01:08.18
Body SysBody 23-FEB-2011 14:01:08.18 Body SysBody 23-FEB-2011 14:01:08.18
Attr PgmName = "Process" Attr PgmName = "Process"
Attr TypeRef = "pwrb:Type-IoProcessMask" Attr TypeRef = "pwrb:Type-IoProcessMask"
EndBody EndBody
EndObject 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 Object ThreadObject $Attribute 10 23-FEB-2011 14:01:08.18
Body SysBody 23-FEB-2011 14:01:08.18 Body SysBody 23-FEB-2011 14:01:08.18
Attr PgmName = "ThreadObject" Attr PgmName = "ThreadObject"
Attr TypeRef = "pwrs:Type-$Objid" Attr TypeRef = "pwrs:Type-$Objid"
EndBody EndBody
EndObject 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 Object InputAreaOffset $Attribute 11 04-MAR-2011 10:18:56.35
Body SysBody 04-MAR-2011 10:19:17.94 Body SysBody 04-MAR-2011 10:19:17.94
Attr PgmName = "InputAreaOffset" Attr PgmName = "InputAreaOffset"
...@@ -3275,6 +3534,9 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -3275,6 +3534,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32" Attr TypeRef = "pwrs:Type-$UInt32"
EndBody EndBody
EndObject EndObject
!/**
! Size for the device in the input area.
!*/
Object InputAreaSize $Attribute 12 04-MAR-2011 10:19:46.95 Object InputAreaSize $Attribute 12 04-MAR-2011 10:19:46.95
Body SysBody 04-MAR-2011 10:19:37.75 Body SysBody 04-MAR-2011 10:19:37.75
Attr PgmName = "InputAreaSize" Attr PgmName = "InputAreaSize"
...@@ -3282,6 +3544,9 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -3282,6 +3544,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32" Attr TypeRef = "pwrs:Type-$UInt32"
EndBody EndBody
EndObject EndObject
!/**
! Offset in the output area.
!*/
Object OutputAreaOffset $Attribute 13 04-MAR-2011 10:20:07.15 Object OutputAreaOffset $Attribute 13 04-MAR-2011 10:20:07.15
Body SysBody 04-MAR-2011 10:19:58.64 Body SysBody 04-MAR-2011 10:19:58.64
Attr PgmName = "OutputAreaOffset" Attr PgmName = "OutputAreaOffset"
...@@ -3289,6 +3554,9 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -3289,6 +3554,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32" Attr TypeRef = "pwrs:Type-$UInt32"
EndBody EndBody
EndObject EndObject
!/**
! Size for the device in the output area.
!*/
Object OutputAreaSize $Attribute 14 04-MAR-2011 10:20:18.60 Object OutputAreaSize $Attribute 14 04-MAR-2011 10:20:18.60
Body SysBody 04-MAR-2011 10:19:58.64 Body SysBody 04-MAR-2011 10:19:58.64
Attr PgmName = "OutputAreaSize" Attr PgmName = "OutputAreaSize"
...@@ -3323,6 +3591,20 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -3323,6 +3591,20 @@ Volume OtherIO $ClassVolume 0.0.250.10
EndBody EndBody
EndObject EndObject
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 Object Hilscher_cifX_Module $ClassDef 19 23-FEB-2011 15:23:13.31
Body SysBody 23-FEB-2011 14:02:55.28 Body SysBody 23-FEB-2011 14:02:55.28
Attr Editor = 0 Attr Editor = 0
...@@ -3334,24 +3616,47 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -3334,24 +3616,47 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr StructName = "Hilscher_cifX_Module" Attr StructName = "Hilscher_cifX_Module"
Attr NextAix = "_X15" Attr NextAix = "_X15"
EndBody EndBody
!/**
! Optional description.
!*/
Object Description $Attribute 6 23-FEB-2011 14:02:24.06 Object Description $Attribute 6 23-FEB-2011 14:02:24.06
Body SysBody 23-FEB-2011 14:02:24.06 Body SysBody 23-FEB-2011 14:02:24.06
Attr PgmName = "Description" Attr PgmName = "Description"
Attr TypeRef = "pwrs:Type-$String80" Attr TypeRef = "pwrs:Type-$String80"
EndBody EndBody
EndObject 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 Object Process $Attribute 9 23-FEB-2011 14:02:24.06
Body SysBody 23-FEB-2011 14:02:24.06 Body SysBody 23-FEB-2011 14:02:24.06
Attr PgmName = "Process" Attr PgmName = "Process"
Attr TypeRef = "pwrb:Type-IoProcessMask" Attr TypeRef = "pwrb:Type-IoProcessMask"
EndBody EndBody
EndObject 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 Object ThreadObject $Attribute 10 23-FEB-2011 14:02:24.06
Body SysBody 23-FEB-2011 14:02:24.06 Body SysBody 23-FEB-2011 14:02:24.06
Attr PgmName = "ThreadObject" Attr PgmName = "ThreadObject"
Attr TypeRef = "pwrs:Type-$Objid" Attr TypeRef = "pwrs:Type-$Objid"
EndBody EndBody
EndObject 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 Object InputAreaOffset $Attribute 11 04-MAR-2011 10:20:33.79
Body SysBody 04-MAR-2011 10:20:33.79 Body SysBody 04-MAR-2011 10:20:33.79
Attr PgmName = "InputAreaOffset" Attr PgmName = "InputAreaOffset"
...@@ -3359,6 +3664,9 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -3359,6 +3664,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32" Attr TypeRef = "pwrs:Type-$UInt32"
EndBody EndBody
EndObject EndObject
!/**
! Size for the module in the input area.
!*/
Object InputAreaSize $Attribute 12 04-MAR-2011 10:20:33.79 Object InputAreaSize $Attribute 12 04-MAR-2011 10:20:33.79
Body SysBody 04-MAR-2011 10:20:33.79 Body SysBody 04-MAR-2011 10:20:33.79
Attr PgmName = "InputAreaSize" Attr PgmName = "InputAreaSize"
...@@ -3366,6 +3674,9 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -3366,6 +3674,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32" Attr TypeRef = "pwrs:Type-$UInt32"
EndBody EndBody
EndObject EndObject
!/**
! Offset in the output area.
!*/
Object OutputAreaOffset $Attribute 13 04-MAR-2011 10:20:33.79 Object OutputAreaOffset $Attribute 13 04-MAR-2011 10:20:33.79
Body SysBody 04-MAR-2011 10:20:33.79 Body SysBody 04-MAR-2011 10:20:33.79
Attr PgmName = "OutputAreaOffset" Attr PgmName = "OutputAreaOffset"
...@@ -3373,6 +3684,9 @@ Volume OtherIO $ClassVolume 0.0.250.10 ...@@ -3373,6 +3684,9 @@ Volume OtherIO $ClassVolume 0.0.250.10
Attr TypeRef = "pwrs:Type-$UInt32" Attr TypeRef = "pwrs:Type-$UInt32"
EndBody EndBody
EndObject EndObject
!/**
! Size for the module in the output area.
!*/
Object OutputAreaSize $Attribute 14 04-MAR-2011 10:20:33.79 Object OutputAreaSize $Attribute 14 04-MAR-2011 10:20:33.79
Body SysBody 04-MAR-2011 10:20:33.79 Body SysBody 04-MAR-2011 10:20:33.79
Attr PgmName = "OutputAreaSize" Attr PgmName = "OutputAreaSize"
......
...@@ -27,6 +27,7 @@ typedef struct _io_sPnRackLocal { ...@@ -27,6 +27,7 @@ typedef struct _io_sPnRackLocal {
unsigned short bytes_of_output; unsigned short bytes_of_output;
unsigned char *inputs; unsigned char *inputs;
unsigned char *outputs; unsigned char *outputs;
void *userdata;
} io_sPnRackLocal; } io_sPnRackLocal;
typedef struct _io_sPnCardLocal { typedef struct _io_sPnCardLocal {
......
...@@ -2808,6 +2808,9 @@ Volume Profibus $ClassVolume 0.0.250.7 ...@@ -2808,6 +2808,9 @@ Volume Profibus $ClassVolume 0.0.250.7
! @Group IO ! @Group IO
! @Summary Defines that a Profinet controller stack is installed. ! @Summary Defines that a Profinet controller stack is installed.
! Configures a Profinet controller stack. ! Configures a Profinet controller stack.
!
! @b See also
! @classlink PnDevice profibus_pndevice.html
!*/ !*/
Object PnControllerSoftingPNAK $ClassDef 15 21-APR-2009 13:41:08.17 Object PnControllerSoftingPNAK $ClassDef 15 21-APR-2009 13:41:08.17
Body SysBody 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 ...@@ -2912,6 +2915,10 @@ Volume Profibus $ClassVolume 0.0.250.7
! @Group IO ! @Group IO
! @Summary Configures one Profinet device. ! @Summary Configures one Profinet device.
! 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 Object PnDevice $ClassDef 16 21-APR-2009 13:41:08.17
Body SysBody 21-APR-2009 13:41:08.17 Body SysBody 21-APR-2009 13:41:08.17
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment