Академический Документы
Профессиональный Документы
Культура Документы
EIO0000000538 07/2014
SoHVAC
SoHVAC Standard Library
User Guide
EIO0000000538.03
07/2014
www.schneider-electric.com
The information provided in this documentation contains general descriptions and/or technical
characteristics of the performance of the products contained herein. This documentation is not
intended as a substitute for and is not to be used for determining suitability or reliability of these
products for specific user applications. It is the duty of any such user or integrator to perform the
appropriate and complete risk analysis, evaluation and testing of the products with respect to the
relevant specific application or use thereof. Neither Schneider Electric nor any of its affiliates or
subsidiaries shall be responsible or liable for misuse of the information contained herein. If you
have any suggestions for improvements or amendments or have found errors in this publication,
please notify us.
No part of this document may be reproduced in any form or by any means, electronic or
mechanical, including photocopying, without express written permission of Schneider Electric.
All pertinent state, regional, and local safety regulations must be observed when installing and
using this product. For reasons of safety and to help ensure compliance with documented system
data, only the manufacturer should perform repairs to components.
When devices are used for applications with technical safety requirements, the relevant
instructions must be followed.
Failure to use Schneider Electric software or approved software with our hardware products may
result in injury, harm, or improper operating results.
Failure to observe this information can result in injury or equipment damage.
2014 Schneider Electric. All rights reserved.
EIO0000000538 07/2014
Table of Contents
Safety Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
About the Book. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 1 Introduction to SoHVAC Standard Library. . . . . . . . . .
Introduction to SoHVAC Standard Library . . . . . . . . . . . . . . . . . . . . . .
13
17
19
19
21
22
22
35
35
45
46
47
48
49
51
53
54
55
57
58
59
60
61
62
63
64
65
66
67
69
70
71
72
73
74
3
2.7
2.8
2.9
2.10
2.11
BACnetIP_SNMPColdStartTrap . . . . . . . . . . . . . . . . . . . . . . . . . . .
BACnetIP_SNMPLinkDownTrap . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BACnetIP_SNMPLinkUpTrap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BACnetIP_SNMPManager1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BACnetIP_SNMPManager2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BACnetIP_Port1_AutoNegotiation . . . . . . . . . . . . . . . . . . . . . .
BACnetIP_Port1_DuplexMode . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BACnetIP_Port1_Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BACnetIP_Port2_AutoNegotiation . . . . . . . . . . . . . . . . . . . . . .
BACnetIP_Port2_DuplexMode . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BACnetIP_Port2_Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Browser Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AddBrowserGraph_240_140_Type. . . . . . . . . . . . . . . . . . . . . . . . .
AddBrowserGraph_128_64_Type . . . . . . . . . . . . . . . . . . . . . . . . . .
AddBrowserGraph_120_32_Type . . . . . . . . . . . . . . . . . . . . . . . . . .
AddBrowserAlpha_4_20_Type . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Expansion Bus Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ExpBUS_IsMaster. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ExpBUS_MyNode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ExpBUS_BaudRate. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ExpBUS_GetStatus. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ExpBUS_GetNetworkStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ExpBUS_NetworkNode_n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ExpBUS_NodeGuardTimeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
History Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
HistoryErase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
HistoryReadEvent. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
HistoryWriteEvent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Identity Libraries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Identity_CJ_ANALOG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Modbus Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Modbus1_Address - Modbus2_Address . . . . . . . . . . . . . . . . . . .
Modbus1_Baud - Modbus2_Baud . . . . . . . . . . . . . . . . . . . . . . . . . .
Modbus1_Parity - Modbus2_Parity . . . . . . . . . . . . . . . . . . . . .
Modbus1_StopBit - Modbus2_StopBit . . . . . . . . . . . . . . . . . . .
ModbusMaster_Interframe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ModbusMaster_Read100MultipleHoldingRegisters . . . . . . .
ModbusMaster_Read100MultipleInputRegisters. . . . . . . . . .
75
76
77
78
79
80
81
83
85
86
88
90
91
94
95
96
97
98
100
101
103
104
105
107
109
110
111
114
116
116
118
119
121
122
124
126
127
129
EIO0000000538 07/2014
ModbusMaster_Read10MultipleHoldingRegisters . . . . . . . .
ModbusMaster_Read10MultipleInputRegisters . . . . . . . . . .
ModbusMaster_ReadSingleHoldingRegister. . . . . . . . . . . . . .
ModbusMaster_ReadSingleInputRegister . . . . . . . . . . . . . . . .
ModbusMaster_ReadSingleCoilStatus . . . . . . . . . . . . . . . . . . .
ModbusMaster_ReadSingleInputStatus . . . . . . . . . . . . . . . . . . . . . . .
ModbusMaster_Timeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ModbusMaster_Write100MultipleHoldingRegisters . . . . . .
ModbusMaster_Write10MultipleHoldingRegisters . . . . . . .
ModbusMaster_WriteSingleHoldingRegister . . . . . . . . . . . .
ModbusMaster_WriteSingleCoilStatus . . . . . . . . . . . . . . . . . . . . . . . .
2.12 ModbusTCP Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ModbusTCP_Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ModbusTCP_Gateway . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ModbusIP_IPConfiguration. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ModbusTCP_SubnetMask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ModbusTCP_Port1_AutoNegociation . . . . . . . . . . . . . . . . . . . . .
ModbusTCP_Port1_DuplexMode. . . . . . . . . . . . . . . . . . . . . . . . . . .
ModbusTCP_Port1_Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ModbusTCP_Port2_AutoNegociation . . . . . . . . . . . . . . . . . . . . .
ModbusTCP_Port2_DuplexMode. . . . . . . . . . . . . . . . . . . . . . . . . . .
ModbusTCP_Port2_Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ModbusTCP_SNMPAuthenticationTrap . . . . . . . . . . . . . . . . . . . .
ModbusTCP_SNMPColdStartTrap . . . . . . . . . . . . . . . . . . . . . . . . .
ModbusTCP_SNMPLinkDownTrap. . . . . . . . . . . . . . . . . . . . . . . . . . .
ModbusTCP_SNMPLinkUpTrap. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ModbusTCP_SNMPManager1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ModbusTCP_SNMPManager2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.13 Password Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
EnablePrgLevel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PasswordIndependent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PasswordTimeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PasswordLevel1 - PasswordLevel5 . . . . . . . . . . . . . . . . . . . . .
EnableLevel1 - EnableLevel5 . . . . . . . . . . . . . . . . . . . . . . . . .
2.14 System Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
InfoMaskNum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
InfoMaskRev . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
InfoMaskVer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
EIO0000000538 07/2014
131
133
135
137
139
141
143
145
147
149
151
153
154
155
156
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
174
176
177
179
180
181
182
183
5
InfoProjNum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
InfoProjRev . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
InfoProjVer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
E2_GetStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RTC_GetStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LCDBacklight . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Mathematical_Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MemoryStackError. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Mathematical_Errors_Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hardware_Errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hardware_Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
184
185
186
187
188
189
190
192
193
195
196
197
199
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
223
225
EIO0000000538 07/2014
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
253
254
255
256
257
259
260
261
262
263
264
265
7
DATETIME_GET_TIME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BYTE2BIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BYTE2SBYTE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BYTE2LED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LED2BYTE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DWORD2LONG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LONG2DWORD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SBYTE2BYTE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SHORT2WORD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
WORD2SHORT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BUTTON_GET_FIELDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
COMMAND_GET_FIELDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16BITS2WORD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
WORD216BITS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.6 Counter Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CTD (Down Counter) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CTU (Up Counter) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CTUD (Up Down Counter). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.7 Edge Detection Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
F_TRIG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
R_TRIG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.8 Logic Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AND (0, 1 AND). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OR (0, 1 OR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
NOT (0, 1 NOT). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
NAND (0, 1 NAND) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
NOR (0, 1 NOR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
XOR (0, 1 XOR). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AND16 (16 bit AND) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OR16 (16 bit OR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
NOT16 (16 bit NOT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
NAND16 (16 bit NAND). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
NOR16 (16 bit NOR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
XOR16 (16 bit XOR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AND32 (32 bit AND) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OR32 (32 bit OR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
266
267
268
269
270
271
272
273
274
275
276
277
278
280
282
283
285
287
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
EIO0000000538 07/2014
EIO0000000538 07/2014
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
336
338
340
341
343
345
347
349
350
351
353
354
355
356
358
359
361
363
365
367
369
371
373
375
377
381
383
387
389
392
394
396
400
403
405
409
411
414
418
421
425
426
429
433
438
EIO0000000538 07/2014
ZeroEnergyControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ExternalAirDamperControl. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CrossFlowHeatExchangerControl . . . . . . . . . . . . . . . . . . . . . . .
TwinCoilsControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
HeatWheelControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OperatingHoursAndAlarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
WeeklyScheduler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AlarmManagement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AutomaticAlarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ByPassAutoAlarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ByPassAutoManuAlarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ManualResetAlarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Differential Pressure control . . . . . . . . . . . . . . . . . . . . . . .
440
445
449
452
454
457
459
463
466
467
468
470
472
475
477
481
484
489
491
495
499
502
505
513
517
520
523
525
530
533
538
540
546
554
557
560
563
566
11
WeeklyScheduler. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AlarmManagement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AlarmManualReset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OperatingHoursAndAlarms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OperatingLimit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AO_Linearization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12
570
574
577
579
581
583
585
591
EIO0000000538 07/2014
Safety Information
Important Information
NOTICE
Read these instructions carefully, and look at the equipment to become familiar with the device
before trying to install, operate, or maintain it. The following special messages may appear
throughout this documentation or on the equipment to warn of potential hazards or to call attention
to information that clarifies or simplifies a procedure.
EIO0000000538 07/2014
13
PLEASE NOTE
Electrical equipment should be installed, operated, serviced, and maintained only by qualified
personnel. No responsibility is assumed by Schneider Electric for any consequences arising out of
the use of this material.
A qualified person is one who has skills and knowledge related to the construction and operation
of electrical equipment and its installation, and has received safety training to recognize and avoid
the hazards involved.
BEFORE YOU BEGIN
Do not use this product on machinery lacking effective point-of-operation guarding. Lack of
effective point-of-operation guarding on a machine can result in serious injury to the operator of
that machine.
WARNING
UNGUARDED EQUIPMENT
Do not use this software and related automation equipment on equipment which does not have
point-of-operation protection.
Do not reach into machinery during operation.
Failure to follow these instructions can result in death, serious injury, or equipment
damage.
This automation equipment and related software is used to control a variety of industrial processes.
The type or model of automation equipment suitable for each application will vary depending on
factors such as the control function required, degree of protection required, production methods,
unusual conditions, government regulations, etc. In some applications, more than one processor
may be required, as when backup redundancy is needed.
Only you, the user, machine builder or system integrator can be aware of all the conditions and
factors present during setup, operation, and maintenance of the machine and, therefore, can
determine the automation equipment and the related safeties and interlocks which can be properly
used. When selecting automation and control equipment and related software for a particular
application, you should refer to the applicable local and national standards and regulations. The
National Safety Councils Accident Prevention Manual (nationally recognized in the United States
of America) also provides much useful information.
In some applications, such as packaging machinery, additional operator protection such as pointof-operation guarding must be provided. This is necessary if the operators hands and other parts
of the body are free to enter the pinch points or other hazardous areas and serious injury can occur.
Software products alone cannot protect an operator from injury. For this reason the software
cannot be substituted for or take the place of point-of-operation protection.
14
EIO0000000538 07/2014
CAUTION
EQUIPMENT OPERATION HAZARD
Verify that all installation and set up procedures have been completed.
Before operational tests are performed, remove all blocks or other temporary holding means
used for shipment from all component devices.
Remove tools, meters, and debris from equipment.
EIO0000000538 07/2014
15
16
EIO0000000538 07/2014
Reference Number
EIO0000000537 (Eng)
EIO0000000533 (Eng)
You can download these technical publications and other technical information from our website
at www.schneider-electric.com.
Product Related Information
WARNING
LOSS OF CONTROL
The designer of any control scheme must consider the potential failure modes of control paths
and, for certain critical control functions, provide a means to achieve a safe state during and
after a path failure. Examples of critical control functions are emergency stop and overtravel
stop, power outage and restart.
Separate or redundant control paths must be provided for critical control functions.
System control paths may include communication links. Consideration must be given to the
implications of unanticipated transmission delays or failures of the link.
Observe all accident prevention regulations and local safety guidelines.1
Each implementation of this equipment must be individually and thoroughly tested for proper
operation before being placed into service.
Failure to follow these instructions can result in death, serious injury, or equipment
damage.
EIO0000000538 07/2014
17
For additional information, refer to NEMA ICS 1.1 (latest edition), "Safety Guidelines for the
Application, Installation, and Maintenance of Solid State Control" and to NEMA ICS 7.1 (latest
edition), "Safety Standards for Construction and Guide for Selection, Installation and Operation of
Adjustable-Speed Drive Systems" or their equivalent governing your particular location.
WARNING
UNINTENDED EQUIPMENT OPERATION
Only use software approved by Schneider Electric for use with this equipment.
Update your application program every time you change the physical hardware configuration.
Failure to follow these instructions can result in death, serious injury, or equipment
damage.
18
EIO0000000538 07/2014
SoHVAC
Introduction to SoHVAC Standard Library
EIO0000000538 07/2014
Chapter 1
Introduction to SoHVAC Standard Library
EIO0000000538 07/2014
19
20
EIO0000000538 07/2014
SoHVAC
System Libraries
EIO0000000538 07/2014
Chapter 2
System Libraries
System Libraries
Overview
This chapter describes the system libraries.
What Is in This Chapter?
This chapter contains the following sections:
Section
Topic
Page
2.1
Software Libraries
22
2.2
Hardware Libraries
35
2.3
45
2.4
54
2.5
BACnetMSTP Libraries
58
2.6
BACnetIP Libraries
64
2.7
Browser Libraries
90
2.8
97
2.9
History Libraries
109
2.10
Identity Libraries
116
2.11
Modbus Libraries
118
2.12
ModbusTCP Libraries
153
2.13
Password Libraries
171
2.14
System Libraries
180
EIO0000000538 07/2014
21
System Libraries
Section 2.1
Software Libraries
Software Libraries
Software Libraries
Software Libraries
The software libraries include the following elements:
Generic Algorithm
Sheet
Fix (Constant)
Par (Parameter)
Pers (Persistent)
Timer
Var (Variable)
Command Input
Command Output
22
EIO0000000538 07/2014
System Libraries
Algorithm
Generic algorithms are the basic elements in a project. They allow you to define functions using
the C language.
Each algorithm corresponds to a C function and therefore it can have a variable number of inputs
with different data types, but only one output.
Each algorithm belongs to a category. This concept is similar to the concept of class in objectprogramming. The algorithms in categories allow you to optimize resources, and avoid the
duplication of code.
When you add an algorithm to a project, the environment prompts you to define its category which,
in turn, automatically sets its name.
By default, it has a CJ_VOID output and no inputs. To add the required number of inputs, select
Add Input from the context menu.
At the beginning, their data type is CJ_VOID. Once they are linked, they can be set to the write
data type automatically. Otherwise, use the C Algorithm Editor, which allows you to:
define, or import from a file, the C function that characterizes the algorithm
change its category
define the number and data types of inputs
define the output type
EIO0000000538 07/2014
23
System Libraries
Subsheet
Subsheet objects allow you to logically group a series of entities, thus dividing the project into
functional blocks. They contain all types of entities including subsheets themselves, which allows
you to organize your project into a multi-level structure.
To join internal and external entities, you need to export the relevant inputs/outputs. Exported
inputs/outputs are displayed in a different color (blue by default). You can either add an empty
subsheet to a project or select which entities to group first and then use the Create Subsheet
command.
Subsheets are the basis for creating templates and libraries.
Fix
An entity of type Fix is a constant variable. These variables types are stored in flash memory (nonvolatile memory) and it is not possible to change the value of a Fix during program execution.
They have the following properties:
24
Property
Description
Top
Sets the position where the element is drawn, relative to the top edge of the
sheet.
Array
Entity array size. If value is greater than 1, entity is an array else it is a normal
entity.
Category
Description
Height
Vertical size in pixels of the icon that represents the entity. To change it, you
can either use the properties table or graphically resize the entity using
mouse pointer.
Left
Sets the position where the element is drawn, relative to the left edge of the
sheet.
MasterRefresh
Max
Maximum value that the constant can take. It depends on the selected Type.
Min
Minimum value that the constant can take. It depends on the selected Type.
Name
Precision
Indicates the number of decimal digits used to interpret the internal value of
the element and to display the value in EIML pages.
Timed
Allows you to define in which task this element and the other elements linked
to its inputs are calculated.
EIO0000000538 07/2014
System Libraries
Property
Description
Type
Defines the data type of a constant. The default value of this property is
CJ_VOID. It can be changed either automatically by joining an input with a
data type different from CJ_VOID to the output of the entity, or manually by
setting this property in the Properties window.
According to the selected data type, the constant contains different limits and
takes up a different amount of flash memory.
Value
Value taken by the constant. Ensure that it is consistent with the selected
data type that it falls within the range set by properties Min and Max.
Width
Horizontal size in pixels of the icon that represents the entity. To change it,
you can either use the properties table or graphically resize the entity using
mouse pointer.
Description
Top
Sets the position where the element is drawn, relative to the top edge of the
sheet.
Array
Entity array size. If value is greater than 1, entity is an array else it is a normal
entity.
Category
Condvisible
Description
Height
Left
Sets the position where the element is drawn, relative to the left edge of the
sheet.
MasterRefresh
EIO0000000538 07/2014
25
System Libraries
Property
Description
Max
Maximum value that the parameter can take. It depends on the selected Type.
Min
Minimum value that the parameter can take. It depends on the selected Type.
Name
Order
Parmin
Limits the minimum value of the actual parameters at the value of another
entity existent in the application. If set at <NONE> minimum limit is the value
set in the Min property.
Precision
Indicates the number of decimal digits used to interpret the internal value of
the element and to display the value in EIML pages.
Timed
Allows you to define in which task this element and the other elements linked
to its inputs are calculated.
Type
Defines the data type of the parameter. The default value of this property is
CJ_VOID.
It can be changed either automatically by joining an element with a data type
different from CJ_VOID to the input/output of the entity, or manually by setting
this property in the Properties window.
According to the selected data type, the parameter contains different limits
and takes up a different amount of E2 memory.
Value
Width
26
EIO0000000538 07/2014
System Libraries
Description
Top
Sets the position where the element is drawn, relative to the top edge of the sheet.
Array
Entity array size. If value is greater than 1, entity is an array else it is a normal entity.
Category
Condvisible
Description
Height
Left
Sets the position where the element is drawn, relative to the left edge of the sheet.
MasterRefresh
Max
Maximum value that the parameter can take. It depends on the selected Type.
Min
Minimum value that the parameter can take. It depends on the selected Type.
Name
Order
Precision
Indicates the number of decimal digits used to interpret the internal value of the
element and to display the value in EIML pages.
Timed
Allows you to define in which task this element and the other elements linked to its
inputs are calculated.
Type
Defines the data type of the parameter. The default value of this property is
CJ_VOID.
It can be changed either automatically by joining an element with a data type
different from CJ_VOID to the input/output of the entity, or manually by setting this
property in the Properties window.
According to the selected data type, the parameter contains different limits and
takes up a different amount of E2 memory.
Value
Width
EIO0000000538 07/2014
27
System Libraries
Var
An entity of type Var is a variable. These variables types are stored in volatile memory, so that all
values are lost after the power is removed from the controller.
The variables value can be modified during program execution.
They have the following properties:
Property
Description
Top
Sets the position where the element is drawn, relative to the top edge of the sheet.
Array
Entity array size. If value is greater than 1, entity is an array else it is a normal entity.
Category
Condvisible
Description
Height
Left
Sets the position where the element is drawn, relative to the left edge of the sheet.
MasterRefresh
Automatic refresh time on networks. HIGH priority is processed in the message queue
before the LOW priority.
Useful only if the entity is shared through Network Master menus.
Max
Maximum value that the parameter can take. It depends on the selected Type.
Min
Minimum value that the parameter can take. It depends on the selected Type.
Name
Order
Precision
Indicates the number of decimal digits used to interpret the internal value of the
element and to display the value in EIML pages.
Timed
Allows you to define in which task this element and the other elements linked to its
inputs are calculated.
Type
Defines the data type of the parameter. The default value of this property is CJ_VOID.
It can be changed either automatically by joining an element with a data type different
from CJ_VOID to the input/output of the entity, or manually by setting this property in
the Properties window.
According to the selected data type, the parameter contains different limits and takes
up a different amount of E2 memory.
Value
Width
EIO0000000538 07/2014
System Libraries
Description
Memory Type
Runtime
Changes
Reset/ Power
Cycle
Reset to Factory
Default
Variables
RAM (volatile)
Yes
Default value
SoHVAC
reloaded
No
Parameter
Flash (non-volatile)
(CRC-Check)
Yes
Remain
Yes
Persistent
Flash (non-volatile)
Yes
Remain
No
Constants
Flash (non-volatile)
No
Remain
No
NOTE: Use parameter type for reading (configuration parameters). Use persistent type for writing
(operation hours, alarms, and so on).
EIO0000000538 07/2014
29
System Libraries
Timer
Timers are counters that are automatically increased/decreased by the system, under a time base.
They have inputs which you can reset, load the value, enable or cancel the count, and an output
that gives back the value of the counter.
The only permanent input present is the Reset , while the Clear, Enable, and Reload inputs
can be activated trough the Context menu.
If the Enable input equals zero, timer count stops. If it equals 1, timer count is enabled.
Connecting a parameter to the Reload input allows to load the timer count with the parameter
value instead of a default value (look at Max property).
The Reset input senses the transition from 0 to 1 to reload timer count with Max value or reload
pin value when connected.
The Clear input realizes the transition from 0 to 1 to delete the current countdown.
The Out output gives the counter value.
30
Input
Type
Limit
Description
Reset
CJ_BIT
0-1
Clear
CJ_BIT
0-1
Enable
CJ_BIT
0-1
Reload
CJ_WORD
0...65535
EIO0000000538 07/2014
System Libraries
Output
Type
Limit
Description
Out
CJ_WORD
0...65535
Elapsed Time.
Represents the current elapsed time value (hundreds
of ms for UoM=100 msec or seconds for UoM=sec).
Use the properties of the Timer to define how often this counter is changed and whether it should
be increased or decreased.
For example, you can provide compressor short-cycle protection or timed lighting using these
objects.
They have the following properties:
Property
Description
Top
Sets the position where the element is drawn, relative to the top edge of the sheet.
Category
Description
Direction
Direction towards which the value is changed when the enable input is activated.
If this property is set to UP, the counter value is increased, under the pre-set time
base, starting from zero (when timer is reset) until it reaches the value set in Max.
If the property is set to DOWN, the value is decreased starting from the value set in
Max until it returns to 0.
Height
Vertical size in pixels of the icon that represents the entity. To change it, you can
either use the properties table or graphically resize the entity using mouse pointer.
Left
Sets the position where the element is drawn, relative to the left edge of the sheet.
Max
Indicates the maximum value the timer can take. The meaning of this property
depends on the value of the property Direction.
If direction is set to UP, it indicates the value that has to be reached by the timer.
Otherwise, it indicates the starting value after a reset. If the Reload input is present,
this input value is the one loaded as start or end limit, while Max represents only a
superior control limit.
Name
Order
Timed
Allows defining in which task calculate this element and the other elements linked
to its inputs.
Type
Data type is set to CJ_WORD and cannot be changed. Therefore, the timer can take
a maximum value equal to the limit of this data type.
EIO0000000538 07/2014
31
System Libraries
Property
Description
Udm
Width
32
EIO0000000538 07/2014
System Libraries
Command In
The SoHVAC environment allows you to specify generic, user-definable commands that trigger
certain actions.
Command In objects indicate the reception of these commands and trigger whatever action that
is linked to them.
All objects of this type have an output that returns a structure CJ_CMD including the parameter
value of the command received and the node that sent it in.
In addition, they have the following properties:
Property
Description
Top
Sets the position where the element is drawn, relative to the top edge of the sheet.
Category
Cmd
Indicates the name that identifies the command whose reception you want to monitor
Description
Height
Vertical size in pixels of the icon that represents the entity. To change it, you can
either use the properties table or graphically resize the entity using mouse pointer.
Left
Sets the position where the element is drawn, relative to the left edge of the sheet
Name
Type
Width
Horizontal size in pixels of the icon that represents the entity. To change it, you can
either use the properties table or graphically resize the entity using mouse pointer.
The param input is used to retrieve the parameter when sending the command. The second input
is a trigger input. The trigger input senses a change in signal edge connected with the entity
that triggers the forwarding of a command when the value increases from 0 to 1.
EIO0000000538 07/2014
33
System Libraries
Description
Top
Sets the position where the element is drawn, relative to the top edge of the sheet.
Category
Cmd
Indicates the name that identifies the command whose reception you want to
monitor.
Description
Height
Vertical size in pixels of the icon that represents the entity. To change it, you can
either use the properties table or graphically resize the entity using mouse pointer.
Left
Sets the position where the element is drawn, relative to the left edge of the sheet
Name
Order
Timed
Allows you to define in which task this element and the other elements linked to its
inputs are calculated.
Width
Horizontal size in pixels of the icon that represents the entity. To change it, you can
either use the properties table or graphically resize the entity using mouse pointer.
NOTE: A maximum number of 250 Command Out objects can be created in a project.
34
EIO0000000538 07/2014
System Libraries
Section 2.2
Hardware Libraries
Hardware Libraries
Hardware Libraries
Hardware Libraries
The hardware libraries include the following elements:
Digital Input
Digital Output
Analog Input
Analog Output
Button
LED
Buzzer
Clock
EIO0000000538 07/2014
35
System Libraries
Digital Input
Digital Input objects represent the digital inputs on the controller or the expansions. They have
the following properties:
Property
Description
Top
Sets the position where the element is drawn, relative to the top edge of the sheet.
Category
Description
ExportInBMS
Indicates whether the object is accessible through the network connectivity port
or not.
Height
Left
Sets the position where the element is drawn, relative to the left edge of the sheet.
Name
Type
Indicates data type, for which Digital Input is CJ_BIT and cannot be changed
Width
NOTE: A maximum number of 250 Digital Input objects can be created in a project.
To add a digital input to a project, select the DigitalIn element in the library manager and dragand-drop it on the sheet.
To display its properties, double-click DigitalIn (or else right-click and select Properties from the
menu).
Digital Inputs allow you to monitor the value taken by the physical digital input and use it as input
for an algorithm.
36
EIO0000000538 07/2014
System Libraries
Digital Output
Digital Out objects represent a digital output on the controller or the expansions. They have the
following properties:
Property
Description
Top
Sets the position where the element is drawn, relative to the top edge of the sheet.
Category
Description
ExportInBMS
Indicates whether the object is accessible through the network connectivity port or
not.
Height
Left
Sets the position where the element is drawn, relative to the left edge of the sheet.
Name
Order
Timed
Allows you to define in which task this element and the other elements linked to its
inputs are calculated
Type
Indicates data type, for which Digital Input is CJ_BIT and cannot be changed
Width
NOTE: A maximum number of 250 Digital Output objects can be created in a project.
NOTE: To add a Digital Output to a sheet, proceed as you add a Digital Input.
EIO0000000538 07/2014
37
System Libraries
Analog Input
Analog Input objects are the abstract representation of any type of analog terminal. They can
represent a physical input of the following types: NTC, PTC, PT1000, 05 Volt, 010 Volt,
020 mA, and 420 mA.
Analog Input can be used to read a probe or a generic temperature, pressure, or position sensor.
An Analog Input is characterized by a CJ_ANALOG output pin and the following properties:
Property
Description
Top
Sets the position where the element is drawn, relative to the top edge of the sheet.
Category
Description
ExportInBMS
Indicates whether the object is accessible through the network connectivity port or not.
Height
Left
Sets the position where the element is drawn, relative to the left edge of the sheet.
Name
Precision
Indicates the number of decimal digits used to interpret the internal value of the element
and to display the value in EIML pages. The number of decimals depends on the
selected value in the sensor property. By definition, the temperature inputs have 1
decimal digit. The voltage and current inputs have 2 decimal digits.
Sensor
For every analog input you use in a project, you need to specify the type of sensor whose
value you want to read.
Possible choices are:
0...5 Volt
0...10 Volt
0...20 mA
4...20 mA
NTC
NTC 10K-2
NTC 10K-3
PTC
PT1000
Resistance
Temperature (reserved for future use)
Humidity (reserved for future use)
The selected sensor type has to be supported by the hardware.
Type
Indicates data type, for which digital input is CJ_BIT and cannot be changed
Width
NOTE: A maximum number of 250 Analog Input objects can be created in a project.
38
EIO0000000538 07/2014
System Libraries
To read the state of an analog input added to a project, join its output pin to the input of an Algo or
a Var.
As discussed earlier, CJ_ANALOG is a structured data type that contains multiple pieces of
information: an Error field that indicates a possible error detected, and a Value field that shows its
value. To add an Analog Input to a sheet, proceed as you add a Digital Input.
Range and precision of the analog inputs according to the sensor type:
Sensor
Precision
Range
Unit
0...10 V
2 digits
01000
0.01 V
0...20 mA
2 digits
0...2000
0.01 mA
0.01 V
0...5 V
2 digits
0...500
0...20 mA
2 digits
4002000
NTC
1 digit
0.01 mA
NTC 10K-2
1 digis
0.1 C or F
NTC 10K-3
1 digit
0.1 C or F
Resistance
0 digit
TBD
1 Ohm
PT1000
1 digit
0.1 C or F
PTC
1 digit
0.1 C or F
Analog Output
Analog output is the logical representation of a current analog output (0...20 mA) or a voltage
analog output (0...10 V).
NOTE: A maximum number of 250 Analog Input objects can be created in a project.
To read the state of an analog input added to a project, join its output pin to the input of an Algo or
a Var.
EIO0000000538 07/2014
39
System Libraries
These object types have a CJ_WORD input pin that expresses a percentage that can take values
ranging from 0 to 100.00, and has the following properties
Property
Description
Top
Sets the position where the element is drawn, relative to the top edge of the sheet.
Actuator
For every analog output you use in a project, you need to specify the type of
actuator you want to use.
Possible choices are:
0...10 V
0...20 mA
4...20 mA
PWM: Pulse width modulation 0100 % with frequency defined by property
frequency.
FAN: PWM Pulse width modulation 5...95 % synchronous to the AC power supply
frequency1.
The selected actuator type has to be supported by the hardware.
Category
Description
ExportInBMS
Indicates whether the object is accessible through the network connectivity port or
not.
Frequency
Sets the frequency for the pulse width modulation output signal.
Height
Left
Sets the position where the element is drawn, relative to the left edge of the sheet.
Max
Min
Name
Order
Precision
Indicates the number of decimal digits used to interpret the internal value of the
element and to display the value in EIML pages. The number of decimals depends
on the selected value in the actuator property. By definition, the range is 0100%
with 2 decimal digits.
Timed
Allows you to define in which task this element and the other elements linked to its
inputs are calculated.
Width
Horizontal size in pixels of the icon that represents the entity. To change it, you
can either use the properties table or graphically resize the entity using mouse
pointer.
NOTE: A maximum number of 250 Analog Output objects can be created in a project.
40
EIO0000000538 07/2014
System Libraries
Range
Unit
Comments
0...10 V
01000
0 is 0 V output
10000 is 10 V output
0...20 mA
01000
0 is 0 mA output
10000 is 20 mA output
4..20 mA
01000
0 is 4 mA output
10000 is 20 mA output
FAN1
01000
PWM
01000
0 output is 0 continuously
10000 output is 1 continuously
Button
Button elements represent an action on a button, because a button can generate the following
events:
press
hold
release
Therefore, there can be up to 3 different Button objects referring to the same button, each one of
which captures a different event.
They have the following properties:
Property
Description
Top
Sets the position where the element is drawn, relative to the top edge of the sheet.
Category
Cmd
The Cmd property identifies the type of event to intercept. It can take the following
values:
ON_PRESSED
ON_CONTINUE
ON_RELEASE
Description
ExportInBMS
Indicates whether the object is accessible through the network connectivity port or
not.
Height
Left
Sets the position where the element is drawn, relative to the left edge of the sheet.
EIO0000000538 07/2014
41
System Libraries
Property
Description
Name
Type
Indicates data type, for which buttons is CJ_BTN and cannot be changed
Width
NOTE: All products LED are not customer programmable. Some are reserved to indicate product
status
LEDs can be used to notify the user with information that you want to be visible at all times such
as a compressor status or a door open condition.
They have the following properties:
42
Property
Description
Top
Sets the position where the element is drawn, relative to the top edge of the sheet.
Category
Description
ExportInBMS
Indicates whether the object is accessible through the network connectivity port or not.
Height
Left
Sets the position where the element is drawn, relative to the left edge of the sheet.
Name
Order
Timed
Allows you to define in which task this element and the other elements linked to its
inputs are calculated.
Type
Indicates data type, which for LEDs is obviously set to CJ_LED and cannot be
changed.
EIO0000000538 07/2014
System Libraries
Property
Description
Width
Description
Top
Sets the position where the element is drawn, relative to the top edge of the sheet.
Category
Description
ExportInBMS
Indicates whether the object is accessible through the network connectivity port or not.
Height
Left
Sets the position where the element is drawn, relative to the left edge of the sheet.
Name
Order
Timed
Allows you to define in which task this element and the other elements linked to its
inputs are calculated.
Type
Indicates data type, for which buttons is CJ_BTN and cannot be changed
Width
EIO0000000538 07/2014
43
System Libraries
Clock
Clock objects are the logical representation of the real time clocks built in the controllers and
expansions.
Through these objects you can get the current date and time, thus permitting all those operations
that are linked to the clock.
For example, to program different controller behaviors depending on the time range in which it is
operating.
Clock objects return a CJ_DATETIME value that you can convert into the
CJ_DATETIME_STRUCT structure to perform more complex operations.
They have the following properties:
Property
Description
Top
Sets the position where the element is drawn, relative to the top edge of the sheet.
Category
Description
ExportInBMS
Indicates whether the object is accessible through the network connectivity port or not.
Height
Left
Sets the position where the element is drawn, relative to the left edge of the sheet.
Name
Type
Indicates data type, for which Clock objects is CJ_DATETIME and cannot be changed.
Width
44
EIO0000000538 07/2014
System Libraries
Section 2.3
Analog Input Libraries
Page
Humidity_4_20_mA
46
Pressure_4_20_mA_0_30_Bar
47
Pressure_4_20_mA_0_7_Bar
48
Pressure_4_20_mA_General
49
SelectUniversalAIn
51
EnableFilterAIn
53
EIO0000000538 07/2014
45
System Libraries
Humidity_4_20_mA
Function Block Diagram
Functional Description
The Humidity_4_20_mA library uses a 4-20 mA analog input and returns a linear currenthumidity conversion as output.
An output of 0...100 (percent), proportional to the current measurement of the sensor, is provided.
The Error field is defined as:
0 no error detected
1 overrange value detected
2 error detected: sensor out of range, open circuit, short circuit, under range
This is a template type library.
If you change the type of sensors inside the template library, change the name of the library.
Output Pin Description
Output
Type
Range
Unit
Description
Value
CJ_ANALOG
Value: 0...100
Error: 0...2
%RH
46
EIO0000000538 07/2014
System Libraries
Pressure_4_20_mA_0_30_Bar
Function Block Diagram
Functional Description
The Pressure_4_20_mA_0_30_Bar library uses a 4-20 mA analog input and returns a linear
current-pressure conversion as output.
An output of 0-30 Bar, proportional to the current measurement of the sensor, is provided.
The Error field is defined as:
0 no error detected
2 error detected: sensor out of range, open circuit, short circuit, underrange, overrange
This is a template type library.
If you change the type of sensors inside the template library, change the name of the library.
Output Pin Description
Output
Type
Range
Unit
Description
Value
CJ_ANALOG
Value: 0...300
Error: 0...2
0.1 Bar
EIO0000000538 07/2014
47
System Libraries
Pressure_4_20_mA_0_7_Bar
Function Block Diagram
Functional Description
The Pressure_4_20_mA_0_7_Bar library uses a 4-20 mA analog input and returns a linear
current-pressure conversion as output.
An output of 0-7 Bar, proportional to the current measurement of the sensor, is provided.
The Error field is defined as:
0 no error detected
2 error detected: sensor out of range, open circuit, short circuit, underrange, overrange
This is a template type library.
If you change the type of sensors inside the template library, change the name of the library.
Output Pin Description
Output
Type
Range
Unit
Description
Value
CJ_ANALOG
Value: 0...70
Error: 0...2
0.1 Bar
48
EIO0000000538 07/2014
System Libraries
Pressure_4_20_mA_General
Function Block Diagram
Functional Description
The Pressure_4_20_mA_General library uses a 4-20 mA analog input and returns a linear
current-pressure conversion as output.
The output range is established by parameters within the library. To establish the range, alter the
value property of Pressure_4_20_mA_Min1 and Pressure_4_20_mA_Max1 parameters.
The default value of Pressure_4_20_mA_Min1 and Pressure_4_20_mA_Max1 parameters is
0.
The default precision for Pressure_4_20_mA_Min1 and Pressure_4_20_mA_Max1 is 1 digit.
To understand how to change a parameter value, refer to the SoHVAC Software User Manual.
The Error field is defined as:
0 no error detected
2 error detected: sensor out of range, open circuit, short circuit, underrange, overrange
EIO0000000538 07/2014
49
System Libraries
If you change the type of sensors inside the template library, change the name of the library.
Output Pin Description
Output
Type
Range
Unit
Description
Value
CJ_ANALOG
min...max*
Error: 0...2
0.1 Bar
50
EIO0000000538 07/2014
System Libraries
SelectUniversalAIn
Function Block Diagram
Functional Description
The SelectUniversalAIn library allows forcing the type of analog input sensor n in the
controller. The range of permitted input values for this library is 2-7, and each value identifies a
particular sensor type.
The association is as follows:
2 SENSOR_NTC. NTC sensor
3 SENSOR_0_20mA. 0...20 mA current sensor
4 SENSOR_4_20mA. 4...20 mA current sensor
5 SENSOR_0_5V. 0...5 V voltage sensor
6 SENSOR_0_10V. 0...10 V voltage sensor
7 SENSOR_PT1000. PT1000 sensor
This is a template type library.
Type
Range
Default value
Description
in
CJ_BYTE
2...7
EIO0000000538 07/2014
51
System Libraries
52
Output
Type
Range
out
CJ_BYTE
2...7
Unit
Description
returns the type of analog input set
EIO0000000538 07/2014
System Libraries
EnableFilterAIn
Functional Block Diagram
Functional Description
The EnableFilterAIn library allows to enable or disable the analog input filter of the nth analog
input.
To set the value, adjust the value property of the EnFilter_AI parameter present in the library.To
understand how to change a parameter value, refer to the SoHVAC Software User Manual.
Type
Range
Default value
Description
in
CJ_BIT
0, 1
Type
Range
Description
out
CJ_BIT
0, 1
EIO0000000538 07/2014
53
System Libraries
Section 2.4
Analog Output Libraries
54
Page
SelectTypeAOn
55
PWM_FrequencyAOn
57
EIO0000000538 07/2014
System Libraries
SelectTypeAOn
Function Block Diagram
Functional Description
The SelectTypeAOn library allows setting the type of the nth analog output. The range of
permitted values for this library is 1..3 and each value identifies a particular output type.
The number association is as follows:
1 AO_0_20mA. 0...20 mA current analog output
2 AO_4_20mA. 4...20 mA current analog output
3 AO_0_10V. 0...10 V voltage analog output
To set the value, adjust the value property of the Select_TypeAOn parameter present in the
library.
To understand how to change a parameter value, refer to the SoHVAC Software User Manual.
This is a template type library.
EIO0000000538 07/2014
55
System Libraries
CAUTION
UNINTENDED EQUIPMENT OPERATION
Do not restart your application after a parameter modification without first removing and
reapplying power to the controller.
Failure to follow these instructions can result in injury or equipment damage.
Input Pin Description
Input
Type
Range
Default value
Description
in
CJ_BYTE
1...3
Unit
56
Output
Type
Range
out
CJ_BYTE
1...3
Description
returns the type of analog output set
EIO0000000538 07/2014
System Libraries
PWM_FrequencyAOn
Functional Block Diagram
Functional Description
The PWM_FrequencyAOn library allows setting the frequency of the nth analog output when this
output is configured for pulse width modulation.
NOTE: This is a single instance library.
Input Pin Description
Input
Type
Range
Description
frequency
CJ_WORD
0...2000
EIO0000000538 07/2014
57
System Libraries
Section 2.5
BACnetMSTP Libraries
BACnetMSTP Libraries
Overview
This section describes the BACnetMSTP libraries which are required to configure the program of
standard BACnet protocol. These libraries are used with a controller that includes a BACnet
communication module.
What Is in This Section?
This section contains the following topics:
Topic
58
Page
BACnetMSTP_Baudrate
59
BACnetMSTP_DeviceInstance
60
BACnetMSTP_InfoFrames
61
BACnetMSTP_MacID
62
BACnetMSTP_MaxMaster
63
EIO0000000538 07/2014
System Libraries
BACnetMSTP_Baudrate
Function Block Diagram
Functional Description
The BACnetMSTP_BaudRate library configures the communication baud rate on the BACnet
MS/TP network.
The following baud rates are supported:
0 9.6 Kbit
1 19.2 Kbit
2 38.4 Kbit
3 76.8 Kbit
To set the default value, adjust the value property of the P_BACnetMSTP_BaudRate parameter
present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Manual.
This is a template type library.
Type
Range
Default value
Description
in
CJ_BYTE
0...3
Type
Range
Description
out
CJ_BYTE
0...3
EIO0000000538 07/2014
59
System Libraries
BACnetMSTP_DeviceInstance
Function Block Diagram
Functional Description
The BACnetMSTP_DeviceInstance library configures the identification of the equipment on the
complete BACnet network.
To set the value, adjust the value property of the P_BACnetMSTP_DeviceInstance parameter
present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Manual.
This is a template type library.
Type
Range
Default value
Description
in
CJ_LONG
1...4194303
108
60
Output
Type
Range
Description
out
CJ_LONG
1...4194303
EIO0000000538 07/2014
System Libraries
BACnetMSTP_InfoFrames
Function Block Diagram
Functional Description
The BACnetMSTP_InfoFrames library configures the maximum number of information frames
that the equipment sends on the BACnet MSTP network, each time it receives the token.
To set the value, adjust the value property of the P_BACnetMSTP_InfoFrames parameter
present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Manual.
This is a template type library.
Type
Range
Default value
Description
in
CJ_BYTE
1...127
Type
Range
Description
out
CJ_BYTE
1...127
EIO0000000538 07/2014
61
System Libraries
BACnetMSTP_MacID
Function Block Diagram
Functional Description
The BACnetMSTP_MacID library configures the RS485 node address on the BACnet MSTP
network.
To set the value, adjust the value property of the P_BACnetMSTP_MacID parameter present in
the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Manual.
This is a template type library.
Type
Range
Default value
Description
in
CJ_BYTE
1...127
62
Output
Type
Range
Description
out
CJ_BYTE
1...127
EIO0000000538 07/2014
System Libraries
BACnetMSTP_MaxMaster
Function Block Diagram
Functional Description
The BACnetMSTP_MaxMaster library configures the last address configured for which the token
must be passed.
To set the value, adjust the value property of the P_BACnetMSTP_MaxMaster parameter
present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Manual.
This is a template type library.
Type
Range
Default value
Description
in
CJ_BYTE
1...127
127
Type
Range
Description
out
CJ_BYTE
1...127
EIO0000000538 07/2014
63
System Libraries
Section 2.6
BACnetIP Libraries
BACnetIP Libraries
Overview
This section describes the BACnetIP libraries which are used for BACnetIP configuration by the
application program. These libraries are used with a controller that includes a BACnetIP
communication module.
What Is in This Section?
This section contains the following topics:
Topic
64
Page
BACnetIP_Address
65
BACnetIP_Gateway
66
BACnetIP_IPConfiguration
67
BACnetIP_SubnetMask
69
BACnetIP_BACnetPortNumber
70
BACnetIP_DeviceInstance
71
BACnetIP_BBMDAddress
72
BACnetIP_BBMDPortNumber
73
BACnetIP_SNMPAuthenticationTrap
74
BACnetIP_SNMPColdStartTrap
75
BACnetIP_SNMPLinkDownTrap
76
BACnetIP_SNMPLinkUpTrap
77
BACnetIP_SNMPManager1
78
BACnetIP_SNMPManager2
79
BACnetIP_Port1_AutoNegotiation
80
BACnetIP_Port1_DuplexMode
81
BACnetIP_Port1_Speed
83
BACnetIP_Port2_AutoNegotiation
85
BACnetIP_Port2_DuplexMode
86
BACnetIP_Port2_Speed
88
EIO0000000538 07/2014
System Libraries
BACnetIP_Address
Function Block Diagram
Functional Description
The BACnetIP_Address library configures the IP address of the M168 controller on the BACnet
IP network.
To set the value, adjust the value property of the P_BACnetIP_Address parameter present in
the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
Description
in
CJ_IP_Address
0.0.0.0
...
255.255.255.255
192.168.2.44
Type
Range
Description
out
CJ_IP_Address
0.0.0.0
...
255.255.255.255
EIO0000000538 07/2014
65
System Libraries
BACnetIP_Gateway
Function Block Diagram
Functional Description
The BACnetIP_Gateway library configures the IP address of the M168 controller on the BACnet
IP network.
To set the value, adjust the value property of the P_BACnetIP_Gateway parameter present in
the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
Description
in
CJ_IP_Address
0.0.0.0
...
255.255.255.255
192.168.2.1
66
Output
Type
Range
Description
out
CJ_IP_Address
0.0.0.0
...
255.255.255.255
EIO0000000538 07/2014
System Libraries
BACnetIP_IPConfiguration
Function Block Diagram
Functional Description
The BACnetIP_IPConfiguration library configures the IP address, the method for IP
configuration dynamic host configuration protocol (DHCP), BootServer (BootP) or Fixed IP of the
M168 controller on the BACnet IP network.
To set the value, adjust the value property of the P_BACnetIP_IPConfiguration parameter
present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
Description
in
CJ_BYTE
0...2
EIO0000000538 07/2014
67
System Libraries
68
Output
Type
Range
Description
out
CJ_BYTE
0...2
EIO0000000538 07/2014
System Libraries
BACnetIP_SubnetMask
Function Block Diagram
Functional Description
The BACnetIP_SubnetMask library configures the gateway subnet mask of the M168 controller
on the BACnet IP network.
To set the value, adjust the value property of the P_BACnetIP_SubnetMask parameter present
in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
Description
in
CJ_IP_Address
0.0.0.0
...
255.255.255.255
255.255.255.0
Type
Range
Description
out
CJ_IP_Address
0.0.0.0
...
255.255.255.255
EIO0000000538 07/2014
69
System Libraries
BACnetIP_BACnetPortNumber
Function Block Diagram
Functional Description
The BACnetIP_BACnetPortNumber library configures the BACnet port number of the M168
controller on the BACnet IP network.
To set the value, adjust the value property of the P_BACnetIP_BACnetPortNumber parameter
present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
Description
in
CJ_WORD
47808...47823
(BAC0...BACF hex)
47808
70
Output
Type
Range
Description
out
CJ_IP_Address
47808...47823
(BAC0...BACF hex)
EIO0000000538 07/2014
System Libraries
BACnetIP_DeviceInstance
Function Block Diagram
Functional Description
The BACnetIP_DeviceInstance library configures the BACnet device instance of the M168
controller on the BACnet IP network.
To set the value, adjust the value property of the P_BACnetIP_DeviceInstance parameter
present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
Description
in
CJ_LONG
1...4104393
108
Type
Range
Description
out
CJ_LONG
1...4104393
EIO0000000538 07/2014
71
System Libraries
BACnetIP_BBMDAddress
Function Block Diagram
Functional Description
The BACnetIP_BBMDAddress library configures the BBMD IP address of the M168 controller on
the BACnet IP network.
To set the value, adjust the value property of the P_BACnetIP_BBMDAddress parameter
present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
Description
in
CJ_IP_Address
0.0.0.0
...
255.255.255.255
255.255.255.255
72
Output
Type
Range
Description
out
CJ_IP_Address
0.0.0.0
...
255.255.255.255
EIO0000000538 07/2014
System Libraries
BACnetIP_BBMDPortNumber
Function Block Diagram
Functional Description
The BACnetIP_BBMDPortNumber library configures the BACnet BBMD port number of the M168
controller on the BACnet IP network.
To set the value, adjust the value property of the P_BACnetIP_BBMDPortNumber parameter
present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
Description
in
CJ_WORD
47808...47823
(BAC0...BACF_hex)
47808
Type
Range
Description
out
CJ_WORD
47808...47823
(BAC0...BACF hex)
EIO0000000538 07/2014
73
System Libraries
BACnetIP_SNMPAuthenticationTrap
Function Block Diagram
Functional Description
The BACnetIP_SNMPAuthenticationTrap library enables the SNMP authentication trap of the
M168 controller on the BACnet IP network.
To set the value, adjust the value property of the P_BACnetIP_SNMPAuthentication
parameter present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
Description
in
CJ_BIT
0...1
74
Output
Type
Range
Description
out
CJ_BIT
0...1
EIO0000000538 07/2014
System Libraries
BACnetIP_SNMPColdStartTrap
Function Block Diagram
Functional Description
The BACnetIP_SNMPColdStartTrap library enables the SNMP cold start trap of the M168
controller on the BACnet IP network.
To set the value, adjust the value property of the P_BACnetIP_SNMPColdStartTrap
parameter present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
Description
in
CJ_BIT
0...1
Type
Range
Description
out
CJ_BIT
0...1
EIO0000000538 07/2014
75
System Libraries
BACnetIP_SNMPLinkDownTrap
Function Block Diagram
Functional Description
The BACnetIP_SNMPLinkDownTrap library enables the SNMP link down trap of the M168
controller on the BACnet IP network.
To set the value, adjust the value property of the P_BACnetIP_SNMPLinkDownTrap parameter
present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
Description
in
CJ_BIT
0...1
76
Output
Type
Range
Description
out
CJ_BIT
0...1
EIO0000000538 07/2014
System Libraries
BACnetIP_SNMPLinkUpTrap
Function Block Diagram
Functional Description
The BACnetIP_SNMPLinkUpTrap library enables the SNMP link up trap of the M168 controller
on the BACnet IP network.
To set the value, adjust the value property of the P_BACnetIP_SNMPLinkUpTrap parameter
present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
Description
in
CJ_BIT
0...1
Type
Range
Description
out
CJ_BIT
0...1
EIO0000000538 07/2014
77
System Libraries
BACnetIP_SNMPManager1
Function Block Diagram
Functional Description
The BACnetIP_SNMPManager1 library configures the IP address of SNMP manager 1 of the
M168 controller on the BACnet IP network.
To set the value, adjust the value property of the P_BACnetIP_SNMPManager1 parameter
present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
Description
in
CJ_IP_Address
0.0.0.0
...
255.255.255.255
192.168.2.1
78
Output
Type
Range
Description
out
CJ_IP_Address
0.0.0.0
...
255.255.255.255
EIO0000000538 07/2014
System Libraries
BACnetIP_SNMPManager2
Function Block Diagram
Functional Description
The BACnetIP_SNMPManager2 library configures the IP address of SNMP manager 1 of the
M168 controller on the BACnet IP network
To set the value, adjust the value property of the P_BACnetIP_SNMPManager2 parameter
present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
Description
in
CJ_IP_Address
0.0.0.0
...
255.255.255.255
192.168.2.2
Type
Range
Description
out
CJ_IP_Address
0.0.0.0
...
255.255.255.255
EIO0000000538 07/2014
79
System Libraries
BACnetIP_Port1_AutoNegotiation
Function Block Diagram
Functional Description
The BACnetIP_Port1_AutoNegotiation library enables the auto negotiation of BACnet IP
port 1 of the M168 controller on the BACnet IP network.
To set the value, adjust the value property of the P_BACnetIP_Port1AutoNegotation
parameter present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
in
CJ_BIT
0, 1
Description
sets Port1 Auto Negotiation:
0 = Disabled
1 = Enabled
80
Output
Type
Range
Default value
Description
out
CJ_BIT
0, 1
System Libraries
BACnetIP_Port1_DuplexMode
Function Block Diagram
Functional Description
The BACnetIP_Port1_DuplexMode library configures the duplex mode of BACnet IP port 1 of
the M168 controller on the BACnet IP network.
To set the value, adjust the value property of the P_BACnetIP_Port1DuplexMode parameter
present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
in
CJ_BYTE
0...2
Description
sets Port1 Duplex Mode:
0 = Default
1 = Half-duplex
2 = Full-duplex
EIO0000000538 07/2014
81
System Libraries
Type
Range
Default value
out
CJ_BYTE
0...2
Description
returns Port1 Duplex Mode:
0 = Default
1 = Half-duplex
2 = Full-duplex
82
EIO0000000538 07/2014
System Libraries
BACnetIP_Port1_Speed
Function Block Diagram
Functional Description
The BACnetIP_Port1_Speed library configures the speed of BACnet IP port 1 of the M168
controller on the BACnet IP network.
To set the value, adjust the value property of the P_BACnetIP_Port1Speed parameter present
in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
in
CJ_BYTE
0...2
Description
sets Port1 Speed:
0 = Default
1 = 10 Mbps
2 = 100 Mbps
EIO0000000538 07/2014
83
System Libraries
Type
Range
Default value
out
CJ_BYTE
0...2
Description
returns Port1 Speed:
0 = Default
1 = 10 Mbps
2 = 100 Mbps
84
EIO0000000538 07/2014
System Libraries
BACnetIP_Port2_AutoNegotiation
Function Block Diagram
Functional Description
The BACnetIP_Port2_AutoNegotiation library enables the auto negotiation of BACnet IP
port 2 of the M168 controller on the BACnet IP network.
To set the value, adjust the value property of the P_BACnetIP_Port2AutoNegotiation
parameter present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
in
CJ_BIT
0, 1
Description
sets Port2 Auto Negotiation:
0 = Disabled
1 = Enabled
Type
Range
Default value
Description
out
CJ_BIT
0, 1
EIO0000000538 07/2014
85
System Libraries
BACnetIP_Port2_DuplexMode
Function Block Diagram
Functional Description
The BACnetIP_Port2_DuplexMode library configures the duplex mode of BACnet IP port 2 of
the M168 controller on the BACnet IP network.
To set the value, adjust the value property of the P_BACnetIP_Port2DuplexMode parameter
present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
in
CJ_BYTE
0...2
Description
sets Port2 Duplex Mode:
0 = Default
1 = Half-duplex
2 = Full-duplex
86
EIO0000000538 07/2014
System Libraries
Type
Range
Default value
out
CJ_BYTE
0...2
Description
returns Port2 Duplex Mode:
0 = Default
1 = Half-duplex
2 = Full-duplex
EIO0000000538 07/2014
87
System Libraries
BACnetIP_Port2_Speed
Function Block Diagram
Functional Description
The BACnetIP_Port2_Speed library configures the speed of BACnet IP port 2 of the M168
controller on the BACnet IP network.
To set the value, adjust the value property of the P_BACnetIP_Port2Speed parameter present
in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
in
CJ_BYTE
0...2
Description
sets Port2 Speed:
0 = Default
1 = 10 Mbps
2 = 100 Mbps
88
EIO0000000538 07/2014
System Libraries
Type
Range
Default value
out
CJ_BYTE
0...2
Description
returns Port2 Speed:
0 = Default
1 = 10 Mbps
2 = 100 Mbps
EIO0000000538 07/2014
89
System Libraries
Section 2.7
Browser Libraries
Browser Libraries
Overview
This section describes the browser libraries which are required to configure one or more displays.
These libraries are used to direct and display pages based on events.
What Is in This Section?
This section contains the following topics:
Topic
90
Page
AddBrowserGraph_240_140_Type
91
AddBrowserGraph_128_64_Type
94
AddBrowserGraph_120_32_Type
95
AddBrowserAlpha_4_20_Type
96
EIO0000000538 07/2014
System Libraries
AddBrowserGraph_240_140_Type
Function Block Diagram
Functional Description
It is possible to select the page to be processed through this library. Within a project, there may be
pages with the same ID created for different browsers.
It is possible to select the 240 * 140 pixel graphic page and use it in the application with the help
of AddBrowserGraph_240_140_Type library.
It is possible to load a certain page based on application events. For example, an alarm page is
displayed when an alarm occurs.
NOTE: An example of the use of this library is presented below.
NOTE: Adjusting the Digital Input selects the page to be viewed.
NOTE: Page_On contains the ID of the on page, while Page_Off contains a different ID for the
off page.
NOTE: If Digital Input = 1, select Page_On (Page_On ID = 2).
NOTE: If Digital Input = 0, select Page_Off (Page_Off ID = 3).
NOTE: On receiving the trigger, the command out entity sends the command to load the page
chosen by the selector SEL_WORD_1.
EIO0000000538 07/2014
91
System Libraries
Displays:
92
EIO0000000538 07/2014
System Libraries
NOTE: Refer to the example in the SoHVAC Samples folder. The subsequently explained libraries
follow the same principle of use.
Input Pin Description
Input
Type
Range
Description
in
CJ_WORD
1...240
Type
Range
Description
out
CJ_WORD
0...65535
EIO0000000538 07/2014
93
System Libraries
AddBrowserGraph_128_64_Type
Function Block Diagram
Functional Description
It is possible to select the page to be processed through this library. Within a project, there may be
pages with the same ID, created for different browsers.
It is possible to select the 128 * 64 pixel graphic page and use it in the application with the help of
AddBrowserGraph_128_64_Type library.
An example of the use of this library is presented in the AddBrowserGraph_240_140_Type library
(see page 91).
Input Pin Description
Input
Type
Range
Description
in
CJ_WORD
1...240
94
Output
Type
Range
Description
out
CJ_WORD
0...65535
EIO0000000538 07/2014
System Libraries
AddBrowserGraph_120_32_Type
Function Block Diagram
Functional Description
It is possible to select the page to be processed through this library. Within a project, there may be
pages with the same ID, created for different browsers.
It is possible to select the 120 * 32 pixel graphic page and use it in the application with the help of
AddBrowserGraph_120_32_Type library.
An example of the use of this library is presented in the AddBrowserGraph_240_140_Type library
(see page 91).
Input Pin Description
Input
Type
Range
Description
in
CJ_WORD
1...240
Type
Range
Description
out
CJ_WORD
0...65535
EIO0000000538 07/2014
95
System Libraries
AddBrowserAlpha_4_20_Type
Function Block Diagram
Functional Description
It is possible to select the page to be processed through this library. Within a project, there may be
pages with the same ID, created for different browsers.
It is possible to select the 4 * 20 character alphanumeric page and use it in the application with the
help of AddBrowserAlpha_4_20_Type library.
An example of the use of this library is presented in the AddBrowserGraph_240_140_Type library
(see page 91).
Input Pin Description
Input
Type
Range
Description
in
CJ_WORD
1...240
96
Output
Type
Range
Description
out
CJ_WORD
0...65535
EIO0000000538 07/2014
System Libraries
Section 2.8
Expansion Bus Libraries
Page
98
ExpBUS_MyNode
100
ExpBUS_BaudRate
101
ExpBUS_GetStatus
103
ExpBUS_GetNetworkStatus
104
ExpBUS_NetworkNode_n
105
ExpBUS_NodeGuardTimeout
107
EIO0000000538 07/2014
97
System Libraries
ExpBUS_IsMaster
Function Block Diagram
Functional Description
The ExpBUS_IsMaster library is used to establish whether the node where the project is
mounted is the network master.
Adjust the value property of the ExpBUS_IsMaster parameter in the library as follows:
If the parameter is 1, the node is a Master.
If it is set to 0, the node is a Slave.
To understand how to change a parameter value, refer to the SoHVAC Software User Manual.
NOTE: For Master/Slave definition, refer to the SoHVAC Software User Manual.
This is a template type library.
98
Input
Type
Range
Default value
Description
in
CJ_BIT
0, 1
EIO0000000538 07/2014
System Libraries
Type
Range
Default value
Description
out
CJ_BIT
0, 1
EIO0000000538 07/2014
99
System Libraries
ExpBUS_MyNode
Function Block Diagram
Functional Description
The ExpBUS_MyNode library represents the physical address of the controller where the program
is loaded.
Adjust the value property of the ExpBUS_MyNode parameter in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Manual.
This is a template type library.
Type
Range
Default value
Description
in
CJ_BYTE
1...127
100
Output
Type
Range
Default value
Description
out
CJ_BYTE
1...127
EIO0000000538 07/2014
System Libraries
ExpBUS_BaudRate
Function Block Diagram
Functional Description
The ExpBUS_BaudRate library allows setting the baud rate for communication over the expansion
bus channel.
The following baud rates are supported:
1 20 Kbit
2 50 Kbit
3 125 Kbit
4 500 Kbit
Set the value by adjusting the value property of the ExpBUS_BaudRate parameter.
To understand how to change a parameter value, refer to the SoHVAC Software User Manual.
This is a template type library.
EIO0000000538 07/2014
101
System Libraries
Type
Range
Default value
Description
in
CJ_BYTE
1...4
102
Output
Type
Range
Default value
Description
out
CJ_BYTE
1...4
EIO0000000538 07/2014
System Libraries
ExpBUS_GetStatus
Function Block Diagram
Functional Description
The ExpBUS_GetStatus library returns the status of the expansion bus channel.
The following output values are permitted:
0 EXPANSION BUS_OK. The channel is operating correctly.
1 EXPANSION BUS_WARNING. The channel is operational, but is in a state requiring attention.
2 EXPANSION BUS_ERROR. An error was detected on the channel and is only enabled for
reception.
3 EXPANSION BUS_BUS_OFF. An error was detected on the channel and both the transmission
and reception are disabled. Equipment is disconnected from the network.
Output Pin Description
Output
Type
Range
Unit
Description
out
CJ_SHORT
0...3
EIO0000000538 07/2014
103
System Libraries
ExpBUS_GetNetworkStatus
Function Block Diagram
Functional Description
The ExpBUS_GetNetworkStatus library returns the status of the node, requested by the input
in, connected to the first expansion bus channel.
The following output values are permitted:
0 EXPANSION BUS_OK. The node is operating correctly.
1 EXPANSION BUS_WARNING. The node is operational, but is in a state requiring service.
2 EXPANSION BUS_ERROR. The node has stopped answering.
3 EXPANSION BUS_BUS_OFF. The node does not answer.
NOTE: This library may be used for each of the 32 potential network nodes, connected to the first
expansion bus communication channel.
Input Pin Description
Input
Type
Range
Default value
Description
in
CJ_BYTE
0...127
104
Output
Type
Range
Unit
Description
out
CJ_BYTE
0...3
EIO0000000538 07/2014
System Libraries
ExpBUS_NetworkNode_n
Function Block Diagram
Functional Description
The ExpBUS_NetworkNode_n library allows setting the physical address of the nth node of the
network (n = 1...32).
To decide the value, adjust the value property of the ExpBUS_NetworkNode_n parameter in the
library.
To understand how to change a parameter value, refer to the SoHVAC Software User Manual.
An address may assume any value between 1 and 127 and must be unique for each channel. A
value of 0 indicates that the node is not present.
This is a template type library.
Type
Range
Default value
Description
in
CJ_BYTE
0...127
n*
EIO0000000538 07/2014
105
System Libraries
106
Output
Type
Range
Unit
Description
out
CJ_BYTE
0...127
EIO0000000538 07/2014
System Libraries
ExpBUS_NodeGuardTimeout
Function Block Diagram
Functional Description
The ExpBUS_NodeGuardTimeout library is used to set the guarding time of the expansion bus
protocol.
To set the value, adjust the value property of the ExpBUS_NodeGuardTimeout parameter in the
library.
For each time value, the controller, if it is a master, verifies all the nodes connected to it as slaves
and their relevant status using the ExpBUS_GetNetworkStatus value. It is possible to read this
status for each node of the network.
The parameter values are in seconds. For example, by setting a value of 5, all the nodes on the
network will be requested by the master every 5 seconds.
To understand how to change a parameter value, refer to the SoHVAC Software User Manual.
This is a template type library.
EIO0000000538 07/2014
107
System Libraries
Type
Range
Default value
Description
in
CJ_BYTE
1...60
5s
Type
Range
Unit
Description
out
CJ_BYTE
1...60
NOTE: The Expansion bus timeout value specified in the M168 controller must be identical to the
value specified in the function block ExpBUS_NodeGuardTimeout. Different values between the
node guard time out values in the M168 controller and in the M168 expansion modules may cause
unintended equipment operation.
WARNING
UNINTENDED EQUIPMENT OPERATION
Ensure that the node guard time out value is identical in all devices connected to the expansion
bus.
Failure to follow these instructions can result in death, serious injury, or equipment
damage.
108
EIO0000000538 07/2014
System Libraries
Section 2.9
History Libraries
History Libraries
Overview
This section describes the history libraries that are used to manage the history log (erasing,
reading and writing).
To be able to use them, it is necessary to enable use of the history log and define its dimensions
in the project options.
For more detailed description, refer to the SoHVAC software manual.
What Is in This Section?
This section contains the following topics:
Topic
Page
HistoryErase
110
HistoryReadEvent
111
HistoryWriteEvent
114
EIO0000000538 07/2014
109
System Libraries
HistoryErase
Function Block Diagram
Functional Description
It is possible to reset the history log using HistoryErase library, deleting all the entries present.
The operation is performed when the ev input changes from 0 to 1 (rising edge).
Input Pin Description
110
Input
Type
Range
Description
ev
CJ_BIT
0, 1
EIO0000000538 07/2014
System Libraries
HistoryReadEvent
Function Block Diagram
Functional Description
Using the HistoryReadEvent library, it is possible to read the entries recorded in the event log
with the help of HistoryWriteEvent library.
This is an asynchronous operation. It is necessary to act on the inputs and then verify the value
output to obtain the status of the operation.
It is possible to request the last event using the last input. Similarly, preceding events can be
requested using the previous input and succeeding events can be requested using the next
input. You can check the complete memory with pulses on previous input.
Once reading the event has been achieved (status = HISTORY_READ_OK), it is possible to have
the progressive number, code, date, and value eventually stored for the requested event.
The output status may assume the following values:
1 HISTORY_READ_OK. Reading was successful.
2 HISTORY_READ_NONE. There are no stored elements.
3 HISTORY_READ_DIM. Memory overflow error was detected.
4 HISTORY_READ_FAIL. Reading was unsuccessful.
When the read history points on the first saved data, a new rising edge on previous event will return
the correct error code. Other outputs do not change.
EIO0000000538 07/2014
111
System Libraries
Example
Algorithm:
Display:
Last_Event, Prev_Event, and Next_Event digital inputs are connected to the two hardware
digital inputs. Outputs values are displayed on the screen.
Input Pin Description
112
Input
Type
Range
Description
last
CJ_BIT
0, 1
previous
CJ_BIT
0, 1
next
CJ_BIT
0, 1
EIO0000000538 07/2014
System Libraries
Type
Range
Description
status
CJ_BYTE
1...4
progressive
CJ_LONG
-2147483648... 2147483647
code
CJ_WORD
0...65535
event code
date
CJ_DATETIME
0...2147483647
value
CJ_SHORT
-32768...32767
EIO0000000538 07/2014
113
System Libraries
HistoryWriteEvent
Function Block Diagram
Functional Description
The HistoryWriteEvent library allows saving an event in the log.
This library associates the event code with the code input, the system clock with the clock input
and field value with the value one wants to join to the event to store.
On clock input rising edge, the data input save process is activated. To verify the outcome of the
operation, verify the value of the status output.
The output can assume the following values:
0 HISTORY_WRITE_OK. Writing was successful.
1 HISTORY_QUEUE_FULL. Writing cancelled because the request queue is full.
2 HISTORY_WRONG_DATETIME. Writing was unsuccessful because the data is incorrect.
Status will be equal to 2 if the Datetime is <= 0.
NOTE: For internal use, the CJ_DATETIME is a signed long and may be negative.
NOTE: The QUEUE size is equal to 4 entries.
Input Pin Description
Input
114
Type
Range
Description
code
CJ_WORD
0...65535
event
CJ_BIT
0, 1
clock
CJ_DATETIME
0...2147483647
value
CJ_SHORT
-32768...32767
EIO0000000538 07/2014
System Libraries
Type
Range
Description
status
CJ_BYTE
0...2
operation status
EIO0000000538 07/2014
115
System Libraries
Section 2.10
Identity Libraries
Identity Libraries
Identity_CJ_ANALOG
Function Block Diagram
Functional Description
The identity function block transfers the data from the input pin to the output pin without any data
type conversion.
This function block is used when a subsheet is created. The subsheet may have 1 input pin, but
inside the subsheet there are multiple function blocks which require the same data.
The identity function block is identical with a variable entiity, except that no data is stored in volatile
memory.
NOTE:
The other libraries belonging to the Identity group are as follows:
Identity_CY_BIT
Identity_CY_BTN
Identity_CY_BUZZ
Identity_CY_BYTE
Identity_CY_CMD
Identity_CY_DATE
Identity_CY_DATETIME
Identity_CY_DWORD
Identity_CY_LED
Identity_CY_LONG
Identity_CY_SHORT
Identity_CY_S_BYTE
Identity_CY_TIME
Identity_CY_WORD
116
EIO0000000538 07/2014
System Libraries
Type
Range
Description
in1
CJ_ANALOG
Value: -32768...32767
Error: 0...2
input value
Type
Range
Description
Out
CJ_ANALOG
Value: -32768...32767
Error: 0...2
output value
EIO0000000538 07/2014
117
System Libraries
Section 2.11
Modbus Libraries
Modbus Libraries
Overview
This section describes the Modbus libraries that allow the configuration and management of the
standard Modbus protocol.
The serial line 1 libraries will be identified by the Modbus 1 prefix and the serial line 2 libraries by
the Modbus 2 prefix.
Refer to the controller hardware documentation to check the compatibility with this protocol.
What Is in This Section?
This section contains the following topics:
Topic
118
Page
Modbus1_Address - Modbus2_Address
119
Modbus1_Baud - Modbus2_Baud
121
Modbus1_Parity - Modbus2_Parity
122
Modbus1_StopBit - Modbus2_StopBit
124
ModbusMaster_Interframe
126
ModbusMaster_Read100MultipleHoldingRegisters
127
ModbusMaster_Read100MultipleInputRegisters
129
ModbusMaster_Read10MultipleHoldingRegisters
131
ModbusMaster_Read10MultipleInputRegisters
133
ModbusMaster_ReadSingleHoldingRegister
135
ModbusMaster_ReadSingleInputRegister
137
ModbusMaster_ReadSingleCoilStatus
139
ModbusMaster_ReadSingleInputStatus
141
ModbusMaster_Timeout
143
ModbusMaster_Write100MultipleHoldingRegisters
145
ModbusMaster_Write10MultipleHoldingRegisters
147
ModbusMaster_WriteSingleHoldingRegister
149
ModbusMaster_WriteSingleCoilStatus
151
EIO0000000538 07/2014
System Libraries
Modbus1_Address - Modbus2_Address
Function Block Diagram
Functional Description
The Modbus1_Address and Modbus2_Address library represents the physical address of the
controller on the Modbus network.
To set the value, adjust the value property of the Modbus1_Address and Modbus2_Address
parameter in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Manual.
This is template type library.
NOTE: The Modbus1_Address library only defines the network address of Port 1 (Modbus slave).
NOTE: The Modbus2_Address library only defines the network address of Port 2 (Modbus
master or slave)
NOTE: This is a single instance library.
Input Pin Description
Input
Type
Range
Default value
Description
in
CJ_BYTE
1...247
EIO0000000538 07/2014
119
System Libraries
120
Output
Type
Range
Description
out
CJ_BYTE
1...247
EIO0000000538 07/2014
System Libraries
Modbus1_Baud - Modbus2_Baud
Function Block Diagram
Functional Description
The Modbus1_Baud and Modbus2_Baud library allows setting the communication baud rate.
The following baud rates are supported:
0: 1200 Kbit
1: 2400 Kbit
2: 4800 Kbit
3: 9600 Kbit
4: 19200 Kbit
5: 28800 Kbit
6: 38400 Kbit
7: 57600 Kbit
To set the default value, adjust the value property of the Modbus1_Baud and Modbus2_Baud
parameter in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Manual.
NOTE: This is a template type library.
NOTE: This is a single instance library.
NOTE: The library can be used for Modbus Master and Modbus Slave protocols.
Input Pin Description
Input
Type
Range
Default Value
Description
in
CJ_BYTE
0...7
Type
Range
Description
out
CJ_BYTE
0...7
EIO0000000538 07/2014
121
System Libraries
Modbus1_Parity - Modbus2_Parity
Function Block Diagram
Functional Description
The Modbus1_Parity and Modbus2_Parity library allows setting the parity for data
transmission.
Parity is a code used to check the integrity of transmitted data and may be of following types:
0 NONE. No parity
1 ODD. Odd parity
2 EVEN. Even parity
To set the value, adjust the value property of the Modbus1_Parity and Modbus2_Parity
parameter in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Manual.
This is a template type library.
122
Input
Type
Range
Default value
Description
in
CJ_BYTE
0...2
EIO0000000538 07/2014
System Libraries
Type
Range
Description
out
CJ_BYTE
0...2
EIO0000000538 07/2014
123
System Libraries
Modbus1_StopBit - Modbus2_StopBit
Function Block Diagram
Functional Description
The Modbus1_StopBit and Modbus2_StopBit library allows setting the type of Stop bit for data
transmission. This technique is used to allow the transmitting/receiving device to detect the end of
a communication frame.
The number association is as follows:
0 1 Stop bit
1 2 Stop bits
To set the value, adjust the value property of the Modbus1_StopBit and Modbus2_StopBit
parameter in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Manual.
This is a template type library.
124
Input
Type
Range
Default value
Description
in
CJ_BIT
0, 1
EIO0000000538 07/2014
System Libraries
Type
Range
Description
out
CJ_BIT
0, 1
EIO0000000538 07/2014
125
System Libraries
ModbusMaster_Interframe
Function Block Diagram
Functional Description
The ModbusMaster_Interframe library allows you to set the Modbus interframe delay. The
interframe delay is the time duration between 2 Modbus messages.
To set the value, adjust the value property of the P_ModbusMaster_Interframes parameter
present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Manual.
Type
Range
Default Value
Description
in
CJ_BYTE
0...240
126
Output
Type
Range
Default Value
Description
out
CJ_BYTE
0...240
EIO0000000538 07/2014
System Libraries
ModbusMaster_Read100MultipleHoldingRegisters
Function Block Diagram
Functional Description
The ModbusMaster_Read100MultipleHoldingRegisters library allows you to read up to
100 holding register values of a slave node. This function initiates a Modbus function code 03
message.
To start the reading operation, set a rising edge to the enable input. Add the reading request for
the data present in the register of the slave node in the queue.
After the reading request is added in the queue, the library processes the message and analyzes
the answer by monitoring the status output.
When the value of the status output is 3, the slave response is positive and the values are stored
in the value[100] output. If the value of the status output is 4, the communication is
unsuccessful.
Setting enable to 0 frees the queue for the next transmission.
During the communication period, the enable input must be maintained to 1. Setting enable to
0 during the communication process terminates the message.
NOTE: You can use the library only for Modbus master.
EIO0000000538 07/2014
127
System Libraries
Type
Range
Description
enable
CJ_BIT
0, 1
register
CJ_WORD
1...65535
slave
CJ_BYTE
0...247
num
CJ_BYTE
1...100
NOTE: The Modbus definition for register addresses starts the enumeration of addresses with 1
as the first address. However, many IEC based devices start enumerating addresses with 0 as the
first address. Therefore, the function block subtracts 1 from the value provided in the register.
For example, if you want to read from or write to address 100 in an International Electro-Technical
Commission (IEC) device, you must provide a value 101 to the register.
Output Pin Description
128
Output
Type
Range
Description
status
CJ_BYTE
0...5
value[100]
CJ_WORD
0...65535
EIO0000000538 07/2014
System Libraries
ModbusMaster_Read100MultipleInputRegisters
Function Block Diagram
Functional Description
The ModbusMaster_Read100MultipleInputRegisters library allows you to read up to 100
input register values of a slave node. This function initiates a Modbus function code 04 message.
To start the reading operation, set a rising edge to the enable input. Add the reading request for
the data present in the register of the slave node in the queue.
After the reading request is added in the queue, the library processes the message and analyzes
the answer by monitoring the status output.
When the value of the status output is 3, the slave response is positive. The values are stored in
the value output. If the value of the status output is 4, the communication is unsuccessful.
Setting enable to 0 frees the queue for the next transmission.
During the communication period, the enable input must be maintained to 1.
Setting enable to 0 during the communication process terminates the message.
NOTE: You can use the library only for Modbus master.
EIO0000000538 07/2014
129
System Libraries
Type
Range
Description
enable
CJ_BIT
0, 1
register
CJ_WORD
1...65535
slave
CJ_BYTE
0...247
num
CJ_BYTE
1...100
NOTE: The Modbus definition for register addresses starts the enumeration of addresses with 1
as the first address. Many IEC based devices start enumerating addresses with 0 as the first
address. Therefore, the function block subtracts 1 from the value provided in the register. For
example, to read from or write to address 100 in an IEC device, you must provide a value of 101
to the register.
Output Pin Description
Output
Type
Range
status
CJ_BYTE
0...5
Description
returns the master/slave communication status:
0 = free for a communication
1 = added a communication request in the queue
2 = communication in progress
3 = communication correctly completed
4 = communication not completed correctly (that is, NAK
reply or timeout)
5 = Modbus queue is full so communication cannot be
performed or invalid register requested (0)
value[100] CJ_WORD
130
0...65535
EIO0000000538 07/2014
System Libraries
ModbusMaster_Read10MultipleHoldingRegisters
Function Block Diagram
Functional Description
The ModbusMaster_Read10MultipleHoldingRegisters library allows you to read up to 10
holding register values of a slave node. This function initiates a Modbus function code 03 message.
To start the reading operation, set a rising edge to the enable input. Add the reading request for
the data present in the register of the slave node in the queue.
After the reading request is added in the queue, the library processes the message and analyzes
the answer by monitoring the status output.
When the value of the status output is 3, the slave response is positive and the values are stored
in the value[10] output. If the value of the status output is 4, the communication is
unsuccessful.
Setting enable to 0 frees the queue for the next transmission.
During the communication period, the enable input must be maintained to 1. Setting enable to
0 during the communication process terminates the message.
NOTE: You can use the library only for Modbus master.
EIO0000000538 07/2014
131
System Libraries
Type
Range
Description
enable
CJ_BIT
0, 1
register
CJ_WORD
1...65535
slave
CJ_BYTE
0...247
num
CJ_BYTE
1...10
NOTE: The Modbus definition for register addresses starts the enumeration of addresses with 1
as the first address. However, many IEC based devices start enumerating addresses with 0 as the
first address. Therefore, the function block subtracts 1 from the value provided in the register.
For example, if you want to read from or write to address 100 in an IEC device, you must provide
a value 101 to the register.
Output Pin Description
Output
Type
Range
status
CJ_BYTE
0...5
Description
returns the master/slave communication status:
0 = free for a communication
1 = added a communication request in the queue
2 = communication in progress
3 = communication correctly completed
4 = communication not completed correctly (that is, NAK
reply or timeout)
5 = Modbus queue is full so communication cannot be
performed or invalid register requested (0)
value[10]
132
CJ_WORD
0...65535
EIO0000000538 07/2014
System Libraries
ModbusMaster_Read10MultipleInputRegisters
Function Block Diagram
Functional Description
The ModbusMaster_Read10MultipleInputRegisters library allows you to read up to 10
input register values of a slave node. This function initiates a Modbus function code 04 message.
To start the reading operation, set a rising edge to the enable input. Add the reading request for
the data present in the register of the slave node in the queue.
After the reading request is added in the queue, the library processes the message and analyzes
the answer by monitoring the status output.
When the value of the status output is 3, the slave response is positive. The values are stored in
the value output. If the value of the status output is 4, the communication is unsuccessful.
Setting enable to 0 frees the queue for the next transmission.
During the communication period, the enable input must be maintained to 1.
Setting enable to 0 during the communication process terminates the message.
NOTE: You can use the library only for Modbus master.
EIO0000000538 07/2014
133
System Libraries
Type
Range
Description
enable
CJ_BIT
0, 1
register
CJ_WORD
1...65535
slave
CJ_BYTE
0...247
num
CJ_BYTE
1...10
NOTE: The Modbus definition for register addresses starts the enumeration of addresses with 1
as the first address. Many IEC based devices start enumerating addresses with 0 as the first
address. Therefore, the function block subtracts 1 from the value provided in the register. For
example, if you want to read from or write to address 100 in an IEC device, you must provide a
value of 101 to the register.
Output Pin Description
Output
Type
Range
status
CJ_BYTE
0...5
Description
returns the master/slave communication status:
0 = free for a communication
1 = added a communication request in the queue
2 = communication in progress
3 = communication correctly completed
4 = communication not completed correctly (that is, NAK
reply or timeout)
5 = Modbus queue is full so communication cannot be
performed or invalid register requested (0)
value[10]
134
CJ_WORD
0...65535
EIO0000000538 07/2014
System Libraries
ModbusMaster_ReadSingleHoldingRegister
Function Block Diagram
Functional Description
The ModbusMaster_ReadSingleHoldingRegister library allows to read a holding register
value of a slave node. This function initiates a Modbus function code 03 message.
To start the reading operation, set a rising edge to the enable input. The reading request of the
data present in the register of slave node will be added in the queue.
Once added in the queue, the message will be processed and the answer will be analyzed
monitoring the status output.
When the status output has the value 3, the slave response will be positive and the value will be
in the value output. If the status output has the value 4, the communication was unsuccessful.
Setting enable to 0 frees the queue for the next transmission.
During all the communication period, the enable input must be maintained to 1. Setting enable to
0 during the communication process will terminate the message.
NOTE: The library can be used only for Modbus master.
Input Pin Description
Input
Type
Range
Description
enable
CJ_BIT
0, 1
register
CJ_WORD
1...65535
slave
CJ_BYTE
0...247
NOTE: The Modbus definition for register addresses starts the enumeration of addresses with 1
as the first address. However, many IEC based devices start enumerating addresses with 0 as the
first address. Therefore, the function block subtracts 1 from the value provided in the register.
For example, to read from or write to address 100 in an IEC device, you must provide a value of
101 to the register.
EIO0000000538 07/2014
135
System Libraries
Type
Range
status
CJ_BYTE
0...5
Description
returns the master/slave communication status:
0 = free for a communication
1 = added a communication request in the queue
2 = communication is in progress
3 = communication completed correctly
4 = communication not completed correctly (that is, NAK
reply or timeout)
5 = Modbus queue is full so communication cannot be
performed or invalid register requested (0)
value
136
CJ_WORD
0...65535
read value
EIO0000000538 07/2014
System Libraries
ModbusMaster_ReadSingleInputRegister
Function Block Diagram
Functional Description
The ModbusMaster_ReadSingleInputRegister library allows to read an allows to read an
input register value of a slave node. This function initiates a Modbus function code 04 message.
To start the reading operation, set a rising edge to the enable input. The reading request of the
data present in the register of slave node will be added in the queue.
Once added in the queue, the message will be processed and the answer will be analyzed
monitoring the status output.
When the status output has the value 3, the slave response is positive. The value will be in the
value output. If the status output has the value 4, the communication was unsuccessful.
Setting enable to 0 frees the queue for the next transmission.
During the entire communication period, the enable input must be maintained to 1.
Setting enable to 0 during the communication process will terminate the message.
NOTE: The library can be used only for Modbus master.
Input Pin Description
Input
Type
Range
Description
enable
CJ_BIT
0, 1
register
CJ_WORD
1...65535
slave
CJ_BYTE
0...247
NOTE: The Modbus definition for register addresses starts the enumeration of addresses with 1
as the first address. Many IEC based devices start enumerating addresses with 0 as the first
address. Therefore, the function block subtracts 1 from the value provided in the register. For
example, to read from or write to address 100 in an IEC device, you must provide a value of 101
to the register.
EIO0000000538 07/2014
137
System Libraries
Type
Range
status
CJ_BYTE
0...5
Description
returns the master/slave communication status:
0 = free for a communication
1 = added a communication request in the queue
2 = communication in progress
3 = communication correctly completed
4 = communication not completed correctly (that is, NAK
reply or timeout)
5 = Modbus queue is full so communication cannot be
performed or invalid register requested (0)
value
138
CJ_WORD
0...65535
read value
EIO0000000538 07/2014
System Libraries
ModbusMaster_ReadSingleCoilStatus
Function Block Diagram
Functional Description
The ModbusMaster_ReadSingleCoilStatus library allows you to read a single coil status
register value of a slave node. This function initiates a Modbus function code 01 message.
To start the reading operation, set a rising edge to the enable input. The reading request of the
data present in the coil status register of slave node is added in the queue.
After it is added in the queue, the message gets processed and the answer is analyzed after
monitoring the status output.
When the status output value is 3, the slave response is positive and the value gets stored in
the Value output. If the status output value is 4, the communication is unsuccessful.
Setting enable to 0 frees the queue for the next transmission.
During the entire communication period, the enable input must be maintained to 1.
Setting enable to 0 during the communication process will terminate the message.
NOTE: The library is used only for Modbus master.
EIO0000000538 07/2014
139
System Libraries
Type
Range
Description
enable
CJ_BIT
0, 1
coil
CJ_WORD
1...65535
slave
CJ_BYTE
0...255
NOTE: The Modbus definition for register addresses start the enumeration of addresses with 1 as
the first address. However, many IEC based devices start enumerating addresses with 0 as the
first address. Therefore, the function block subtracts 1 from the value provided in the register. For
example, to read from or write to address 100 in an IEC device, you must provide a value of 101
to the register.
Output Pin Description
Output
Type
Range
status
CJ_BYTE
0...5
Description
returns the master/slave communication status:
0 = free for a communication
1 = added a communication request in the queue
2 = communication is in progress
3 = communication correctly completed
4 = communication is not correctly completed (that is, NAK
reply or timeout)
5 = Modbus queue is full so communication cannot be
performed or invalid register requested (0)
value
140
CJ_WORD
0...65535
read value
EIO0000000538 07/2014
System Libraries
ModbusMaster_ReadSingleInputStatus
Functional Block Diagram
Functional Description
The ModbusMaster_ReadSingleInputStatus library allows reading of a single input status
register value of a slave node. This function initiates a Modbus function code 02 message.
To start the reading operation, set a rising edge to the enable input. The reading request of the
data present in the input status register of slave node will be added in the queue.
Once added in the queue, the message will be processed and the answer will be analyzed
monitoring the status output.
When the status output has the value 3, the slave response will be positive and the value will be
in the value output. If the status output has the value 4, the communication was unsuccessful.
Setting enable to 0 frees the queue for the next transmission.
During all the communication period, the enable input must be maintained to 1.
Setting enable to 0 during the communication process will terminate the message.
NOTE: The library can be used only for Modbus master.
EIO0000000538 07/2014
141
System Libraries
Type
Range
Description
enable
CJ_BIT
0, 1
input
CJ_WORD
1...65535
slave
CJ_BYTE
0...255
NOTE: The Modbus definition for register addresses start the enumeration of addresses with 1 as
the first address. However, many IEC-based devices start enumerating addresses with 0 as the
first address. Therefore, the function block subtracts 1 from the value provided in the register.
For example, to read from or write to address 100 in an IEC device, you must provide a value of
101 to the register.
Output Pin Description
Output
Type
Range
status
CJ_BYTE
0...5
Description
Returns the master/slave communication status:
0 = free for a communication
1 = added a communication request in the queue
2 = communication is in progress
3 = communication correctly completed
4 = communication is not correctly completed (that is, NAK
reply or timeout)
5 = Modbus queue is full so communication cannot be
performed or invalid register requested (0)
value
142
CJ_WORD
065535
read value
EIO0000000538 07/2014
System Libraries
ModbusMaster_Timeout
Function Block Diagram
Functional Description
The ModbusMaster_Timeout library sets the timeout of the response during a communication
with the slave.
After the expiration of this timeout, if there is no answer from the slave, the master sets a
communication detected error and can start another communication process.
To set the value, adjust the value property of the P_ModBusMaster_Timeout parameter in the
library. To understand how to change a parameter value, refer to the SoHVAC Software User
Manual.
Default value is 1s.
This is a template type library.
Type
Range
Default value
Unit
Description
in
CJ_BYTE
2...240
10
0.1s
EIO0000000538 07/2014
143
System Libraries
144
Output
Type
Range
Unit
Description
out
CJ_BYTE
2...240
0.1s
EIO0000000538 07/2014
System Libraries
ModbusMaster_Write100MultipleHoldingRegisters
Function Block Diagram
Functional Description
The ModbusMaster_Write100MultipleHoldingRegisters library allows you to write up to
100 holding register values of a slave node. This function initiates a Modbus function code 10
message.
To start the writing operation, set a rising edge to the enable input.
Add the writing request for the data in the value input in the queue.
After the writing request is added in the queue, the library processes the message and analyzes
the answer by monitoring the status output.
When the value of the status output is 3, the slave response is positive. If the value of the
status output is 4, communication is unsuccessful.
Setting enable to 0 frees the queue for the next transmission.
During the communication period, the enable input must be maintained to 1.
NOTE: You can use the library only for Modbus master.
EIO0000000538 07/2014
145
System Libraries
Type
Range
Description
enable
CJ_BIT
0, 1
register
CJ_WORD
1...65535
slave
CJ_BYTE
0...247
value[100]
CJ_WORD
0...65535
num
CJ_BYTE
1...100
NOTE: The Modbus definition for register addresses starts the enumeration of addresses with 1
as the first address. However, many IEC based devices start enumerating addresses with 0 as the
first address. Therefore, the function block subtracts 1 from the value provided in the register.
For example, if you want to read from or write to address 100 in an IEC device, you must provide
a value of 101 to the register.
Output Pin Description
Output
Type
Range
status
CJ_BYTE
0...5
Description
returns the master/slave communication status:
0 = free for a communication
1 = added a communication request in the
queue
2 = communication is in progress
3 = communication correctly completed
4 = communication is not correctly
146
EIO0000000538 07/2014
System Libraries
ModbusMaster_Write10MultipleHoldingRegisters
Function Block Diagram
Functional Description
The ModbusMaster_Write10MultipleHoldingRegisters library allows you to write up to
10 holding register values of a slave node. This function initiates a Modbus function code 10
message.
To start the writing operation, set a rising edge to the enable input.
Add the writing request for the data in the value input in the queue.
After the writing request is added in the queue, the library processes the message and analyzes
the answer by monitoring the status output.
When the value of the status output is 3, the slave response is positive. If the value of the
status output is 4, communication is unsuccessful.
Setting enable to 0 frees the queue for the next transmission.
During the communication period, the enable input must be maintained to 1.
NOTE: You can use the library only for Modbus master.
EIO0000000538 07/2014
147
System Libraries
Type
Range
Description
enable
CJ_BIT
0, 1
register
CJ_WORD
1...65535
slave
CJ_BYTE
0...247
value[10]
CJ_WORD
0...65535
num
CJ_BYTE
1...10
NOTE: The Modbus definition for register addresses starts the enumeration of addresses with 1
as the first address. However, many IEC based devices start enumerating addresses with 0 as the
first address. Therefore, the function block subtracts 1 from the value provided in the register.
For example, if you want to read from or write to address 100 in an IEC device, you must provide
a value of 101 to the register.
Output Pin Description
148
Output
Type
Range
Description
status
CJ_BYTE
0...5
EIO0000000538 07/2014
System Libraries
ModbusMaster_WriteSingleHoldingRegister
Function Block Diagram
Functional Description
The ModbusMaster_WriteSingleHoldingRegister library allows to write a value in a
holding register of a slave node. This function initiates a Modbus function code 06 message.
To start the writing operation, set a rising edge to the enable input.
The writing request of the data in the value input will be added in the queue.
Once added in the queue, the message will be processed and the answer will be analyzed
monitoring the status output.
When the status output has the value 3, the slave response is positive. If the status output has
the value 4, communication was unsuccessful.
Setting enable to 0 frees the queue for the next transmission.
During the entire communication period, the enable input must be maintained to 1.
NOTE: The library can be used only for Modbus master.
EIO0000000538 07/2014
149
System Libraries
Type
Range
Description
enable
CJ_BIT
0, 1
register
CJ_WORD
1...65535
slave
CJ_BYTE
0...247
value
CJ_WORD
0...65535
NOTE: The Modbus definition for register addresses starts the enumeration of addresses with 1
as the first address. However, many IEC based devices start enumerating addresses with 0 as the
first address. Therefore, the function block subtracts 1 from the value provided in the register.
For example, to read from or write to address 100 in an IEC device, you must provide a value of
101 to the register.
Output Pin Description
Output
Type
Range
status
CJ_BYTE
0...5
Description
returns the master/slave communication status:
0 = free for a communication
1 = added a communication request in the queue
2 = communication is in progress
3 = communication correctly completed
4 = communication is not correctly completed (that is, NAK
reply or timeout)
5 = Modbus queue is full so communication cannot be
performed or invalid register requested (0)
150
EIO0000000538 07/2014
System Libraries
ModbusMaster_WriteSingleCoilStatus
Functional Block Diagram
Functional Description
The ModbusMaster_WriteSingleCoilStatus library allows writing of a single coil status
register value of a slave node. This function initiates a Modbus function code 05 message.
To start the writing operation, set a rising edge to the enable input. The writing request of the data
in the value input will be added in the queue.
Once added in the queue, the message will be processed and the answer will be analyzed
monitoring the status output.
When the status output has the value 3, the slave response is positive. If the status output
has the value 4, the communication was unsuccessful.
Setting enable to 0 frees the queue for the next transmission.
During all the communication period, the enable input must be maintained to 1.
Setting enable to 0 during the communication process will terminate the message.
NOTE: The library can be used only for Modbus master.
EIO0000000538 07/2014
151
System Libraries
Type
Range
Description
enable
CJ_BIT
0, 1
coil
CJ_WORD
1...65535
slave
CJ_BYTE
0...255
value
CJ_WORD
1...65535
NOTE: The Modbus definition for register addresses start the enumeration of addresses with 1 as
the first address. However, many IEC-based devices start enumerating addresses with 0 as the
first address. Therefore, the function block subtracts 1 from the value provided in the register.
For example, to read from or write to address 100 in an IEC device, you must provide a value of
101 to the register.
Output Pin Description
Output
Type
Range
status
CJ_BYTE
0...5
Description
Returns the master/slave communication status:
0 = free for a communication
1 = added a communication request in the queue
2 = communication is in progress
3 = communication correctly completed
4 = communication is not correctly completed (that is, NAK
reply or timeout)
5 = Modbus queue is full so communication cannot be
performed or invalid register requested (0)
152
EIO0000000538 07/2014
System Libraries
Section 2.12
ModbusTCP Libraries
ModbusTCP Libraries
Overview
This section describes the Modbus TCP libraries which are used for Modbus TCP configuration by
the application program. These libraries are used with a controller that includes a Modbus TCP
communication module.
What Is in This Section?
This section contains the following topics:
Topic
Page
ModbusTCP_Address
154
ModbusTCP_Gateway
155
ModbusIP_IPConfiguration
156
ModbusTCP_SubnetMask
158
ModbusTCP_Port1_AutoNegociation
159
ModbusTCP_Port1_DuplexMode
160
ModbusTCP_Port1_Speed
161
ModbusTCP_Port2_AutoNegociation
162
ModbusTCP_Port2_DuplexMode
163
ModbusTCP_Port2_Speed
164
ModbusTCP_SNMPAuthenticationTrap
165
ModbusTCP_SNMPColdStartTrap
166
ModbusTCP_SNMPLinkDownTrap
167
ModbusTCP_SNMPLinkUpTrap
168
ModbusTCP_SNMPManager1
169
ModbusTCP_SNMPManager2
170
EIO0000000538 07/2014
153
System Libraries
ModbusTCP_Address
Function Block Diagram
Functional Description
The ModbusTCP_Address library configures the IP address of a M168 controller on the Modbus
TCP network.
To set the value, adjust the value property of the P_ModbusTCP_Address parameter present in
the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
Description
in
CJ_IP_Address
0.0.0.0
...
255.255.255.255
192.168.2.44
154
Output
Type
Range
Description
out
CJ_IP_Address
0.0.0.0
...
255.255.255.255
EIO0000000538 07/2014
System Libraries
ModbusTCP_Gateway
Function Block Diagram
Functional Description
The ModbusTCP_Gateway library configures the gateway IP address of a M168 controller on the
Modbus TCP network.
To set the value, adjust the value property of the P_ModbusTCP_Gateway parameter present in
the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
Description
in
CJ_IP_Address
0.0.0.0
...
255.255.255.255
192.168.2.1
Type
Range
Description
out
CJ_IP_Address
0.0.0.0
...
255.255.255.255
EIO0000000538 07/2014
155
System Libraries
ModbusIP_IPConfiguration
Function Block Diagram
Functional Description
The ModbusTCP_IPConfiguration library configures the IP address the method for IP
configuration dynamic host configuration protocol (DHCP), BootServer (BootP) or fixed IP, of the
M168 controller on the ModbusTCP network.
To set the value, adjust the value property of the ModbusTCP_IPConfiguration parameter
present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
156
Input
Type
Range
Default value
Description
in
CJ_BYTE
0...2
EIO0000000538 07/2014
System Libraries
Type
Range
Description
out
CJ_BYTE
0...2
EIO0000000538 07/2014
157
System Libraries
ModbusTCP_SubnetMask
Function Block Diagram
Functional Description
The ModbusTCP_SubnetMask library configures the gateway subnet mask of the M168 controller
on the Modbus TCP network.
To set the value, adjust the value property of the P_ModbusTCP_SubnetMask parameter
present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
Description
in
CJ_IP_Address
0.0.0.0
...
255.255.255.255
255.255.255.0
158
Output
Type
Range
Description
out
CJ_IP_Address
0.0.0.0
...
255.255.255.255
EIO0000000538 07/2014
System Libraries
ModbusTCP_Port1_AutoNegociation
Function Block Diagram
Functional Description
The ModbusTCP_Port1AutoNegociation library enables the auto negotiation of Modbus TCP
port 1 of the M168 controller on the Modbus TCP network.
To set the value, adjust the value property of the P_ModbusTCP_Port1AutoNegociation
parameter present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
Description
in
CJ_BIT
0...1
Type
Range
Description
out
CJ_BIT
0...1
EIO0000000538 07/2014
159
System Libraries
ModbusTCP_Port1_DuplexMode
Function Block Diagram
Functional Description
The ModbusTCP_Port1_DuplexMode library configures the duplex mode of Modbus TCP port 1
of the M168 controller on the Modbus TCP network.
To set the value, adjust the value property of the P_ModbusTCP_Port1_DuplexMode
parameter present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
Description
in
CJ_BYTe
0...2
160
Output
Type
Range
Description
out
CJ_BYTE
0...2
EIO0000000538 07/2014
System Libraries
ModbusTCP_Port1_Speed
Function Block Diagram
Functional Description
The ModbusTCP_Port1_Speed library configures the speed of Modbus TCP Port 1 of the M168
controller on the Mosbus TCP network.
To set the value, adjust the value property of the P_ModbusTCP_Port1_Speed parameter
present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
Description
in
CJ_BYTE
0...2
Type
Range
Description
out
CJ_BYTE
0...2
EIO0000000538 07/2014
161
System Libraries
ModbusTCP_Port2_AutoNegociation
Function Block Diagram
Functional Description
The ModbusTCP_Port2_AutoNegociation library enables the auto negotiation of Modbus
TCP Port 2 of the M168 controller on the Modbus TCP network.
To set the value, adjust the value property of the P_ModbusTCP_Port2_AutoNegociation
parameter present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
Description
in
CJ_BIT
0...1
162
Output
Type
Range
Description
out
CJ_BIT
0...1
EIO0000000538 07/2014
System Libraries
ModbusTCP_Port2_DuplexMode
Function Block Diagram
Functional Description
The ModbusTCP_Port2_DuplexMode library configures the duplex mode of Modbus TCP port 2
of the M168 controller on the Modbus TCP network.
To set the value, adjust the value property of the P_ModbusTCP_Port2_DuplexMode
parameter present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
Description
in
CJ_BYTe
0...2
Type
Range
Description
out
CJ_BYTE
0...2
EIO0000000538 07/2014
163
System Libraries
ModbusTCP_Port2_Speed
Function Block Diagram
Functional Description
The ModbusTCP_Port2_Speed library configures the speed of Modbus TCP Port 2 of the M168
controller on the Modbus TCP network.
To set the value, adjust the value property of the P_ModbusTCP_Port2_Speed parameter
present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
Description
in
CJ_BYTE
0...2
164
Output
Type
Range
Description
out
CJ_BYTE
0...2
EIO0000000538 07/2014
System Libraries
ModbusTCP_SNMPAuthenticationTrap
Function Block Diagram
Functional Description
The ModbusTCP_SNMPAuthenticationTrap library enables the SNMP authentication trap of
the M168 controller on the Modbus IP network.
To set the value, adjust the value property of the P_ModbusTCP_SNMPAuthentication
parameter present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
Description
in
CJ_BIT
0...1
Type
Range
Description
out
CJ_BIT
0...1
EIO0000000538 07/2014
165
System Libraries
ModbusTCP_SNMPColdStartTrap
Function Block Diagram
Functional Description
The ModbusTCP_SNMPColdStartTrap library enables the SNMP cold start trap of the M168
controller on the Modbus TCP network.
To set the value, adjust the value property of the P_ModbusTCP_SNMPColdStartTrap
parameter present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
Description
in
CJ_BIT
0...1
166
Output
Type
Range
Description
out
CJ_BIT
0...1
EIO0000000538 07/2014
System Libraries
ModbusTCP_SNMPLinkDownTrap
Function Block Diagram
Functional Description
The ModbusTCP_SNMPLinkDownTrap library enables the SNMP link down trap of the M168
controller on the BACnet IP network.
To set the value, adjust the value property of the P_ModbusTCP_SNMPLinkDownTrap
parameter present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
Description
in
CJ_BIT
0...1
Type
Range
Description
out
CJ_BIT
0...1
EIO0000000538 07/2014
167
System Libraries
ModbusTCP_SNMPLinkUpTrap
Function Block Diagram
Functional Description
The ModbusTCP_SNMPLinkUpTrap library enables the SNMP link up trap of the M168 controller
on the Modbus TCP network.
To set the value, adjust the value property of the P_ModbusTCP_SNMPLinkUpTrap parameter
present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
Description
in
CJ_BIT
0...1
168
Output
Type
Range
Description
out
CJ_BIT
0...1
EIO0000000538 07/2014
System Libraries
ModbusTCP_SNMPManager1
Function Block Diagram
Functional Description
The ModbusTCP_SNMPManager1 library configures the IP address of SNMP manager 1 of the
M168 controller on the BACnet IP network.
To set the value, adjust the value property of the P_ModbusTCP_SNMPManager1 parameter
present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
Description
in
CJ_IP_Address
0.0.0.0
...
255.255.255.255
192.168.2.1
Type
Range
Description
out
CJ_IP_Address
0.0.0.0
...
255.255.255.255
EIO0000000538 07/2014
169
System Libraries
ModbusTCP_SNMPManager2
Function Block Diagram
Functional Description
The ModbusTCP_SNMPManager2 library configures the IP address of SNMP manager 1 of the
M168 controller on the Modbus TCP network
To set the value, adjust the value property of the P_ModbusTCP_SNMPManager2 parameter
present in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Guide.
This is a template type library.
Type
Range
Default value
Description
in
CJ_IP_Address
0.0.0.0
...
255.255.255.255
192.168.2.2
170
Output
Type
Range
Description
out
CJ_IP_Address
0.0.0.0
...
255.255.255.255
EIO0000000538 07/2014
System Libraries
Section 2.13
Password Libraries
Password Libraries
Overview
This section describes the password libraries.
What Is in This Section?
This section contains the following topics:
Topic
Page
EnablePrgLevel
172
PasswordIndependent
174
PasswordTimeout
176
PasswordLevel1 - PasswordLevel5
177
EnableLevel1 - EnableLevel5
179
EIO0000000538 07/2014
171
System Libraries
EnablePrgLevel
Function Block Diagram
Functional Description
The EnablePrgLevel library allows automatically enabling the request to send the first page of
levels 1-5, whenever the relevant command is intercepted (see the command list in the SOHVAC
software manual).
Some of these commands are associated with specific terminal key combinations:
pressing and holding the ENTER key for approximately 3 seconds: PrgLevel 1 command
pressing and holding the ENTER+ESC keys for approximately 3 seconds: PrgLevel 2
command
pressing and holding the LEFT+RIGHT keys for approximately 3 seconds: PrgLevel 3
command
If 1, then by using a combination of the above mentioned keys, it is possible to access the first
page of levels 1-3. If 0, then this mode is deactivated.
To set the value, adjust the value property of the Enable_PrgLevel parameter in the library.
To understand how to change a parameter value, refer to the SoHVAC Software User Manual.
172
EIO0000000538 07/2014
System Libraries
Type
Range
Default value
Description
in
CJ_BIT
0, 1
Type
Range
Description
out
CJ_BIT
0, 1
EIO0000000538 07/2014
173
System Libraries
PasswordIndependent
Function Block Diagram
Functional Description
The PasswordIndependent library permits management of the page level passwords, either
independently or hierarchically (higher level passwords also have access to lower levels).
0 hierarchical
1 independent
To set the value, adjust the value property of the Password_Independent parameter in the
library. To understand how to change a parameter value, refer to the SoHVAC Software User
Manual.
This is a template type library.
174
Input
Type
Range
Default value
Description
in
CJ_BIT
0, 1
EIO0000000538 07/2014
System Libraries
Type
Range
Description
out
CJ_BIT
0, 1
EIO0000000538 07/2014
175
System Libraries
PasswordTimeout
Function Block Diagram
Functional Description
The PasswordTimeout library permits setting/returning the number of seconds of keyboard
inactivity after which entering the password once more will be required to gain access to the
various levels of the system.
This is a template type library.
Type
Range
Default value
Description
in
CJ_BYTE
0...240
60
176
Output
Type
Range
Description
out
CJ_BYTE
0...240
System Libraries
PasswordLevel1 - PasswordLevel5
Function Block Diagram
Functional Description
The PasswordLeveln libraries permit reading and writing the passwords of the various levels of
protection.
Each password can have values within the range established by the CJ_SHORT data type (from 32768 to 32767). The value 0 corresponds to no protection for that level.
To set the password value for each level, adjust the value property of the PasswordLeveln
parameter in the library. To understand how to change a parameter value, refer to the SoHVAC
Software User Manual.
This is a template type library.
Type
Range
Default value
Description
in
CJ_SHORT
-32768...32767
EIO0000000538 07/2014
177
System Libraries
178
Output
Type
Range
Description
out
CJ_SHORT
-32768...32767
EIO0000000538 07/2014
System Libraries
EnableLevel1 - EnableLevel5
Function Block Diagram
Functional Description
The EnableLeveln libraries permit to set the enabling status in relation to the various levels of
protection.
To set the password value for each level, adjust the value property of the Enable_Leveln
parameter in the library.
If 1, then the level is accessible (optionally password protected). If 0, then the level is not
accessible.
To understand how to change a parameter value, refer to the SoHVAC Software User Manual.
This is a template type library.
Type
Range
Default value
Description
in
CJ_BIT
0, 1
Type
Range
Description
out
CJ_BIT
0, 1
EIO0000000538 07/2014
179
System Libraries
Section 2.14
System Libraries
System Libraries
Overview
This section describes the system libraries.
What Is in This Section?
This section contains the following topics:
Topic
180
Page
InfoMaskNum
181
InfoMaskRev
182
InfoMaskVer
183
InfoProjNum
184
InfoProjRev
185
InfoProjVer
186
E2_GetStatus
187
RTC_GetStatus
188
LCDBacklight
189
Language
190
Reset
192
Mathematical_Errors
193
MemoryStackError
195
Mathematical_Errors_Reset
196
Hardware_Errors
197
Hardware_Values
199
EIO0000000538 07/2014
System Libraries
InfoMaskNum
Function Block Diagram
Functional Description
The InfoMaskNum library has the purpose of returning the firmware code of the hardware being
used.
Output Pin Description
Output
Type
Range
Description
out
CJ_WORD
0...65535
EIO0000000538 07/2014
181
System Libraries
InfoMaskRev
Function Block Diagram
Functional Description
The InfoMaskRev library has the purpose of returning the firmware revision number of the
hardware being used.
Output Pin Description
182
Output
Type
Range
Description
out
CJ_WORD
0...65535
EIO0000000538 07/2014
System Libraries
InfoMaskVer
Function Block Diagram
Functional Description
The InfoMaskVer library has the purpose of returning the firmware version of the hardware being
used.
Output Pin Description
Output
Type
Range
Description
out
CJ_WORD
0...65535
EIO0000000538 07/2014
183
System Libraries
InfoProjNum
Function Block Diagram
Functional Description
The InfoProjNum library has the purpose of returning the number assigned to the current project.
Output Pin Description
184
Output
Type
Range
Description
out
CJ_WORD
0...65535
EIO0000000538 07/2014
System Libraries
InfoProjRev
Function Block Diagram
Functional Description
The InfoProjRev library has the purpose of returning the revision number of the current project.
Output Pin Description
Output
Type
Range
Description
out
CJ_WORD
0...65535
EIO0000000538 07/2014
185
System Libraries
InfoProjVer
Function Block Diagram
Functional Description
The InfoProjVer library has the purpose of returning the version of the current project.
Output Pin Description
186
Output
Type
Range
Description
out
CJ_WORD
0...65535
EIO0000000538 07/2014
System Libraries
E2_GetStatus
Function Block Diagram
Functional Description
The E2_GetStatus library has the purpose of returning a code representing the status of the
controller retained memory at the time the request is made.
The codes returned are as follows:
0 CJ_E2_OK. Operating correctly.
1 CJ_E2_READ_ERROR. An E2 access error has been detected.
2 CJ_E2_WRITE_ERROR. An E2 write error has been detected.
3 CJ_E2_CRC_ERROR. Inconsistent data in the memory.
Output Pin Description
Output
Type
Range
Description
out
CJ_SHORT
0...3
EIO0000000538 07/2014
187
System Libraries
RTC_GetStatus
Function Block Diagram
Functional Description
The RTC_GetStatus library has the purpose of returning a code representing the status of the
controller RTC at the time the request is made.
The codes returned are as follows:
0 CJ_RTC_OK. Operating correctly.
1 CJ_RTC_READ_ERROR. A RTC access read error has been detected.
2 CJ_RTC_LOW_VOLTAGE. The RTC chip has passed the minimum threshold voltage
necessary for maintaining information. The data present may no longer be valid.
3 RTC Disabled. The RTC clock is disabled as the default factory setting after production to
increase backup battery life time. To enable the RTC, you must enter the time and date of the
RTC.
NOTE: To reset the RTC_GetStatus code to 0, you must reenter the time and date of the RTC.
Output Pin Description
188
Output
Type
Range
Description
out
CJ_SHORT
0...3
EIO0000000538 07/2014
System Libraries
LCDBacklight
Function Block Diagram
Functional Description
The LCDBacklight library allows you to set the backlight mode of the M168 controller build in
display.
To set the value, adjust the value property of the P_LCDBacklight parameter present in the
library.
To understand how to change a parameter value, refer to the SoHVAC Software User Manual.
Type
Range
Default
Value
Description
in
CJ_BYTE
0...2
0 = Off
1 = On
2 = Time
Type
Range
Description
out
CJ_BYTE
0...2
0 = Off
1 = On
2 = Time
EIO0000000538 07/2014
189
System Libraries
Language
Function Block Diagram
Functional Description
The Language library allows altering the system language.
The language identifiers are associated as follows:
0 English
1 Italian
2 French
3 Spanish
4 German
5 Russian
6 Portuguese
7...255 reserved
The system displays the EIML page matching required ID and selected language. If the page with
selected language does not exist, the system selects with correct ID with another language
defined.
This is a template type library.
190
Input
Type
Range
Default value
Description
in
CJ_BYTE
0...255
EIO0000000538 07/2014
System Libraries
Type
Range
Description
out
CJ_BYTE
0...255
EIO0000000538 07/2014
191
System Libraries
Reset
Function Block Diagram
Functional Description
The Reset library permits performing actions on the reset status of the system. This state is an
initial stage which the system processes prior to initiating the entire application.
This function allows performing specific process after reset.
Output Pin Description
192
Output
Type
Range
Description
Reset_Q
CJ_BIT
0, 1
EIO0000000538 07/2014
System Libraries
Mathematical_Errors
Function Block Diagram
Functional Description
The outputs of the MathErrors library raises to 1 on detection of errors during mathematical
calculations within mathematical function blocks.
Output Pin Description
Output
Type
Range
Description
Overflow_err
CJ_BIT
0, 1
0 No error detected
1 Overflow error detected
Underflow_err
CJ_BIT
0, 1
0 No error detected
1 Underflow error detected
DivByZero_err
CJ_BIT
0, 1
0 No error detected
1 Division by zero error detected
NaN_err
CJ_BIT
0, 1
0 No error detected
1 Invalid number detected
Example: Square root of a negative value.
Math_err
CJ_BIT
0, 1
0 No error detected
1 Mathematical error detected. This output is an OR function
of the first 4 outputs.
EIO0000000538 07/2014
193
System Libraries
NOTE: Some of the mathematical errors detected by this function could have significant impact on
the execution of your application. It is your responsibility to monitor for these potential errors, and
to program instructions to appropriately control the execution of your application should one or
more of these errors occur. The impact of any of these errors depends upon configuration,
equipment used, and the program instructions executed prior to and after detection of the potential
error or errors.
WARNING
UNINTENDED EQUIPMENT OPERATION
Always use the Mathematical_Errors function block to monitor your equipment.
Failure to follow these instructions can result in death, serious injury, or equipment
damage.
194
EIO0000000538 07/2014
System Libraries
MemoryStackError
Function Block Diagram
Functional Description
The MemoryStackError library reports stack overflow errors (that is stack overflow).
Output Pin Description
Output
Type
Range
Description
Stack_err
CJ_BIT
0, 1
0 No error detected
1 Memory stack error detected
EIO0000000538 07/2014
195
System Libraries
Mathematical_Errors_Reset
Function Block Diagram
Functional Description
The inputs of this function reset the mathematical errors.
Output Pin Description
Output
Type
Range
Description
Overflow
CJ_BIT
0, 1
Underflow
CJ_BIT
0, 1
DivByZero
CJ_BIT
0, 1
NaN
CJ_BIT
0, 1
Math
CJ_BIT
0, 1
196
EIO0000000538 07/2014
System Libraries
Hardware_Errors
Function Block Diagram
Functional Description
The outputs of this function indicate the status or errors detected of some M168 hardware
components:
PowerSupplyErr linked to the module input power supply
5voltAnaErr and 24voltAnaErr linked to the analog inputs auxiliary power supply to sensors
24voltBusErr linked to the expansion bus auxiliary power supply to display
RTC_Status and E2_Status linked to Real Time Clock and non-volatile memory components
Output Pin Description
Output
Type
Range
Description
PowerSupplyErr
CJ_BIT
0, 1
0 No error detected
1 Detection of power supply input out of the range. Some
equipment, relays for example, may become
inoperative.
5voltAnaErr
CJ_BIT
0, 1
0 No error detected
1 Analog Input 5V-S auxiliary supply detected out of the
range. Check if current consumption is in the specified
range.
24voltAnaErr
CJ_BIT
0, 1
0 No error detected
1 Analog Input 24V-S auxiliary supply detected out of the
range. Verify if current consumption is in the specified
range.
EIO0000000538 07/2014
197
System Libraries
Output
Type
Range
Description
24voltBusErr
CJ_BIT
0, 1
0 No error detected
1 Expansion Bus 24V-S auxiliary supply detected out of
the range. Verify if current consumption is in the
specified range.
RTC_Status
CJ_SHORT
0...3
E2_Status
CJ_SHORT
0...2
NOTE: Some of the hardware errors detected by this function could have significant impact on the
execution of your application. It is your responsibility to monitor for these potential errors, and to
program instructions to appropriately control the execution of your application should one or more
of these errors occur. The impact of any of these errors depends upon configuration, equipment
used, and the program instructions executed prior to and after detection of the potential error or
errors.
WARNING
UNINTENDED EQUIPMENT OPERATION
Always use the Hardware_Errors function block to monitor your equipment.
Failure to follow these instructions can result in death, serious injury, or equipment
damage.
198
EIO0000000538 07/2014
System Libraries
Hardware_Values
Function Block Diagram
Functional Description
The Hardware_Values library provides information about various power supply values: controller
power supply, 5 V sensor power supply, 24 V sensor power supply, 24 V expansion bus power
supply.
Output Pin Description
Output
Type
Range
Description
PowerSupplyVal
CJ_SHORT
-3276732768
5VoltAnaVal
CJ_SHORT
-3276732768
24VoltAnaVal
CJ_SHORT
-3276732768
24VoltBusVal
CJ_SHORT
-3276732768
EIO0000000538 07/2014
199
System Libraries
200
EIO0000000538 07/2014
SoHVAC
Standard Libraries
EIO0000000538 07/2014
Chapter 3
Standard Libraries
Standard Libraries
Overview
This chapter describes the standard libraries.
What Is in This Chapter?
This chapter contains the following sections:
Section
Topic
Page
3.1
Arithmetic Libraries
202
3.2
Bistable Libraries
220
3.3
227
3.4
Comparator Libraries
240
3.5
Conversion Libraries
251
3.6
Counter Libraries
282
3.7
289
3.8
Logic Libraries
292
3.9
Selection Libraries
311
3.10
Timer Libraries
333
3.11
Timing Libraries
340
EIO0000000538 07/2014
201
Standard Libraries
Section 3.1
Arithmetic Libraries
Arithmetic Libraries
Overview
This section describes the arithmetic libraries.
What Is in This Section?
This section contains the following topics:
Topic
202
Page
Arithmetic Libraries
203
ADD
204
ADD32
205
SUB
206
SUB32
207
MUL
208
MUL32
209
DIV
210
DIV32
211
MOD
212
MOD32
213
ABS
214
ABS32
215
SQRT
216
SQRT32
217
POW
218
POW32
219
EIO0000000538 07/2014
Standard Libraries
Arithmetic Libraries
Introduction
These libraries allow performing arithmetical operations between 16 and 32 bit operands.
It is important to highlight that functions are available for arithmetical operation overflow and
division by zero error checking and management.
The Mathematical_Errors function block allows to read the status of the mathematical error
bits.
There are two function blocks for reading and resetting detected mathematical errors:
Mathematical_Errors
Mathematical_Errors_Reset
The following functions allow to set the error bits. This is used for error detection in algorithms:
void CJ_Overflow_Error_Write(void)
void CJ_Underflow_Error_Write(void)
void CJ_DivByZero_Error_Write(void)
void CJ_NaN_Error_Write(void)
As is the case for any type of computer programming, it is the responsibility of the programmer to
write the code that prevents unwanted or unintended results from mathematical operations and
memory access operations. Further, the controllers are designed for maximum up-time and
performance, and will not halt on a variable operand or pointer that is invalid or otherwise out of
bounds. It is likewise the responsibility of the programmer to test the results of operations to
ascertain the validity of the assignment variable before taking further action on those results.
WARNING
UNINTENDED EQUIPMENT OPERATION
Failure to follow these instructions can result in death, serious injury, or equipment
damage.
EIO0000000538 07/2014
203
Standard Libraries
ADD
Function Block Diagram
Functional Description
The ADD library allows performing 16 bit addition operation.
Input Pin Description
Input
Type
Range
Description
in1
CJ_SHORT
-32768...32767
16 bit input
in2
CJ_SHORT
-32768...32767
16 bit input
204
Output
Type
Range
Description
out
CJ_SHORT
-32768...32767
EIO0000000538 07/2014
Standard Libraries
ADD32
Function Block Diagram
Functional Description
The ADD32 library allows performing 32 bit addition operation.
Input Pin Description
Input
Type
Range
Description
in1
CJ_LONG
-2147483648...2147483647
32 bit input
in2
CJ_LONG
-2147483648...2147483647
32 bit input
Type
Range
Description
out
CJ_LONG
-2147483648...2147483647
EIO0000000538 07/2014
205
Standard Libraries
SUB
Function Block Diagram
Functional Description
The SUB library allows performing 16 bit subtraction operation.
NOTE: Operation is performed using the following syntax: in1 - in2.
Input Pin Description
Input
Type
Range
Description
in1
CJ_SHORT
-32768...32767
16 bit input
in2
CJ_SHORT
-32768...32767
16 bit input
206
Output
Type
Range
Description
out
CJ_SHORT
-32768...32767
EIO0000000538 07/2014
Standard Libraries
SUB32
Function Block Diagram
Functional Description
The SUB32 library allows performing 32 bit subtraction operation.
NOTE: Operation is performed using the following syntax: in1 - in2.
Input Pin Description
Input
Type
Range
Description
in1
CJ_LONG
-2147483648...2147483647
32 bit input
in2
CJ_LONG
-2147483648...2147483647
32 bit input
Type
Range
Description
out
CJ_LONG
-2147483648...2147483647
EIO0000000538 07/2014
207
Standard Libraries
MUL
Function Block Diagram
Functional Description
The MUL library allows performing 16 bit multiplication operation.
Input Pin Description
Input
Type
Range
Description
in1
CJ_SHORT
-32768...32767
16 bit input
in2
CJ_SHORT
-32768...32767
16 bit input
208
Output
Type
Range
Description
out
CJ_SHORT
-32768...32767
EIO0000000538 07/2014
Standard Libraries
MUL32
Function Block Diagram
Functional Description
The MUL32 library allows performing 32 bit multiplication operation.
Input Pin Description
Input
Type
Range
Description
in1
CJ_LONG
-2147483648...2147483647
32 bit input
in2
CJ_LONG
-2147483648...2147483647
32 bit input
Type
Range
Description
out
CJ_LONG
-2147483648...2147483647
EIO0000000538 07/2014
209
Standard Libraries
DIV
Function Block Diagram
Functional Description
The DIV library allows performing 16 bit division operation.
NOTE: Operation is performed using the following syntax: in1 / in2.
Input Pin Description
Input
Type
Range
Description
in1
CJ_SHORT
-32768...32767
16 bit input
in2
CJ_SHORT
-32768...32767
16 bit input
210
Output
Type
Range
Description
out
CJ_SHORT
-32768...32767
EIO0000000538 07/2014
Standard Libraries
DIV32
Function Block Diagram
Functional Description
The DIV32 library allows performing 32 bit division operation.
NOTE: Operation is performed using the following syntax: in1 / in2.
Input Pin Description
Input
Type
Range
Description
in1
CJ_LONG
-2147483648...2147483647
32 bit input
in2
CJ_LONG
-2147483648...2147483647
32 bit input
Type
Range
Description
out
CJ_LONG
-2147483648...2147483647
EIO0000000538 07/2014
211
Standard Libraries
MOD
Function Block Diagram
Functional Description
The MOD library allows obtaining the remainder from the division between two 16 bit inputs.
NOTE: Operation is performed using the following syntax: in1 MOD in2.
Input Pin Description
Input
Type
Range
Description
in1
CJ_SHORT
-32768...32767
16 bit input
in2
CJ_SHORT
-32768...32767
16 bit input
212
Output
Type
Range
Description
out
CJ_SHORT
-16383...16383
EIO0000000538 07/2014
Standard Libraries
MOD32
Function Block Diagram
Functional Description
The MOD32 library allows obtaining the remainder from the division between two 32 bit inputs.
NOTE: Operation is performed using the following syntax: in1 MOD in2.
Input Pin Description
Input
Type
Range
Description
in1
CJ_LONG
-2147483648...2147483647
32 bit input
in2
CJ_LONG
-2147483648...2147483647
32 bit input
Type
Range
Description
out
CJ_LONG
-1073741823...1073741823
EIO0000000538 07/2014
213
Standard Libraries
ABS
Function Block Diagram
Functional Description
The ABS library allows performing absolute value operation on 16 bit input.
NOTE: A mathematical overflow alarm will be generated when the absolute value exceeds the
output ranges
Input Pin Description
Input
Type
Range
Description
in1
CJ_SHORT
-32768...32767
16 bit input
214
Output
Type
Range
Description
out
CJ_SHORT
0...32767
EIO0000000538 07/2014
Standard Libraries
ABS32
Function Block Diagram
Functional Description
The ABS32 library allows performing absolute value operation on 32 bit input.
NOTE: A mathematical overflow alarm will be generated when the absolute value exceeds the
output ranges.
Input Pin Description
Input
Type
Range
Description
in1
CJ_LONG
-2147483648...2147483647
32 bit input
Type
Range
Description
out
CJ_LONG
0...2147483647
EIO0000000538 07/2014
215
Standard Libraries
SQRT
Function Block Diagram
Functional Description
The SQRT library allows performing square root operation on 16 bit input.
Input Pin Description
Input
Type
Range
Description
in1
CJ_SHORT
0...32767
16 bit input
216
Output
Type
Range
Description
out
CJ_SHORT
0...181
EIO0000000538 07/2014
Standard Libraries
SQRT32
Function Block Diagram
Functional Description
The SQRT32 library allows performing square root operation on 32 bit input.
Input Pin Description
Input
Type
Range
Description
in1
CJ_LONG
-0...2147483647
32 bit input
Type
Range
Description
out
CJ_LONG
0...46340
EIO0000000538 07/2014
217
Standard Libraries
POW
Function Block Diagram
Functional Description
The POW library allows performing power raising operation on 16 bit input.
NOTE: Operation is performed using the following syntax: x ^ y.
Input Pin Description
Input
Type
Range
Description
CJ_SHORT
-32768...32767
CJ_SHORT
0...32767
218
Output
Type
Range
Description
out
CJ_SHORT
-32768...32767
16 bit result
EIO0000000538 07/2014
Standard Libraries
POW32
Function Block Diagram
Functional Description
The POW32 library allows performing power raising operation on 32 bit input.
NOTE: Operation is performed using the following syntax: x ^ y.
Input Pin Description
Input
Type
Range
Description
CJ_LONG
-2147483648...2147483647
CJ_LONG
0...2147483647
Type
Range
Description
out
CJ_LONG
-2147483648...2147483647
32 bit result
EIO0000000538 07/2014
219
Standard Libraries
Section 3.2
Bistable Libraries
Bistable Libraries
Overview
This section describes the bistable libraries.
What Is in This Section?
This section contains the following topics:
Topic
220
Page
RS
221
SR
223
FLIP-FLOP
225
EIO0000000538 07/2014
Standard Libraries
RS
Function Block Diagram
Functional Description
The RS library performs RS functions, that is, latches the output value according to the following
logic:
Q is set to the value 1 each time RESET is equal to 0 and SET is equal to 1.
Q is set to the value 0 each time RESET is equal to 1.
In practice, the output is set giving priority to the value of RESET.
S
Hold state
NOTE: Hold State means that the output value is retained even if either or both inputs return to 0.
EIO0000000538 07/2014
221
Standard Libraries
Type
Range
Description
SET
CJ_BIT
0, 1
set input
RESET
CJ_BIT
0, 1
reset input
222
Output
Type
Range
Description
CJ_BIT
0, 1
output value
EIO0000000538 07/2014
Standard Libraries
SR
Function Block Diagram
Functional Description
The SR library performs SR functions, that is, latches the output value according to the following
logic:
Q is set to the value 1 each time SET is equal to 1.
Q is set to the value 0 each time RESET is equal to 1, except when the value of SET is 1.
In practice, the output is set giving priority to the value of SET.
S
Hold state
Type
Range
Description
SET
CJ_BIT
0, 1
set input
RESET
CJ_BIT
0, 1
reset input
EIO0000000538 07/2014
223
Standard Libraries
224
Output
Type
Range
Description
CJ_BIT
0, 1
output value
EIO0000000538 07/2014
Standard Libraries
FLIP-FLOP
Function Block Diagram
Functional Description
The FLIP-FLOP library performs SR flip-flop functions, that is, for each rising edge of the clock, it
stores the input value and returns it as output:
Q is set to the value of IN for each CLOCK input rising edge.
Q is set to the value 0 for RESET equal to 1.
In all other cases, Q returns the previous value.
In practice, this function stores the input and maintains it until the conditions change.
NOTE: Refer to the graph below.
EIO0000000538 07/2014
225
Standard Libraries
Type
Range
Description
IN
CJ_BIT
0, 1
set input
CLOCK
CJ_BIT
0, 1
clock
RESET
CJ_BIT
0, 1
reset input
226
Output
Type
Range
Description
CJ_BIT
0, 1
output value
EIO0000000538 07/2014
Standard Libraries
Section 3.3
Bit Shift Libraries
Page
228
229
230
231
232
233
234
235
236
237
238
239
EIO0000000538 07/2014
227
Standard Libraries
Functional Description
The SHL library allows performing left shift operations on 8 bit input.
By adjusting n, it is possible to make n bits enter from the right. The result will be that the least
significant bits of the binary string will be shifted leftwards by n positions.
For example:
in1 = 10011101 (157 or 0x9D)
n=2
out = 01110100 (116 or 0x74)
Input Pin Description
Input
Type
Range
Description
in1
CJ_BYTE
0...255
8 bit input
CJ_BYTE
0...255
228
Output
Type
Range
Description
out
CJ_BYTE
0...255
8 bit result
EIO0000000538 07/2014
Standard Libraries
Functional Description
The SHL16 library allows performing left shift operations on 16 bit input.
By adjusting n, it is possible to make n bits enter from the right. The result will be that the least
significant bits of the binary string will be shifted leftwards by n positions.
For example:
in1 = 1001110110011101
n=4
out = 1101100111010000
Input Pin Description
Input
Type
Range
Description
in1
CJ_WORD
0...65535
16 bit input
CJ_BYTE
0...255
Type
Range
Description
out
CJ_WORD
0...65535
16 bit result
EIO0000000538 07/2014
229
Standard Libraries
Functional Description
The SHL32 library allows performing left shift operations on 32 bit input.
By adjusting n, it is possible to make n bits enter from the right. The result will be that the least
significant bits of the binary string will be shifted leftwards by n positions.
For example:
in1 = 1111111100000000111111110000000011111111
n=7
out = 1000000001111111100000000111111110000000
Input Pin Description
Input
Type
Range
Description
in1
CJ_DWORD
0...4294967295
32 bit input
CJ_BYTE
0...255
230
Output
Type
Range
Description
out
CJ_DWORD
0...4294967295
32 bit result
EIO0000000538 07/2014
Standard Libraries
Functional Description
The SHR library allows performing right shift operations on 8 bit input.
By adjusting n, it is possible to make n bits enter from the left. The result will be that the most
significant bits of the binary string will be shifted rightwards by n positions.
For example:
in1 = 10011101 (157 or 0x9D)
n=2
out = 00100111 (39 or 0x27)
Input Pin Description
Input
Type
Range
Description
in1
CJ_BYTE
0...255
8 bit input
CJ_BYTE
0...255
Type
Range
Description
out
CJ_BYTE
0...255
8 bit result
EIO0000000538 07/2014
231
Standard Libraries
Functional Description
The SHR16 library allows performing right shift operations on 16 bit input.
By adjusting n, it is possible to make n bits enter from the left. The result will be that the most
significant bits of the binary string will be shifted rightwards by n positions.
For example:
in1 = 1001110110011101
n=4
out = 0000100111011001
Input Pin Description
Input
Type
Range
Description
in1
CJ_WORD
0...65535
16 bit input
CJ_BYTE
0...255
232
Output
Type
Range
Description
out
CJ_WORD
0...65535
16 bit result
EIO0000000538 07/2014
Standard Libraries
Functional Description
The SHR32 library allows performing right shift operations on 32 bit input.
By adjusting n, it is possible to make n bits enter from the left. The result will be that the most
significant bits of the binary string will be shifted rightwards by n positions.
For example:
in1 = 1111111100000000111111110000000011111111
n=7
out = 0000000111111110000000011111111000000001
Input Pin Description
Input
Type
Range
Description
in1
CJ_DWORD
0...4294967295
32 bit input
CJ_BYTE
0...255
Type
Range
Description
out
CJ_DWORD
0...4294967295
32 bit result
EIO0000000538 07/2014
233
Standard Libraries
Functional Description
The ROL library allows performing left rotation operations on 8 bit input.
By adjusting n, it is possible to make the last n bits rotate. The result is that the least significant n
bits will be inserted at the end of the binary string and the remaining bits shifted leftwards by n
positions.
For example:
in1 = 10011101 (157 or 0x9D)
n=2
out = 01110110 (118 or 0x76)
Input Pin Description
Input
Type
Range
Description
in1
CJ_BYTE
0...255
8 bit input
CJ_BYTE
0...255
234
Output
Type
Range
Description
out
CJ_BYTE
0...255
8 bit result
EIO0000000538 07/2014
Standard Libraries
Functional Description
The ROL16 library allows performing left rotation operations on 16 bit input.
By adjusting n, it is possible to make the last n bits rotate. The result is that the most significant n
bits will be inserted at the end of the binary string and the remaining bits shifted leftwards by n
positions.
For example:
in1 = 1001110110011101
n=4
out = 1101100111011001
Input Pin Description
Input
Type
Range
Description
in1
CJ_WORD
0...65535
16 bit input
CJ_BYTE
0...255
Type
Range
Description
out
CJ_WORD
0...65535
16 bit result
EIO0000000538 07/2014
235
Standard Libraries
Functional Description
The ROL32 library allows performing left rotate operations on 32 bit input.
By adjusting n, it is possible to make the last n bits rotate. The result is that the most significant n
bits will be inserted at the end of the binary string and the remaining bits shifted leftwards by n
positions.
For example:
in1 = 1111111100000000111111110000000011111111
n=7
out = 1000000001111111100000000111111111111111
Input Pin Description
Input
Type
Range
Description
in1
CJ_DWORD
0...4294967295
32 bit input
CJ_BYTE
0...255
236
Output
Type
Range
Description
out
CJ_DWORD
0...4294967295
32 bit result
EIO0000000538 07/2014
Standard Libraries
Functional Description
The ROR library allows performing right rotation operations on 8 bit input.
By adjusting n, it is possible to make the first n bits rotate. The result is that the least significant n
bits will be inserted at the beginning of the binary string and the remaining bits shifted rightwards
by n positions.
For example:
in1 = 10011101 (157 or 0x9D)
n=2
out = 01100111 (103 or 0x67)
Input Pin Description
Input
Type
Range
Description
in1
CJ_BYTE
0...255
8 bit input
CJ_BYTE
0...255
Type
Range
Description
out
CJ_BYTE
0...255
8 bit result
EIO0000000538 07/2014
237
Standard Libraries
Functional Description
The ROR16 library allows performing right rotation operations on 16 bit input.
By adjusting n, it is possible to make the first n bits rotate. The result is that the least significant n
bits will be inserted at the beginning of the binary string and the remaining bits shifted rightwards
by n positions.
For example:
in1 = 1001110110011101
n=4
out = 1101100111011001
Input Pin Description
Input
Type
Range
Description
in1
CJ_WORD
0...65535
16 bit input
CJ_BYTE
0...255
238
Output
Type
Range
Description
out
CJ_WORD
0...65535
16 bit result
EIO0000000538 07/2014
Standard Libraries
Functional Description
The ROR32 library allows performing right rotation operations on 32 bit input.
By adjusting n, it is possible to make the first n bits rotate. The result is that the least significant n
bits will be inserted at the beginning of the binary string and the remaining bits shifted rightwards
by n positions.
For example:
in1 = 1111111100000000111111110000000011111111
n=7
out = 1111111111111110000000011111111000000001
Input Pin Description
Input
Type
Range
Description
in1
CJ_DWORD
0...4294967295
32 bit input
CJ_BYTE
0...255
Type
Range
Description
out
CJ_DWORD
0...4294967295
32 bit result
EIO0000000538 07/2014
239
Standard Libraries
Section 3.4
Comparator Libraries
Comparator Libraries
Overview
This section describes the comparator libraries.
What Is in This Section?
This section contains the following topics:
Topic
240
Page
EQ (Equal Comparator)
241
242
GT (Greater Comparator)
243
244
LT (Less Comparator)
245
246
247
248
249
250
EIO0000000538 07/2014
Standard Libraries
EQ (Equal Comparator)
Function Block Diagram
Functional Description
The EQ library compares in1 and in2 inputs. If both the values are equal, the output assumes the
value as 1. Otherwise, the value is 0.
NOTE: Input data are converted to 32 bit values with signs.
Input Pin Description
Input
Type
Range
Description
in1
CJ_LONG
-2147483648...2147483647
input to be compared
in2
CJ_LONG
-2147483648...2147483647
input to be compared
Type
Range
Description
out
CJ_BIT
0, 1
output value
EIO0000000538 07/2014
241
Standard Libraries
Functional Description
The GE library compares in1 and in2 inputs. If the value of in1 is greater than or equal to the
value of in2, the output assumes the value as 1. Otherwise, the value is 0.
NOTE: Input data are converted to 32 bit values with signs.
Input Pin Description
Input
Type
Range
Description
in1
CJ_LONG
-2147483648...2147483647
input to be compared
in2
CJ_LONG
-2147483648...2147483647
input to be compared
242
Output
Type
Range
Description
out
CJ_BIT
0, 1
output value
EIO0000000538 07/2014
Standard Libraries
GT (Greater Comparator)
Function Block Diagram
Functional Description
The GT library compares in1 and in2 inputs. If the value of in1 is greater than the value of in2,
the output assumes the value as 1. Otherwise, the value is 0.
NOTE: Input data are converted to 32 bit values with signs.
Input Pin Description
Input
Type
Range
Description
in1
CJ_LONG
-2147483648...2147483647
input to be compared
in2
CJ_LONG
-2147483648...2147483647
input to be compared
Type
Range
Description
out
CJ_BIT
0, 1
output value
EIO0000000538 07/2014
243
Standard Libraries
Functional Description
The LE library compares in1 and in2 inputs. If the value of in1 is less than or equal to the value
of in2, the output assumes the value as 1. Otherwise, the value is 0.
NOTE: Input data are converted to 32 bit values with signs.
Input Pin Description
Input
Type
Range
Description
in1
CJ_LONG
-2147483648...2147483647
input to be compared
in2
CJ_LONG
-2147483648...2147483647
input to be compared
244
Output
Type
Range
Description
out
CJ_BIT
0, 1
output value
EIO0000000538 07/2014
Standard Libraries
LT (Less Comparator)
Function Block Diagram
Functional Description
The LT library compares in1 and in2 inputs. If the value of in1 is less than the value of in2, the
output assumes the value as 1. Otherwise, the value is 0.
NOTE: Input data are converted to 32 bit values with signs.
Input Pin Description
Input
Type
Range
Description
in1
CJ_LONG
-2147483648...2147483647
input to be compared
in2
CJ_LONG
-2147483648...2147483647
input to be compared
Type
Range
Description
out
CJ_BIT
0, 1
output value
EIO0000000538 07/2014
245
Standard Libraries
Functional Description
The NE library compares in1 and in2 inputs. If the value of in1 differs from the value of in2, the
output assumes the value as 1. Otherwise, the value is 0.
NOTE: Input data are converted to 32 bit values with signs.
Input Pin Description
Input
Type
Range
Description
in1
CJ_LONG
-2147483648...2147483647
input to be compared
in2
CJ_LONG
-2147483648...2147483647
input to be compared
246
Output
Type
Range
Description
out
CJ_BIT
0, 1
output value
EIO0000000538 07/2014
Standard Libraries
Functional Description
The U_GE library compares in1 and in2 inputs. If the value of in1 is greater than or equal to the
value of in2, the output assumes the value as 1. Otherwise, the value is 0.
NOTE: Input data are converted to 32 bit values without signs.
Input Pin Description
Input
Type
Range
Description
in1
CJ_DWORD
0...4294967295
input to be compared
in2
CJ_DWORD
0...4294967295
input to be compared
Type
Range
Description
out
CJ_BIT
0, 1
output value
EIO0000000538 07/2014
247
Standard Libraries
Functional Description
The U_GT library compares in1 and in2 inputs. If the value of in1 is greater than the value of
in2, the output assumes the value as 1. Otherwise, the value is 0.
NOTE: Input data are converted to 32 bit values without signs.
Input Pin Description
Input
Type
Range
Description
in1
CJ_DWORD
0...4294967295
input to be compared
in2
CJ_DWORD
0...4294967295
input to be compared
248
Output
Type
Range
Description
out
CJ_BIT
0, 1
output value
EIO0000000538 07/2014
Standard Libraries
Functional Description
The U_LE library compares in1 and in2 inputs. If the value of in1 is less than or equal to the
value of in2, the output assumes the value as 1. Otherwise, the value is 0.
NOTE: Input data are converted to 32 bit values without signs.
Input Pin Description
Input
Type
Range
Description
in1
CJ_DWORD
0...4294967295
input to be compared
in2
CJ_DWORD
0...4294967295
input to be compared
Type
Range
Description
out
CJ_BIT
0, 1
output value
EIO0000000538 07/2014
249
Standard Libraries
Functional Description
The U_LT library compares in1 and in2 inputs. If the value of in1 is less than the value of in2,
the output assumes the value as 1. Otherwise, the value is 0.
NOTE: Input data are converted to 32 bit values without signs.
Input Pin Description
Input
Type
Range
Description
in1
CJ_DWORD
0...4294967295
input to be compared
in2
CJ_DWORD
0...4294967295
input to be compared
250
Output
Type
Range
Description
out
CJ_BIT
0, 1
output value
EIO0000000538 07/2014
Standard Libraries
Section 3.5
Conversion Libraries
Conversion Libraries
Overview
This section describes the conversion libraries.
What Is in This Section?
This section contains the following topics:
Topic
Page
ANALOG_GET_ERROR
253
ANALOG_GET_VALUE
254
TO_ANALOG
255
ANALOG_GET_FIELDS
256
AI_to_DI
257
Celsius2Fahrenheit
259
Fahrenheit2Celsius
260
DATETIME2FIELDS
261
FIELDS2DATETIME
262
263
DATETIME_GET_WEEKDAY
264
265
DATETIME_GET_TIME
266
BYTE2BIT
267
BYTE2SBYTE
268
BYTE2LED
269
LED2BYTE
270
DWORD2LONG
271
LONG2DWORD
272
SBYTE2BYTE
273
SHORT2WORD
274
WORD2SHORT
275
BUTTON_GET_FIELDS
276
COMMAND_GET_FIELDS
277
16BITS2WORD
278
EIO0000000538 07/2014
251
Standard Libraries
Topic
WORD216BITS
252
Page
280
EIO0000000538 07/2014
Standard Libraries
ANALOG_GET_ERROR
Function Block Diagram
Functional Description
The ANALOG_GET_ERROR library returns the detected analog input error type, in particular:
0 no error detected
1 sensor short circuit
2 inoperative or missing sensor
Input Pin Description
Input
Type
Range
Description
IN
CJ_ANALOG
Value: -32768...32767
Error: 0...2
analog input
Type
Range
Description
OUT
CJ_BYTE
0...2
EIO0000000538 07/2014
253
Standard Libraries
ANALOG_GET_VALUE
Function Block Diagram
Functional Description
The ANALOG_GET_VALUE library returns the value measured by the sensor.
If there is an error detected with the sensor, the value returned is the maximum (32767).
Input Pin Description
Input
Type
Range
Description
IN
CJ_ANALOG
Value: -32768...32767
Error: 0...2
analog input
Output
Type
Range
Description
OUT
CJ_SHORT
-32768...32767
sensor value
254
EIO0000000538 07/2014
Standard Libraries
TO_ANALOG
Function Block Diagram
Functional Description
The TO_ANALOG library constructs a CJ_ANALOG data type structure.
Input Pin Description
Input
Type
Range
Description
VALUE
CJ_SHORT
-32768...32767
measured value
ERROR
CJ_BYTE
0...2
error detected
Type
Range
Description
OUT
CJ_ANALOG
Value: -32768...32767
Error: 0...2
analog type
EIO0000000538 07/2014
255
Standard Libraries
ANALOG_GET_FIELDS
Function Block Diagram
Functional Description
The ANALOG_GET_FIELDS library returns the fields of the input CJ_ANALOG structure.
Input Pin Description
Input
Type
Range
Description
analog
CJ_ANALOG
value: -32768...32767
error: 0...2
sensor input
256
Output
Type
Range
Description
value
CJ_SHORT
-32768...32767
measured value
error
CJ_BYTE
0...2
error detected
EIO0000000538 07/2014
Standard Libraries
AI_to_DI
Function Block Diagram
Functional Description
The AI_to_DI library allows you to use an analog input as additional digital free contact inputs.
The function works correctly with the following configuration:
The analog input must be configured as NTC input.
The AI pin must be directly connected to a real analog input (out pin of ANALOGIN library) and
not to a CJ_ANALOG variable.
DI = 1 for contact resistance <= 600 ohms
DI = 0 for contact resistance >= 60k ohms
Example
EIO0000000538 07/2014
257
Standard Libraries
Type
Range
Description
AI
CJ_ANALOG
Value: -32768...32767
Error: 0...2
sensor input
Output
Type
Range
Description
out
CJ_BIT
0, 1
258
EIO0000000538 07/2014
Standard Libraries
Celsius2Fahrenheit
Function Block Diagram
Functional Description
The Celsius2Fahrenheit library converts Celsius to Fahrenheit.
Input Pin Description
Input
Type
Range
Unit
Description
In
CJ_SHORT
-32768...32767
0.10C
temperature in 0C
Type
Range
Unit
Description
CJ_SHORT
-32768...32767
EIO0000000538 07/2014
0.1 F
temperature in 0F
259
Standard Libraries
Fahrenheit2Celsius
Function Block Diagram
Functional Description
The Fahrenheit2Celsius library converts Fahrenheit to Celsius.
Input Pin Description
Input
Type
Range
Unit
Description
In
CJ_SHORT
-32768...32767
0.10F
temperature in 0F
Type
Range
Unit
Description
CJ_SHORT
-32768...32767
260
0.1 C
temperature in 0C
EIO0000000538 07/2014
Standard Libraries
DATETIME2FIELDS
Function Block Diagram
Functional Description
The DATETIME2FIELDS library returns the individual fields of the input date and time.
Input Pin Description
Input
Type
Range
Description
IN
CJ_DATETIME
0...2147483647
Type
Range
Description
YEAR
MONTH
DAY
WEEKDAY
HOUR
MIN,SEC
CJ_BYTE
00...68
1...12
1...31
0...6
0...23
0...59
EIO0000000538 07/2014
261
Standard Libraries
FIELDS2DATETIME
Function Block Diagram
Description
The FIELDS2DATETIME library constructs the date and time from the input fields.
Input Pin Description
Input
Type
Range
Description
YEAR
MONTH
DAY
HOUR
MIN, SEC
CJ_BYTE
00...68
1...12
1...31
0...23
0...59
262
Output
Type
Range
Description
OUT
CJ_DATETIME
0...2147483647
EIO0000000538 07/2014
Standard Libraries
Functional Description
The DATETIME_GET_YEAR, DATETIME_GET_MONTH and DATETIME_GET_DAY library returns
the year, month and day individually from the input date.
Input Pin Description
Input
Type
Range
Description
IN
CJ_DATETIME
0...2147483647
Type
Range
Description
OUT
CJ_BYTE
0...68
1...12
1...31
EIO0000000538 07/2014
263
Standard Libraries
DATETIME_GET_WEEKDAY
Function Block Diagram
Functional Description
The DATETIME_GET_WEEKDAY library returns the number of the day of the week [0 = Sunday,...,
6 = Saturday].
Input Pin Description
Input
Type
Range
Description
IN
CJ_DATETIME
0...2147483647
264
Output
Type
Range
Description
OUT
CJ_BYTE
0...6
EIO0000000538 07/2014
Standard Libraries
Functional Description
The DATETIME_GET_HOUR, DATETIME_GET_MIN and DATETIME_GET_SEC library returns
the hour, minute and second individually from the input time.
Input Pin Description
Input
Type
Range
Description
IN
CJ_DATETIME
0...2147483647
Type
Range
Description
OUT
CJ_BYTE
0...23
0...59
0...59
hour
minute
second
EIO0000000538 07/2014
265
Standard Libraries
DATETIME_GET_TIME
Function Block Diagram
Functional Description
The DATETIME_GET_TIME library returns the time (hour, minute and second) from a
CJ_DATETIME type input.
The value 86400 represents the number of the seconds in a day.
Input Pin Description
Input
Type
Range
Description
IN
CJ_DATETIME
0...2147483647
266
Output
Type
Range
Description
OUT
CJ_TIME
0...86400
EIO0000000538 07/2014
Standard Libraries
BYTE2BIT
Function Block Diagram
Functional Description
The BYTE2BIT library returns 1 if input IN is other than zero, otherwise returns 0.
Input Pin Description
Input
Type
Range
Description
IN
CJ_BYTE
0...255
8 bit input
Type
Range
Description
OUT
CJ_BIT
0, 1
binary output
EIO0000000538 07/2014
267
Standard Libraries
BYTE2SBYTE
Function Block Diagram
Functional Description
The BYTE2SBYTE library converts 8 bit data without sign to 8 bit data with sign.
Input Pin Description
Input
Type
Range
Description
IN
CJ_BYTE
0...255
268
Output
Type
Range
Description
OUT
CJ_S_BYTE
-128...127
EIO0000000538 07/2014
Standard Libraries
BYTE2LED
Function Block Diagram
Functional Description
The BYTE2LED library sets the LED operation type, in particular:
0 LED off
1 LED continually on
2 LED on at low frequency
3 LED on at high frequency
Input Pin Description
Input
Type
Range
Description
IN
CJ_BYTE
0...3
Type
Range
Description
OUT
CJ_LED
0...3
LED type
EIO0000000538 07/2014
269
Standard Libraries
LED2BYTE
Function Block Diagram
Functional Description
The LED2BYTE library returns the input LED operation type, in particular:
0 LED off
1 LED continually on
2 LED on at low frequency
3 LED on at high frequency
Input Pin Description
Input
Type
Range
Description
IN
CJ_LED
0...3
LED type
270
Output
Type
Range
Description
OUT
CJ_BYTE
0...3
EIO0000000538 07/2014
Standard Libraries
DWORD2LONG
Function Block Diagram
Functional Description
The DWORD2LONG library converts 32 bit data without sign to 32 bit data with sign.
Input Pin Description
Input
Type
Range
Description
IN
CJ_DWORD
0...4294967295
Type
Range
Description
OUT
CJ_LONG
-2147483647...2147483648
EIO0000000538 07/2014
271
Standard Libraries
LONG2DWORD
Function Block Diagram
Functional Description
The LONG2DWORD library converts 32 bit data with sign to 32 bit data without sign.
Input Pin Description
Input
Type
Range
Description
IN
CJ_LONG
-2147483647...2147483648
272
Output
Type
Range
Description
OUT
CJ_DWORD
0...4294967295
EIO0000000538 07/2014
Standard Libraries
SBYTE2BYTE
Function Block Diagram
Functional Description
The SBYTE2BYTE library converts 8 bit data with sign to 8 bit data without sign.
Input Pin Description
Input
Type
Range
Description
IN
CJ_S_BYTE
-128...127
Type
Range
Description
OUT
CJ_BYTE
0...255
EIO0000000538 07/2014
273
Standard Libraries
SHORT2WORD
Function Block Diagram
Functional Description
The SHORT2WORD library converts 16 bit data with sign to 16 bit data without sign.
Input Pin Description
Input
Type
Range
Description
IN
CJ_SHORT
-32768...32767
274
Output
Type
Range
Description
OUT
CJ_WORD
0...65535
EIO0000000538 07/2014
Standard Libraries
WORD2SHORT
Function Block Diagram
Functional Description
The WORD2SHORT library converts 16 bit data without sign to 16 bit data with sign.
Input Pin Description
Input
Type
Range
Description
IN
CJ_WORD
0...65535
Type
Range
Description
OUT
CJ_SHORT
-32768...32767
EIO0000000538 07/2014
275
Standard Libraries
BUTTON_GET_FIELDS
Function Block Diagram
Functional Description
The BUTTON_GET_FIELDS library returns the following CJ_BTN structured fields:
valid establishes whether the button event has been executed. If 1, event is executed
param represents the number of seconds the relevant key persists
node logical node in which the action has been verified
Input Pin Description
Input
Type
Range
Description
button
CJ_BTN
valid: 0...1
node: 0...127
param: 0...32767
button to process
276
Output
Type
Range
Description
valid
CJ_BIT
0, 1
valid field
param
CJ_SHORT
0...32767
parameter field
node
CJ_BYTE
0...127
node field
EIO0000000538 07/2014
Standard Libraries
COMMAND_GET_FIELDS
Function Block Diagram
Functional Description
The COMMAND_GET_FIELDS library returns the CJ_CMD structured fields:
valid establishes whether the command event has been executed. If 1, event is executed
param represents the command parameter
node logical node in which the action has been verified
Input Pin Description
Input
Type
Range
Description
command
CJ_CMD
valid: 0...1
node: 0...127
param: 0...32767
command to be
processed
Type
Range
Description
valid
CJ_BIT
0, 1
valid field
param
CJ_SHORT
0...32767
parameter field
node
CJ_BYTE
0...127
node field
EIO0000000538 07/2014
277
Standard Libraries
16BITS2WORD
Function Block Diagram
Functional Description
The 16BITS2WORD library constructs the value in word starting from the 16 bits inserted in input.
Input Pin Description
278
Input
Type
Range
Description
bit1
CJ_BIT
0, 1
first bit
bit2
CJ_BIT
0, 1
second bit
bitN
CJ_BIT
0, 1
nth bit
bit16
CJ_BIT
0, 1
sixteenth bit
EIO0000000538 07/2014
Standard Libraries
Type
Range
Description
out
CJ_WORD
0...65535
EIO0000000538 07/2014
279
Standard Libraries
WORD216BITS
Function Block Diagram
Functional Description
The WORD216BITS library returns 16 single bits calculated from a word input value.
Input Pin Description
280
Input
Type
Range
Description
in
CJ_WORD
0...65535
input value
EIO0000000538 07/2014
Standard Libraries
Type
Range
Description
bit1
CJ_BIT
0, 1
first bit
bit2
CJ_BIT
0, 1
second bit
bitN
CJ_BIT
0, 1
nth bit
bit16
CJ_BIT
0, 1
sixteenth bit
EIO0000000538 07/2014
281
Standard Libraries
Section 3.6
Counter Libraries
Counter Libraries
Overview
This section describes the counter libraries.
What Is in This Section?
This section contains the following topics:
Topic
282
Page
283
285
287
EIO0000000538 07/2014
Standard Libraries
Functional Description
The CTD library causes an event counter to count down from a set value, PV.
NOTE: Refer to the following graph:
EIO0000000538 07/2014
283
Standard Libraries
Type
Range
Description
CLOCK
CJ_BIT
0, 1
count down
For each rising edge detected in the CLOCK input, the current CV
value is decreased, with the exception of when the LOAD input is
active, or when CV has reached the value 0.
LOAD
CJ_BIT
0, 1
when the LOAD input is set to 1, the counter status is loaded with
the value of PV.
PV
CJ_WORD
0...65535
preset value
represents the counter starting value, which is loaded each time
the LOAD input is set to the value 1
284
Output
Type
Range
Description
CV
CJ_WORD
0...65535
current value
returns the current counter value
CJ_BIT
0, 1
EIO0000000538 07/2014
Standard Libraries
Functional Description
The CTU library causes an event counter to count up from a value of 0.
NOTE: Refer to the following graph:
EIO0000000538 07/2014
285
Standard Libraries
Type
Range
Description
CU
CJ_BIT
0, 1
count up
For each rising edge detected in the CU input, the current CV value
is increased, with the exception of when the RESET input is active,
until reaching the maximum value of 65635.
RESET
CJ_BIT
0, 1
When the RESET input is set to 1, the internal state of the counter
CV is set to zero.
PV
CJ_WORD
0...65535
preset value
When the CV counter internal status exceeds the PV, then output Q
is set to 1.
286
Output
Type
Range
Description
CV
CJ_WORD
0...65535
Current Value.
returns the current counter value
QU
CJ_BIT
0, 1
EIO0000000538 07/2014
Standard Libraries
Functional Description
The CTUD library causes an event counter to count up and down.
NOTE: Refer to the following graph:
EIO0000000538 07/2014
287
Standard Libraries
Type
Range
Description
CU
CJ_BIT
0, 1
count up
For each rising edge detected in the CU input, the current value of CV
is increased, except when at least one of the LOAD and RESET inputs
is active, and until reaching the maximum value of 65635.
If CU and CD are active simultaneously, the counter is increased.
CD
CJ_BIT
0, 1
count down
For each rising edge detected in the CD input, the current CV value is
decreased, with the exception of when atleast one of the LOAD and
RESET inputs is active, or when CV has reached the value of 0.
If CU and CD are active simultaneously, the counter is increased.
RESET
CJ_BIT
0, 1
When the RESET input is set to 1, the internal state of the counter CV
is set to zero.
LOAD
CJ_BIT
0, 1
When the LOAD input is set to 1, the counter status is loaded with the
value of PV.
If the RESET input is simultaneously active, it is ignored.
PV
CJ_WORD
0...65535
Preset Value.
When the CV counter internal status exceeds the PV, then output QD
is set to 1.
288
Output
Type
Range
Description
CV
CJ_WORD
0...65535
Current Value.
returns the current counter value
QU
CJ_BIT
0, 1
QD
CJ_BIT
0, 1
EIO0000000538 07/2014
Standard Libraries
Section 3.7
Edge Detection Libraries
Page
F_TRIG
290
R_TRIG
291
EIO0000000538 07/2014
289
Standard Libraries
F_TRIG
Function Block Diagram
Functional Description
The F_TRIG library detects a falling edge.
Input Pin Description
Input
Type
Range
Description
in
CJ_BIT
0, 1
boolean input
290
Output
Type
Range
Description
out
CJ_BIT
0, 1
When a falling edge is detected at the in input, the output is set to 1 for
the duration of one processing cycle (main, 5 ms timed or 100 ms
timed).
EIO0000000538 07/2014
Standard Libraries
R_TRIG
Function Block Diagram
Functional Description
The R_TRIG library detects a digital magnitude changing from low to high states.
Input Pin Description
Input
Type
Range
Description
in
CJ_BIT
0, 1
boolean input
Type
Range
Description
out
CJ_BIT
0, 1
When a rising edge is detected at the in input, the output is set to 1 for
the duration of one processing cycle (main, 5 ms timed or 100 ms timed).
EIO0000000538 07/2014
291
Standard Libraries
Section 3.8
Logic Libraries
Logic Libraries
Overview
This section describes the logic libraries.
What Is in This Section?
This section contains the following topics:
Topic
292
Page
293
OR (0, 1 OR)
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
EIO0000000538 07/2014
Standard Libraries
Functional Description
The AND_1 library returns the logical AND of inputs in1 and in2.
If both input values are 1, the output assumes the value as 1. Otherwise, the value is 0.
Input Pin Description
Input
Type
Range
Description
in1
CJ_BIT
0, 1
digital input
in2
CJ_BIT
0, 1
digital input
Type
Range
Description
out
CJ_BIT
0, 1
output value
EIO0000000538 07/2014
293
Standard Libraries
OR (0, 1 OR)
Function BLock Diagram
Functional Description
The OR_1 library returns the logical OR of inputs in1 and in2.
If one of the input values is 1, the output assumes the value as 1. Otherwise, the value is 0.
Input Pin Description
Input
Type
Range
Description
in1
CJ_BIT
0, 1
digital input
in2
CJ_BIT
0, 1
digital input
294
Output
Type
Range
Description
out
CJ_BIT
0, 1
output value
EIO0000000538 07/2014
Standard Libraries
Functional Description
The NOT_1 library returns the negation of the digital input in.
If the input values is 0, the output assumes the value as 1. Otherwise, the value is 0.
Input Pin Description
Input
Type
Range
Description
in
CJ_BIT
0, 1
digital input
Type
Range
Description
out
CJ_BIT
0, 1
output value
EIO0000000538 07/2014
295
Standard Libraries
Functional Description
The NAND_1 library returns the logical NAND of inputs in1 and in2.
If both the input values are 1, the output assumes the value as 0. Otherwise, the value is 1.
Input Pin Description
Input
Type
Range
Description
in1
CJ_BIT
0, 1
digital input
in2
CJ_BIT
0, 1
digital input
296
Output
Type
Range
Description
out
CJ_BIT
0, 1
output value
EIO0000000538 07/2014
Standard Libraries
Functional Description
The NOR_1 library returns the logical NOR of inputs in1 and in2.
If one of the two input values is 1, the output assumes the value as 0. Otherwise, the value is 1.
Input Pin Description
Input
Type
Range
Description
in1
CJ_BIT
0, 1
digital input
in2
CJ_BIT
0, 1
digital input
Type
Range
Description
out
CJ_BIT
0, 1
output value
EIO0000000538 07/2014
297
Standard Libraries
Functional Description
The XOR_1 library returns the exclusive OR of inputs in1 and in2.
If the values are different, the output assumes the value as 1. Otherwise, the value is 0.
Input Pin Description
Input
Type
Range
Description
in1
CJ_BIT
0, 1
digital input
in2
CJ_BIT
0, 1
digital input
298
Output
Type
Range
Description
out
CJ_BIT
0, 1
output value
EIO0000000538 07/2014
Standard Libraries
Functional Description
The AND16_1 library returns the AND of the 16 bits of inputs in1 and in2.
If both the input values are 1for each bit, the corresponding output bit assumes the value as 1.
Otherwise, the value is 0.
Input Pin Description
Input
Type
Range
Description
in1
CJ_WORD
0...65535
digital input
in2
CJ_WORD
0...65535
digital input
Type
Range
Description
out
CJ_WORD
0...65535
output value
EIO0000000538 07/2014
299
Standard Libraries
Functional Description
The OR16_1 library returns the OR of the 16 bits of inputs in1 and in2.
If one of the input values is 1 for each bit, the corresponding output bit assumes the value as 1.
Otherwise, the value is 0.
Input Pin Description
Input
Type
Range
Description
in1
CJ_WORD
0...65535
digital input
in2
CJ_WORD
0...65535
digital input
300
Output
Type
Range
Description
out
CJ_WORD
0...65535
output value
EIO0000000538 07/2014
Standard Libraries
Functional Description
The NOT16_1 library returns the negation of the 16 bits of the digital input in.
If the input value is 0 for each bit, the corresponding output bit assumes the value as 1. Otherwise,
the value is 0.
Input Pin Description
Input
Type
Range
Description
in
CJ_WORD
0...65535
input
Type
Range
Description
out
CJ_WORD
0...65535
output value
EIO0000000538 07/2014
301
Standard Libraries
Functional Description
The NAND16_1 library returns the NAND of the 16 bits of inputs in1 and in2.
If both the input values are 1 for each bit, the corresponding output bit assumes the value as 0.
Otherwise, the value is 1.
Input Pin Description
Input
Type
Range
Description
in1
CJ_WORD
0...65535
input
in2
CJ_WORD
0...65535
input
302
Output
Type
Range
Description
out
CJ_WORD
0...65535
output value
EIO0000000538 07/2014
Standard Libraries
Functional Description
The NOR16_1 library returns the NOR of the 16 bits of inputs in1 and in2.
If one of the input values is 1 for each bit, the corresponding output bit assumes the value as 0.
Otherwise, the value is 1.
Input Pin Description
Input
Type
Range
Description
in1
CJ_WORD
0...65535
input
in2
CJ_WORD
0...65535
input
Type
Range
Description
out
CJ_WORD
0...65535
output value
EIO0000000538 07/2014
303
Standard Libraries
Functional Description
The XOR16_1 library returns the exclusive OR of the 16 bits of inputs in1 and in2.
If the input values are different for each bit, the corresponding output bit assumes the value as 1.
Otherwise, the value is 0.
Input Pin Description
Input
Type
Range
Description
in1
CJ_WORD
0...65535
input
in2
CJ_WORD
0...65535
input
304
Output
Type
Range
Description
out
CJ_WORD
0...65535
output value
EIO0000000538 07/2014
Standard Libraries
Functional Description
The AND32_1 library returns the AND of the 32 bits of inputs in1 and in2.
If both the input values are 1 for each bit, the corresponding output bit assumes the value as 1.
Otherwise, the value is 0.
Input Pin Description
Input
Type
Range
Description
in1
CJ_DWORD
0...4294967295
input
in2
CJ_DWORD
0...4294967295
input
Type
Range
Description
out
CJ_DWORD
0...4294967295
output value
EIO0000000538 07/2014
305
Standard Libraries
Functional Description
The OR32 library returns the OR of the 32 bits of inputs in1 and in2.
If one of the input values is 1 for each bit, the corresponding output bit assumes the value as 1.
Otherwise, the value is 0.
Input Pin Description
Input
Type
Range
Description
in1
CJ_DWORD
0...4294967295
input
in2
CJ_DWORD
0...4294967295
input
306
Output
Type
Range
Description
out
CJ_DWORD
0...4294967295
output value
EIO0000000538 07/2014
Standard Libraries
Functional Description
The NOT32_1 library returns the negation of the 32 bits of the digital input in.
If the input value is 0 for each bit, the corresponding output bit assumes the value as 1. Otherwise,
the value is 0.
Input Pin Description
Input
Type
Range
Description
in1
CJ_DWORD
0...4294967295
input
in2
CJ_DWORD
0...4294967295
input
Type
Range
Description
out
CJ_DWORD
0...4294967295
output value
EIO0000000538 07/2014
307
Standard Libraries
Functional Description
The NAND32_1 library returns the NAND of the 32 bits of inputs in1 and in2.
If both the input values are 1 for each bit, the corresponding output bit assumes the value as 0.
Otherwise, the value is 1.
Input Pin Description
Input
Type
Range
Description
in1
CJ_DWORD
0...4294967295
input
in2
CJ_DWORD
0...4294967295
input
308
Output
Type
Range
Description
out
CJ_DWORD
0...4294967295
output value
EIO0000000538 07/2014
Standard Libraries
Functional Description
The NOR32_1 library returns the NOR of the 32 bits of inputs in1 and in2.
If one of the input values is 1 for each bit, the corresponding output bit assumes the value as 0.
Otherwise, the value is 1.
Input Pin Description
Input
Type
Range
Description
in1
CJ_DWORD
0...4294967295
input
in2
CJ_DWORD
0...4294967295
input
Type
Range
Description
out
CJ_DWORD
0...4294967295
output value
EIO0000000538 07/2014
309
Standard Libraries
Functional Description
The XOR32_1 library returns the exclusive OR of the 32 bits of inputs in1 and in2.
If the input values are different for each bit, the corresponding output bit assumes the value as 1.
Otherwise, the value is 0.
Input Pin Description
Input
Type
Range
Description
in1
CJ_DWORD
0...4294967295
input
in2
CJ_DWORD
0...4294967295
input
310
Output
Type
Range
Description
out
CJ_DWORD
0...4294967295
output value
EIO0000000538 07/2014
Standard Libraries
Section 3.9
Selection Libraries
Selection Libraries
Overview
This section describes the selection libraries.
What Is in This Section?
This section contains the following topics:
Topic
Page
MAX_BIT
312
MAX_BYTE
313
MAX_DWORD
314
MAX_LONG
315
MAX_SHORT
316
MAX_S_BYTE
317
MAX_WORD
318
MIN_BIT
319
MIN_BYTE
320
MIN_DWORD
321
MIN_LONG
322
MIN_SHORT
323
MIN_S_BYTE
324
MIN_WORD
325
SEL_BIT
326
SEL_BYTE
327
SEL_DWORD
328
SEL_LONG
329
SEL_SHORT
330
SEL_S_BYTE
331
SEL_WORD
332
EIO0000000538 07/2014
311
Standard Libraries
MAX_BIT
Function Block Diagram
Functional Description
The MAX_BIT library compares the inputs IN1 and IN2 and returns the largest value.
Input Pin Description
Input
Type
Range
Description
IN1
CJ_BIT
0, 1
data input 1
IN2
CJ_BIT
0, 1
data input 2
312
Output
Type
Range
Description
OUT
CJ_BIT
0, 1
output value
EIO0000000538 07/2014
Standard Libraries
MAX_BYTE
Function Block Diagram
Functional Description
The MAX_BYTE library compares the inputs IN1 and IN2 and returns the largest value.
Input Pin Description
Input
Type
Range
Description
IN1
CJ_BYTE
0...255
data input 1
IN2
CJ_BYTE
0...255
data input 2
Type
Range
Description
OUT
CJ_BYTE
0...255
output value
EIO0000000538 07/2014
313
Standard Libraries
MAX_DWORD
Function Block Diagram
Functional Description
The MAX_DWORD library compares the inputs IN1 and IN2 and returns the largest value.
Input Pin Description
Input
Type
Range
Description
IN1
CJ_DWORD
0...424967295
data input 1
IN2
CJ_DWORD
0...424967295
data input 2
314
Output
Type
Range
Description
OUT
CJ_DWORD
0...424967295
output value
EIO0000000538 07/2014
Standard Libraries
MAX_LONG
Function Block Diagram
Functional Description
The MAX_LONG library compares the inputs IN1 and IN2 and returns the largest value.
Input Pin Description
Input
Type
Range
Description
IN1
CJ_LONG
-2147483648...2147483647
data input 1
IN2
CJ_LONG
-2147483648...2147483647
data input 2
Type
Range
Description
OUT
CJ_LONG
-2147483648...2147483647
output value
EIO0000000538 07/2014
315
Standard Libraries
MAX_SHORT
Function Block Diagram
Functional Description
The MAX_SHORT library compares the inputs IN1 and IN2 and returns the largest value.
Input Pin Description
Input
Type
Range
Description
IN1
CJ_SHORT
-32768...32767
data input 1
IN2
CJ_SHORT
-32768...32767
data input 2
316
Output
Type
Range
Description
OUT
CJ_SHORT
-32768...32767
output value
EIO0000000538 07/2014
Standard Libraries
MAX_S_BYTE
Function Block Diagram
Functional Description
The MAX_S_BYTE library compares the inputs IN1 and IN2 and returns the largest value.
Input Pin Description
Input
Type
Range
Description
IN1
CJ_S_BYTE
-128...127
data input 1
IN2
CJ_S_BYTE
-128...127
data input 2
Type
Range
Description
OUT
CJ_S_BYTE
-128...127
output value
EIO0000000538 07/2014
317
Standard Libraries
MAX_WORD
Function Block Diagram
Functional Description
The MAX_WORD library compares the inputs IN1 and IN2 and returns the largest value.
Input Pin Description
Input
Type
Range
Description
IN1
CJ_WORD
0...65535
data input 1
IN2
CJ_WORD
0...65535
data input 2
318
Output
Type
Range
Description
OUT
CJ_WORD
0...65535
output value
EIO0000000538 07/2014
Standard Libraries
MIN_BIT
Function Block Diagram
Functional Description
The MIN_BIT library compares the inputs IN1 and IN2 and returns the smaller value.
Input Pin Description
Input
Type
Range
Description
IN1
CJ_BIT
0, 1
data input 1
IN2
CJ_BIT
0, 1
data input 2
Type
Range
Description
OUT
CJ_BIT
0, 1
output value
EIO0000000538 07/2014
319
Standard Libraries
MIN_BYTE
Function Block Diagram
Functional Description
The MIN_BYTE library compares the inputs IN1 and IN2 and returns the smaller value.
Input Pin Description
Input
Type
Range
Description
IN1
CJ_BYTE
0...255
data input 1
IN2
CJ_BYTE
0...255
data input 2
320
Output
Type
Range
Description
OUT
CJ_BYTE
0...255
output value
EIO0000000538 07/2014
Standard Libraries
MIN_DWORD
Function Block Diagram
Functional Description
The MIN_DWORD library compares the inputs IN1 and IN2 and returns the smaller value.
Input Pin Description
Input
Type
Range
Description
IN1
CJ_DWORD
0...4294967295
data input 1
IN2
CJ_DWORD
0...4294967295
data input 2
Type
Range
Description
OUT
CJ_DWORD
0...4294967295
output value
EIO0000000538 07/2014
321
Standard Libraries
MIN_LONG
Function Block Diagram
Functional Description
The MIN_LONG library compares the inputs IN1 and IN2 and returns the smaller value.
Input Pin Description
Input
Type
Range
Description
IN1
CJ_LONG
-2147483648...-2147483647
data input 1
IN2
CJ_LONG
-2147483648...-2147483647
data input 2
322
Output
Type
Range
Description
OUT
CJ_LONG
-2147483648...-2147483647
output value
EIO0000000538 07/2014
Standard Libraries
MIN_SHORT
Function Block Diagram
Functional Description
The MIN_SHORT library compares the inputs IN1 and IN2 and returns the smaller value.
Input Pin Description
Input
Type
Range
Description
IN1
CJ_SHORT
-32768...32767
data input 1
IN2
CJ_SHORT
-32768...32767
data input 2
Type
Range
Description
OUT
CJ_SHORT
-32768...32767
output value
EIO0000000538 07/2014
323
Standard Libraries
MIN_S_BYTE
Function Block Diagram
Functional Description
The MIN_S_BYTE library compares the inputs IN1 and IN2 and returns the smaller value.
Input Pin Description
Input
Type
Range
Description
IN1
CJ_S_BYTE
-128...127
data input 1
IN2
CJ_S_BYTE
-128...127
data input 2
324
Output
Type
Range
Description
OUT
CJ_S_BYTE
-128...127
output value
EIO0000000538 07/2014
Standard Libraries
MIN_WORD
Function Block Diagram
Functional Description
The MIN_WORD library compares the inputs IN1 and IN2 and returns the smaller value.
Input Pin Description
Input
Type
Range
Description
IN1
CJ_WORD
0...65535
data input 1
IN2
CJ_WORD
0...65535
data input 2
Type
Range
Description
OUT
CJ_WORD
0...65535
output value
EIO0000000538 07/2014
325
Standard Libraries
SEL_BIT
Function Block Diagram
Functional Description
If the digital input G is set to 0, the output OUT will assume the value of IN1.
If the digital input G is set to 1, the output OUT will assume the value of IN2.
Input Pin Description
Input
Type
Range
Description
IN1
CJ_BIT
0, 1
data input 1
IN2
CJ_BIT
0, 1
data input 2
CJ_BIT
0, 1
selection input
326
Output
Type
Range
Description
OUT
CJ_BIT
0, 1
output value
EIO0000000538 07/2014
Standard Libraries
SEL_BYTE
Function Block Diagram
Functional Description
If the digital input G is set to 0, the output OUT will assume the value of IN1.
If the digital input G is set to 1, the output OUT will assume the value of IN2.
Input Pin Description
Input
Type
Range
Description
IN1
CJ_BYTE
0...255
data input 1
IN2
CJ_BYTE
0...255
data input 2
CJ_BIT
0, 1
selection input
Type
Range
Description
OUT
CJ_BYTE
0...255
output value
EIO0000000538 07/2014
327
Standard Libraries
SEL_DWORD
Function Block Diagram
Functional Description
If the digital input G is set to 0, the output OUT will assume the value of IN1.
If the digital input G is set to 1, the output OUT will assume the value of IN2.
Input Pin Description
Input
Type
Range
Description
IN1
CJ_DWORD
0...4294967295
data input 1
IN2
CJ_DWORD
0...4294967295
data input 2
CJ_BIT
0, 1
selection input
328
Output
Type
Range
Description
OUT
CJ_DWORD
0...4294967295
output value
EIO0000000538 07/2014
Standard Libraries
SEL_LONG
Function Block Diagram
Functional Description
If the digital input G is set to 0, the output OUT will assume the value of IN1.
If the digital input G is set to 1, the output OUT will assume the value of IN2.
Input Pin Description
Input
Type
Range
Description
IN1
CJ_LONG
-2147483648...2147483647
data input 1
IN2
CJ_LONG
-2147483648...2147483647
data input 2
CJ_BIT
0, 1
selection input
Type
Range
Description
OUT
CJ_LONG
-2147483648...2147483647
output value
EIO0000000538 07/2014
329
Standard Libraries
SEL_SHORT
Function Block Diagram
Functional Description
If the digital input G is set to 0, the output OUT will assume the value of IN1.
If the digital input G is set to 1, the output OUT will assume the value of IN2.
Input Pin Description
Input
Type
Range
Description
IN1
CJ_SHORT
-32768...32767
data input 1
IN2
CJ_SHORT
-32768...32767
data input 2
CJ_BIT
0..1
selection input
330
Output
Type
Range
Description
OUT
CJ_SHORT
-32768...32767
output value
EIO0000000538 07/2014
Standard Libraries
SEL_S_BYTE
Function Block Diagram
Functional Description
If the digital input G is set to 0, the output OUT will assume the value of IN1.
If the digital input G is set to 1, the output OUT will assume the value of IN2.
Input Pin Description
Input
Type
Range
Description
IN1
CJ_S_BYTE
-128...127
data input 1
IN2
CJ_S_BYTE
-128...127
data input 2
CJ_BIT
0, 1
selection input
Type
Range
Description
OUT
CJ_S_BYTE
-128...127
output value
EIO0000000538 07/2014
331
Standard Libraries
SEL_WORD
Function Block Diagram
Functional Description
If the digital input G is set to 0, the output OUT will assume the value of IN1.
If the digital input G is set to 1, the output OUT will assume the value of IN2.
Input Pin Description
Input
Type
Range
Description
IN1
CJ_WORD
0...65535
data input 1
IN2
CJ_WORD
0...65535
data input 2
CJ_BIT
0, 1
selection input
332
Output
Type
Range
Description
OUT
CJ_WORD
0...65535
output value
EIO0000000538 07/2014
Standard Libraries
Section 3.10
Timer Libraries
Timer Libraries
Overview
This section describes the timer libraries.
What Is in This Section?
This section contains the following topics:
Topic
Page
334
336
TP (Pulse Timer)
338
EIO0000000538 07/2014
333
Standard Libraries
Functional Description
The TOF library allows the insertion of an off delay time. For example, a machine fan is switched
off automatically in a predetermined length of time.
When an IN falling edge is detected, the ET internal timer is made to start.
If an IN rising edge is detected before the ET timer has reached the value PT, then the output Q
will not be turned off.
NOTE: Refer to the following graph:
334
EIO0000000538 07/2014
Standard Libraries
Type
Range
Description
PT
CJ_WORD
0...65535
preset time
a 16 bit value which identifies the off delay time
(hundreds of ms for TOFmsec and seconds for
TOFsec)
IN
CJ_BIT
0, 1
timer on
Type
Range
Description
ET
CJ_WORD
0...65535
elapsed time
represents the current elapsed time value
(hundreds of ms for TOFmsec and seconds for
TOFsec)
CJ_BIT
0, 1
signal output
EIO0000000538 07/2014
335
Standard Libraries
Functional Description
The TON library allows the insertion of an on delay time. For example, a compressor is switched
on only after a prefixed period of time following the switch-on request. .
When an IN rising edge is detected, the ET internal timer is made to start.
If an IN rising edge is detected before the ET timer has reached the value PT, then the output Q
will not be turned off.
NOTE: Refer to the following graph:
336
EIO0000000538 07/2014
Standard Libraries
Type
Range
Description
PT
CJ_WORD
0...65535
preset time
a 16 bit value which identifies the on delay time
(hundreds of ms for TONmsec and seconds for
TONsec)
IN
CJ_BIT
0, 1
timer on
Type
Range
Description
ET
CJ_WORD
0...65535
elapsed time
represents the current elapsed time value
(hundreds of ms for TONmsec and seconds for
TONsec)
CJ_BIT
0, 1
signal output
EIO0000000538 07/2014
337
Standard Libraries
TP (Pulse Timer)
Function Block Diagram
Functional Description
The TP library allows the insertion of a pulse time.
When an IN rising edge is detected, the output is turned on and the ET internal timer is made to
start. The Q output is switched off after the ET timer has reached the value PT.
If an IN new rising edge is detected before the ET counter has reached the value PT, it will be
ignored.
NOTE: Refer to the following graph:
338
EIO0000000538 07/2014
Standard Libraries
Type
Range
Description
PT
CJ_WORD
0...65535
preset time
a 16 bit value which identifies the time counted
by the counter (hundreds of ms for TPmsec and
seconds for TPsec)
IN
CJ_BIT
0, 1
pulse timer
Type
Range
Description
ET
CJ_WORD
0...65535
elapsed time
represents the current elapsed time value
(hundreds of ms for TPmsec and seconds for
TPsec)
CJ_BIT
0, 1
signal output
The output Q is at 1 for the period of time TP.
EIO0000000538 07/2014
339
Standard Libraries
Section 3.11
Timing Libraries
Timing Libraries
Overview
This section describes the timing libraries.
What Is in This Section?
This section contains the following topics:
Topic
340
Page
TDELAY
341
TSHIFT
343
TSUSTAIN
345
PWM
347
EIO0000000538 07/2014
Standard Libraries
TDELAY
Function Block Diagram
Functional Description
The TDELAY and TDELAY_mS libraries allow adding a delay to the input signal.
The rising edge of the output signal will be translated by a length of time time with respect to the
input signal.
NOTE: Refer to the following graph:
EIO0000000538 07/2014
341
Standard Libraries
Type
Range
Description
in
CJ_BIT
0, 1
input signal
time
CJ_WORD
0...65535
342
Output
Type
Range
Description
cnt
CJ_WORD
0...65535
out
CJ_BIT
0, 1
output signal
EIO0000000538 07/2014
Standard Libraries
TSHIFT
Function Block Diagram
Functional Description
The TSHIFT and TSHIFT_mS libraries allow adding a delay to the input signal. Both edges (rising
and falling) of the output signal will be translated by a length of time with respect to the input signal.
NOTE: Refer to the graphic below.
NOTE: The output stays false when the input is ON for less than the time shift duration.
Type
Range
in
CJ_BIT
0, 1
input signal
time
CJ_WORD
0...65535
shift time (on the basis of seconds for TSHIFT and on 100 ms
for TSHIFT_mS)
EIO0000000538 07/2014
Description
343
Standard Libraries
344
Output
Type
Range
Description
cnt
CJ_WORD
0...65535
out
CJ_BIT
0, 1
output signal
EIO0000000538 07/2014
Standard Libraries
TSUSTAIN
Function Block Diagram
Functional Description
The TSUSTAIN and TSUSTAIN_mS libraries allow adding a delay to the input signal.
The falling edge of the output signal will be translated by a length of time with respect to the input
signal.
Type
Range
Description
in
CJ_BIT
0, 1
input signal
time
CJ_WORD
0...65535
EIO0000000538 07/2014
345
Standard Libraries
346
Output
Type
Range
Description
cnt
CJ_WORD
0...65535
out
CJ_BIT
0, 1
output signal
EIO0000000538 07/2014
Standard Libraries
PWM
Function Block Diagram
Functional Description
The PWM (Pulse Width Modulation) library uses two inputs to calculate a binary output (on/off). This
is a periodic function with time period T.
It provides a time-modulated output based on the value of the input In. This input determines the
percentage of the period T that the PWM output will be at logic 1 (on).
For the remaining of the period, the output will be at logic 0 (Toff = T - Ton).
The output can assume the logic value 1 only once within each period. If the value of In changes
from zero (output permanently off) to some other value, the start of the period is re-synchronized
and the output is turned on immediately.
This feature is useful to avoid delays when immediate output activation is needed after an idle
period.
NOTE: Internal counts are controlled under a 100 ms interrupt. You should set the timed property
of the entity connected at the PWM library output (for example a DIGITALOUT) on Timed 100 ms.
EIO0000000538 07/2014
347
Standard Libraries
Type
Range
Description
In
CJ_WORD
0...10000
CJ_BYTE
0...255
348
Output
Type
Range
Description
PWM
CJ_BIT
0, 1
function output
EIO0000000538 07/2014
SoHVAC
Control Libraries
EIO0000000538 07/2014
Chapter 4
Control Libraries
Control Libraries
Overview
This chapter describes the control libraries.
What Is in This Chapter?
This chapter contains the following sections:
Section
Topic
Page
4.1
Linear Libraries
350
4.2
358
EIO0000000538 07/2014
349
Control Libraries
Section 4.1
Linear Libraries
Linear Libraries
Overview
This section describes the linear libraries.
What Is in This Section?
This section contains the following topics:
Topic
350
Page
A_LINEAR_CONVERTER
351
A_LOW_PASS_FILTER
353
S_LINEAR_CONVERTER
354
S_Low_PASS_FILTER
355
LINEAR_RAMP
356
EIO0000000538 07/2014
Control Libraries
A_LINEAR_CONVERTER
Function Block Diagram
Functional Description
The A_LINEAR_CONVERTER library performs a linear transformation on an input analog signal.
The parameters for the function are set by the user through the x1, x2, y1 and y2 inputs.
In output, the function represents the linear analog signal.
NOTE: If the input has been determined to be in error, then the output will also be in an error state.
Refer to the following graph. Linear conversion from 4-20 mA to 0-30 Bar. The ordinate axis
represents the pressure (Bar) and the abscissa axis current (mA).
EIO0000000538 07/2014
351
Control Libraries
Type
Range
Description
CJ_ANALOG
Value: -32768...32767
Error: 0...2
x1
CJ_SHORT
-32768...32767
coordinate x1
x2
CJ_SHORT
-32768...32767
coordinate x2
y1
CJ_SHORT
-32768...32767
coordinate y1
y2
CJ_SHORT
-32768...32767
coordinate y2
352
Output
Type
Range
Description
CJ_ANALOG
Value: -32768...32767
Error: 0...2
EIO0000000538 07/2014
Control Libraries
A_LOW_PASS_FILTER
Function Block Diagram
Functional Description
The A_LOW_PASS_FILTER library allows filtering out input fluctuations by means of a low-pass
filter.
In case of any step changes in the input, this library allows the inclusion of a settling time prior to
the output value being adjusted to that of the input x.
If the function is active (en = 1), the output signal will reach the value of the input signal after a
period of time equal to ts * 100 ms.
NOTE: If the input has been determined to be in error, then the output will also be in an error state.
Input Pin Description
Input
Type
Range
Description
CJ_ANALOG
Value: -32768...32767
Error: 0...2
ts
CJ_WORD
0...65535
en
CJ_BIT
0, 1
Type
Range
Description
CJ_ANALOG
Value: -32768...32767
Error: 0...2
EIO0000000538 07/2014
353
Control Libraries
S_LINEAR_CONVERTER
Function Block Diagram
Functional Description
The S_LINEAR_CONVERTER library performs a linear transformation on an input digital signal.
The parameters for the function are set by the user through the x1, x2, y1, and y2 inputs.
In output, the function represents the linearized digital signal.
NOTE: If the input has been determined to be in error, then the output will also be in an error state.
Refer to the A_LINEAR CONVERTER GRAPH (see page 351).
Input Pin Description
Input
Type
Range
Description
CJ_SHORT
-32768...32767
input signal
x1
CJ_SHORT
-32768...32767
coordinate x1
x2
CJ_SHORT
-32768...32767
coordinate x2
y1
CJ_SHORT
-32768...32767
coordinate y1
y2
CJ_SHORT
-32768...32767
coordinate y2
354
Output
Type
Range
Description
CJ_SHORT
-32768...32767
EIO0000000538 07/2014
Control Libraries
S_Low_PASS_FILTER
Function Block Diagram
Functional Description
The S_LOW_PASS_FILTER library allows filtering out input fluctuations by means of a low-pass
filter.
In case of any step changes in the input, this library allows the inclusion of a settling time prior to
the output value being adjusted to that of the input x.
If the function is active (en = 1), the output signal will reach the value of the input signal after a
period of time equal to ts * 100 ms.
Input Pin Description
Input
Type
Range
Description
CJ_SHORT
-32768...32767
input signal
ts
CJ_WORD
0...65535
en
CJ_BIT
0, 1
Type
Range
Description
CJ_SHORT
-32768...32767
EIO0000000538 07/2014
355
Control Libraries
LINEAR_RAMP
Function Block Diagram
Functional Description
The LINEAR_RAMP library performs the ramp function y = kx + c, where the slope k is a function
of the stopValue, startValue and time parameters.
The time parameter indicates the number of seconds the function uses to reach the stopValue
value, starting from any given initial value startValue.
According to the above considerations, the slope of the ramp is defined as follows: stopValuestartValue/time.
The start input has the following functions:
If set to the value 1, it initiates the function.
If set to the value 0, it stops the function storing the output in memory. If start changes once
more to the value 1, the output starts off again from where it had stopped.
The load input is used to reset the output to the initial value. If load=1, the ramp function is
inhibited and the output assumes the startValue value.
356
EIO0000000538 07/2014
Control Libraries
Type
Range
Description
startValue
CJ_SHORT
-32768...32767
initial value
stopValue
CJ_SHORT
-32768...32767
final value
time
CJ_WORD
0...65535
load
CJ_BIT
0, 1
start
CJ_BIT
0, 1
Output
Type
Range
Description
out
CJ_SHORT
-32768...32767
EIO0000000538 07/2014
357
Control Libraries
Section 4.2
Non Linear Libraries
358
Page
DEAD_BAND
359
LIMIT
361
ZONE
363
PID
365
PI
367
THERMO_HOT
369
THERMO_COLD
371
THERMO_HOT_COLD
373
EIO0000000538 07/2014
Control Libraries
DEAD_BAND
Function Block Diagram
Functional Description
The DEAD_BAND library compares the input value with the lower and upper inputs. The lower
limit is specified by the lower input and the upper limit is specified by the upper input.
The result of the function is returned as output according to the following graph:
Type
Range
Description
lower
CJ_SHORT
-32768...upper
upper
CJ_SHORT
lower...32767
input
CJ_SHORT
-32768...32767
input to be checked
EIO0000000538 07/2014
359
Control Libraries
360
Output
Type
Range
Description
output
CJ_SHORT
-32768...32767
controlled output
EIO0000000538 07/2014
Control Libraries
LIMIT
Function Block Diagram
Functional Description
The LIMIT library compares the input value with the upper and lower inputs. The lower limit is
specified by the lower input and the upper limit is specified by the upper input.
The result of the function is returned as output according to the following graph:
Type
Range
Description
lower
CJ_SHORT
-32768...upper
upper
CJ_SHORT
lower...32767
input
CJ_SHORT
-32768...32767
input to be checked
EIO0000000538 07/2014
361
Control Libraries
362
Output
Type
Range
Description
output
CJ_SHORT
-32768...32767
controlled output
EIO0000000538 07/2014
Control Libraries
ZONE
Function Block Diagram
Functional Description
The ZONE library adds an offset value to the input value input. The negative and positive offset
values are assigned by the negative and positive inputs respectively.
The result of the function is returned as output according to the following graph:
The inputs negative and positive can be both negative or positive CJ_SHORT. The negative
input value must be lower than the positive input value.
EIO0000000538 07/2014
363
Control Libraries
Type
Range
Description
negative
CJ_SHORT
-32768...positive
negative offset
positive
CJ_SHORT
negative...32767
positive offset
input
CJ_SHORT
-32768...32767
input to be verified
364
Output
Type
Range
Description
output
CJ_SHORT
-32768...32767
controlled output
EIO0000000538 07/2014
Control Libraries
PID
Function Block Diagram
Functional Description
The PID library performs the function of the PID regulator, which produces a control signal which
is the sum of a term proportional to the deviation to a given set point (part P), with one proportional
to its integral (part I) and another to its derivative (part D).
The logic provided by the regulator follows the idea defined in the following figure:
The output of the three components will produce a term, in percentage points to two decimal
places, which will correspond to the quantity of signal to be produced so that the output is brought
close to the established value (Set parameter).
The Mode parameter distinguishes the regulator into direct (Mode = 0), or inverse (Mode = 1) acting
system control. For example:
Mode = 1, to control a heating process
Mode = 0, to control a refrigeration process
NOTE: For correct functioning of the library, the Bp, Ti and Td parameters are set on the basis of
the dynamic characteristics of the system being controlled (for example by using one of the various
PID auto-tuning methods).
EIO0000000538 07/2014
365
Control Libraries
Type
Range
Description
Value
CJ_SHORT
-32768...32767
value to be controlled
Set
CJ_SHORT
-32768...32767
set-point
Bp
CJ_WORD
0...65535
proportional band
Ti
CJ_WORD
0...999
Td
CJ_WORD
0...999
Mode
CJ_BIT
0, 1
Mode of operation:
0 = direct action
1 = inverse action
366
Output
Type
Range
Description
out
CJ_WORD
0...10000
EIO0000000538 07/2014
Control Libraries
PI
Function Block Diagram
Functional Description
The PI library performs the function of the PI regulator, which produces a control signal which is
the sum of a term proportional to the deviation (part P) and one proportional to its integral (part I).
The logic provided by the regulator follows the idea defined in the following figure:
The output of the two components will produce a term, in percentage points to two decimal places,
which will correspond to the quantity of signal to be produced so that the output is brought close to
the established value (Set parameter).
The Mode parameter distinguishes the regulator into direct (Mode = 0), or inverse (Mode = 1) acting
system control. For example:
Mode = 1, if it desired to control a heating process
Mode = 0, if it desired to control a refrigeration process
NOTE: For correct functioning of the library, the Bp and Ti parameters are set on the basis of the
dynamic characteristics of the system being controlled (for example, by using one of the various
PI auto-tuning methods).
EIO0000000538 07/2014
367
Control Libraries
Type
Range
Description
Value
CJ_SHORT
-32768...32767
value to be controlled
Set
CJ_SHORT
-32768...32767
set-point
Bp
CJ_WORD
0...65535
proportional band
Ti
CJ_WORD
0...999
Mode
CJ_BIT
0, 1
Mode of operation:
0 = direct action
1 = inverse action
368
Output
Type
Range
Description
out
CJ_WORD
0...10000
EIO0000000538 07/2014
Control Libraries
THERMO_HOT
Function Block Diagram
Functional Description
The THERMO_HOT library performs the role of an inverse-acting on-off regulator. That is:
If the input value in is less than the set-point value set, having subtracted the differential diff,
the output is activated (out = 1).
If the input value in is greater than the set-point value set, the output is deactivated (out = 0).
For example, this library may be used to regulate a heating process, that is, a thermostat with
hysteresis below the set-point.
EIO0000000538 07/2014
369
Control Libraries
Type
Range
Description
in
CJ_SHORT
-32768...32767
input value
set
CJ_SHORT
-32768...32767
set-point
diff
CJ_SHORT
-32768...32767
differential
370
Output
Type
Range
Description
out
CJ_BIT
0, 1
regulator status
EIO0000000538 07/2014
Control Libraries
THERMO_COLD
Function Block Diagram
Functional Description
The THERMO_COLD library performs the role of a direct-acting on-off regulator, that is:
If the input value in is greater than the set-point value set summed with the differential diff,
the output is activated (out = 1).
If the input value in is less than or equal to the set-point value set, the output is deactivated
(out = 0).
For example, this library may be used to regulate a refrigeration process, that is, a thermostat with
hysteresis above the set-point.
EIO0000000538 07/2014
371
Control Libraries
Type
Range
Description
in
CJ_SHORT
-32768...32767
input value
set
CJ_SHORT
-32768...32767
set-point
diff
CJ_SHORT
-32768...32767
differential
372
Output
Type
Range
Description
out
CJ_BIT
0, 1
regulator status
EIO0000000538 07/2014
Control Libraries
THERMO_HOT_COLD
Function Block Diagram
Functional Description
The THERMO_HOT_COLD library permits performing both direct and inverse actions, by altering the
mode input.
With mode = 0, direct action.
If the input value in is greater than the set-point value set summed with the differential diff,
the output is activated (out = 1).
If the input value in is less than or equal to the set-point value set, the output is deactivated
(out = 0).
Direct action is necessary when dealing with a thermostat with hysteresis above the set-point.
With mode = 1, inverse action.
If the input value in is less than the set-point value set, by subtracting the differential diff,
the output is activated (out = 1).
If the input value in is greater than or equal to the set-point value set, the output is deactivated
(out = 0).
Inverse action is necessary when dealing with a thermostat with hysteresis below the set-point.
Input Pin Description
Input
Type
Range
Description
in
CJ_SHORT
-32768...32767
input value
set
CJ_SHORT
-32768...32767
set-point
diff
CJ_SHORT
-32768...32767
differential
mode
CJ_BIT
0, 1
mode of operation:
0 = direct action
1 = inverse action
EIO0000000538 07/2014
373
Control Libraries
374
Output
Type
Range
Description
out
CJ_BIT
0, 1
regulator status
EIO0000000538 07/2014
SoHVAC
AHU AFBs
EIO0000000538 07/2014
Chapter 5
AHU Application Program Function Blocks
Page
OnOff_Control
377
AirFlowControl
381
PumpControl
383
PumpAlarm
387
OperatingMode
389
SummerSPcompensation
392
FansOnOffControl
394
FanTempControl
396
FanStaticPressureControl
400
SniffingFanControl
403
FanManagement
405
FanAlarm
409
FloatingSetPoint
411
HeatingCoilControl
414
PostHeatCoilControl
418
PostHeatHeaterControl
421
HeaterAlarm
425
CoolingCoilControl
426
DehumidControl
429
HumidificationControl
433
AirQualityControl
438
ZeroEnergyControl
440
ExternalAirDamperControl
445
CrossFlowHeatExchangerControl
449
TwinCoilsControl
452
EIO0000000538 07/2014
375
AHU AFBs
Topic
376
Page
HeatWheelControl
454
OperatingHoursAndAlarm
457
WeeklyScheduler
459
AlarmManagement
463
AutomaticAlarm
466
ByPassAutoAlarm
467
ByPassAutoManuAlarm
468
ManualResetAlarm
470
472
EIO0000000538 07/2014
AHU AFBs
OnOff_Control
Function Block Diagram
Functional Description
Manages the on/off procedure of the unit with different methods. On the basis of the modality
configured, unit on takes place only if all of the switch-on conditions are respected; the unit goes
into the off status as soon as one of these conditions is not present. In this case, the unit goes into
the corresponding off status that determined switch-off.
The on/off status from key has priority with respect to the others. This status is that which
determines unit switch-on. The unit cannot switch-on until the condition from key (if enByKey = 1
enabled) has been verified and consequently, none of the remaining states can be reached.
EIO0000000538 07/2014
377
AHU AFBs
On/Off Methods
Method
Input Function
Switch-On
Switch-Off
Key
enByKey
Digital input
enByDI
Supervisor
enBySup
Schedule timer
enBySchedule
Alarm
onAlarms
Discharged RTC
rtcFault
NOTE: If all the enable functions (enByKey, enByDI, enBySup and enBySchedule) are
disabled, then the machine is enabled by default.
378
EIO0000000538 07/2014
AHU AFBs
Type
Minimum
Maximum
Default
Description
enByKey
CJ_BIT
evKeyOnOff
CJ_BIT
enByDI
CJ_BIT
statusDI
CJ_BIT
enBySup
CJ_BIT
statusSup
CJ_BIT
enBySchedule
EIO0000000538 07/2014
CJ_BIT
379
AHU AFBs
Input
Type
Minimum
Maximum
Default
Description
statusSchedule
CJ_BIT
onAlarms
CJ_BIT
rtcFault
CJ_BIT
rtcDone
CJ_BIT
Type
Minimum
Maximum
Description
unitStatus
CJ_BYTE
unitOnOff
CJ_BIT
380
EIO0000000538 07/2014
AHU AFBs
AirFlowControl
Function Block Diagram
Functional Description
The flow switch is managed after the initial switch-on phase of the unit and after the time defined
by the parameter startupDelay. When this delay expires, if the contact signals a lack of flow,
the alarm is indicated.
The control is performed also during normal functioning. The flow sensor is monitored
continuously. If the contact signals a lack of flow for a band of time exceeding the time set by the
runningDelay parameter, the alarm is signaled.
The flow switch alarm has manual restore by forcing the resetAlarm input.
EIO0000000538 07/2014
381
AHU AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
fans
CJ_BIT
fan status:
0 fans not operating
1 fans operating
startupDelay
CJ_WORD
999
runningDelay
CJ_WORD
999
DI_Flow
CJ_BIT
resetAlarm
CJ_BIT
Minimum
Maximum
Description
Type
enable
CJ_BIT
flowAlarm
CJ_BIT
382
EIO0000000538 07/2014
AHU AFBs
PumpControl
Function Block Diagram
EIO0000000538 07/2014
383
AHU AFBs
Functional Description
Manages the 2 circulation pumps for heating and cooling. The 2 controls are independent of each
other.
The regulationType parameter defines the type of regulation with which the pump is controlled:
0 continuous functioning
1 on/off functioning
In the continuous functioning mode, regulation is linked to the status of the power plant, the pumps
switch on and off with machine switch-on/off. Select regulationType = 0 to set this regulation.
In the on/off functioning mode, the pumps are activated when there is an effective heating/cooling
request that exceeds a switch-on set (setON) and switch-off when the same request drops below
a switch-off set (setOFF). Select regulationType = 1 to set this regulation.
The pump is activated when the regulation ramp exceeds setON. When it drops below setOFF, a
timer is activated that keeps the pump active for a band of time that can be set (minTimePumpON
parameter). The timer is reset if the ramp goes back over setON. The pump is switched-off by the
switch-off command of the unit, canceling any active timing.
Pump status
Every pump has an associated functioning status (statusHeatPump and statusCoolPump
outputs)
Disabled the pump is not configured
Off the pump is off
In switch-off stand-by the pump is about to switch-off, it is in stand-by for the delay specified by
the minTimePumpON parameter
On the pump is functioning
Alarm pump thermal switch alarm
384
EIO0000000538 07/2014
AHU AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
unitOnOff
CJ_BIT
regulationType
CJ_BIT
setON
CJ_WORD
1.00
90.0
setOFF
CJ_WORD
1.00
90.0
minTimePumpON
CJ_WORD
99
enHeatPump
CJ_BIT
rampHeat
CJ_WORD
0.00
100.00
alarmHeatPump
CJ_BIT
blockHeatPump
CJ_BIT
enCoolPump
CJ_BIT
rampCool
CJ_BIT
alarmCoolPump
CJ_BIT
blockCoolPump
CJ_BIT
EIO0000000538 07/2014
385
AHU AFBs
Type
Minimum
Maximum
Description
enable
CJ_BIT
heatPump
CJ_BIT
statusHeatPump
CJ_BYTE
coolPump
CJ_BIT
statusCoolPump
CJ_BYTE
386
EIO0000000538 07/2014
AHU AFBs
PumpAlarm
Function Block Diagram
Functional Description
The macroblock manages the thermal switch alarms of each of the two heating and cooling pumps.
The alarm intervenes automatically after 2 seconds from activation of the dedicated contact and is
restored automatically on return of the alarm condition.
Input Pin Description
Input
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
enHeatPump
CJ_BIT
DI_AlarmHeatPump
EIO0000000538 07/2014
CJ_BIT
387
AHU AFBs
Input
Type
Minimum
Maximum
Default
Description
enCoolPump
CJ_BIT
DI_AlarmCoolPump
CJ_BIT
Type
Minimum
Maximum
Description
enable
CJ_BIT
alarmHeatPump
CJ_BIT
alarmCoolPump
CJ_BIT
388
EIO0000000538 07/2014
AHU AFBs
OperatingMode
Function Block Diagram
Functional Description
The operational mode can assume the following values:
MOdE Parameter
Operational Mode
Description
Chiller - Cooling
There are procedures that allow to set the unit functioning mode:
1. through the MOdE parameter present inside the macroblock
2. through supervision protocol (function enabled by enBySup input)
Setting: connect the statusSup input with the command for mode change sent by the
supervision protocol
3. through the Change-over from outside temperature (function enabled from enByChangeOver
input)
Setting:
the unit switches to summer operating mode when the outside temperature value exceeds
the setToCooling
the unit switches to winter operating mode when the external temperature drops below the
setToHeating.
NOTE: Change-over from outside temperature has a higher priority than change-over by
supervision.
EIO0000000538 07/2014
389
AHU AFBs
Type
Minimum
Maximum
Default
Description
enByKey
CJ_BIT
enBySup
CJ_BIT
statusSup
CJ_BIT
enByChangeOver
CJ_BIT
tempExternal
CJ_ANALOG
setToHeating
CJ_SHORT
-58.0
302.0
setToCooling
CJ_SHORT
-58.0
302.0
390
EIO0000000538 07/2014
AHU AFBs
Internal Parameters/Status
Parameter
Type
Minimum
Maximum
Default
Description
MOdE
CJ_BIT
Type
Minimum
Maximum
Description
mode
CJ_BIT
EIO0000000538 07/2014
391
AHU AFBs
SummerSPcompensation
Function Block Diagram
Functional Description
The cooling regulation requests compensation of the room regulation set point depending on the
outside temperature only for the summer operating mode (mode = 0). The function is imported in
order to prevent an excessive heat change between the outside environment and internal
environment and adapt the well-being area to the changed conditions. It also allows energy saving
on the system.
The compensation set point increases proportionally with the increase of the external temperature
until reaching the maximum set acceptable configured from the maxSetPoint input.
392
EIO0000000538 07/2014
AHU AFBs
This function is inhibited with an external probe and the error is detected.
If the function is disabled or inhibited, the setPoint output is always equivalent to the setPoint
input.
Input Pin Description
Input
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
mode
CJ_BIT
setPoint
CJ_SHORT
-58.0
302.0
maxSetPoint
CJ_SHORT
-58.0
302.0
setExtStart
CJ_SHORT
-58.0
302.0
diffExt
CJ_SHORT
0.0
80.0
tempExternal
CJ_ANALOG
Type
Minimum
Maximum
Description
enable
CJ_BIT
setPoint
CJ_SHORT
-58.0
302.0
EIO0000000538 07/2014
393
AHU AFBs
FansOnOffControl
Function Block Diagram
Functional Description
The on/off regulation maintains the switch-on/off of the fans depending on the regulation set point
(setPoint) and a differential (dif) that are compared by reading the room temperature or on the
return channel depending on where the regulation probe is positioned. The regulation is
distinguished on the basis of the summer/winter operating mode.
The 2 fans are driven simultaneously by the same requestFan output signal.
Summer/cooling operating mode:
394
EIO0000000538 07/2014
AHU AFBs
If the regulation probe is in inoperative conditions, it is possible to decide the status that the 2 fans
must have through the valOnErrorProbe input.
Input Pin Description
Input
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
unitOnOff
CJ_BIT
mode
CJ_BIT
setPoint
CJ_SHORT
-58.0
302.0
dif
CJ_SHORT
0.0
80.0
tempRoom
CJ_ANALOG
valOnErrorProbe
CJ_BIT
Type
Minimum
Maximum
Description
enable
CJ_BIT
requestFan
CJ_BIT
EIO0000000538 07/2014
395
AHU AFBs
FanTempControl
Function Block Diagram
396
EIO0000000538 07/2014
AHU AFBs
Functional Description
The regulation depends on the regulation set point (setPoint) and a differential (dif) that are
compared by reading the room temperature or on the return channel depending on where the
regulation probe is positioned. The regulation is distinguished on the basis of the summer/winter
operating mode.
The 2 fans are commanded simultaneously by the same requestFan output signal.
Summer/cooling operating mode:
If the regulation probe is inactive, it is possible to decide the status that the 2 fans must have
through the valOnErrorProbe input.
EIO0000000538 07/2014
397
AHU AFBs
The switch-off point corresponds to the value of the room regulation Set Point. The switch-on/off
action is delayed to prevent cycles that are too short and transients that could adversely influence
the regulation (delayOnOffFan input).
Input Pin Description
Input
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
unitOnOff
CJ_BIT
mode
CJ_BIT
setPoint
CJ_SHORT
-58.0
302.0
dif
CJ_SHORT
0.0
80.0
tempRoom
CJ_ANALOG
maxValue
CJ_WORD
0.00
100.00
minValue
CJ_WORD
0.00
100.00
398
EIO0000000538 07/2014
AHU AFBs
Input
Type
Minimum
Maximum
Default
Description
enOnOffStep
CJ_BIT
diffRamp
CJ_WORD
0.00
60.00
8.00
delayOnOffFan
CJ_WORD
999
10
valOnErrorProbe
CJ_WORD
0.00
100.00
Type
Minimum
Maximum
Description
enable
CJ_BIT
requestFan
CJ_WORD
0.00
100.00
EIO0000000538 07/2014
399
AHU AFBs
FanStaticPressureControl
Function Block Diagram
Functional Description
A proportional-integral control can be performed using the supply pressure probe and comparing
it with a ramp floating pressure set point.
400
EIO0000000538 07/2014
AHU AFBs
Fans PI Regulation
The regulation is proportional if the integral time is equal to 0 (integralTime = 0).
If the regulation probe is inactive, it is possible to determine the status required by the 2 fans with
the valOnErrorProbe input.
The 2 fans are driven simultaneously by the same requestFan output signal.
EIO0000000538 07/2014
401
AHU AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
unitOnOff
CJ_BIT
dischargePress
CJ_ANALOG
setPointPress
CJ_SHORT
0.0
750.0
setPointRampTime
CJ_WORD
0.0
750.0
PropBand
CJ_SHORT
0.0
300
integralTime
CJ_WORD
999
maxValue
CJ_WORD
0.00
100.00
minValue
CJ_WORD
0.00
100.00
valOnErrorProbe
CJ_WORD
0.00
100.00
Type
Minimum
Maximum
Description
enable
CJ_BIT
actualSetPointPress
CJ_SHORT
0.0
750.0
requestFan
CJ_WORD
0.00
100.00
402
EIO0000000538 07/2014
AHU AFBs
SniffingFanControl
Function Block Diagram
Functional Description
When the regulation probe is positioned in the return channel (onReturnProbe = 1), it will be
possible to monitor the room temperature by regularly starting the return fan.
The cycle is made up of a stand-by time (waitTime) during which the fan is off and an activation
time (activeTime) during which the fan is on. The cycle always starts with the pause period as
soon as the fan is switched-off by room regulation reqReturnFan = 0. The cycle ends, if during
the activation phase, the room temperature regulation activates the fan (reqReturnFan = 1).
Through the enBothFans input, it decides whether to activate only the return fan (enBothFans
= 0) during air quality (sniffing) or both fans (enBothFans = 1).
If the cycle is not active or the function is not enabled, the 2 outSupplyFan and outReturnFan
outputs are always equivalent to the 2 reqSupplyFan and reqSupplyFan inputs respectively.
EIO0000000538 07/2014
403
AHU AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
unitOnOff
CJ_BIT
waitTime
CJ_WORD
99
activeTime
CJ_WORD
30
enBothFans
CJ_BIT
enReturnFan
CJ_BIT
CJ_WORD
0.00
100.00
reqReturnFan
CJ_WORD
0.00
100.00
onReturnProbe
CJ_BIT
reqSupplyFan
Type
Minimum
Maximum
Description
enable
CJ_BIT
outSupplyFan
CJ_WORD
0.00
100.00
outReturnFan
CJ_WORD
0.00
100.00
404
EIO0000000538 07/2014
AHU AFBs
FanManagement
Function Block Diagram
Functional Description
Manages the 2 return and supply fans according to the regulation status (reqSupplyFan and
reqReturnFan input) at the input.
The block manages on/off or modulating fans. All the dedicated inputs are of CJ_WORD type. If the
macroblock is to be used with step regulators (on/off), the off status is configured as 0.0%, while
the on status as 100.0%.
EIO0000000538 07/2014
405
AHU AFBs
Fans Times
Fan protection times to prevent simultaneous peaks:
minTimeStartOther - minimum time that must pass between switch-on of one fan and the next
minTimeStopOther - minimum time that must pass between switch-off of one fan and the next
Manual Operating Mode
For condensing fans to go into manual operating mode, the 2 enManualSupplyFan and
enManualReturnFan inputs must be set:
0 normal device behavior
1 disables the fan and takes it to manual operating mode
A fan in manual operating mode does not participate in regulations and can be forced into switchon/off by setting the desired value through the internal forceSupplyFan and forceReturnFan
status.
A fan in manual operating mode is sensitive to alarms.
Fans Status
Each fan has an associated operating status (statusSupplyFan and statusReturnFan
output):
Disabled the fan is not configured
On the fan is operating
Switch-on stand-by the fan is in stand-by due to the switch-on protection times
Off the fan is off
Switch-off stand-by the fan is in stand-by due to the switch-off protection times
Alarm fan thermal switch alarm
Manual the fan is in manual operating mode
Input Pin Description
Input
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
minTimeStartOther
CJ_WORD
999
minTimeStopOther
CJ_WORD
999
406
EIO0000000538 07/2014
AHU AFBs
Input
Type
Minimum
Maximum
Default
Description
enSupplyFan
CJ_BIT
reqSupplyFan
CJ_WORD
0.0
100.00
enManualSupplyFan
CJ_BIT
alarmSupplyFan
CJ_BIT
blockSupplyFan
CJ_BIT
enReturnFan
CJ_BIT
reqReturnFan
CJ_WORD
0.00
100.00
enManualReturnFan
CJ_BIT
alarmReturnFan
CJ_BIT
blockReturnFan
CJ_BIT
Internal Parameters/Status
Parameter
Type
Minimum
Maximum
Description
forceSupplyFan
CJ_WORD
0.00
100.00
forceReturnFan
CJ_WORD
0.00
100.00
EIO0000000538 07/2014
407
AHU AFBs
Type
Minimum
enable
CJ_BIT
outSupplyFan
CJ_WORD
0.00
100.00
statusSupplyFan
CJ_BYTE
outReturnFan
CJ_WORD
0.0
100.00
statusReturnFan
CJ_BYTE
408
Maximum
Description
EIO0000000538 07/2014
AHU AFBs
FanAlarm
Function Block Diagram
Functional Description
The macroblock manages the thermal switch alarms of each of the 2 supply and return fans. The
alarm intervenes automatically after 2 seconds from activation of the dedicated contact and is
restored automatically on return of the alarm condition.
Input Pin Description
Input
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
enSupplyFan
CJ_BIT
DI_AlarmSupplyFan
EIO0000000538 07/2014
CJ_BIT
409
AHU AFBs
Input
Type
Minimum
Maximum
Default
Description
enReturnFan
CJ_BIT
DI_AlarmReturnFan
CJ_BIT
Type
Minimum
Maximum
Description
enable
CJ_BIT
alarmSupplyFan
CJ_BIT
alarmReturnFan
CJ_BIT
410
EIO0000000538 07/2014
AHU AFBs
FloatingSetPoint
Function Block Diagram
Functional Description
In relation to the offset between set point and room temperature, it establishes the value the supply
temperature has. The supply set point is calculated as floating set point on the room temperature.
EIO0000000538 07/2014
411
AHU AFBs
The Minimum Limit and the Maximum Limit are expressed as temperature offset (offset)
with respect to the room regulation set point setPoint. If the temperature remains in the neutral
zone (zone), the setPoint is not modified. By setting offset = 0.0, the function is as if not
enabled. If the temperature probe is incorrect, the function is disabled. When the function is
disabled or inhibited, the supply set point calculated on (setPointSupply) output is always
equivalent to the room set point (setPoint) past on input.
Single Coil Unit
With single coil unit, the management of setpoint depends on the input mode.
SUMMER mode (mode = 0):
412
EIO0000000538 07/2014
AHU AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
mode
CJ_BIT
coils
CJ_BYTE
setPoint
CJ_SHORT
-58.0
302.0
diffTemp
CJ_SHORT
0.0
80.0
zone
CJ_SHORT
0.0
80.0
offsetTemp
CJ_SHORT
0.0
80.0
offset value [ C]
tempRoom
CJ_ANALOG
Type
Minimum
Maximum
Description
enable
CJ_BIT
setPointSupply
CJ_SHORT
-58.0
302.0
EIO0000000538 07/2014
413
AHU AFBs
HeatingCoilControl
Function Block Diagram
Functional Description
For units with single coil, this macroblock manages the coil as a heating/cooling resource on the
basis of the operational mode selected (mode input).
Regulation takes place on a floating set point on the supply (setPointSupply) calculated as an
offset from the room regulation set point. The respective valves are commanded through a
proportional (P) or proportional-integral (PI) algorithm. The reference probe is that of the supply
temperature.
Set the integral time at 0 (integralTime) to use proportional regulation. By setting an integral
time greater than 0 (integralTime > 0), regulation is more precise. The integral part has the job
of taking the output to normal working conditions, thus reducing the delta introduced by just the
proportional component.
414
EIO0000000538 07/2014
AHU AFBs
Heating
Proportional regulation of the heating valve:
In the event of a detected error on the supply probe, it is possible to open the valve of the heating
coil by setting the valueOnErrorProbe input. During an anti-freeze alarm (antiFreeze = 1),
the coil is forced to the maximum value of 100%.
Winter/Heating Operating Mode in Free-Heating Mode
When there are free-heating(requestFCH = 2) conditions, the ramp that commands heating is
divided into 2 successive ramps. The first (one half of differential) regulates free-heating through
the outside air damper, the second regulates the heating coil.
NOTE: If one of the probes involved in regulation is inactive, the regulation of the free-heating can
no longer be used.
EIO0000000538 07/2014
415
AHU AFBs
Single-Coil Unit
For units with single coil, this macroblock manages the coil as a heating/cooling resource on the
basis of the operational mode selected (mode input). The same regulations seen above are valid
for the Heating mode.
Cooling
Proportional regulation of the cooling valve:
In the event of a detected error on the supply probe, it is possible to open the valve of the cooling
coil by setting the valueOnErrorProbe input. During an anti-freeze alarm (antiFreeze = 1),
the coil is forced to the closure value of 0%.
Summer/Cooling Operating Mode in Free-Cooling Mode
When there are free-cooling (requestFCH = 1) conditions, the ramp that commands cooling is
divided into 2 successive ramps. The first (one half of differential) regulates free-cooling through
the external air damper, the second regulates the cooling coil.
NOTE: If one of the probes involved in regulation is inactive, the regulation of the free-cooling can
no longer be used.
416
EIO0000000538 07/2014
AHU AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
unitOnOff
CJ_BIT
mode
CJ_BIT
coils
CJ_BYTE
setPointSupply
CJ_SHORT
-58.0
302.0
diffTemp
CJ_SHORT
0.0
50.0
integralTime
CJ_WORD
999
zoneTemp
CJ_SHORT
0.0
80.0
tempSupply
CJ_ANALOG
requestFCH
CJ_BYTE
free-cooling/heating request:
0 no request
1 free-cooling request
2 free-heating request
valueOnProbeError
CJ_WORD
0.00
100.00
antiFreeze
CJ_BIT
blockAlarm
CJ_BIT
Minimum
Maximum
Type
Description
enable
CJ_BIT
requestCoil
CJ_WORD
0.00
100.00
EIO0000000538 07/2014
417
AHU AFBs
PostHeatCoilControl
Function Block Diagram
418
EIO0000000538 07/2014
AHU AFBs
Functional Description
The post-heating is mainly useful for 2 purposes: integration of heat in heating mode, or
compensation due to heat loss during the dehumidification phase.
Regulation takes place on the supply floating set point (setPointSupply) and the valve can be
commanded through a proportional (P) or proportional-integral (PI) algorithm. The reference probe
is that of the supply temperature.
The third coil is used to analogically regulate the post-heating valve. The regulation uses the
double of the heating differential (diffTemp). There is always a neutral zone (zoneTemp) in which
the current value of the coil never changes.
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
unitOnOff
CJ_BIT
setPointSupply
CJ_SHORT
-58.0
302.0
diffTemp
CJ_SHORT
0.0
50.0
EIO0000000538 07/2014
419
AHU AFBs
Input
Type
Minimum
Maximum
Default
Description
integralTime
CJ_WORD
999
zoneTemp
CJ_SHORT
0.0
80.0
tempSupply
CJ_ANALOG
antiFreeze
CJ_BIT
anti-freeze alarm
blockAlarm
CJ_BIT
Type
Minimum
Maximum
Description
enable
CJ_BIT
postHeatingCoil
CJ_WORD
0.00
100.00
420
EIO0000000538 07/2014
AHU AFBs
PostHeatHeaterControl
Function Block Diagram
EIO0000000538 07/2014
421
AHU AFBs
Functional Description
The post-heating is mainly useful for 2 purposes: integration of heat in heating mode, or
compensation due to heat loss during the dehumidification phase.
On the basis of the number of heaters configured (numHeaters), the doubled regulation
differential is divided proportionally (diffTemp) in order to guarantee uniform switch-on of each
individual heater stage.
A control is carried out proportional to the number of heaters on the supply temperature set point
(setPointSupply) with relative band (diffTemp) and a neutral zone (zoneTemp) in which the
current value of the heaters is not modified.
A band of time must pass between every insertion/removal of the heaters (delayOnOffHeater
input) so that there are no simultaneous peaks.
If the supply probe is inactive, the regulation is inhibited.
Heaters Status
Each of the 3 heater stages can assume the following operating status:
Disabled the heaters stage is not enabled
Off the heater stage is off
Switch-on stand-by the heaters stage is about to switch-on, it is in stand-by during the delay
defined by delayOnOffHeater
On the heaters stage is on
Switch-off stand-by the heaters stage is about to switch-off, it is in stand-by during the delay
defined by delayOnOffHeater
Alarm the heaters are blocked due to the relative thermal switch alarm
422
EIO0000000538 07/2014
AHU AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
unitOnOff
CJ_BIT
numHeaters
CJ_BYTE
number of heaters
setPointSupply
CJ_SHORT
-58.0
302.0
diffTemp
CJ_SHORT
0.0
50.0
zoneTemp
CJ_SHORT
0.0
80.0
tempSupply
CJ_ANALOG
delayOnOffHeater
CJ_WORD
999
alarmHeater
CJ_BIT
antiFreeze
CJ_BIT
anti-freeze alarm
blockAlarm
CJ_BIT
EIO0000000538 07/2014
423
AHU AFBs
Type
Minimum
Maximum
Description
enable
CJ_BIT
heater1
CJ_BIT
heater2
CJ_BIT
heater3
CJ_BIT
statusHeater1
CJ_BYTE
statusHeater2
CJ_BYTE
statusHeater3
CJ_BYTE
424
EIO0000000538 07/2014
AHU AFBs
HeaterAlarm
Function Block Diagram
Functional Description
The macroblock manages the thermal switch alarms (cumulative) of the 3 heaters. The alarm
intervenes automatically after 2 seconds from activation of the dedicated contact and is restored
automatically on return of the alarm condition.
Input Pin Description
Input
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
DI_AlarmHeater
CJ_BIT
Type
Minimum
Maximum
Description
enable
CJ_BIT
alarmHeater
CJ_BIT
EIO0000000538 07/2014
425
AHU AFBs
CoolingCoilControl
Function Block Diagram
Functional Description
Regulation takes place on a floating set point on the supply (setPointSupply) calculated as an
offset from the room regulation set point. The respective valves are driven through a proportional
(P) or proportional-integral (PI) algorithm. The reference probe is that of the supply temperature.
Set the integral time at 0 (integralTime) to use the proportional regulation. By setting an integral
time greater than 0 (integralTime > 0), regulation is more precise. The integral part has the job
of taking the output to normal working conditions, thus reducing the delta introduced by the
proportional component.
426
EIO0000000538 07/2014
AHU AFBs
Cooling
Proportional regulation of the cooling valve:
In the event of a detected error on the supply probe, it is possible to decide the opening value of
the cooling coil by setting the valueOnErrorProbe input. During an anti-freeze alarm
(antiFreeze = 1), the coil is forced to the closure value of 0%.
Summer/Cooling Operating Mode in Free-Cooling Mode
When there are free-cooling(requestFCH = 1) conditions, the ramp that commands cooling is
divided into 2 successive ramps. The first (one half of differential) regulates free-cooling through
the external air damper, the second regulates the cooling coil.
NOTE: If one of the probes involved in regulation is inactive, the regulation of the free-cooling can
no longer be used.
EIO0000000538 07/2014
427
AHU AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
unitOnOff
CJ_BIT
coils
CJ_BYTE
setPointSupply
CJ_SHORT
-58.0
302.0
diffTemp
CJ_SHORT
0.0
50.0
integralTime
CJ_WORD
999
zoneTemp
CJ_SHORT
0.0
80.0
tempSupply
CJ_ANALOG
requestFCH
CJ_BYTE
free-cooling/heating request:
0 no request
1 free-cooling request
2 free-heating request
valueOnProbeError
CJ_WORD
0.00
100.00
antiFreeze
CJ_BIT
blockAlarm
CJ_BIT
Type
Minimum
Maximum
Description
enable
CJ_BIT
requestCoil
CJ_WORD
0.00
100.00
428
EIO0000000538 07/2014
AHU AFBs
DehumidControl
Function Block Diagram
Functional Description
To adapt well in the environment, the humidity in the air must also be considered and regulated on
the basis of a determined desired set point percentage (setPointHR) with relative hysteresis
(diffHR) and a neutral zone (zoneHR) in which the current value that the humidifier assumes is
not modified.
EIO0000000538 07/2014
429
AHU AFBs
Dehumidification Regulation
The regulation uses the same cooling coil, thus implying that there are at least 2 coils configured
(coils > 1). If the room humidity probe is disabled or inoperative, management of the dehumidification is disabled.
430
EIO0000000538 07/2014
AHU AFBs
When the dehumidification request is active, the limit action controls dehumidification so as not to
cool the air too much (causing dehumidification) and consequently requests more heat from the
heating coils (and post-heating). This action optimizes the regulation, also providing energy
savings.
This control function is disabled when the supply air temperature sensor is inoperative.
Example
Dehumidification
Request [%]
Dehumidification
Limitation [%]
Description
80
50
80
25
80
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
CJ_BIT
coils
CJ_BYTE
setPointHR
CJ_SHORT
100
diffHR
CJ_SHORT
100
zoneHR
CJ_SHORT
100
integralTime
CJ_WORD
999
humidityRoom
CJ_ANALOG
enLimitDehumid
CJ_BIT
setPointSupply
CJ_SHORT
-58.0
302.0
diffTemp
CJ_SHORT
0.0
50.0
unitOnOff
EIO0000000538 07/2014
431
AHU AFBs
Input
Type
Minimum
Maximum
Default
Description
zoneTemp
CJ_SHORT
0.0
80.0
0.0
tempSupply
CJ_ANALOG
antiFreeze
CJ_BIT
blockAlarm
CJ_BIT
Type
Minimum
Maximum
Description
enable
CJ_BIT
requestCoil
CJ_WORD
0.00
100.00
432
EIO0000000538 07/2014
AHU AFBs
HumidificationControl
Function Block Diagram
EIO0000000538 07/2014
433
AHU AFBs
Functional Description
To adapt well in the environment, the humidity in the air must also be considered and regulated on
the basis of a determined desired set point percentage (setPointHR) with relative hysteresis
(diffHR) and a neutral zone (zoneHR) in which the current value that the humidifier assumes is
not modified.
It is possible to drive an on/off or modulating type dehumidifier (humidifierType). If the room air
humidity probe (humidityRoom) is disabled or in inoperative condition, management of the
dehumidification is disabled.
Enabling of Humidifier Depending on the Supply Temperature
In order to work correctly, the humidifier requires a minimum temperature value of the air.
Therefore a set point is identified (setPointSupply) along with relative hysteresis
(diffSupply) on the supply temperature in order to enable/disable the humidifier. This function
is enabled by the enTSupplyLimit = 1 input. If enTSupplyLimit = 0 (function not enabled),
the humidifier switches-on/off on the normal set point percentage (setPointHR).
With supply probe (tempTSupply) in inoperative conditions, the function is inhibited and the
humidifier switches-on/off on the percentage set point.
Humidifier On/Off
In order to use the humidifier on/off regulation, set humidifierType = 1.
With the humidityRoom probe in inoperative condition, the humidifier is off. The active output for
this regulation is the do_Humidifier digital output.
434
EIO0000000538 07/2014
AHU AFBs
With the humiditySupply probe in inoperative condition, the humidifier works on normal setpoint
percentage (setPointHR).
Modulating Humidifier
In order to use the modulating regulation of the humidifier, set humidifierType = 2.
With the humidityRoom probe in inoperative conditions, the humidifier is off. The active output for
this regulation is the ao_Humidifier analog output.
Humidifier Status
The humidifier assumes the following operating states (statusHumidifier output):
Disabled the humidifier has not been configured for the system
Off humidifier is off
Off due to supply temperature humidifier is off due to low temperature of the supply air
On humidifier on
Alarm humidifier in alarm condition
EIO0000000538 07/2014
435
AHU AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
unitOnOff
CJ_BIT
humidifierType
CJ_BYTE
type of humidifier:
0 on/off
1 modulating
setPointHR
CJ_SHORT
100
diffHR
CJ_SHORT
100
zoneHR
CJ_SHORT
100
humidityRoom
CJ_ANALOG
enTsupplyLimit
CJ_BIT
setPointTsupply
CJ_SHORT
-58.0
302.0
diffTsupply
CJ_SHORT
0.0
50.0
tempTsupply
CJ_ANALOG
enHsupplyLimit
CJ_BIT
setPointHsupply
CJ_SHORT
95
diffHsupply
CJ_SHORT
40
436
EIO0000000538 07/2014
AHU AFBs
Input
Type
Minimum
Maximum
Default
Description
Hsupply
CJ_ANALOG
alarmHumidifier
CJ_BIT
humidifier alarm
blockAlarm
CJ_BIT
Type
Minimum
Maximum
Description
enable
CJ_BIT
statusHumidifier
CJ_BYTE
humidifier status:
0 disabled
1 off
2 off due to supply temperature
3 on
4 humidifier alarm
do_Humidifier
CJ_BIT
ao_Humidifier
CJ_WORD
0.00
100.00
EIO0000000538 07/2014
437
AHU AFBs
AirQualityControl
Function Block Diagram
Functional Description
Manages regulation for fresh air on request of the relevant VOC/CO2 probe to command an
outside air damper. On the basis of the regulation probe, a proportional check is performed at the
set point (setPointAQ) and at the relative differential (diffAQ).
438
EIO0000000538 07/2014
AHU AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
unitOnOff
CJ_BIT
setPointAQ
CJ_SHORT
10000
diffAQ
CJ_SHORT
2000
airQualityProbe
CJ_ANALOG
maxValue
CJ_WORD
0.00
100.00
minValue
CJ_WORD
0.00
100.00
Type
Minimum
enable
CJ_BIT
requestAirQuality
CJ_WORD
0.00
100.00
EIO0000000538 07/2014
Maximum
Description
439
AHU AFBs
ZeroEnergyControl
Function Block Diagram
440
EIO0000000538 07/2014
AHU AFBs
Functional Description
Free-cooling in temperature is activated when the difference between the room air temperature
and the temperature of the outside air reaches the set point (setPointFCH) and relative
hysteresis (diffFCH input).
Free-heating in temperature is activated when the difference between the outside air temperature
and the temperature of the room air reaches the set point (setPointFCH) and relative hysteresis
(diffFCH input).
Free-cooling enabling in temperature:
EIO0000000538 07/2014
441
AHU AFBs
NOTE: The free-cooling/free-heating function is disabled when one of the sensors is inoperative.
In that case the heating coil control or cooling coil control will use the full proportional band for
temperature control rather than half of the proportional band as in the case of the free-cooling/freeheating function.
442
EIO0000000538 07/2014
AHU AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
unitOnOff
CJ_BIT
mode
CJ_BIT
coils
CJ_BYTE
setPointFCH
CJ_SHORT
0.0
50.0
diffFCH
CJ_SHORT
0.0
50.0
tempRoom
CJ_ANALOG
tempExtern
CJ_ANALOG
setPointSupply
CJ_SHORT
-58.0
302.0
diffTemp
CJ_SHORT
0.0
50.0
zoneTemp
CJ_SHORT
0.0
80.0
maxVal
CJ_WORD
0.00
100.00
minVal
CJ_WORD
0.00
100.00
tempSupply
CJ_ANALOG
EIO0000000538 07/2014
443
AHU AFBs
Type
Minimum
Maximum
Description
enable
CJ_BIT
requestFCH
CJ_WORD
0.00
100.00
enFCH
CJ_BYTE
444
EIO0000000538 07/2014
AHU AFBs
ExternalAirDamperControl
Function Block Diagram
Functional Description
It drives the damper action using 2 digital outputs, one to drive opening (openCmd) and one to drive
closure (closeCmd). The following inputs must be set in order to correctly drive the external
damper motor:
runningTime damper running time to pass from 0% to 100%
endRunTime maximum maintenance time of the end run signal on the relays
minVariation (optional) if greater than zero, the command is only given to the relays when the
effective variation on the regulation ramp exceeds the value set. If PS09 = 0, the command
always passes.
Every time the unitOnOff input passes to 1 (for board switch-on, restore of a block alarm or
restore of the power supply after a black-out), there is re-alignment of the outside air damper. For
the entire running time (plus any endRunTime time), the damper is closed and regulation is
interrupted. When the time has passed, the regulation returns to normal operating mode. This is
necessary because there is no feedback to control the position of the damper.
EIO0000000538 07/2014
445
AHU AFBs
The outside air damper can be driven in 3 distinct ways (regType input):
regType = 0 disabled
regType = 1 modulating regulation
regType = 2 fixed opening regulation
It is also possible to select the type of request that must satisfy the damper (cmdPriority input).
Disabled
In disabled mode, the damper is disabled. Selecting this setting will keep the damper at its current
position and further commands will be ignored.
To use this setting, set regType = 0.
Fixed Opening Regulation
In this way, the outside air damper always assumes the same opening value, decided by the
fixValue input. In this regulation, the range of opening values is from 0% to 100%. There is no
minimum opening value and the requestFCH, requestAQ, and cmdPriority inputs have no
effect on the damper status. In this mode, free-cooling, free-heating, and air quality control are not
used.
To use this setting, set regType = 2.
Modulating Regulation
In modulating regulation mode, the damper can be used to satisfy the following requests:
free-cooling/free-heating (requestFCH input)
air quality control (requestAQ input)
In this status, it is the 0.0%...100.0% requestFCH values or requestAQ values that determine
damper opening.
To use this setting, set regType = 1.
Damper Command
The outside air damper can be used for 2 regulations: free-cooling/free-heating and air quality
control. The priority of these requests is decided by the cmdPriority input:
cmdPriority = 0 the damper is commanded by free-cooling/free-heating
cmdPriority = 1 the damper is controlled from air quality control
cmdPriority = 2 the damper request is calculated as the maximum of the 2 requests: free-cooling
(/free-heating) and air quality control requests
cmdPriority = 3 the damper request is calculated as an arithmetic average of the 2 free-cooling
(/free-heating) requests and air quality control in a way to respond to both the active requests.
446
EIO0000000538 07/2014
AHU AFBs
Damper Status
To identify damper operating, the following states are represented in the user interface:
disabled the damper is disabled
closed the damper is closed at value 0.0%
opening the damper is in opening movement
open the damper is at a standstill at a determined value
closure the damper is in closing movement
alignment the damper is moving due to an alignment owing to unit switch-on or restore of voltage
(currentPosition = 0.0%)
The currentPosition output corresponds to the current opening value of the damper,
currentPosition equals 0.0% when the damper is in the alignment phase.
Input Pin Description
Input
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
unitOnOff
CJ_BIT
regType
CJ_BYTE
type of regulation:
0 disabled
1 modulating regulation
2 fixed opening regulation
fixValue
CJ_WORD
0.00
100.00
0.00
requestFCH
CJ_WORD
0.00
100.00
0.00
requestAQ
CJ_WORD
0.00
100.00
0.00
cmdPriority
CJ_BYTE
runningTime
CJ_WORD
3600
EIO0000000538 07/2014
447
AHU AFBs
Input
Type
Minimum
Maximum
Default
Description
endRunTime
CJ_WORD
600
minVariation
CJ_WORD
0.00
100.00
0.00
blockAlarm
CJ_BIT
Type
Minimum
Maximum
Description
enable
CJ_BIT
statusDumper
CJ_BYTE
currentPosition
CJ_WORD
0.00
100.00
openCmd
CJ_BIT
closeCmd
CJ_BIT
448
EIO0000000538 07/2014
AHU AFBs
CrossFlowHeatExchangerControl
Function Block Diagram
Functional Description
When the quantity of fresh air requested is large, the air handling units are equipped with an
expelled air recovery system for improving energy costs.
The recovery device has a by-pass damper that is used to exclude the passage of outside air
through the heat exchanger air channels. The recovery device is normally always active and is bypassed during the free-cooling/free-heating phases (reqFCH > 0), or during cyclical defrosting with
outside temperatures that are too low. The (setPointMinTemp) set point must be set along with
the relative differential (diffMinTemp) for the activation of the defrosting cycle.
EIO0000000538 07/2014
449
AHU AFBs
When exhaust air minimum temperature conditions are reached, as represented in the diagram, a
cyclical by-pass sequence of the recovery device is activated to allow the exhaust air (hot, from the
room) to defrost the heat exchanger air channels.
After the byPassTime delay, the by-pass damper is activated to allow defrosting. When the
temperature returns above the accepted value, the damper is deactivated and the recovery device
starts-up.
With the regulation probe incorrect, the function is disabled.
Recovery Device Status
The recovery device can assume the following operating status (statusHE output):
Disabled recovery device disabled
Off the recovery device is off
in defrosting the recovery device is off and defrosting is active
Off due to free-cooling/heating the recovery device is off due to a free-cooling/heating request
On the recovery device is operating
450
EIO0000000538 07/2014
AHU AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
unitOnOff
CJ_BIT
requestFCH
CJ_BYTE
free-cooling/heating request:
0 no request
1 free-cooling request
2 free-heating request
tempExhaust
CJ_ANALOG
setPointMinTemp
CJ_SHORT
-58.0
302.0
diffMinTemp
CJ_SHORT
0.0
50.0
delayMinTemp
CJ_WORD
99
Type
Minimum
Maximum
Description
enable
CJ_BIT
statusHE
CJ_BYTE
do_HE
CJ_BIT
EIO0000000538 07/2014
451
AHU AFBs
TwinCoilsControl
Function Block Diagram
Functional Description
When the quantity of fresh air requested is large, the air handling units are equipped with an
expelled air recovery system to save energy.
The double coil recovery device is activated through the heat exchange fluid circulation pump
between the 2 coils. To limit energy consumption of the pump, activation is managed by a minimum
difference between the exhaust air temperature and that of the outside air (setPointHE
parameter and relative differential diffHE). The circulation pump is stopped during the freecooling and free-heating phases (reqFCH > 0).
452
EIO0000000538 07/2014
AHU AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
unitOnOff
CJ_BIT
requestFCH
CJ_BYTE
free-cooling/heating request:
0 no request
1 free-cooling request
2 free-heating request
tempExhaust
CJ_ANALOG
tempExtern
CJ_ANALOG
setPointHE
CJ_SHORT
-58.0
302.0
diffHE
CJ_SHORT
0.0
50.0
Type
Minimum
Maximum
Description
enable
CJ_BIT
statusHE
CJ_BYTE
do_HE
CJ_BIT
EIO0000000538 07/2014
453
AHU AFBs
HeatWheelControl
Function Block Diagram
Functional Description
When the quantity of fresh air requested is large, the air handling units are equipped with an
expelled air warm recovery system for improving energy costs.
The recovery device can be regulated in 2 different ways: on/off (HEType = 0) or with an analog
output (HEType = 1) and is only active when the fans are on.
The recovery device is deactivated during the free-cooling and free-heating phases (reqFCH > 0).
HEType = 0 on/off regulation
454
EIO0000000538 07/2014
AHU AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
unitOnOff
CJ_BIT
HEType
CJ_BIT
requestFCH
CJ_BYTE
free-cooling/heating request:
0 no request
1 free-cooling request
2 free-heating request
tempExhaust
CJ_ANALOG
tempExtern
CJ_ANALOG
setPointHE
CJ_SHORT
-58.0
302.0
diffHE
CJ_SHORT
0.0
50.0
EIO0000000538 07/2014
455
AHU AFBs
Input
Type
Minimum
Maximum
Default
Description
orFans
CJ_BIT
minValueHE_AO
CJ_WORD
0.00
100.00
maxValueHE_AO
CJ_WORD
0.00
100.00
Type
Minimum
Maximum
Description
enable
CJ_BIT
statusHE
CJ_BYTE
do_HE
CJ_BIT
ao_HE
CJ_WORD
0.00
100.00
456
EIO0000000538 07/2014
AHU AFBs
OperatingHoursAndAlarm
Function Block Diagram
Functional Description
Manages the operating hours of the connected device. To zero the operating hours, set the internal
status hoursCntDevice at 0.
By activating the enableHourAlarm input, it is possible to manage the alarm relative to
exceeding the operating hours set (limitHoursAlarm input).
Input Pin Description
Input
Type
Minimum
Default
Description
enable
CJ_BIT
device
CJ_BIT
enableHourAlarm
CJ_BIT
limitHoursAlarm
CJ_DWORD
99999
Parameters/Internal Status
Parameter
Type
Minimum
Maximum
Default
Description
hoursCntDevice
CJ_DWORD
99999
EIO0000000538 07/2014
457
AHU AFBs
Type
Minimum
Maximum
Description
enable
CJ_BIT
alarmHourDevice
CJ_BIT
458
EIO0000000538 07/2014
AHU AFBs
WeeklyScheduler
Function Block Diagram
Functional Description
Manages a weekly scheduler. Every day of the week can be one of 3 types: workingDayA,
workingDayB and notWorkingDay. The typeDay_Sunday, typeDay_Monday,...
typeDay_Saturday internal parameters allow to set the type of day in a way to associate up to
3 different behaviors to each of the days of the week.
2 time bands are associated to every type of working day. Each of the 2 bands has an enable status
associated, for enabling/disabling of the band and an offset value, so as to modify the work set
point. For notWorkingDay types of day, the scheduler does not manage any time band and
relative offsets.
The offsetSP outputs correspond with the value actually calculated on the basis of the
parameters and the time bands set, while timeZoneActive indicates if one of the time bands
configured is active or not. The output remains at 1 for the entire time included in the band
configured, while it remains at 0 in other cases.
EIO0000000538 07/2014
459
AHU AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
clockRTC
CJ_DATETIME
alarmRTC
CJ_BIT
dayA_enTZ_1
CJ_BIT
dayA_OffsetSP_1
CJ_SHORT
-58.0
302.0
-10.0
dayA_enTZ_2
CJ_BIT
dayA_OffsetSP_2
CJ_SHORT
-58.0
302.0
-10.0
dayB_enTZ_1
CJ_BIT
dayB_OffsetSP_1
CJ_SHORT
-58.0
302.0
-10.0
dayB_enTZ_2
CJ_BIT
dayB_OffsetSP_2
CJ_SHORT
-58.0
302.0
-10.0
460
EIO0000000538 07/2014
AHU AFBs
Internal Parameters/Status
Parameter
Type
Minimum
Maximum
Default
Description
typeDay_Sunday
CJ_BYTE
typeDay_Monday
CJ_BYTE
typeDay_Tuesday
CJ_BYTE
typeDay_Wednesday
CJ_BYTE
typeDay_Thursday
CJ_BYTE
typeDay_Friday
CJ_BYTE
typeDay_Saturday
CJ_BYTE
dayA_StartTZ_1
CJ_TIME
0:00:00
23:59:59
8:00:00
dayA_EndTZ_1
CJ_TIME
0:00:00
23:59:59
17:00:00
dayA_StartTZ_2
CJ_TIME
0:00:00
23:59:59
18:00:00
dayA_EndTZ_2
CJ_TIME
0:00:00
23:59:59
21:00:00
dayB_StartTZ_1
CJ_TIME
0:00:00
23:59:59
8:00:00
dayB_EndTZ_1
CJ_TIME
0:00:00
23:59:59
17:00:00
EIO0000000538 07/2014
461
AHU AFBs
Parameter
Type
Minimum
Maximum
Default
Description
dayB_StartTZ_2
CJ_TIME
0:00:00
23:59:59
18:00:00
dayB_EndTZ_2
CJ_TIME
0:00:00
23:59:59
21:00:00
Type
Minimum
Maximum
Description
enable
CJ_BIT
dayActive
CJ_BYTE
typeDayActive
CJ_BYTE
offsetSP
CJ_SHORT
-58.0
302.0
timeZoneActive
CJ_BIT
462
EIO0000000538 07/2014
AHU AFBs
AlarmManagement
Function Block Diagram
Functional Description
The macroblock manages up to 100 alarm events. Every alarm has an increasing index
associated; alarm 1 has index 1 alarm n has index n. Management is based on a priority of 100
alarms, the priority is decided by the index. The alarm with highest priority must be at alarm 1 input,
while that with least priority is connected to the input of the last alarm managed.
The 6 input words allow the retention of the first 96 alarms, while the remaining 4 alarms must be
connected to the respective alarm97, alarm98, alarm99, alarm100 inputs. Every time the
evRequestAlarm input is activated, the next active alarm is requested. If it is the first requested
(after a reset, evResetIndex input) the first active alarm is requested. The request is interpreted
and as a result the index of the relative active alarm (activeAlarmIndex output). This value
allows you to identify which alarm is being examined. If the active output AlarmIndex = 0, it
means that there is no alarm active to be examined.
The evResetIndex input is used to zero the structure in a way that the first time an alarm is
requested, the output index supplied is effectively that of the priority active alarm.
EIO0000000538 07/2014
463
AHU AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
dayProbeAlarm
CJ_BYTE
240
alarm1_16
CJ_WORD
65535
alarm17_32
CJ_WORD
65535
alarm33_48
CJ_WORD
65535
alarm49_64
CJ_WORD
65535
alarm65_80
CJ_WORD
65535
alarm81_96
CJ_WORD
65535
alarm97
CJ_BIT
alarm n 97
alarm98
CJ_BIT
alarm n 98
alarm99
CJ_BIT
alarm n 99
alarm100
CJ_BIT
alarm n 100
evResetIndex
CJ_BIT
evRequestAlarm
CJ_BIT
464
EIO0000000538 07/2014
AHU AFBs
Type
Minimum
Maximum
Description
enable
CJ_BIT
activeAlarmIndex
CJ_BYTE
100
numActiveAlarm
CJ_BYTE
100
AlarmIndex
CJ_BYTE
100
EIO0000000538 07/2014
465
AHU AFBs
AutomaticAlarm
Function Block Diagram
Functional Description
The macroblock manages the category of alarms with immediate intervention and automatic reset.
The alarm is signaled immediately by the activation of the dedicated digital input (DI_Alarm) and
is restored automatically on return of the alarm condition.
Input Pin Description
Input
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
DI_Alarm
CJ_BIT
Type
Minimum
Maximum
Description
enable
CJ_BIT
alarmStatus
CJ_BIT
466
EIO0000000538 07/2014
AHU AFBs
ByPassAutoAlarm
Function Block Diagram
Functional Description
The macroblock manages the category of alarms with settable delay and automatic reset.
The alarm is signaled after a by-pass time (delayTime) from the activation of the dedicated digital
input (DI_Alarm) and is restored automatically on return of the alarm condition.
Input Pin Description
Input
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
delayAlarm
CJ_WORD
999
DI_Alarm
CJ_BIT
Minimum
Maximum
Type
Description
enable
CJ_BIT
alarmStatus
CJ_BIT
EIO0000000538 07/2014
467
AHU AFBs
ByPassAutoManuAlarm
Function Block Diagram
Functional Description
The macroblock manages the category of alarms with settable delay and type of reset.
The alarm is signaled after a by-pass time (delayTime) from the activation of the dedicated digital
input (DI_Alarm) and the type of reset can be set (restoreType): automatic on return of the
alarm condition or manual.
Input Pin Description
Input
Type
Minimum
Maximum Default
Description
enable
CJ_BIT
delayAlarm
CJ_WORD
999
restoreType
CJ_BIT
DI_Alarm
CJ_BIT
resetAlarm
CJ_BIT
468
EIO0000000538 07/2014
AHU AFBs
Type
Minimum
Maximum
Description
enable
CJ_BIT
alarmStatus
CJ_BIT
EIO0000000538 07/2014
469
AHU AFBs
ManualResetAlarm
Function Block Diagram
Functional Description
Block for management of alarms manual reset. The reset output must be connected directly to
the reset inputs of the alarms that manage a manual reset.
When the evReset input passes from 0 to 1, the actualStatus = myStatus condition is
verified. If the condition is verified, the reset output is set at 1.
Input Pin Description
Input
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
evReset
CJ_BIT
actualStatus
CJ_WORD
65535
myStatus
CJ_WORD
65535
470
EIO0000000538 07/2014
AHU AFBs
Type
Minimum
Maximum
Description
enable
CJ_BIT
reset
CJ_BIT
EIO0000000538 07/2014
471
AHU AFBs
472
EIO0000000538 07/2014
AHU AFBs
Functional Description
The differential pressure switch is managed after the time defined by the parameter
startupDelay. This timer starts counting after the initial switch-on phase of the unit and after the
switch-on phase of the fans. When this delay expires, if the contact signals a lack of differential
pressure, the alarm is indicated.
The control is also performed during normal functioning, and the sensor is monitored continuously.
If the contact signals a lack of differential pressure for a band of time exceeding the time set by the
runningDelay parameter, the alarm is signaled.
The type of reset can be set (restoreType) automatic on return of the alarm condition or manual
by forcing the resetAlarm input.
Input Pin Description
Input
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
fan
CJ_BIT
startupDelay
CJ_WORD
999
runningDelay
CJ_WORD
999
EIO0000000538 07/2014
473
AHU AFBs
Input
Type
Minimum
Maximum
Default
Description
restoreType
CJ_BIT
DI_Filter
CJ_BIT
resetAlarm
CJ_BIT
Type
Minimum
Maximum
Description
enable
CJ_BIT
alarm
CJ_BIT
474
EIO0000000538 07/2014
SoHVAC
Chiller AFBs
EIO0000000538 07/2014
Chapter 6
Chiller Application Program Function Blocks
Page
OnOff_Control
477
FlowMeterManagement
481
WaterPumpControl
484
PumpThermalAlarm
489
OperatingModeControl
491
DeadZone
495
LateralBandRegulation
499
CompressorThermalAlarm
502
CompressorControl
505
PumpDownManagement
513
AntiFreezeControl
517
LowPressureAlarmDI
520
HighPressureAlarmDI
523
LowPressureAlarmAI
525
HighPressureAlarmAI
530
DefrostManagement
533
FanThermalAlarm
538
StepRegulationFan
540
LinearFanControl
546
TemperatureAlarm
554
DynamicSetPoint
557
ForceShutdown
560
HighPressurePartialisationHT
563
LowPressurePartialisationLT
566
WeeklyScheduler
570
EIO0000000538 07/2014
475
Chiller AFBs
Topic
476
Page
AlarmManagement
574
AlarmManualReset
577
OperatingHoursAndAlarms
579
OperatingLimit
581
AO_Linearization
583
EIO0000000538 07/2014
Chiller AFBs
OnOff_Control
Function Block Diagram
Functional Description
Manages the on/off procedure of the unit with different methods. On the basis of the modality
configured, unit on takes place only if all of the switch-on conditions are respected, while the unit
goes into the off status as soon as one of these conditions is missing. In this case, the unit goes
into the corresponding off status that determined switch-off.
The on/off status from key has priority with respect to the others. This status is that which
determines unit switch-on. The unit cannot switch-on until the condition from key (if enByKey = 1
enabled) has been verified and consequently, none of the remaining states can be reached.
EIO0000000538 07/2014
477
Chiller AFBs
On/Off Methods
Method
Input Function
Switch-On
Switch-Off
Key
enByKey
Digital input
enByDI
Supervisor
enBySup
Schedule timer
enBySchedule
switch-on is allowed if the enabling the unit switches off if the enabling status
status is set at 1
is set at 0
Alarm
onAlarms
Automatic
change-over
onChangeMode
Discharged RTC
rtcFault
When the unit switches-on, it tests the availability of the system clock. If this
is enabled and is in alarm conditions (condition linked to rtcFault = 1 input),
it offers the possibility of intercepting the output status (unitStatus) and
condition it to a particular user management. This status is identical to an off
status caused by the clock in inoperative conditions. To release the unit and
switch it on, an event must be supplied at the rtcDone input. If the RTC alarm
returns, the unit goes into the switch-on mode if necessary conditions are not
present.
NOTE: If all the enable functions (enByKey, enByDI, enBySup and enBySchedule) are
disabled, then the machine is enabled by default.
Input Pin Description
Input
Type
Minimum
Maximum
Default
Description
enByKey
CJ_BIT
evKeyOnOff
CJ_BIT
478
EIO0000000538 07/2014
Chiller AFBs
Input
Type
Minimum
Maximum
Default
Description
enByDI
CJ_BIT
statusDI
CJ_BIT
enBySup
CJ_BIT
statusSup
CJ_BIT
enBySchedule
CJ_BIT
statusSchedule
CJ_BIT
onAlarms
CJ_BIT
EIO0000000538 07/2014
479
Chiller AFBs
Input
Type
Minimum
Maximum
Default
Description
onChangeMode
CJ_BIT
pumpDone
CJ_BIT
rtcFault
CJ_BIT
rtcDone
CJ_BIT
Type
Minimum
Maximum
Description
unitStatus
CJ_BYTE
unitOnOff
CJ_BIT
480
EIO0000000538 07/2014
Chiller AFBs
FlowMeterManagement
Function Block Diagram
Functional Description
The flow switch is managed after the initial switch-on phase of the unit and after the time defined
by the parameter startupDelay. When this delay expires, if the contact signals a lack of flow,
the alarm is indicated.
The control is performed also during normal functioning. The flow sensor is monitored
continuously. If the contact signals a lack of flow for a band of time exceeding the time set by the
runningDelay parameter, the alarm is signaled.
EIO0000000538 07/2014
481
Chiller AFBs
If the alarm persists for a time equal to the pumpStopDelay parameter, the output is activated in
a way to guarantee the activation of the block of any circulation pump.
The flow switch alarm has automatic reset, unless it exceeds a certain number of interventions
during the hour (maxEvHour). In this case, it becomes manual reset.
Input Pin Description
Input
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
unitOnOff
CJ_BIT
startupDelay
CJ_WORD
999
runningDelay
CJ_WORD
999
pumpCountOff
CJ_WORD
999
TimePumpLowWater
CJ_WORD
999
DI_Flow
CJ_BIT
maxEvHour
CJ_BYTE
10
resetAlarm
CJ_BIT
482
EIO0000000538 07/2014
Chiller AFBs
Type
Minimum
Maximum
Description
enable
CJ_BIT
Alarm
CJ_BIT
blockFlow
CJ_BIT
EIO0000000538 07/2014
483
Chiller AFBs
WaterPumpControl
Function Block Diagram
484
EIO0000000538 07/2014
Chiller AFBs
Functional Description
Manages up to 2 circulation pumps, one as an alternate to the other. If 2 pumps are configured
(numPumps = 2), the functioning hours of both must be equal. Therefore, every rotPumpTime
time, switch-off of the active pump and switch-on of the other is commanded. In the event of an
alarm of the active pump, if possible, the switch-on of the other pump is requested.
The regulationType parameter defines the type of regulation with which the pump is controlled:
0 continuous functioning
1 functioning on thermostat call
2 cyclical functioning
In the continuous functioning mode, the pump control outputs must activate when the unit switches
off and a time period must pass (delaySwitchOnComp parameter) before switch-on of the
compressors. Vice versa, on the unit switch-off control, any active compressors must switch-off
and a (delaySwitchOffPump parameter) time must pass before pump switch-off.
In the functioning on thermostat control, the pump is activated as a consequence of a cooling or
heating request. On this request, first the pump output is activated and then after the
delaySwitchOnComp time the compressor switches on in heating/cooling mode.
The compressor switches off in the same way as the thermostat switch-off request, while the pump
remains on for the delaySwitchOffPump time.
In the cyclical functioning mode, the pump is controlled with definition of the switch-on and switchoff times. If the thermostat function activates a cooling or heating call during the pump activation
time, the pump remains active for the entire call period plus any delay time between compressor
switch-off and pump switch-off.
EIO0000000538 07/2014
485
Chiller AFBs
Pump status
Every pump has an associated functioning status (statusPump1 and statusPump2) outputs:
Disabled the pump is not configured
Off the pump is off
On the pump is functioning
Alarm pump thermal switch alarm
Input Pin Description
Input
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
CJ_BIT
numPumps
CJ_BYTE
pumps number
stopOnDefrost
CJ_BIT
regulationType
CJ_BYTE
rotPumpTime
CJ_BYTE
240
delaySwitchOnComp
CJ_WORD
999
delaySwitchOffPump
CJ_WORD
999
unitOnOff
486
EIO0000000538 07/2014
Chiller AFBs
Input
Type
Minimum
Maximum
Default
Description
cycleTimePumpOn
CJ_WORD
999
120
cycleTimePumpOff
CJ_WORD
999
120
requestComp
CJ_BIT
blockPump
CJ_BIT
onDefrost_C1
CJ_BIT
onDefrost_C2
CJ_BIT
alarmPump1
CJ_BIT
alarmPump2
CJ_BIT
hoursP1
CJ_DWORD
99999
hoursP2
CJ_DWORD
99999
Type
Minimum
Maximum
Description
enable
CJ_BIT
pumpDone
CJ_BIT
pumpCompCount
CJ_WORD
999
pumpCountOff
CJ_WORD
999
pump1
CJ_BIT
pump 1 control
statusPump1
CJ_BYTE
pump2
CJ_BIT
pump 2 control
EIO0000000538 07/2014
487
Chiller AFBs
Output
Type
Minimum
Maximum
Description
statusPump2
CJ_BYTE
488
EIO0000000538 07/2014
Chiller AFBs
PumpThermalAlarm
Function Block Diagram
Functional Description
The function block manages up to 2 pump thermal switch alarms. The alarm does immediate
intervention, while it can be set to have automatic reset or manual reset on return of the alarm
condition.
Input Pin Description
Input
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
numPumps
CJ_BYTE
pumps number
The alarm of the second pump is
enabled when numPumps = 2.
restoreType
CJ_BIT
EIO0000000538 07/2014
489
Chiller AFBs
Input
Type
Minimum
Maximum
Default
Description
DI_AlarmPump1
CJ_BIT
resetAlarmPump1
CJ_BIT
DI_AlarmPump2
CJ_BIT
resetAlarmPump2
CJ_BIT
Minimum
Maximum
Description
Type
enable
CJ_BIT
alarmPump1
CJ_BIT
alarmPump2
CJ_BIT
490
EIO0000000538 07/2014
Chiller AFBs
OperatingModeControl
Function Block Diagram
Functional Description
The operational mode can assume the following values:
MOdE Parameter
Operational Mode
Description
Chiller - Cooling
The following procedures allow you to set the unit functioning mode:
the MOdE parameter present inside the macroblock
the digital input (function enabled from the enByDI input)
The unit has the following settings:
winter functioning mode with the contact open
summer functioning mode with the contact closed.
EIO0000000538 07/2014
491
Chiller AFBs
the change-over from outside temperature (function enabled from enByChangeOver input)
Setting:
the unit switches to summer functioning mode when the outside temperature value exceeds
the setToCooling
the unit switches to winter functioning mode when the external temperature drops below the
setToHeating.
Type
Minimum
Maximum
Default
Description
unitStatus
CJ_BYTE
enByDI
CJ_BIT
492
EIO0000000538 07/2014
Chiller AFBs
Input
Type
Minimum
Maximum
Default
Description
statusDI
CJ_BIT
enBySup
CJ_BIT
statusSup
CJ_BIT
enByChangeOver
CJ_BIT
tempExternal
CJ_ANALOG
setToHeating
CJ_SHORT
-58.0
302.0
20.0
setToCooling
CJ_SHORT
-58.0
302.0
10.0
onDefrost_C1
CJ_BIT
onDefrost_C2
CJ_BIT
EIO0000000538 07/2014
493
Chiller AFBs
Internal Parameters/Status
Parameter
Type
Minimum
Maximum
Default
Description
MOdE
CJ_BIT
Type
Minimum
Maximum
Description
onChangeMode
CJ_BIT
mode
CJ_BIT
valve_C1
CJ_BIT
valve_C2
CJ_BIT
494
EIO0000000538 07/2014
Chiller AFBs
DeadZone
Function Block Diagram
EIO0000000538 07/2014
495
Chiller AFBs
Functional Description
Regulation defines a neutral zone as the center on set-point in which no activation or deactivation
of any function occurs. The decision whether to activate or deactivate the steps available is taken
only when the output temperature moves out of the neutral zone.
If 2 circuits are set (numCircuit = 2 input), regulation takes place on the average of the 2 output
temperature probes (tempOutlet_C1, tempOutlet_C2). If one of the 2 probes is inactive,
regulation is made on the other functioning probe. If both probes are inactive, regulation is
disabled.
The switch-on and switch-off requests for the various power steps supplied by the compressors in
case of summer functioning mode (chiller, mode = 0) follow this logic:
Switch-on when the output temperature exceeds the neutral zone
Switch-off when the output temperature is below the neutral zone
The switch-on and switch-off requests for the various power steps supplied by the compressors in
case of winter functioning mode (heat pump, mode = 1) follow this logic:
Switch-on when the output temperature is below the neutral zone
Switch-off when the output temperature exceeds the neutral zone
If the output temperature remains outside the neutral area even after a time interval given by the
delayOutZone input, the switch-on or switch-off of another power step is requested.
By setting the enAdaptiveZone = 1 parameter, a self-adapting regulation function is activated on
the output temperature, in which the neutral zone is calculated in a way to consider the dynamic
features of the system and the load variations. In particular, the neutral zone can vary, considering
the times of the compressors and the number of start-ups/hour. In this case, the value of the zone
only has sense at unit start-up, while it is recalculated within the minimum adaptiveZone_Min
and maximum adaptiveZone_Max limits, in order to adapt to an intermediate functioning
situation with respect to the maximum number of start-ups/hour (maxNumEvHour, numEvHour
inputs).
496
EIO0000000538 07/2014
Chiller AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
unitOnOff
CJ_BIT
numCircuit
CJ_BYTE
numCompCirc
CJ_BYTE
numStepsAvail
CJ_BYTE
mode
CJ_BIT
setCooling
CJ_SHORT
-58.0
302.0
setHeating
CJ_SHORT
-58.0
302.0
zone
CJ_SHORT
0.0
50.0
delayOutZone
CJ_WORD
999
999
enAdaptiveZone
CJ_BIT
adaptiveZone_Min
CJ_SHORT
0.0
50.0
1.0
adaptiveZone_Max
CJ_SHORT
0.0
50.0
5.0
EIO0000000538 07/2014
497
Chiller AFBs
Input
Type
Minimum
Maximum
Default
Description
tempOut_C1
CJ_ANALOG
blockComp_C1
CJ_BIT
tempOut_C2
CJ_ANALOG
blockComp_C2
CJ_BIT
numEvHour
CJ_BYTE
15
maxNumEvHour
CJ_BYTE
15
Type
Minimum
Maximum
Description
enable
CJ_BIT
reqSteps
CJ_BYTE
498
EIO0000000538 07/2014
Chiller AFBs
LateralBandRegulation
Function Block Diagram
EIO0000000538 07/2014
499
Chiller AFBs
Functional Description
Lateral band regulation makes use of a proportional control to establish when to insert or remove
the steps configured, in a way to regulate switch-on or switch-off of the various devices within the
proportional band.
The figure below shows the behavior of the regulation in band mode (SP, SP + BP), the case of
summer functioning (chiller, mode = 0). On the basis of the input temperature, the regulation adds
or removes the number of steps to request the compressors. In this regulation, the band is shifted
completely over the set-point.
However, in winter functioning mode (heat pump mode = 1), the band is shifted completely below
the set-point:
500
EIO0000000538 07/2014
Chiller AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
unitOnOff
CJ_BIT
numStepsAvail
CJ_BYTE
mode
CJ_BIT
setCooling
CJ_SHORT
-58.0
302.0
setHeating
CJ_SHORT
-58.0
302.0
proportionalBand
CJ_SHORT
2.0
70.0
tempIn
CJ_ANALOG
Type
Minimum
Maximum
Description
enable
CJ_BIT
reqSteps
CJ_BYTE
EIO0000000538 07/2014
501
Chiller AFBs
CompressorThermalAlarm
Function Block Diagram
Functional Description
The macroblock manages the thermal switch alarm of 4 compressors. The alarm is delayed by any
(delayAlarm input) by-pass time. The type of reset can also be set: automatic on return of the
alarm condition or manual.
502
EIO0000000538 07/2014
Chiller AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
CJ_BYTE
delayAlarm
CJ_WORD
999
restoreType
CJ_BIT
DI_AlarmComp1
CJ_BIT
resetAlarmComp1
CJ_BIT
DI_AlarmComp2
CJ_BIT
resetAlarmComp2
CJ_BIT
DI_AlarmComp3
CJ_BIT
resetAlarmComp3
CJ_BIT
numComp
EIO0000000538 07/2014
503
Chiller AFBs
Input
Type
Minimum
Maximum
Default
Description
DI_AlarmComp4
CJ_BIT
resetAlarmComp4
CJ_BIT
Type
Minimum
Maximum
Description
enable
CJ_BIT
alarmComp1
CJ_BIT
alarmComp2
CJ_BIT
alarmComp3
CJ_BIT
alarmComp4
CJ_BIT
504
EIO0000000538 07/2014
Chiller AFBs
CompressorControl
Function Block Diagram
EIO0000000538 07/2014
505
Chiller AFBs
Functional Description
The function block controls 2 refrigeration circuits, each with up to 4 compressors with identical
capacity. The requests to the compressors are satisfied only if the unit is on (unitOnOff = 1).
Compressors Status
Each compressor has an associated functioning status (statusComp1, statusComp2,
statusComp3, statusComp4):
Disabled the compressor is not configured
On the compressor is functioning
Switch-on stand-by the compressor is in stand-by due to the switch-on delay time as defined by
minOnDelay.
Off the compressor is off
Switch-off stand-by the compressor is in stand-by due to the switch-off delay time as defined by
minOnDelay.
Alarm compressor thermal switch alarm
Manual the compressor is in manual functioning mode
Rotation of the Compressors
The rotation of the compressors is a procedure that allows to balance the number of functioning
hours and peaks of each compressor as much as possible.
In the twin circuit case, the rotation must manage, wherever possible, the distribution of the calls
on the circuit compressors, in order to privilege balanced functioning of the 2 circuits.
The rotation does not involve any compressors in alarm conditions or in manual functioning mode
and can dynamically switch other compressors on if one or more of the same go into alarm
conditions.
Using the rotationType input, the program can manage 4 types of rotation: FIFO, LIFO, FIFO
+ hours, LIFO + hours.
1. FIFO
It follows the first in first out logic. That is, the first compressor that switches on is the first to
switch off. Initially, this compressor could lead to a large difference of functioning hours between
the various compressors, but after an initial phase these should become equal to each other.
This type of rotation has a particularity in the case where all compressors configured in the
system do not switch-on. In fact, for example, if the first compressor switches on and then off,
the next compressor to switch on is the second. The last compressor switched off is
remembered so as to switch on the next in the sequence thus making use of all the parts
configured in the best possible way.
2. LIFO
Follows the last in first out logic. That is, the last compressor to switch-on will be the first to
switch-off.
506
EIO0000000538 07/2014
Chiller AFBs
EIO0000000538 07/2014
507
Chiller AFBs
minOffOtherDelay establishes the minimum time that must pass between switch-off of one
compressor and the next
maxStartForHour establishes the maximum number of switch-ons during one hour. If this limit is
reached, the regulator waits for the conditions before switching that compressor back to on.
Manual Functioning Mode
In this state, the devices do not take part in rotations and in heat regulation calculations. However,
they are sensitive to any of the alarms.
To go into compressors manual functioning mode, the relevant macroblock inputs
enManualComp1, enManualComp2, enManualComp3, and enManualComp4 must be enabled:
0 normal device behavior
1 disables the compressor and takes it to manual functioning mode
A compressor in manual functioning mode does not take part in the regulations. It can be forced to
switch-on/off by setting the desired value through the relative internal states of the macroblock
forceManualComp1, forceManualComp2, forceManualComp3 and forceManualComp4. A
compressor in manual functioning mode is sensitive to alarms.
Input Pin Description
Input
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
CJ_BIT
numCircuit
CJ_BYTE
numCompCirc
CJ_BYTE
forceShutDown
CJ_BIT
regulationSteps
CJ_BYTE
unitOnOff
508
EIO0000000538 07/2014
Chiller AFBs
Input
Type
Minimum
Maximum
Default
Description
requestType
CJ_BIT
priorityCircuit
CJ_BIT
limit_BlockComp
CJ_BIT
errorProbe_C1
CJ_BIT
errorProbe_C2
CJ_BIT
compOnErrorProbe
CJ_BYTE
blockComp_C1
CJ_BIT
onDefrost_C1
CJ_BIT
onDripping_C1
CJ_BIT
blockComp_C2
CJ_BIT
onDefrost_C2
CJ_BIT
onDripping_C2
CJ_BIT
rotationType
CJ_BYTE
pumpDone
CJ_BIT
EIO0000000538 07/2014
509
Chiller AFBs
Input
Type
Minimum
Maximum
Default
Description
pumpCompCount
CJ_WORD
999
minOnDelay
CJ_WORD
999
minOffDelay
CJ_WORD
999
minOnOnDelay
CJ_WORD
999
minOnOtherDelay
CJ_WORD
999
minOffOtherDelay
CJ_WORD
999
numEvHour
CJ_BYTE
14
enManualComp1
CJ_BIT
hourComp1
CJ_DWORD
99999
alarmComp1
CJ_BIT
enManualComp2
CJ_BIT
hourComp2
CJ_DWORD
99999
alarmComp2
CJ_BIT
enManualComp3
CJ_BIT
hourComp3
CJ_DWORD
99999
alarmComp3
CJ_BIT
510
EIO0000000538 07/2014
Chiller AFBs
Input
Type
Minimum
Maximum
Default
Description
enManualComp4
CJ_BIT
hourComp4
CJ_DWORD
99999
alarmComp4
CJ_BIT
Internal Parameters/Status
Parameter
Type
Minimum
Maximum
Default
Description
forceManualComp1_4
CJ_BIT
forcing of compressors 1, 2, 3,
and 4 in manual functioning
mode
Type
Minimum
Maximum
Description
enable
CJ_BIT
maxNumEvHour
CJ_BYTE
15
reqSteps_C1
CJ_BYTE
reqSteps_C2
CJ_BYTE
comp1
CJ_BIT
compressor 1 command
statusComp1
CJ_BYTE
compressor 1 status:
0 disabled
1 off
2 switch-on stand-by
3 on
4 switch-off stand-by
5 thermal switch alarm
6 in manual mode
comp2
CJ_BIT
compressor 2 command
EIO0000000538 07/2014
511
Chiller AFBs
Output
Type
Minimum
Maximum
Description
statusComp2
CJ_BYTE
compressor 2 status:
0 disabled
1 off
2 switch-on stand-by
3 on
4 switch-off stand-by
5 thermal switch alarm
6 in manual mode
comp3
CJ_BIT
compressor 3 command
statusComp3
CJ_BYTE
compressor 3 status:
0 disabled
1 off
2 switch-on stand-by
3 on
4 switch-off stand-by
5 thermal switch alarm
6 in manual mode
comp4
CJ_BIT
compressor 4 command
statusComp4
CJ_BYTE
compressor 4 status:
0 disabled
1 off
2 switch-on stand-by
3 on
4 switch-off stand-by
5 thermal switch alarm
6 in manual mode
powerRequested
CJ_BYTE
100
powerSupplied
CJ_BYTE
100
numStepsAvail
CJ_BYTE
numStepsAvail_C1
CJ_BYTE
numStepsAvail_C2
CJ_BYTE
512
EIO0000000538 07/2014
Chiller AFBs
PumpDownManagement
Function Block Diagram
Functional Description
The macroblock manages the pump-down procedure up to 2 circuits.
The pump-down procedure is used to partially empty the excess refrigerant from the evaporator.
The type of pump-down regulation can be set using the pumpDownType input. Timed only or at
relative threshold on the basis of the evaporation pressure.
EIO0000000538 07/2014
513
Chiller AFBs
In all cases, the compressor switch-off delay in pump-down mode is always valid, whenever the
switch-off pressure threshold should not be realized or the evaporation probes are inoperable.
NOTE: In the event of an alarm, the procedure ignores the compressors switch-off delay in pumpdown mode.
514
EIO0000000538 07/2014
Chiller AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
pumpDownType
CJ_BIT
delayPumpDown
CJ_WORD
999
diffPumpDown
CJ_SHORT
300.0
1.5
numCompCirc
CJ_BYTE
pressEvap_C1
CJ_ANALOG
pressEvap_C2
CJ_ANALOG
comp1
CJ_BIT
comp2
CJ_BIT
comp3
CJ_BIT
comp4
CJ_BIT
alarmComp1
CJ_BIT
alarmComp2
CJ_BIT
alarmComp3
CJ_BIT
alarmComp4
CJ_BIT
EIO0000000538 07/2014
515
Chiller AFBs
Type
Minimum
Maximum
Description
enable
CJ_BIT
compOut1
CJ_BIT
compOut2
CJ_BIT
compOut3
CJ_BIT
compOut4
CJ_BIT
solenoidValve_C1
CJ_BIT
solenoidValve_C2
CJ_BIT
516
EIO0000000538 07/2014
Chiller AFBs
AntiFreezeControl
Function Block Diagram
Functional Description
The macroblock manages the anti-freeze heaters and the relative alarm up to 2 circuits.
2 thresholds are maintained, with relative differential: one to activate the heaters and the other to
signal the alarm.
If the anti-freeze alarm persists for a time longer than delayBlockPump seconds, the blockPump
output is set at value 1 in a way to switch the pumps off, if necessary.
In case of anti-freeze, when the unit is off (unitOnOff = 0 input), only the heaters are activated
while the alarm is not signaled.
The alarms all have manual reset.
EIO0000000538 07/2014
517
Chiller AFBs
Unique Evaporation
In the twin circuit machines (numCircuit = 2), it is possible to select whether to use a unique
circuit to manage evaporation. To enable this function, set enSingleEvap = 1. Evaporation is
performed by the anti-freeze and the heaters normally used for circuit 1 using the most unfavorable
value between the 2 outlet water temperature values acquired by the 2 respective transducers. If
one of the 2 probes is inactive, the other is used.
The heaters output and the anti-freeze alarm controlled are always those relative to circuit 1
(heater_C1 and alarmAntiFreeze_C1).
Input Pin Description
Input
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
unitOnOff
CJ_BIT
numCircuit
CJ_BYTE
enSingleEvap
CJ_BIT
setPointHeater
CJ_SHORT
-58.0
302.0
diffHeater
CJ_SHORT
0.0
50.0
heaterOnErrorProbe
CJ_BIT
518
EIO0000000538 07/2014
Chiller AFBs
Input
Type
Minimum
Maximum
Default
Description
enAntiFreezeAlarm
CJ_BIT
setPointAlarm
CJ_SHORT
-58.0
302.0
3.0
diffAlarm
CJ_SHORT
0.0
50.0
2.0
delayBlockPump
CJ_WORD
999
tempOut_C1
CJ_ANALOG
resetAlarm_C1
CJ_BIT
tempOut_C2
CJ_ANALOG
resetAlarm_C2
CJ_BIT
Type
Minimum
Maximum
Description
enable
CJ_BIT
heater_C1
CJ_BIT
alarmAntiFreeze_C1
CJ_BIT
heater_C2
CJ_BIT
alarmAntiFreeze_C2
CJ_BIT
blockPump
CJ_BIT
pump block:
0 block not active
1 block active
EIO0000000538 07/2014
519
Chiller AFBs
LowPressureAlarmDI
Function Block Diagram
Functional Description
The macroblock manages the alarm up to 2 circuits. It is possible to monitor when a minimum
condensation pressure occurs using a digital input connected to an external pressure switch. The
alarm is detected only if the machine is on (unitOnOff = 1).
On start-up of the first compressor, the alarm is delayed by a certain time (startUpCompDelay),
so as not to allow the compressors to pressurize the circuit.
The alarm initially has automatic reset, unless it exceeds a certain number of interventions during
the hour (numEvHourBP). In this case, it becomes manual reset.
Low Pressure Alarm on Start-up
The low pressure start-up alarm occurs due to a low pressure situation and the inability to activate
a request for switch-on of a compressor. The alarm has automatic reset and disappears unless
there is a freon leak in the system. On compressor switch-off due to a low pressure alarm, the latter
is delayed by a certain period of time (delayAlarmBPonStart input) in order to permit the
refrigerant circuit to allow compressor start-up.
520
EIO0000000538 07/2014
Chiller AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
unitOnOff
CJ_BIT
numCircuit
CJ_BYTE
numEvHourLP
CJ_BYTE
15
startUpCompDelay
CJ_WORD
999
delayAlarmLPonStart
CJ_WORD
999
reqComp_C1
CJ_BYTE
orComp_C1
CJ_BIT
circuit 1 compressors OR
DI_AlarmLP_C1
CJ_BIT
resetAlarmLP_C1
CJ_BIT
reqComp_C2
CJ_BYTE
EIO0000000538 07/2014
521
Chiller AFBs
Input
Type
Minimum
Maximum
Default
Description
orComp_C2
CJ_BIT
circuit 2 compressors OR
DI_AlarmLP_C2
CJ_BIT
resetAlarmLP_C2
CJ_BIT
Minimum
Maximum
Type
Description
enable
CJ_BIT
alarmLP_C1
CJ_BIT
alarmLPStart_C1
CJ_BIT
alarmLP_C2
CJ_BIT
alarmLPStart_C2
CJ_BIT
522
EIO0000000538 07/2014
Chiller AFBs
HighPressureAlarmDI
Function Block Diagram
Functional Description
The macroblock manages the alarm up to 2 circuits. It is possible to monitor when a maximum
condensation pressure has exceeded using a digital input connected to an external pressure
switch. The alarm is detected only if the machine is on (unitOnOff = 1). The type of reset can be
set: automatic on return of the alarm condition or manual.
Input Pin Description
Input
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
unitOnOff
CJ_BIT
numCircuit
CJ_BYTE
EIO0000000538 07/2014
523
Chiller AFBs
Input
Type
Minimum
Maximum
Default
Description
restoreType
CJ_BIT
DI_AlarmHP_C1
CJ_BIT
resetAlarmHP_C1
CJ_BIT
DI_AlarmHP_C2
CJ_BIT
resetAlarmHP_C2
CJ_BIT
Type
Minimum
Maximum
Description
enable
CJ_BIT
alarmHP_C1
CJ_BIT
alarmHP_C2
CJ_BIT
524
EIO0000000538 07/2014
Chiller AFBs
LowPressureAlarmAI
Function Block Diagram
EIO0000000538 07/2014
525
Chiller AFBs
Functional Description
The macroblock manages the alarm up to 2 circuits. If the intake pressure drops below a certain
threshold, a low condensation pressure alarm is generated. The alarm is detected only if the
machine is on (unitOnOff = 1).
On start-up of the first compressor, the alarm is delayed by a certain time (startUpCompDelay),
so as not to allow the compressors to pressurize the circuit.
The alarm initially has automatic reset, unless it exceeds a certain number of interventions during
the hour (numEvHourBP). In this case, it becomes manual reset and can be zeroed, if in the
meantime, the pressure has risen above the minimum threshold (setPointAlarmLP) by a certain
differential value (diffAlarmLP).
526
EIO0000000538 07/2014
Chiller AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
unitOnOff
CJ_BIT
numCircuit
CJ_BYTE
mode
CJ_BIT
numEvHourLP
CJ_BYTE
15
startUpCompDelay
CJ_WORD
999
delayAlarmLPonStart
CJ_WORD
999
setPointAlarmLP
CJ_SHORT
0.0
750.0
diffAlarmLP
CJ_SHORT
0.0
300.0
pressCond_C1
CJ_ANALOG
circuit 1 condensation
pressure probe [bar]
reqComp_C1
CJ_BYTE
orComp_C1
CJ_BIT
circuit 1 compressors OR
EIO0000000538 07/2014
527
Chiller AFBs
Input
Type
Minimum
Maximum
Default
Description
resetAlarmLP_C1
CJ_BIT
pressCond_C2
CJ_ANALOG
circuit 2 condensation
pressure probe [bar]
reqComp_C2
CJ_BYTE
orComp_C2
CJ_BIT
circuit 2 compressors OR
resetAlarmLP_C2
CJ_BIT
enLPLT
CJ_BIT
setPointLPLT
CJ_SHORT
0.0
750.0
1.0
diffLPLT
CJ_SHORT
0.0
300.0
0.5
timeLPLT
CJ_WORD
999
120
528
EIO0000000538 07/2014
Chiller AFBs
Type
Minimum
Maximum
Description
enable
CJ_BIT
alarmLP_C1
CJ_BIT
alarmLPStart_C1
CJ_BIT
alarmLP_C2
CJ_BIT
alarmLPStart_C2
CJ_BIT
EIO0000000538 07/2014
529
Chiller AFBs
HighPressureAlarmAI
Function Block Diagram
Functional Description
The macroblock manages the alarm up to 2 circuits. If the condensation pressure exceeds a
certain threshold, a high pressure alarm is generated. The alarm is detected only if the machine is
on (unitOnOff = 1). The type of reset can be set: automatic on return of the alarm condition or
manual.
530
EIO0000000538 07/2014
Chiller AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
unitOnOff
CJ_BIT
numCircuit
CJ_BYTE
restoreType
CJ_BIT
setPointAlarmHP
CJ_SHORT
0.0
750.0
diffAlarmHP
CJ_SHORT
0.0
300.0
pressCond_C1
CJ_ANALOG
resetAlarmHP_C1
CJ_BIT
pressCond_C2
CJ_ANALOG
resetAlarmHP_C2
CJ_BIT
EIO0000000538 07/2014
531
Chiller AFBs
Type
Minimum
Maximum
Description
enable
CJ_BIT
alarmHP_C1
CJ_BIT
alarmHP_C2
CJ_BIT
532
EIO0000000538 07/2014
Chiller AFBs
DefrostManagement
Function Block Diagram
EIO0000000538 07/2014
533
Chiller AFBs
Functional Description
This procedure is only active in winter functioning mode (heat pump, mode = 1) and when at least
one compressor in the circuit is on (orCmpC1 = 1).
If the pressure persists (even not continuously) for a determined period of time (delayDefrost
input) below the defrost start set-point (setPointStartDefrost) and at least one compressor
is functioning, the defrosting phase starts and the relative (onDefrost_C1, onDefrost_C2)
output is activated in a way to manage the switch-over of the inversion valve.
The defrosting phase ends due to one of these conditions:
when the pressure reaches the defrosting end set point (setPointEndDefrost) on expiry of
the maximum duration time of defrosting (maxDefrostTime) in case of machine or circuit
alarms that block the compressors due to unit switch-off (off)
After the end of defrosting, the dripping phase starts for the entire time set from drippingTime
input.
To prevent the starting of defrosting immediately after shutdown of all compressors, a minimum
time is waited for re-start of the circuit (minTimeWaitPdc) in a way to guarantee at least one
functioning period in heat pump mode before entering defrost mode.
Defrosting is disabled if the probes are inoperable.
NOTE: In the case of twin circuit (numCircuit = 2), defrosting cannot be simultaneous. If one
circuit is defrosting, the other circuit cannot start a defrosting procedure until the circuit in defrosting
mode has ended the complete cycle.
534
EIO0000000538 07/2014
Chiller AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
unitOnOff
CJ_BIT
numCircuit
CJ_BYTE
number of circuits
configured
mode
CJ_BIT
setPointStartDefrost
CJ_SHORT
0.0
750.0
setPointEndDefrost
CJ_SHORT
0.0
750.0
EIO0000000538 07/2014
535
Chiller AFBs
Input
Type
Minimum
Maximum
Default
Description
delayDefrost
CJ_WORD
60
3600
maxDefrostTime
CJ_WORD
10
999
drippingTime
CJ_WORD
999
minTimeWaitPdc
CJ_WORD
999
orComp_C1
CJ_BIT
circuit 1 compressors OR
pressCond_C1
CJ_ANALOG
circuit 1 condensation
pressure probe [bar]
OrComp_C2
CJ_BIT
circuit 2 compressors OR
pressCond_C2
CJ_ANALOG
circuit 2 condensation
pressure probe [bar]
enCompensation
CJ_BIT
maxDelayDefrost
CJ_WORD
60
9600
3600
setStartTempExt
CJ_SHORT
-58.0
302.0
5.0
setEndTempExt
CJ_SHORT
-58.0
302.0
0.0
tempExternal
CJ_ANALOG
536
EIO0000000538 07/2014
Chiller AFBs
Type
Minimum
Maximum
Description
enable
CJ_BIT
onDefrost_C1
CJ_BIT
cntWaitDefrost_C1
CJ_WORD
999
cntOnDefrost_C1
CJ_WORD
999
onDripping_C1
CJ_BIT
onDefrost_C2
CJ_BIT
cntWaitDefrost_C2
CJ_WORD
999
cntOnDefrost_C2
CJ_WORD
999
onDripping_C2
CJ_BIT
EIO0000000538 07/2014
537
Chiller AFBs
FanThermalAlarm
Function Block Diagram
Functional Description
The macroblock manages the thermal switch alarm of 2 fans. The alarm is delayed by any
(delayAlarm input) by-pass time. The type of reset can also be set: automatic on return of the
alarm condition or manual. Each of the alarms can be enabled individually.
Input Pin Description
Input
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
numCircuit
CJ_BYTE
delayAlarm
CJ_WORD
999
restoreType
CJ_BIT
538
EIO0000000538 07/2014
Chiller AFBs
Input
Type
Minimum
Maximum
Default
Description
DI_AlarmFan1
CJ_BIT
resetAlarmFan1
CJ_BIT
DI_AlarmFan2
CJ_BIT
resetAlarmFan2
CJ_BYTE
Minimum
Maximum
Description
Type
enable
CJ_BIT
alarmFan1
CJ_BIT
alarmFan2
CJ_BIT
EIO0000000538 07/2014
539
Chiller AFBs
StepRegulationFan
Function Block Diagram
540
EIO0000000538 07/2014
Chiller AFBs
Functional Description
Manages a step regulation of the condensation fans regulating a digital output. The regulations are
active if the unit is on (unitOnOff = 1).
The following figure shows the behavior of the proportional regulation in the case of summer
functioning (chiller, mode = 0). In this regulation, the proportional band is shifted completely over
the set-point.
The following figure shows the behavior of the proportional regulation in case of the winter
functioning (heat pump, mode = 1). In this regulation, the proportional band is shifted completely
under the set-point.
When the pressure probe is inoperable, it is possible to force (valOnErrorProbe input) the
regulation value of the 2 fans.
The possibility exists to make the regulation of the fans independent or dependent of that of the
compressors by setting the enFanWithComp = 0 input. The regulation is independent from the
heat regulation, otherwise (enFanWithComp = 1) the fans are activated if the heat regulator has
requested to switch-on at least 1 compressor (if orComp_C1 = 1, orComp_C2 = 1).
The stopOnDefrost input establishes the behavior of the fans during defrosting.
Unique Condensation
In the twin circuit machines (numCircuit = 2), it is possible to select whether to use a unique
circuit to manage condensation. To enable this function, enSingleCond = 1 must be set.
Condensation is performed by fan 1 using the most unfavorable value from the 2 condensation
pressure values acquired from the 2 respective transducers. If one of the 2 probes is in inoperative
conditions, the other is used. The output activated is always that relative to circuit 1 (doFan_C1).
EIO0000000538 07/2014
541
Chiller AFBs
Fans Status
Every fan has an associated functioning status (statusFan1 and statusFan2 outputs):
Disabled the fan is not configured
On the fan is functioning
Switch-on stand-by the fan is in stand-by due to the switch-on delay time as defined by
minTimeStartOther.
Off the fan is off
Switch-off stand-by the fan is in stand-by due to the switch-off delay time as defined by
minTimeStartOther.
Alarm fan thermal switch alarm
Manual the fan is in manual functioning mode
Fans Times
Fan protection times to prevent simultaneous peaks:
minTimeStartOther - minimum time that must pass between switch-on of one fan and the next
minTimeStopOther - minimum time that must pass between switch-off of one fan and the next
Manual Functioning Mode
The program allows to set manual functioning for compressors and fans. In this state, the devices
do not take part in rotations and in heat regulation calculations, however they are sensitive to
alarms. Manual functioning of the devices is useful when functional tests must be performed on the
machine in order test the integrity and correct functioning.
For condensing fans to go into manual functioning mode, the 2 enManual_C1 and enManual_C2
inputs must be set:
0 normal device behavior
1 disables the fan and takes it to manual functioning mode
A fan in manual functioning mode does not participate in regulations and can be forced into switchon/off by setting the relative states inside theforceManual_C1 and forceManual_C2
macroblock.
A fan in manual functioning mode is sensitive to alarms.
542
EIO0000000538 07/2014
Chiller AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
unitOnOff
CJ_BIT
numCircuit
CJ_BYTE
mode
CJ_BIT
enFanWithComp
CJ_BIT
enSingleCond
CJ_BIT
stopOnDefrost_C1
CJ_BIT
valOnErrorProbe
CJ_BIT
minTimeStartOther
CJ_WORD
999
minTimeStopOther
CJ_WORD
999
setPointHeating
CJ_SHORT
0.0
750.0
diffHeating
CJ_SHORT
300.0
setPointCooling
CJ_SHORT
0.0
750.0
diffCooling
CJ_SHORT
300.0
EIO0000000538 07/2014
543
Chiller AFBs
Input
Type
Minimum
Maximum
Default
Description
enManual_C1
CJ_BIT
orComp_C1
CJ_BIT
circuit 1 compressors OR
alarmFan_C1
CJ_BIT
blockFan_C1
CJ_BIT
onDefrost_C1
CJ_BIT
pressCond_C1
CJ_ANALOG
forceManual_C1
CJ_BIT
enManual_C2
CJ_BIT
orComp_C2
CJ_BIT
circuit 2 compressors OR
alarmFan_C2
CJ_BIT
blockFan_C2
CJ_BIT
onDefrost_C2
CJ_BIT
pressCond_C2
CJ_ANALOG
forceManual_C2
CJ_BIT
stopOnDefrost_C2
CJ_BIT
544
EIO0000000538 07/2014
Chiller AFBs
Type
Minimum
Maximum
Description
enable
CJ_BIT
doFan_C1
CJ_BIT
statusFan_C1
CJ_BYTE
doFan_C2
CJ_BIT
statusFan_C2
CJ_BYTE
EIO0000000538 07/2014
545
Chiller AFBs
LinearFanControl
Function Block Diagram
546
EIO0000000538 07/2014
Chiller AFBs
Functional Description
Manages a proportional-integral regulation of the condensation fans, regulating an analogue
output. The regulation becomes only proportional by setting a 0 value at the input of the integral
time (PI_Ti_Heating = 0, PI_Ti_Cooling = 0). The regulations are only active if the unit is on
(unitOnOff = 1).
The fan speed regulation maintains a minimum value (minValFan and a maximum value
(maxValFan). It is also possible to set the speed-up time (speedUpTime input) on start-up, during
which the speed of the fan goes to maximum.
The possibility of keeping the fans at minimum, even under the set point, is also provided for
enabling the cut-off function (enCutOff = 1). If the pressure should decrease further below the set
point of a certain threshold, fans switch-off is forced.
A high speed value is also present, over which the speed remains constant. Whenever forcing is
enabled at maximum (enForceMax = 1), if the pressure should increase further and exceed a
certain threshold, the speed of the fans is forced at 100%.
The following figure shows the behavior of the proportional regulation in the case of summer
functioning (chiller, mode = 0). In this regulation, the proportional band is shifted completely over
the set point.
EIO0000000538 07/2014
547
Chiller AFBs
The following figure shows the behavior of the proportional regulation in the case of winter
functioning (heat pump, mode = 1). In this regulation, the proportional band is shifted completely
under the set point.
When the pressure probe is inoperable, it is possible to force (valOnErrorProbe input) the
regulation value of the 2 fans.
The possibility exists to make the regulation of the fans independent or dependent with that of the
compressors by setting the enFanWithComp = 0 input. The regulation is independent from the
heat regulation, otherwise (enFanWithComp = 1) the fans are activated if the heat regulator has
requested to switch at least one compressor on (if orCmp_C1 = 1, orCmp_C2 = 1).
The stopOnDefrost input establishes the behavior of the fans during defrosting.
Unique Condensation
In the twin circuit machines (numCircuit = 2), it is possible to select whether to use a unique
circuit to manage condensation. To enable this function, enSingleCond = 1 must be set.
Condensation is performed by fan 1 using the most unfavourable value from the 2 condensation
pressure values acquired from the 2 respective transducers. If one of the 2 probes is inoperable,
the other is used. The output activated is always that relative to circuit 1 (aoFan_C1).
548
EIO0000000538 07/2014
Chiller AFBs
Fans Status
Every fan has an associated functioning status (statusFan_C1 and statusFan_C2 outputs):
Disabled the fan is not configured
On the fan is functioning
Switch-on stand-by the fan is in stand-by due to the switch-on delay time as defined by
minTimeStartOther.
Off the fan is off
Switch-off stand-by the fan is in stand-by due to the switch-off delay time as defined by
minTimeStartOther.
Alarm fan thermal switch alarm
Manual the fan is in manual functioning mode
Fans Times
Fan protection times to prevent simultaneous peaks:
minTimeStartOther - minimum time that must pass between switch-on of one fan and the next
minTimeStopOther - minimum time that must pass between switch-off of one fan and the next
Manual Functioning Mode
For condensing fans to go into manual functioning mode, the 2 enManual_C1 and enManual_C2
inputs must be set:
0 normal device behavior
1 disables the fan and takes it to manual functioning mode
A fan in manual functioning mode does not participate in regulations and can be forced into switchon/off by setting the desired value through the internal forceManual_C1 and forceManual_C2
inputs.
A fan in manual functioning mode is sensitive to alarms.
Input Pin Description
Input
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
unitOnOff
CJ_BIT
numCircuit
CJ_BYTE
number of circuits
configured
EIO0000000538 07/2014
549
Chiller AFBs
Input
Type
Minimum
Maximum
Default
Description
mode
CJ_BIT
enFanWithComp
CJ_BIT
enabling of regulation of
the fans with the
compressors:
0 disabled
1 enabled
enSingleCond
CJ_BIT
enabling unique
condensation:
0 disabled
1 enabled
minFanValue
CJ_WORD
0.00
100.00
minimum functioning
speed
maxFanValue
CJ_WORD
0.00
100.00
maximum functioning
speed
valOnErrorProbe
CJ_WORD
0.00
100.00
speedUpTime
CJ_WORD
999
minTimeStartOther
CJ_WORD
999
minTimeStopOther
CJ_WORD
999
enCutOff
CJ_BIT
enabling of cut-off
function:
0 disabled
1 enabled
diffCutOff
CJ_SHORT
0.0
300.0
2.0
setPointHeating
CJ_SHORT
0.0
750.0
PI_Bp_Heating
CJ_SHORT
300.0
PI proportional band in
winter mode [bar]
PI_Ti_Heating
CJ_WORD
999
setPointCooling
CJ_SHORT
0.0
750.0
550
EIO0000000538 07/2014
Chiller AFBs
Input
Type
Minimum
Maximum
Default
Description
PI_Bp_Cooling
CJ_SHORT
300.0
PI proportional band in
summer mode [bar]
PI_Ti_Cooling
CJ_WORD
999
enForceMax
CJ_BIT
setPointForceHeating
CJ_SHORT
0.0
750.0
diffForceHeating
CJ_SHORT
0.0
300.0
forcing differential at
maximum in winter mode
[bar]
setPointForceCooling
CJ_SHORT
0.0
750.0
diffForceCooling
CJ_SHORTT
0.0
300.0
forcing differential at
maximum in summer
mode [bar]
enManual_C1
CJ_BIT
enabling of manual
functioning mode of the
circuit 1 fan:
0 automatic functioning
mode
1 manual functioning
mode
orComp_C1
CJ_BIT
circuit 1 compressors OR
alarmFan_C1
CJ_BIT
blockFan_C1
CJ_BIT
onDefrost_C1
CJ_BIT
pressCond_C1
CJ_ANALOG
circuit 1 condensation
pressure probe [bar]
forceManual_C1
CJ_WORD
0.00
100.00
0.00
stopOnDefrostC1
CJ_BIT
EIO0000000538 07/2014
551
Chiller AFBs
Input
Type
Minimum
Maximum
Default
Description
enManual_C2
CJ_BIT
enabling of manual
functioning mode of the
circuit 2 fan:
0 automatic functioning
mode
1 manual functioning
mode
orComp_C2
CJ_BIT
circuit 2 compressors OR
alarmFan_C2
CJ_BIT
blockFan_C2
CJ_BIT
onDefrost_C2
CJ_BIT
pressCond_C2
CJ_ANALOG
circuit 2 condensation
pressure probe [bar]
forceManual_C2
CJ_WORD
0.00
100.00
0.00
stopOnDefrost_C2
CJ_BIT
minOutFan
CJ_WORD
0.00
100.00
Type
Minimum
Maximum
Description
enable
CJ_BIT
aoFan_C1
CJ_WORD
0.00
100.00
statusFan_C1
CJ_BYTE
aoFan_C2
CJ_WORD
0.00
100.00
552
EIO0000000538 07/2014
Chiller AFBs
Output
Type
Minimum
Maximum
Description
statusFan_C2
CJ_BYTE
EIO0000000538 07/2014
553
Chiller AFBs
TemperatureAlarm
Function Block Diagram
Functional Description
Depending on the functioning mode, a control is made on the input temperature to the exchangers,
eventually activating an alarm.
In winter functioning mode (heat pump, mode = 1), if the temperature falls below a certain
threshold for a time that can be set (delayAlarm), a low temperature alarm is generated.
554
In summer functioning mode (chiller, mode = 0), if the input temperature is over a certain
threshold for a time that can be set (delayAlarm), a high temperature alarm is generated.
EIO0000000538 07/2014
Chiller AFBs
It is also possible to set a prevention time of the temperature alarms on switch-on of the system.
By setting the delayAfterUnitOn input higher than 0, when unitOnOff passes from 0 to1, the
alarms signal is delayed for the entire time selected.
These alarms are only detected if the machine is on (unitOnOff = 1) and have automatic
reset.The alarms control is disabled during a functioning mode changeover (onChangeMode = 1).
Input Pin Description
Input
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
unitOnOff
CJ_BIT
mode
CJ_BIT
onChangeMode
CJ_BIT
delayAlarm
CJ_WORD
999
delayAfterUnitOn
CJ_WORD
999
tempIn
CJ_ANALOG
setPointAlarmHT
CJ_SHORT
-58.0
302.0
setPointAlarmLT
CJ_SHORT
-58.0
302.0
diffAlarm
CJ_SHORT
0.0
50.0
EIO0000000538 07/2014
555
Chiller AFBs
Type
Minimum
Maximum
Description
enable
CJ_BIT
alarmHT
CJ_BIT
alarmLT
CJ_BIT
556
EIO0000000538 07/2014
Chiller AFBs
DynamicSetPoint
Function Block Diagram
Functional Description
The function performs set point compensation on the basis of the external temperature detected.
The regulation set-point assumes a value between the standard set point SP (corresponding to the
initial threshold of the external temperature, START) and the set point plus an offset OFS
(corresponding to the final threshold of the external temperature, END), both for chiller and heat
pump functioning modes. The trend is linear between the 2 compensation points and the curve
assumes a different meaning on the basis of the offset sign.
With offsets below 0, there is the following behavior (chiller, summer functioning mode):
EIO0000000538 07/2014
557
Chiller AFBs
With offsets above 0, there is the following behavior (heat pump, winter functioning mode):
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
setPoint
CJ_SHORT
-58.0
302.0
offsetSetPoint
CJ_SHORT
-58.0
302.0
setStartCompensation
CJ_SHORT
-58.0
302.0
setEndCompensation
CJ_SHORT
-58.0
302.0
minSetPoint
CJ_SHORT
-58.0
302.0
maxSetPoint
CJ_SHORT
-58.0
302.0
tempExternal
CJ_ANALOG
558
EIO0000000538 07/2014
Chiller AFBs
Type
Minimum
Maximum
Description
enable
CJ_BIT
setPoint
CJ_SHORT
-58.0
302.0
EIO0000000538 07/2014
559
Chiller AFBs
ForceShutdown
Function Block Diagram
Functional Description
Manages the forced switch-off of the functions when the output temperature passes a determined
set point. The block is released only when the temperature re-passes through the main regulation
set point.
If 2 circuits are set (numCircuit = 2 input), regulation takes place on the average of the 2 output
temperature probes (empOut_C1, tempOut_C2). If one of the 2 probes is inactive, regulation is
made on the other functioning probe. If both probes are inactive, regulation is disabled.
In summer functioning mode (chiller, mode = 0):
560
EIO0000000538 07/2014
Chiller AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
numCircuit
CJ_BYTE
mode
CJ_BIT
setCooling
CJ_SHORT
-58.0
302.0
setHeating
CJ_SHORT
-58.0
302.0
setCoolingForce
CJ_SHORT
-58.0
302.0
setHeatingForce
CJ_SHORT
-58.0
302.0
tempOut_C1
CJ_ANALOG
tempOut_C2
CJ_ANALOG
EIO0000000538 07/2014
561
Chiller AFBs
Type
Minimum
Maximum
Description
enable
CJ_BIT
forceShutDown
CJ_BIT
562
EIO0000000538 07/2014
Chiller AFBs
HighPressurePartialisationHT
Function Block Diagram
Functional Description
This function block (High Pressure Partialisation High Temperature) calculates the conditions to
enable power limitation of the chiller in case of higher external air temperature conditions.
This power limitation can be activated only in summer mode; there is an equivalent function block
for winter mode (Low Pressure Partialisation with Low Temperature).
The power limitation function is enabled when the condenser pressure is above setPressHPHT
and if the external temperature is above setTempExternal. During the power limitation function,
the number of compressor steps will be reduced, which will reduce the electrical power
consumption.
The power limitation function is disabled when the condenser pressure will drop below
setPressHPHT-diffPressHPHT, and the minimum time minTimePart has expired.
In case the machine is using two refrigeration circuits (numCircuit=2), pressure control is using
the average of the condensation pressure sensors (pressCond_C1, pressCond_C2). If one of
the two sensors is inoperative, the control will use the other operative sensor. The function is
disabled if both sensors are inoperative.
EIO0000000538 07/2014
563
Chiller AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
numCircuit
CJ_BYTE
mode
CJ_BIT
setTempExternal
CJ_SHORT
-58.0
302.0
setPressHPHT
CJ_SHORT
0.0
750.0
diffPressHPHT
CJ_SHORT
0.0
300.0
564
EIO0000000538 07/2014
Chiller AFBs
Input
Type
Minimum
Maximum
Default
Description
minTimePart
CJ_WORD
99
tempExternal
CJ_ANALOG
pressCond_C1
CJ_ANALOG
pressCond_C2
CJ_ANALOG
Type
Minimum
Maximum
Description
enable
CJ_BIT
partHPHT
CJ_BIT
EIO0000000538 07/2014
565
Chiller AFBs
LowPressurePartialisationLT
Function Block Diagram
Functional Description
This control allows to limit the power of the refrigerant circuit if the external temperature conditions
and of the cooled water lead to minimum pressure alarms. If less than minDelayPart seconds
have passed from the intervention of a minimum pressure alarm, the external air temperature
drops below a determined threshold (setTempExternal input), and the output water temperature
exceeds a determined threshold (setTempOut threshold). The value of the pressure probe is
tested in a way to activate power limitation (partLPLT = 1 output) when the pressure goes below
a determined threshold (setPressLPLT input).
566
EIO0000000538 07/2014
Chiller AFBs
This power limitation can be activated only in winter mode, there is an equivalent function block for
summer mode (High Pressure Limitation Partialization with High Temperature).
In case the machine is using two refrigeration circuits (numCircuit=2), pressure control is using
the average of the condensation pressure sensors (pressCond_C1, pressCond_C2). If one of
the two sensors is inoperative, the control will use the other operative sensor. The function is
disabled if both sensors are inoperative.
EIO0000000538 07/2014
567
Chiller AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
numCircuit
CJ_BYTE
unitOnOff
CJ_BIT
mode
CJ_BIT
setTempExternal
CJ_SHORT
-58.0
302.0
setTempOut
CJ_SHORT
-58.0
302.0
setPressLPLT
CJ_SHORT
0.0
750.0
diffPressLPLT
CJ_SHORT
0.0
300.0
minDelayPart
CJ_WORD
999
alarmLP
CJ_BIT
resetAlarmLP
CJ_BIT
tempExternal
CJ_ANALOG
tempOut_C1
CJ_ANALOG
pressCond_C1
CJ_ANALOG
568
EIO0000000538 07/2014
Chiller AFBs
Input
Type
Minimum
Maximum
Default
Description
tempOut_C2
CJ_ANALOG
pressCond_C2
CJ_ANALOG
Type
Minimum
Maximum
Description
enable
CJ_BIT
partLPLT
CJ_BIT
activation of chocking
EIO0000000538 07/2014
569
Chiller AFBs
WeeklyScheduler
Function Block Diagram
Functional Description
Manages a weekly scheduler. Every day of the week can be one of the 3 types: workingDayA,
workingDayB, and notWorkingDay. The typeDay_Sunday,
typeDay_Monday,...typeDay_Saturday internal parameters allow to set the type of day in a
way to associate up to 3 different behaviors to each of the days of the week.
2 time bands are associated to every type of working day. Each of the 2 bands has an enable
status associated for enabling/disabling of the band and 2 offset values, so as to modify the work
set point. For notWorkingDay type of day, the scheduler does not manage any time band and
relative offsets.
The offsetCooling and offsetHeating outputs correspond with the value actually calculated
on the basis of the parameters and the time bands set, while timeZoneActive indicates if one
of the time bands configured is active or not. The output remains at 1 for the entire time included
in the band configured, while it remains at 0 in other cases.
570
EIO0000000538 07/2014
Chiller AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
clockRTC
CJ_DATETIME -
alarmRTC
CJ_BIT
dayA_enTZ_1
CJ_BIT
dayA_OffsetCoolingTZ_1
CJ_SHORT
-58.0
302.0
-10.0
dayA_OffsetHeatingTZ_1
CJ_SHORT
-58.0
302.0
10.0
dayA_enTZ_2
CJ_BIT
dayA_OffsetCoolingTZ_2
CJ_SHORT
-58.0
302.0
-10.0
dayA_OffsetHeatingTZ_2
CJ_SHORT
-58.0
302.0
10.0
dayB_enTZ_1
CJ_BIT
dayB_OffsetCoolingTZ_1
CJ_SHORT
-58.0
302.0
-10.0
dayB_OffsetHeatingTZ_1
CJ_SHORT
-58.0
302.0
10.0
EIO0000000538 07/2014
571
Chiller AFBs
Input
Type
Minimum
Maximum
Default
Description
dayB_enTZ_2
CJ_BIT
dayB_OffsetCoolingTZ_2
CJ_SHORT
-58.0
302.0
-10.0
dayB_OffsetHeatingTZ_2
CJ_SHORT
-58.0
302.0
10.0
Internal Parameters/Status
Parameter
Type
Minimum
Maximum
Default
Description
typeDay_Sunday
CJ_BYTE
typeDay_Monday
CJ_BYTE
typeDay_Tuesday
CJ_BYTE
typeDay_Wednesday
CJ_BYTE
typeDay_Thursday
CJ_BYTE
typeDay_Friday
CJ_BYTE
typeDay_Saturday
CJ_BYTE
572
EIO0000000538 07/2014
Chiller AFBs
Parameter
Type
Minimum
Maximum
Default
Description
dayA_StartTZ_1
CJ_TIME
0:00:00
23:59:59
8:00:00
dayA_EndTZ_1
CJ_TIME
0:00:00
23:59:59
17:00:00
dayA_StartTZ_2
CJ_TIME
0:00:00
23:59:59
18:00:00
dayA_EndTZ_2
CJ_TIME
0:00:00
23:59:59
21:00:00
dayB_StartTZ_1
CJ_TIME
0:00:00
23:59:59
8:00:00
dayB_EndTZ_1
CJ_TIME
0:00:00
23:59:59
17:00:00
dayB_StartTZ_2
CJ_TIME
0:00:00
23:59:59
18:00:00
dayB_EndTZ_2
CJ_TIME
0:00:00
23:59:59
21:00:00
Type
Minimum
Maximum
Description
enable
CJ_BIT
dayActive
CJ_BYTE
typeDayActive
CJ_BYTE
offsetCooling
CJ_SHORT
-58.0
302.0
offsetHeating
CJ_SHORT
-58.0
302.0
timeZoneActive
CJ_BIT
EIO0000000538 07/2014
573
Chiller AFBs
AlarmManagement
Function Block Diagram
Functional Description
The macroblock manages up to 100 alarm events. Every alarm has an increasing index
associated; alarm 1 has index 1 alarm n has index n. Management is based on a priority of 100
alarms, the priority is decided by the index. The alarm with highest priority must be that at alarm 1
input, while that with least priority is connected to the input of the last alarm managed.
The 6 input words allow the memorization of the first 96 alarms, while the remaining 4 alarms must
be connected to the respective alarm97, alarm98, alarm99, alarm100 inputs. Every time the
evRequestAlarm input is activated, the next active alarm is requested. If it is the first requested
(after a reset, evResetIndex input) the first active alarm is requested. The request is interpreted
and as a result the index of the relative active alarm (activeAlarmIndex output). This value
allows you to identify which alarm is being examined. If the active output AlarmIndex = 0, it
means that there is no alarm active to be examined.
574
EIO0000000538 07/2014
Chiller AFBs
The evResetIndex input is used to zero the structure in a way that the first time an alarm is
requested, the output index supplied is effectively that of the priority active alarm.
Input Pin Description
Input
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
dayProbeAlarm
CJ_BYTE
240
alarm1_16
CJ_WORD
65535
alarm17_32
CJ_WORD
65535
alarm33_48
CJ_WORD
65535
alarm49_64
CJ_WORD
65535
alarm65_80
CJ_WORD
65535
alarm81_96
CJ_WORD
65535
alarm97
CJ_BIT
alarm n 97
alarm98
CJ_BIT
alarm n 98
alarm99
CJ_BIT
alarm n 99
alarm100
CJ_BIT
alarm n 100
evResetIndex
CJ_BIT
evRequestAlarm
CJ_BIT
EIO0000000538 07/2014
575
Chiller AFBs
Type
Minimum
Maximum
Description
enable
CJ_BIT
activeAlarmIndex
CJ_BYTE
100
numActiveAlarm
CJ_BYTE
100
alarmIndex
CJ_BYTE
100
576
EIO0000000538 07/2014
Chiller AFBs
AlarmManualReset
Function Block Diagram
Functional Description
Block for management of alarms manual reset. The reset output must be connected directly to the
reset inputs of the alarms that manage a manual reset.
When the evReset input passes from 0 to 1, the actualStatus = myStatus condition is
verified. If the condition is verified, the reset output is set at 1.
Input Pin Description
Input
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
evReset
CJ_BIT
actualStatus
CJ_WORD
65535
myStatus
CJ_WORD
65535
EIO0000000538 07/2014
577
Chiller AFBs
Type
enable
CJ_BIT
reset
CJ_BIT
578
Minimum
Maximum
Description
EIO0000000538 07/2014
Chiller AFBs
OperatingHoursAndAlarms
Function Block Diagram
Functional Description
Manages the functioning times of the connected device. To zero the functioning hours, set the
internal status hoursCntDevice at 0.
By activating the enableHourAlarm input, it is possible to manage the alarm relative to
exceeding the functioning hours set (limitHoursAlarm input).
Input Pin Description
Input
Type
Minimum
Default
Description
enable
CJ_BIT
device
CJ_BIT
enableHourAlarm
CJ_BIT
limitHoursAlarm
CJ_DWORD
99999
Internal parameters/Status
Name
Type
Minimum
Maximum
Default
Description
hoursCntDevice
CJ_DWORD
99999
EIO0000000538 07/2014
579
Chiller AFBs
Type
Minimum
Maximum
Description
enable
CJ_BIT
alarmHourDevice
CJ_BIT
580
EIO0000000538 07/2014
Chiller AFBs
OperatingLimit
Function Block Diagram
Functional Description
When the external temperature drops to particularly low values, it may no longer be convenient or
sufficient to heat using the heat pump. A limit set point on the external temperature is used to
deactivate the heat pump and activate, as a replacement, a relay output for switch-on consent of
a boiler or a set of electric heaters. The reactivation occurs when the external temperature exceeds
the limit set point plus a limit differential. Management is enabled through the limitType input
and can be set if the auxiliary output and compressors are used simultaneously:
0 heat pump only (limit function disabled)
1 activates auxiliary output as an alternative to the heat pump
2 activates auxiliary output and the heat pump
The auxiliary digital output control is given at the auxDO output, while if the heat pump must be
deactivated (therefore if the compressors must switch-off), the limit_BlockComp output is
activated.
EIO0000000538 07/2014
581
Chiller AFBs
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
mode
CJ_BIT
limitType
CJ_BYTE
setPointLimit
CJ_SHORT
-58.0
302.0
diffLimit
CJ_SHORT
0.0
50.0
tempExternal
CJ_ANALOG
Type
Minimum
Maximum
Description
enable
CJ_BIT
auxDO
CJ_BIT
limit_BlockComp
CJ_BIT
582
EIO0000000538 07/2014
Chiller AFBs
AO_Linearization
Function Block Diagram
Functional Description
The value input is linearised by setting the internal parameters x1, x2, x3, y1, y2, y3. If the
enable input = 0, the linearValue output corresponds with the value input.
Input Pin Description
Input
Type
Minimum
Maximum
Default
Description
enable
CJ_BIT
value
CJ_WORD
0.0
100.00
Internal Parameters/Status
Parameter
Type
Minimum
Maximum
Default
Description
x1
CJ_WORD
0.00
100.00
25.00
x2
CJ_WORD
0.00
100.00
50.00
x3
CJ_WORD
0.00
100.00
75.00
y1
CJ_WORD
0.00
100.00
25.00
y2
CJ_WORD
0.00
100.00
50.00
y3
CJ_WORD
0.00
100.00
75.00
EIO0000000538 07/2014
583
Chiller AFBs
Type
Minimum
Maximum
Description
enable
CJ_BIT
linearValue
CJ_WORD
0.00
100.00
584
EIO0000000538 07/2014
SoHVAC
Glossary
EIO0000000538 07/2014
Glossary
A
AI
Analog Input
B
BACnet
Building Automation and Control network
BOOL
Boolean type.
This is the basic data type in computing. A BOOL variable can have either of the following two
values: 0 (FALSE) or 1 (TRUE).
A bit extracted from a word is of type BOOL.
Bp
Proportional Band
BYTE
When 8 bits are grouped together, they are called a BYTE. You can enter a BYTE either in binary
mode or in base 8.
The BYTE type is encoded in an 8 bit format which, in hexadecimal format, ranges from 16#00 to
16#FF.
C
CV
Current Value
D
Deadband
A range of the controlled variable in which no corrective action is taken by the controlled system
and no energy is used.
DI
Digital Input
EIO0000000538 07/2014
585
Glossary
Diff
Differential
DWORD
Double Word.
The DWORD type is encoded in a 32 bit format.
This table shows the upper/lower limits of each of the bases that can be used:
Base
Lower limit
Upper limit
Hexadecimal
16#0
16#FFFFFFFF
Octal
8#0
8#37777777777
Binary
2#0
2#11111111111111111111111111111111
Examples of representation:
Data
00000000000010101101110011011110
16#ADCDE
00000000000000010000000000000000
8#200000
00000000000010101011110011011110
2#10101011110011011110
E
EN
EN stands for ENable; it is an optional block input. When the EN input is enabled, an ENO output is
set automatically.
If EN = 0, the block is not enabled; its internal program is not executed, and ENO is set to 0.
If EN = 1, the blocks internal program is run and ENO is set to 1. If an error is detected, ENO is set
to 0.
If the EN input is not connected, it is set automatically to 1.
EQ
Equal Comparator
Err
Error
ET
Elapsed Time
586
EIO0000000538 07/2014
Glossary
F
Function Block Diagram
Function block diagram is a graphical programming language that works like a flowchart. By adding
simple logical blocks (AND, OR, etc.), each function or function block in the program is represented
in this graphical format. For each block, the inputs are on the left and the outputs on the right. Block
outputs can be linked to inputs of other blocks in order to create complex expressions.
G
GE
Greater or Equal Comparator
GT
Greater Comparator
I
In
Input
INT
Single INTeger (encoded in 16 bits).
The upper/lower limits are as follows: -(2 to the power of 15) to (2 to the power of 15) - 1.
Example:
-32768, 32767, 2#1111110001001001, 16#9FA4.
L
LE
Less or Equal Comparator
Literal value of time
The TIME type has the following units: days (d), hours (h), minutes (m), seconds (s) and
milliseconds (ms). A literal value of type TIME is represented by a combination of the preceding
types prefixed with T#, t#, TIME# or time#.
Examples: T#25h15m, t#14,7S, TIME#5d10h23m45s3ms
LT
Less Comparator
EIO0000000538 07/2014
587
Glossary
N
NAN
Not a Number
Used to indicate that the result of an operation is not a number.
Example: calculating the square root of a negative number.
NE
Not Equal Comparator
O
Out
Output
P
Par
Parameter
Pers
Persistent
PI
Proportional Integral
PID
Proportional Integral Differential
PT
Preset Timer
PV
Preset Value
PWM
Pulse Width Modulation
R
ROL
Rotary Left
ROR
Rotary Right
588
EIO0000000538 07/2014
Glossary
S
SHL
Shift Left
SHR
Shift Right
STRING
A STRING variable is a series of ASCII characters. The maximum length of a string is 65,534
characters.
T
Td
Differential Time
Ti
Integration Time
TIME
The TIME type expresses a time in milliseconds. Encoded in 32 bits, this type can be used to obtain
times from 0 to 2 32-1 milliseconds.
The TIME type has the following units: days (d), hours (h), minutes (m), seconds (s) and
milliseconds (ms). A literal value of type TIME is represented by a combination of the preceding
types prefixed with T#, t#, TIME# or time#.
Examples: T#25h15m, t#14,7S, TIME#5d10h23m45s3ms
TOF
Off-Delay Timer
TON
On-Delay Timer
TP
Pulse Timer
U
U_GE
Unsigned Greater or Equal Comparator
U_GT
Unsigned Greater Comparator
U_LE
Unsigned Less or Equal Comparator
EIO0000000538 07/2014
589
Glossary
U_LT
Unsigned Less Comparator
V
Val
Value
Var
Variable
Variable
Memory entity of type BOOL, WORD, DWORD, etc., whose contents can be modified by the program
currently running.
W
WORD
The type WORD is encoded in a 16 bit format and is used to perform processing on series of bits.
This table shows the upper/lower limits of each of the bases that can be used:
Base
Lower limit
Upper limit
Hexadecimal
16#0
16#FFFF
Octal
8#0
8#177777
Binary
2#0
2#1111111111111111
Examples of representation
590
Data
0000000011010011
16#D3
1010101010101010
8#125252
0000000011010011
2#11010011
EIO0000000538 07/2014
SoHVAC
Index
EIO0000000538 07/2014
Index
A
AHU Application Program Function Blocks
AHU AFBs, 375
C
Chiller Application Program Function Blocks
Chiller AFBs, 475
Control Libraries, 349
Linear Libraries, 350
Non Linear Libraries, 358
I
Introduction to SoHVAC Standard Library, 19
System Libraries, 21
Analog Input Libraries, 45
Analog Output Libraries, 54
BACnetIP Libraries, 64
BACnetMSTP Libraries, 58
Browser Libraries, 90
Expansion Bus Libraries, 97
Hardware Libraries, 35
History Libraries, 109
Identity Libraries, 116
Modbus Libraries, 118
ModbusTCP Libraries, 153
Password Libraries, 171
Software Libraries, 22
System Libraries, 180
S
Standard Libraries, 201
Arithmetic Libraries, 202
Bistable Libraries, 220
Bit Shift Libraries, 227
Comparator Libraries, 240
Conversion Libraries, 251
Counter Libraries, 282
Edge Detection Libraries, 289
Logic Libraries, 292
Selection Libraries, 311
Timer Libraries, 333
Timing Libraries, 340
EIO0000000538 07/2014
591
Index
592
EIO0000000538 07/2014