forked from tuenhidiy/Arduino_Profibus_DP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsrc.AWL
More file actions
134 lines (118 loc) · 4.5 KB
/
src.AWL
File metadata and controls
134 lines (118 loc) · 4.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
ORGANIZATION_BLOCK OB 1
TITLE = "Main Program Sweep (Cycle)"
//Òåñòîâûé ìèãàþùèé êàæäûé ñêàí áèò.
VERSION : 0.1
VAR_TEMP
OB1_EV_CLASS : BYTE ; //Bits 0-3 = 1 (Coming event), Bits 4-7 = 1 (Event class 1)
OB1_SCAN_1 : BYTE ; //1 (Cold restart scan 1 of OB 1), 3 (Scan 2-n of OB 1)
OB1_PRIORITY : BYTE ; //Priority of OB Execution
OB1_OB_NUMBR : BYTE ; //1 (Organization block 1, OB1)
OB1_RESERVED_1 : BYTE ; //Reserved for system
OB1_RESERVED_2 : BYTE ; //Reserved for system
OB1_PREV_CYCLE : INT ; //Cycle time of previous OB1 scan (milliseconds)
OB1_MIN_CYCLE : INT ; //Minimum cycle time of OB1 (milliseconds)
OB1_MAX_CYCLE : INT ; //Maximum cycle time of OB1 (milliseconds)
OB1_DATE_TIME : DATE_AND_TIME ; //Date and time OB1 started
END_VAR
BEGIN
NETWORK
TITLE =
AN M 0.0;
= M 0.0;
END_ORGANIZATION_BLOCK
ORGANIZATION_BLOCK OB 82
TITLE = "I/O Point Fault"
//Ñ÷åò÷èê ñîáûòèé.
VERSION : 0.1
VAR_TEMP
OB82_EV_CLASS : BYTE ; //16#39, Event class 3, Entering event state, Internal fault event
OB82_FLT_ID : BYTE ; //16#XX, Fault identifcation code
OB82_PRIORITY : BYTE ; //Priority of OB Execution
OB82_OB_NUMBR : BYTE ; //82 (Organization block 82, OB82)
OB82_RESERVED_1 : BYTE ; //Reserved for system
OB82_IO_FLAG : BYTE ; //Input (01010100), Output (01010101)
OB82_MDL_ADDR : WORD ; //Base address of module with fault
OB82_MDL_DEFECT : BOOL ; //Module defective
OB82_INT_FAULT : BOOL ; //Internal fault
OB82_EXT_FAULT : BOOL ; //External fault
OB82_PNT_INFO : BOOL ; //Point information
OB82_EXT_VOLTAGE : BOOL ; //External voltage low
OB82_FLD_CONNCTR : BOOL ; //Field wiring connector missing
OB82_NO_CONFIG : BOOL ; //Module has no configuration data
OB82_CONFIG_ERR : BOOL ; //Module has configuration error
OB82_MDL_TYPE : BYTE ; //Type of module
OB82_SUB_MDL_ERR : BOOL ; //Sub-Module is missing or has error
OB82_COMM_FAULT : BOOL ; //Communication fault
OB82_MDL_STOP : BOOL ; //Module is stopped
OB82_WTCH_DOG_FLT : BOOL ; //Watch dog timer stopped module
OB82_INT_PS_FLT : BOOL ; //Internal power supply fault
OB82_PRIM_BATT_FLT : BOOL ; //Primary battery is in fault
OB82_BCKUP_BATT_FLT : BOOL ; //Backup battery is in fault
OB82_RESERVED_2 : BOOL ; //Reserved for system
OB82_RACK_FLT : BOOL ; //Rack fault, only for bus interface module
OB82_PROC_FLT : BOOL ; //Processor fault
OB82_EPROM_FLT : BOOL ; //EPROM fault
OB82_RAM_FLT : BOOL ; //RAM fault
OB82_ADU_FLT : BOOL ; //ADU fault
OB82_FUSE_FLT : BOOL ; //Fuse fault
OB82_HW_INTR_FLT : BOOL ; //Hardware interupt input in fault
OB82_RESERVED_3 : BOOL ; //Reserved for system
OB82_DATE_TIME : DATE_AND_TIME ; //Date and time OB82 started
END_VAR
BEGIN
NETWORK
TITLE =
L MW 6;
L 1;
+I ;
T MW 6;
NOP 0;
END_ORGANIZATION_BLOCK
ORGANIZATION_BLOCK OB 86
TITLE = "Loss Of Rack Fault"
//Ñ÷åò÷èê ñîáûòèé.
VERSION : 0.1
VAR_TEMP
OB86_EV_CLASS : BYTE ; //16#38/39 Event class 3
OB86_FLT_ID : BYTE ; //16#C1/C4/C5, Fault identifcation code
OB86_PRIORITY : BYTE ; //Priority of OB Execution
OB86_OB_NUMBR : BYTE ; //86 (Organization block 86, OB86)
OB86_RESERVED_1 : BYTE ; //Reserved for system
OB86_RESERVED_2 : BYTE ; //Reserved for system
OB86_MDL_ADDR : WORD ; //Base address of IM module in rack with fault
OB86_RACKS_FLTD : ARRAY [0 .. 31 ] OF BOOL ; //Racks in fault
OB86_DATE_TIME : DATE_AND_TIME ; //Date and time OB86 started
END_VAR
BEGIN
NETWORK
TITLE =
L MW 4;
L 1;
+I ;
T MW 4;
NOP 0;
END_ORGANIZATION_BLOCK
ORGANIZATION_BLOCK OB 100
TITLE = "Complete Restart"
//Ñ÷åò÷èê ñîáûòèé.
VERSION : 0.1
VAR_TEMP
OB100_EV_CLASS : BYTE ; //16#13, Event class 1, Entering event state, Event logged in diagnostic buffer
OB100_STRTUP : BYTE ; //16#81/82/83/84 Method of startup
OB100_PRIORITY : BYTE ; //Priority of OB Execution
OB100_OB_NUMBR : BYTE ; //100 (Organization block 100, OB100)
OB100_RESERVED_1 : BYTE ; //Reserved for system
OB100_RESERVED_2 : BYTE ; //Reserved for system
OB100_STOP : WORD ; //Event that caused CPU to stop (16#4xxx)
OB100_STRT_INFO : DWORD ; //Information on how system started
OB100_DATE_TIME : DATE_AND_TIME ; //Date and time OB100 started
END_VAR
BEGIN
NETWORK
TITLE =
L MW 2;
L 1;
+I ;
T MW 2;
NOP 0;
END_ORGANIZATION_BLOCK