-
Notifications
You must be signed in to change notification settings - Fork 0
/
aqserver.cfg
343 lines (310 loc) · 12.5 KB
/
aqserver.cfg
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
###############################################################################
# config file for data acquisition server for S7-400 PLC
###############################################################################
#
# "#" at 1st column of line will be a comment, use it to disable settings. Note
# that always one valid setting must be available
#
# Use ";" for inline comments
#
# If you want to have some text in more than one line, following lines must
# be indented with TAB, see remarks in aqdata settings
#
###############################################################################
# aqdata settings
###############################################################################
[aqdata]
place = somewhere
creator = Franz Hefekranz
machine = mean machine
order = just do it or number 1234
remarks = ; use tab for multiline values
mean machine
investigating malfunction
production babysitting
###############################################################################
# communication settings
# setting up communication parameters to S7-PLC
###############################################################################
[communication]
# demo switch
# if 1 communication will be ignored and values will be randomly created
demo = 1
# ip address
# you can keep addresses from other project, but have to comment them...
# ip = 192.168.1.107 ; Test PC with PLCSIM and nettoplcsim
ip = 192.168.1.47 ; Test w. Linux and resourceless Snap7-server
# rack number, see HW Config
rack = 0 ;
# slot number of CPU, see HW Config
# you can keep slot number from other project, but have to comment them...
# slot = 4 ; #######
# slot = 3 ; ######
# slot = 3 ; #####
slot = 2 ; plcsim
# maximum attempts for connection, 0 is trying forever
maxattempts = 10
###############################################################################
# miscellaneous settings
###############################################################################
[misc]
# miscellaneous values for setting up the acquisition server
# value delimiter in storage file
delimiter = ;
# prefix of data file name, e.g. a customer/project name or whatever
datafileprefix = testplcsim
# data file name for actual data recording, without extension!
# e.g. if you use "filename", actual name will be "filename.csv"
datafile = testplcsim
# autostart: when program is started decide whether acquisition is started(1)
# immediately or wait for start signal (0)
autostart = 1
#path for data files, use "\" for directory separation, with "\" at the end !
# e.g. datapath = D:\mydata\2015\08\03\
datapath = D:\hzmmic02\Documents\Aqserver\archive\
# if 1 use directory structure datapath\yyyyy\MM\dd otherwise use only datapath
usedir = 1
# scantime in milliseconds [ms]
scantime = 0
# maximum number of records
maxrecords = 10000
###############################################################################
#
#
# ATTENTION: value boolsoffset has been replaced by gain/offset/unit in value settings
# Do not enable anymore (though it doesn't hurt...)
# switch for offset of boolean values
# if 1 then boolean values in a byte (see values settings) will be offset by 2 as follows:
#
# value + bit number * 2
#
# bit | true | false
# ----+------+-------
# 0 | 1 + 0
# ----+------+-------
# 1 | 3 + 2
# ----+------+-------
# 2 | 5 + 4
# ----+------+-------
# 3 | 7 + 6
# ----+------+-------
# 4 | 9 + 8
# ----+------+-------
# 5 | 11 + 10
# ----+------+-------
# 6 | 13 + 12
# ----+------+-------
# 7 | 15 + 14
# if booloffset is 0 then only the boolean value (1 for true, 0 for false) will be stored
# booloffset = 0
###############################################################################
###############################################################################
# trigger settings
###############################################################################
#
# when trigger condition is matched, then we close the old file after post-trigger
# time and start the new file and copy pre-trigger and post-trigger time
# recordings to new file
#
# condition is, with example:
# trgsignal trgcondition trgvalue
# rewind diameter [mm] = 0
#
[trigger]
# trigger signal, copy the name of the signal in [values] section,
# that you want to use as trigger signal.
# if you don't want to use a trigger, set 0 (remove comment in next line)
trgsignal = 0
# comment out next line, if you enable trgsignal = 0
# trgsignal = test1
# trigger condition, use >,>=,==, <=,<,!= as condition
# if conditon is matched, then we close the old file and start a new one
# trgcondition = >
# trgcondition = >=
# trgcondition = ==
# trgcondition = <=
# trgcondition = <
trgcondition = !=
# trigger value, with this value we compare the trigger signal
trgvalue = 0
# pre-trigger time in seconds [s]
# will still add pre-trigger/scantime lines to old file after trigger event
# e.g. pre-trigger is 60 seconds and scantime is 100 ms, then 600 lines will be recorded
# after trigger event
pretrg = 30
#post-trigger time in seconds [s]
# will copy last post-trigger/scantime lines from old to new file
# e.g. post-trigger is 60 seconds and scantime is 100 ms, then 600 lines will be copied
# after trigger event
posttrg = 30
###############################################################################
# debug settings
###############################################################################
[debug]
# debug level
# set logging level to debug, write program actions
# to logfile
# 0 - no logging
# 1 - log INFO messages (default setting)
# 2 - log WARNING messages
# 3 - log DEBUG messages
# 4 - log ERROR messages
# 5 - log CRITICAL messages
# 6 - log EXCEPTION messages
dbglevel = 1
# name of logfile, without extension. Extension will be added as ".log"
logfile = aqserver
# add timestamp to logfile name 1 = yes, 0 = no
# if set to 1 a timestamp will be added to the lofile name. pls. note that a
# new logfile will be created, every time you start the server,
# when dbglevel is > 0
logts = 1
###############################################################################
# value settings, here we define the S7 variables we want to read,
# and their formats !
###############################################################################
[values]
# here we define the S7 variables that we want to observe
# use following syntax:
#
######### how to define the names: ############################################
# use config value name with [] - brackets to define the unit of the value
#
# boolean values:
# For boolean values (see format X above) a complete byte is read and then split into 8 bits
# To define names for the single bits use ',' to separate the names, e.g.:
#
# bit0,bit1,bit2,bit3,bit4,bit5,bit6,bit7 = DB1234.DX5
# Klemmventil UM1,Klemmventil UM2,Klemmventil UM3,Klemmventil UM4,Reserve,Reserve,Reserve,Reserve = DB1234.DX5
#
# If you do not want all the bits, leave the name empty e.g.:
#
# bit0,,bit2,,,,, = DB1234.DX5
#
# This reads only bit0 and bit2
#
#
######### how to define the values: ############################################
# (S7 variable and format)
# DBn.AFn.x
#
# where
# - DB is for data blocks or omitted if other area
# - n is DB number or omitted if other area
# - . only when data, omitted otherwise
# - A is area
# - D for data
# - M or F for flags
# - E or I for inputs
# - A or Q for outputs
# - T for timers
# - Z or C for counters
# - F is format
# - X - for BYTE in BOOL format, followed by byte address:
# - n is whole number for byte address
# (attention to address ranges of PLC)
# will always be split in 8 single booleans
# - B - for BYTE in int format, followed by byte address
# - n is whole number for byte address
# (attention to address ranges of PLC)
# - W - for WORD, followed by byte address
# - n is whole number for byte address
# (attention to address ranges of PLC)
# - D - for DOUBLE WORD, followed by byte address
# - n is whole number for byte address
# (attention to address ranges of PLC)
# - F - for DOUBLE WORD in REAL format, followed by byte address
# - n is whole number for byte address
# (attention to address ranges of PLC)
#
#
###############################################################################
###### how to define gain, offset and unit ####################################
# after the S7 variable we must define a gain, an offset and the unit for
# this value. To do so, we add a comma ',' (without colons) after the S7 variable.
# Thereafter we give a value for the gain the value is multiplied with. If you
# want just the original value, set the gain to 1 (which is the default).
# Then put another comma followed by the offset. The offset is added to the product
# of value and gain. After another value we put a string for the unit. Don't use
# brackets or parentheses as this can cause problems later in KST2.
# Here an example for a value definition:
#
# torque Motor 1 = DB4147.DD1248,1,0,Nm
# -------------- ------------- - - --
# | | | | |
# | | | | +-unit
# | | | +-offset
# | | +-gain
# | +-S7 variable
# + name
# For BOOL variables the settings for gain, offset and unit is a little bit tricky.
# We have to set gain and offset for 8 values in a row.
#
# BUT THEY MUST BE SEPARATED WITH AN UNDERSCORE '_'
#
# This means gain for boolean variables is something like:
#
# 1_1_1_1_1_1_1_1 (when using default value 1)
#
# Set the next comma followed by the values for the offset, in the same manner:
#
# 0_0_0_0_0_0_0_0 (when using default value 0)
#
# Offsets will be added to the product of value and gain. If you want to keep the
# original value set all offsets to 0 (0 is the default for offsets).
# Put another comma after the offsets. We omit the units which don't make sense
# for boolean values. Here an example for a boolean value definition:
#
# A,B,C,D,E,F,G,H = AX9,1_1_1_1_1_1_1_1,0_0_0_0_0_0_0_0,
# - - - - - - - - --- - - - - - - - - - - - - - - - -
# | | | | | | | | | | | | | | | | | | | | | | | | |
# | | | | | | | | | | | | | | | | | | | | | | | | +-8th offset
# | | | | | | | | | | | | | | | | | | | | | | | +-7th offset
# | | | | | | | | | | | | | | | | | | | | | | +-6th offset
# | | | | | | | | | | | | | | | | | | | | | +-5th offset
# | | | | | | | | | | | | | | | | | | | | +-4th offset
# | | | | | | | | | | | | | | | | | | | +-3rd offset
# | | | | | | | | | | | | | | | | | | +-2nd offset
# | | | | | | | | | | | | | | | | | +-1st offset
# | | | | | | | | | | | | | | | | |
# | | | | | | | | | | | | | | | | +-8th gain
# | | | | | | | | | | | | | | | +-7th gain
# | | | | | | | | | | | | | | +-6th gain
# | | | | | | | | | | | | | +-5th gain
# | | | | | | | | | | | | +-4th gain
# | | | | | | | | | | | +-3rd gain
# | | | | | | | | | | +-2nd gain
# | | | | | | | | | +-1st gain
# | | | | | | | | |
# | | | | | | | | +-S7 variable
# | | | | | | | |
# | | | | | | | +-8th name
# | | | | | | +-7th name
# | | | | | +-6th name
# | | | | +-5th name
# | | | +-4th name
# | | +-3rd name
# | +-2nd name
# +-1st name
#
# final value will be calculated as follows:
#
# output = value * gain + offset
#
###############################################################################
len = MW4,1,0,m
74_YI_PV = DB4147.DD1248,0,646.6852,Angström/Woche
A9.0,A9.1,A9.2,A9.3,A9.4,A9.5,A9.6,A9.7 = AX9,1_1_1_1_1_1_1_1,14_29_36_45_69_77_82_93,
Q19.0,Q19.1,Q19.2,Q19.3,Q19.4,Q19.5,Q19.6,Q19.7 = QX19,1_1_1_1_1_1_1_1,0_0_0_0_0_0_0_0,
I1.0,I1.1,I1.2,I1.3,I1.4,I1.5,I1.6,I1.7 = IX1,1_1_1_1_1_1_1_1,0_0_0_0_0_0_0_0,
E3.0,E3.1,E3.2,E3.3,E3.4,E3.5,E3.6,E3.7 = EX3,1_1_1_1_1_1_1_1,0_0_0_0_0_0_0_0,
F3.0,F3.1,F3.2,F3.3,F3.4,F3.5,F3.6,F3.7 = FX3,1_1_1_1_1_1_1_1,0_0_0_0_0_0_0_0,
M5.0,M5.1,M5.2,M5.3,M5.4,M5.5,M5.6,M5.7 = MX5,1_1_1_1_1_1_1_1,0_0_0_0_0_0_0_0,
speed = DB63.DF42,1,0,m/min
DENSITY = DB3074.DF60,1,0,kg/m³
AB9 = AB9,4,0,
QB19 = QB19,1,0,s
IB1 = IB1,1,0,m
EB3 = EB3,1,0,kg
FB3 = FB3,1,0,m³
MB3 = MB3,1,0,m/min