Вы находитесь на странице: 1из 592

SoHVAC

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 . . . . . . . . . . . . . . . . . . . . . .

Chapter 2 System Libraries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


2.1 Software Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Software Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2 Hardware Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hardware Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3 Analog Input Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Humidity_4_20_mA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Pressure_4_20_mA_0_30_Bar. . . . . . . . . . . . . . . . . . . . . . . . . . . .
Pressure_4_20_mA_0_7_Bar. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Pressure_4_20_mA_General. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SelectUniversalAIn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
EnableFilterAIn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.4 Analog Output Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SelectTypeAOn. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PWM_FrequencyAOn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.5 BACnetMSTP Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BACnetMSTP_Baudrate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BACnetMSTP_DeviceInstance. . . . . . . . . . . . . . . . . . . . . . . . . . . .
BACnetMSTP_InfoFrames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BACnetMSTP_MacID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BACnetMSTP_MaxMaster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.6 BACnetIP Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BACnetIP_Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BACnetIP_Gateway . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BACnetIP_IPConfiguration. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BACnetIP_SubnetMask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BACnetIP_BACnetPortNumber. . . . . . . . . . . . . . . . . . . . . . . . . . . .
BACnetIP_DeviceInstance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BACnetIP_BBMDAddress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BACnetIP_BBMDPortNumber . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
BACnetIP_SNMPAuthenticationTrap . . . . . . . . . . . . . . . . . . . . .
EIO0000000538 07/2014

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. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Chapter 3 Standard Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


3.1 Arithmetic Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Arithmetic Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ADD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ADD32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SUB. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SUB32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MUL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MUL32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DIV. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DIV32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MOD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MOD32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ABS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ABS32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SQRT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SQRT32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
POW. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
POW32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2 Bistable Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FLIP-FLOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

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

3.3 Bit Shift Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


SHL (Shift Left). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SHL16 (Shift Left) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SHL32 (Shift Left) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SHR (Shift Right) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SHR16 (Shift Right) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SHR32 (Shift Right) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ROL (Rotary Left) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ROL16 (Rotary Left). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ROL32 (Rotary Left). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ROR (Rotary Right). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ROR16 (Rotary Right) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ROR32 (Rotary Right) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4 Comparator Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
EQ (Equal Comparator) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
GE (Greater or Equal Comparator) . . . . . . . . . . . . . . . . . . . . . . . . . . .
GT (Greater Comparator). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LE (Less or Equal Comparator) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LT (Less Comparator) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
NE (Not Equal Comparator) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
U_GE (Unsigned Greater or Equal Comparator) . . . . . . . . . . . . . . . . .
U_GT (Unsigned Greater Comparator) . . . . . . . . . . . . . . . . . . . . . . . .
U_LE (Unsigned Less or Equal Comparator) . . . . . . . . . . . . . . . . . . .
U_LT (Unsigned Less Comparator). . . . . . . . . . . . . . . . . . . . . . . . . . .
3.5 Conversion Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ANALOG_GET_ERROR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ANALOG_GET_VALUE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TO_ANALOG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ANALOG_GET_FIELDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AI_to_DI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Celsius2Fahrenheit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Fahrenheit2Celsius . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DATETIME2FIELDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FIELDS2DATETIME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DATETIME_GET_YEAR, DATETIME_GET_MONTH and
DATETIME_GET_DAY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DATETIME_GET_WEEKDAY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DATETIME_GET_HOUR, DATETIME_GET_MIN and
DATETIME_GET_SEC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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

NOT32 (32 bit NOT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


NAND32 (32 bit NAND) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
NOR32 (32 bit NOR). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
XOR32 (32 bit XOR). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.9 Selection Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MAX_BIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MAX_BYTE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MAX_DWORD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MAX_LONG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MAX_SHORT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MAX_S_BYTE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MAX_WORD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MIN_BIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MIN_BYTE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MIN_DWORD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MIN_LONG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MIN_SHORT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MIN_S_BYTE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MIN_WORD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SEL_BIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SEL_BYTE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SEL_DWORD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SEL_LONG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SEL_SHORT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SEL_S_BYTE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SEL_WORD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.10 Timer Libraries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOF (Off Delay Timer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TON (On Delay Timer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TP (Pulse Timer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.11 Timing Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TDELAY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TSHIFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TSUSTAIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PWM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

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

Chapter 4 Control Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


4.1 Linear Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A_LINEAR_CONVERTER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A_LOW_PASS_FILTER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
S_LINEAR_CONVERTER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
S_Low_PASS_FILTER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LINEAR_RAMP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2 Non Linear Libraries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DEAD_BAND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LIMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ZONE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PID. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
THERMO_HOT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
THERMO_COLD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
THERMO_HOT_COLD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Chapter 5 AHU Application Program Function Blocks . . . . . . . .


OnOff_Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AirFlowControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PumpControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PumpAlarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OperatingMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SummerSPcompensation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FansOnOffControl. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FanTempControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FanStaticPressureControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SniffingFanControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FanManagement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FanAlarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FloatingSetPoint. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
HeatingCoilControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PostHeatCoilControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PostHeatHeaterControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
HeaterAlarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CoolingCoilControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DehumidControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
HumidificationControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AirQualityControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10

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 . . . . . . . . . . . . . . . . . . . . . . .

Chapter 6 Chiller Application Program Function Blocks . . . . . . .


OnOff_Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FlowMeterManagement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
WaterPumpControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PumpThermalAlarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
OperatingModeControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DeadZone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LateralBandRegulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CompressorThermalAlarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CompressorControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PumpDownManagement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
AntiFreezeControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LowPressureAlarmDI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
HighPressureAlarmDI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LowPressureAlarmAI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
HighPressureAlarmAI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DefrostManagement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FanThermalAlarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
StepRegulationFan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LinearFanControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TemperatureAlarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DynamicSetPoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ForceShutdown. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
HighPressurePartialisationHT . . . . . . . . . . . . . . . . . . . . . . . .
LowPressurePartialisationLT . . . . . . . . . . . . . . . . . . . . . . . . .
EIO0000000538 07/2014

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

Ensure that appropriate safeties and mechanical/electrical interlocks related to point-of-operation


protection have been installed and are operational before placing the equipment into service. All
interlocks and safeties related to point-of-operation protection must be coordinated with the related
automation equipment and software programming.
NOTE: Coordination of safeties and mechanical/electrical interlocks for point-of-operation
protection is outside the scope of the Function Block Library, System User Guide, or other
implementation referenced in this documentation.
START-UP AND TEST
Before using electrical control and automation equipment for regular operation after installation,
the system should be given a start-up test by qualified personnel to verify correct operation of the
equipment. It is important that arrangements for such a check be made and that enough time is
allowed to perform complete and satisfactory testing.

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.

Failure to follow these instructions can result in injury or equipment damage.


Follow all start-up tests recommended in the equipment documentation. Store all equipment
documentation for future references.
Software testing must be done in both simulated and real environments.
Verify that the completed system is free from all short circuits and temporary grounds that are not
installed according to local regulations (according to the National Electrical Code in the U.S.A, for
instance). If high-potential voltage testing is necessary, follow recommendations in equipment
documentation to prevent accidental equipment damage.
Before energizing equipment:
Remove tools, meters, and debris from equipment.
Close the equipment enclosure door.
Remove all temporary grounds from incoming power lines.
Perform all start-up tests recommended by the manufacturer.

EIO0000000538 07/2014

15

OPERATION AND ADJUSTMENTS


The following precautions are from the NEMA Standards Publication ICS 7.1-1995 (English
version prevails):
Regardless of the care exercised in the design and manufacture of equipment or in the selection
and ratings of components, there are hazards that can be encountered if such equipment is
improperly operated.
It is sometimes possible to misadjust the equipment and thus produce unsatisfactory or unsafe
operation. Always use the manufacturers instructions as a guide for functional adjustments.
Personnel who have access to these adjustments should be familiar with the equipment
manufacturers instructions and the machinery used with the electrical equipment.
Only those operational adjustments actually required by the operator should be accessible to
the operator. Access to other controls should be restricted to prevent unauthorized changes in
operating characteristics.

16

EIO0000000538 07/2014

About the Book


At a Glance
Document Scope
This document describes the functions of the SoHVAC Library.
Validity Note
This document is valid for SoHVAC 3.0.
Related Documents
Title of Documentation

Reference Number

SoHVAC Software User Guide

EIO0000000537 (Eng)

Modicon M168 Controller Hardware Guide

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

Introduction to SoHVAC Standard Library


Introduction to SoHVAC Standard Library
Introduction
This document describes the libraries provided with the SoHVAC development environment
program. The libraries are differentiated into three main groups:
System libraries (Software, Hardware,...)
Standard libraries (Counters, Timers,...)
Control libraries (PID, PI, dead band,...)
The standard libraries contain functions to perform calculations, conversions and a range of
standard functions.
The system libraries contain functions related to the hardware used. For example, they have the
necessary features to control network communication, to manage analog and digital inputs and
outputs, and to control history logs.
The control libraries contain functions related to process control, such as Filters.
Each library group is provided with an example project. Refer to the SoHVAC folder
\...\Samples\Libraries\ to view this information.
For more detailed explanations of the library software properties, refer to the software user guide.
Template-type library can be opened to a sub-level and modified. If not mentioned, the libraries
delivered are protected and cannot be modified.
Single-instance library can be used only once in a project. SoHVAC creates an advisory message
if a single instance library is used more than once.
A library can be a single instance library and/or a template type library.

EIO0000000538 07/2014

19

Introduction to SoHVAC Standard Library

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

Analog Input Libraries

45

2.4

Analog Output Libraries

54

2.5

BACnetMSTP Libraries

58

2.6

BACnetIP Libraries

64

2.7

Browser Libraries

90

2.8

Expansion Bus Libraries

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

This figure shows the elements of the software libraries.

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

It is a read-only property and is set to Fix.

Description

Text-type Description field where you can type in notes.

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

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 constant can take. It depends on the selected Type.

Min

Minimum value that the constant can take. It depends on the selected Type.

Name

Unique name that identifies the element inside a project.

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.

NOTE: A maximum number of 1000 Fix objects can be created in a project.


Par
An entity of type Par is a parameter variable. These variables types are stored in non-volatile
memory, so that all values are maintained even after the power is removed from the controller.
The parameter variables can be modified during program execution. They can also be reset to the
factory defaults.
NOTE: The parameter variables are stored in a specific non-volatile memory space, where the
controller performs a CRC check. For program variables which changes frequently, use the
persistent variable types instead of parameter variables types.
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

It is a read-only property and is set to Par.

Condvisible

If selected, allow the parameter to be used with conditioned visibility.

Description

Text-type Description field where you can type in notes.

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

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.

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

Unique name that identifies the element inside a project.

Order

Execution order applied to calculate this element.

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

Initial value taken by the parameter.


It must be consistent with the selected data type and therefore fall within the
range set by the Max and Min properties

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 2000 Par objects can be created in a project.


Pers
An entity of type Pers is a persistent variable. Persistent variables are similar to the parameter
variables but with a few differences.
Persistent variables types are stored in non-volatile memory, so that all values are maintained even
after the power is removed from the controller. They can be modified during program execution and
cannot be reset to the factory defaults.
NOTE: The persistent variables are ideal to store run time hours or alarm events as these variables
could change frequently. There is no CRC check performed over the persistent variable memory
space.

26

EIO0000000538 07/2014

System Libraries

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

It is a read-only property and is set to Pers.

Condvisible

If selected, allow to the parameter to be used with conditioned visibility

Description

Text-type Description field where you can type in notes.

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

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

Unique name that identifies the element inside a project.

Order

Execution order applied to calculate this element.

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

Initial value taken by the parameter.


It must be consistent with the selected data type and therefore fall within the range
set by the Min and Max properties

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 1000 Pers objects can be created in a project.

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

It is a read-only property and is set to Var.

Condvisible

If selected, allow to the parameter to be used with conditioned visibility

Description

Text-type Description field where you can type in notes.

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

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

Unique name that identifies the element inside a project.

Order

Execution order applied to calculate this element.

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

Initial value taken by the parameter.


It must be consistent with the selected data type and therefore fall within the range set
by the Min and Max properties.

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 2000 Var objects can be created in a project.


28

EIO0000000538 07/2014

System Libraries

The following table shows the comparison of various variable types:


Type

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

Enables the timer count-up or count-down during a 0 to


1 transition.

Clear

CJ_BIT

0-1

Clears the timer count during a 0 to 1 transition.

Enable

CJ_BIT

0-1

Enables or stops the timer during a 0 to 1 transition.

Reload

CJ_WORD

0...65535

Reload (Preset) Time.


A 16 bit value which identifies the up/down delay time
(hundreds of ms for UoM=100 msec or seconds for
UoM=sec).

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

It is a read-only property and is set to Timer.

Description

Text-type Description field where you can type in notes.

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

Unique name that identifies the element inside a project.

Order

Execution order applied to calculate this element

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

Unit of time that causes Timer value to change.


This property can take the following values:
100 ms
sec
min
hour
Depending on the value set here, the timer is either increased or decreased every
100 milliseconds, one second, one minute, or one hour respectively.

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 Timer objects can be created in a project.


Udm and Direction under Timer Display
Under the Timer entity, a string was added with the value of the Direction and Udm property.

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

It is a read-only property and is set to Command In.

Cmd

Indicates the name that identifies the command whose reception you want to monitor

Description

Text-type Description field where you can type in notes.

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

Unique name that identifies the element inside a project.

Type

Data type is set to CJ_CMD and cannot be changed.

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 In objects can be created in a project.


Command Out
Command Out is used to send commands that are interpreted by a Command In located in the
same or a different controller.
This object type has 2 inputs:
param
trigger

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

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

It is a read-only property and is set to Command Out.

Cmd

Indicates the name that identifies the command whose reception you want to
monitor.

Description

Text-type Description field where you can type in notes.

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

Unique name that identifies the element inside a project.

Order

Execution order applied to calculate this element.

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

This figure shows the elements of the hardware libraries.

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

Is set to DigitalIn and cannot be changed.

Description

Text-type Description field where you can type in notes.

ExportInBMS

Indicates whether the object is accessible through the network connectivity port
or not.

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

Unique name that identifies the element inside a project.

Type

Indicates data type, for which Digital Input is CJ_BIT and cannot be changed

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 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

Is set to DigitalOut and cannot be changed.

Description

Text-type Description field where you can type in notes.

ExportInBMS

Indicates whether the object is accessible through the network connectivity port or
not.

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

Unique name that identifies the element inside a project.

Order

Execution order applied to calculate this element

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

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 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

Is set to AnalogIn and cannot be changed.

Description

Text-type Description field where you can type in notes.

ExportInBMS

Indicates whether the object is accessible through the network connectivity port or not.

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

Unique name that identifies the element inside a project.

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

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 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

Refer to the Modicon M168 Controller


Hardware Guide.

0.01 mA

NTC 10K-2

1 digis

Refer to the Modicon M168 Controller


Hardware Guide.

0.1 C or F

NTC 10K-3

1 digit

Refer to the Modicon M168 Controller


Hardware Guide.

0.1 C or F

Resistance

0 digit

TBD

1 Ohm

PT1000

1 digit

Refer to the Modicon M168 Controller


Hardware Guide.

0.1 C or F

PTC

1 digit

Refer to the Modicon M168 Controller


Hardware Guide.

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

Is set to AnalogIn and cannot be changed.

Description

Text-type Description field where you can type in notes.

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

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

Maximum value that the variable can take.

Min

Minimum value that the variable can take.

Name

Unique name that identifies the element inside a project.

Order

Execution order applied to calculate this element under examination.

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.

The FAN output is not supported by the M168 range.

NOTE: A maximum number of 250 Analog Output objects can be created in a project.

40

EIO0000000538 07/2014

System Libraries

To add an Analog Output to a sheet, proceed as you add a Digital Input.


Range and precision of the analog inputs according to the sensor type:
Actuator

Range

Unit

Comments

0...10 V

01000

0.01% of full scale

0 is 0 V output
10000 is 10 V output

0...20 mA

01000

0.01% of full scale

0 is 0 mA output
10000 is 20 mA output

4..20 mA

01000

0.01% of full scale

0 is 4 mA output
10000 is 20 mA output

FAN1

01000

0.01% of full scale

0500: output is 0 continuously


950010000: output is 1 continuously

PWM

01000

0.01% of full scale

0 output is 0 continuously
10000 output is 1 continuously

The FAN output is not supported by the M168 range.

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

Is set to button and cannot be changed property and is set to Par.

Cmd

The Cmd property identifies the type of event to intercept. It can take the following
values:
ON_PRESSED
ON_CONTINUE
ON_RELEASE

Description

Text-type description field to type in notes.

ExportInBMS

Indicates whether the object is accessible through the network connectivity port or
not.

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.

EIO0000000538 07/2014

41

System Libraries

Property

Description

Name

Unique name that identifies the element inside a project.

Type

Indicates data type, for which buttons is CJ_BTN and cannot be changed

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 Button objects can be created in a project.


LED
LED objects are the logical representation of the LEDs found on the controller you are
programming or on the expansions connected to it.
This object type has a CJ_LED input pin and its value range is 0...3.
By conveniently setting this value, you can change the behavior of the selected LED as follows:
0: off
1: on
2: slow frequency flash
3: fast frequency flash

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

Is set to LED and cannot be changed.

Description

Text-type Description field where you can type in notes.

ExportInBMS

Indicates whether the object is accessible through the network connectivity port or not.

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

Unique name that identifies the element inside a project.

Order

Execution order applied to calculate this element

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

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 LED objects can be created in a project.


Buzzer
Buzzer objects are used in situations that require an audible alarm.
For example, you can enable a buzzer to alert about a potentially hazardous condition or in an
emergency situation. To do so, add a Buzzer object to the project and join it to an algorithm with a
CJ_BUZZ output.
Depending on the input value of buzzer, its state is set to the following modes:
0: off
1: on
2: slow frequency flash
3: fast frequency flash
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

Is set to Buzzer and cannot be changed.

Description

Text-type Description field where you can type in notes.

ExportInBMS

Indicates whether the object is accessible through the network connectivity port or not.

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

Unique name that identifies the element inside a project.

Order

Execution order applied to calculate this element

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

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 Buzzer objects can be created in a project.

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

Is set to buzzer and cannot be changed.

Description

Text-type Description field where you can type in notes.

ExportInBMS

Indicates whether the object is accessible through the network connectivity port or not.

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

Unique name that identifies the element inside a project.

Type

Indicates data type, for which Clock objects is CJ_DATETIME and cannot be changed.

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 Clock objects can be created in a project.

44

EIO0000000538 07/2014

System Libraries

Section 2.3
Analog Input Libraries

Analog Input Libraries


Overview
This section describes the analog input libraries.
What Is in This Section?
This section contains the following topics:
Topic

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

returns the value of relative


humidity

NOTE: The output value is a percentage unit.

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

returns the value of relative pressure

NOTE: The output value has a precision of one tenth of a 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

returns the value of relative pressure

NOTE: The output value has a precision of one tenth of a 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

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

min...max*
Error: 0...2

0.1 Bar

returns the value of relative pressure

Min...max*: The limits are managed with Pressure_4_20_mA_Min1 and Pressure_4_20_mA_Max1


parameters.

NOTE: The output value has a precision of one tenth of a 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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_BYTE

2...7

establishes the type of nth analog input

EIO0000000538 07/2014

51

System Libraries

Output Pin Description

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.

NOTE: This is a single instance library.


NOTE: This is a template type library.
Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_BIT

0, 1

sets AIn filter:


0 = Disabled
1 = Enabled

Output Pin Description


Output

Type

Range

Description

out

CJ_BIT

0, 1

returns AIn filter:


0 = Disabled
1 = Enabled

EIO0000000538 07/2014

53

System Libraries

Section 2.4
Analog Output Libraries

Analog Output Libraries


Overview
This section describes the analog output libraries.
What Is in This Section?
This section contains the following topics:
Topic

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.

NOTE: This is a single instance library.


NOTE: After each modification, it is necessary to remove and then reapply power to the controller
for the modifications to take effect.

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

establishes the analog output type

Unit

Output Pin Description

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

Sets the frequency of the analog output when it


is configured as PWM.

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_BYTE

0...3

sets the baud rate

Output Pin Description


Output

Type

Range

Description

out

CJ_BYTE

0...3

returns the baud rate

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_LONG

1...4194303

108

sets the device instance


identification value

Output Pin Description

60

Output

Type

Range

Description

out

CJ_LONG

1...4194303

returns the device instance identification


value

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_BYTE

1...127

sets the device


information frames
configuration

Output Pin Description


Output

Type

Range

Description

out

CJ_BYTE

1...127

returns the device information frames


configuration

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_BYTE

1...127

sets the device MacID


address

Output Pin Description

62

Output

Type

Range

Description

out

CJ_BYTE

1...127

returns the device MacID address

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_BYTE

1...127

127

sets the maximum


address to pass the token
on the network

Output Pin Description


Output

Type

Range

Description

out

CJ_BYTE

1...127

returns the maximum address to pass the


token on the network

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_IP_Address

0.0.0.0
...
255.255.255.255

192.168.2.44

sets the IP address

Output Pin Description


Output

Type

Range

Description

out

CJ_IP_Address

0.0.0.0
...
255.255.255.255

returns the IP address

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_IP_Address

0.0.0.0
...
255.255.255.255

192.168.2.1

sets the gateway IP


address

Output Pin Description

66

Output

Type

Range

Description

out

CJ_IP_Address

0.0.0.0
...
255.255.255.255

returns the gateway IP address

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_BYTE

0...2

sets the IP Configuration:


0= DHCP
1= Automatic (BootIP)
2= Local (Stored IP)

EIO0000000538 07/2014

67

System Libraries

Output Pin Description

68

Output

Type

Range

Description

out

CJ_BYTE

0...2

returns the IP Configuration:


0= DHCP
1= Automatic (BootIP)
2= Local (Stored IP)

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_IP_Address

0.0.0.0
...
255.255.255.255

255.255.255.0

sets the subnet mask

Output Pin Description


Output

Type

Range

Description

out

CJ_IP_Address

0.0.0.0
...
255.255.255.255

returns the Isubnet mask

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_WORD

47808...47823
(BAC0...BACF hex)

47808

sets the BACnet port


number

Output Pin Description

70

Output

Type

Range

Description

out

CJ_IP_Address

47808...47823
(BAC0...BACF hex)

returns BACnet port number

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_LONG

1...4104393

108

sets the BACnet device


instance

Output Pin Description


Output

Type

Range

Description

out

CJ_LONG

1...4104393

returns the BACnet device instance

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_IP_Address

0.0.0.0
...
255.255.255.255

255.255.255.255

sets the BBMP


IP address

Output Pin Description

72

Output

Type

Range

Description

out

CJ_IP_Address

0.0.0.0
...
255.255.255.255

returns the BBMD IP address

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_WORD

47808...47823
(BAC0...BACF_hex)

47808

sets the BACnet BBMD


port number

Output Pin Description


Output

Type

Range

Description

out

CJ_WORD

47808...47823
(BAC0...BACF hex)

returns tthe BACnet BBMD port number

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_BIT

0...1

sets the SNMP Authentication trap:


0= Disabled
1= Enabled

Output Pin Description

74

Output

Type

Range

Description

out

CJ_BIT

0...1

returns of the SNMP Authentication trap:


0= Disabled
1= Enabled

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_BIT

0...1

sets the SNMP Cold Start Trap:


0= Disabled
1= Enabled

Output Pin Description


Output

Type

Range

Description

out

CJ_BIT

0...1

returns of the SNMP Cold Start Trap:


0= Disabled
1= Enabled

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_BIT

0...1

sets the SNMP Link Down Trap:


0= Disabled
1= Enabled

Output Pin Description

76

Output

Type

Range

Description

out

CJ_BIT

0...1

returns of the SNMP Link Down Trap:


0= Disabled
1= Enabled

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_BIT

0...1

sets the SNMP Link Up Trap:


0= Disabled
1= Enabled

Output Pin Description


Output

Type

Range

Description

out

CJ_BIT

0...1

returns of the SNMP Link Up Trap:


0= Disabled
1= Enabled

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_IP_Address

0.0.0.0
...
255.255.255.255

192.168.2.1

sets the SNMP


manager 1 IP
address

Output Pin Description

78

Output

Type

Range

Description

out

CJ_IP_Address

0.0.0.0
...
255.255.255.255

returns the SNMP manager 1 IP


address

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_IP_Address

0.0.0.0
...
255.255.255.255

192.168.2.2

sets the SNMP


manager 2 IP
address

Output Pin Description


Output

Type

Range

Description

out

CJ_IP_Address

0.0.0.0
...
255.255.255.255

returns the SNMP manager 2 IP


address

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

in

CJ_BIT

0, 1

Description
sets Port1 Auto Negotiation:
0 = Disabled
1 = Enabled

Output Pin Description

80

Output

Type

Range

Default value

Description

out

CJ_BIT

0, 1

returns Port1 Auto Negotiation:


0 = Disabled
1 = Enabled
EIO0000000538 07/2014

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.

NOTE: This is a single instance library.


Input Pin Description
Input

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

Output Pin Description


Output

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.

NOTE: This is a single instance library.


Input Pin Description
Input

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

Output Pin Description


Output

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

in

CJ_BIT

0, 1

Description
sets Port2 Auto Negotiation:
0 = Disabled
1 = Enabled

Output Pin Description


Output

Type

Range

Default value

Description

out

CJ_BIT

0, 1

returns Port2 Auto Negotiation:


0 = Disabled
1 = Enabled

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.

NOTE: This is a single instance library.


Input Pin Description
Input

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

Output Pin Description


Output

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.

NOTE: This is a single instance library.


Input Pin Description
Input

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

Output Pin Description


Output

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

ID of the page which is desired to be processed.


ID page can be found in the page property or within
brackets on the right side of the page name in the
project inspector.

Output Pin Description


Output

Type

Range

Description

out

CJ_WORD

0...65535

returns the information necessary for LoadPage


function (internal page ID)

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

ID of the page which is desired to be processed.


ID page can be found in the page property or within
brackets on the right side of the page name in the
project inspector.

Output Pin Description

94

Output

Type

Range

Description

out

CJ_WORD

0...65535

returns the information necessary for LoadPage


function (internal page ID)

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

ID of the page which is desired to be processed.


ID page can be found in the page property or within
brackets on the right side of the page name in the
project inspector.

Output Pin Description


Output

Type

Range

Description

out

CJ_WORD

0...65535

returns the information necessary for LoadPage


function (internal page ID)

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

ID of the page which is desired to be processed.


ID page can be found in the page property or within
brackets on the right side of the page name in the
project inspector.

Output Pin Description

96

Output

Type

Range

Description

out

CJ_WORD

0...65535

returns the information necessary for LoadPage


function (internal page ID)

EIO0000000538 07/2014

System Libraries

Section 2.8
Expansion Bus Libraries

Expansion Bus Libraries


Overview
This section describes the libraries that allow the configuration and management of the expansion
bus communication protocol used by the hardware instruments.
What Is in This Section?
This section contains the following topics:
Topic
ExpBUS_IsMaster

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.

NOTE: This is a single instance library.


Input Pin Description

98

Input

Type

Range

Default value

Description

in

CJ_BIT

0, 1

sets the node as network master

EIO0000000538 07/2014

System Libraries

Output Pin Description


Output

Type

Range

Default value

Description

out

CJ_BIT

0, 1

returns the master status

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_BYTE

1...127

sets the current node number

Output Pin Description

100

Output

Type

Range

Default value

Description

out

CJ_BYTE

1...127

returns the current node number

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.

NOTE: This is a single instance library.

EIO0000000538 07/2014

101

System Libraries

Input Pin Description


Input

Type

Range

Default value

Description

in

CJ_BYTE

1...4

sets the baud rate of the expansion


bus communication channel

Output Pin Description

102

Output

Type

Range

Default value

Description

out

CJ_BYTE

1...4

returns the baud rate of the


expansion bus communication
channel

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

returns the status of communication channel

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

the number of the node whose status is to


be verified

Output Pin Description

104

Output

Type

Range

Unit

Description

out

CJ_BYTE

0...3

returns the status of the requested node

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_BYTE

0...127

n*

sets the address of


network node

*The default address of ExpBUS_NetworkNode_12 is 12.

EIO0000000538 07/2014

105

System Libraries

Output Pin Description

106

Output

Type

Range

Unit

Description

out

CJ_BYTE

0...127

returns the address of


network node

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.

NOTE: This is a single instance library.

EIO0000000538 07/2014

107

System Libraries

Input Pin Description


Input

Type

Range

Default value

Description

in

CJ_BYTE

1...60

5s

establishes how often the master node


verifies the status of its slave nodes

Output Pin Description


Output

Type

Range

Unit

Description

out

CJ_BYTE

1...60

returns how often the master node verifies


the status of its slave nodes

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

Requests cancellation of the log entries.


Cancellation is requested when the input value changes from 0
to 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

requests the last item stored in the log

previous

CJ_BIT

0, 1

requests the previous item stored in the log

next

CJ_BIT

0, 1

requests the next item stored in the log

EIO0000000538 07/2014

System Libraries

Output Pin Description


Output

Type

Range

Description

status

CJ_BYTE

1...4

indicates the status of the


reading operation

progressive

CJ_LONG

-2147483648... 2147483647

progressive number of the event

code

CJ_WORD

0...65535

event code

date

CJ_DATETIME

0...2147483647

date and time of the entry

value

CJ_SHORT

-32768...32767

value joined in the event

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

code of the event to be saved

event

CJ_BIT

0, 1

event save request


On input rising edge, the event saving is initiated

clock

CJ_DATETIME

0...2147483647

date and time in which the event occurred (normally


associated with the system clock)

value

CJ_SHORT

-32768...32767

value joined to the event

EIO0000000538 07/2014

System Libraries

Output Pin Description


Output

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

Input Pin Description


Input

Type

Range

Description

in1

CJ_ANALOG

Value: -32768...32767
Error: 0...2

input value

Output Pin Description


Output

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

sets the physical address of the


controller within the network

EIO0000000538 07/2014

119

System Libraries

Output Pin Description

120

Output

Type

Range

Description

out

CJ_BYTE

1...247

returns the physical address of the


controller within the network

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

sets the baud rate

Output Pin Description


Output

Type

Range

Description

out

CJ_BYTE

0...7

returns the baud rate

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.

NOTE: This is a single instance library.


NOTE: The library can be used for the serial line configured in Modbus Master or Modbus Slave
protocols.
Input Pin Description

122

Input

Type

Range

Default value

Description

in

CJ_BYTE

0...2

sets the type of parity for data


transmission

EIO0000000538 07/2014

System Libraries

Output Pin Description


Output

Type

Range

Description

out

CJ_BYTE

0...2

returns the type of parity for data


transmission

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.

NOTE: This is a single instance library.


NOTE: The library can be used for the serial line configured in Modbus Master or Modbus Slave
protocols.
Input Pin Description

124

Input

Type

Range

Default value

Description

in

CJ_BIT

0, 1

sets the type of Stop bit

EIO0000000538 07/2014

System Libraries

Output Pin Description


Output

Type

Range

Description

out

CJ_BIT

0, 1

returns the type of Stop bit

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.

NOTE: This is a single instance library.


NOTE: This is a template type library.
NOTE: You can use the library only for Modbus master.
Input Pin Description
Input

Type

Range

Default Value

Description

in

CJ_BYTE

0...240

sets the Modbus master


interframe delay in 100 ms

Output Pin Description

126

Output

Type

Range

Default Value

Description

out

CJ_BYTE

0...240

returns the Modbus


master interframe delay
in 100 ms

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

Input Pin Description


Input

Type

Range

Description

enable

CJ_BIT

0, 1

enables the master/slave transmission process


of a Modbus reading frame

register

CJ_WORD

1...65535

identifier of the registers that you want to


access

slave

CJ_BYTE

0...247

slave node address:


0 = Broadcast

num

CJ_BYTE

1...100

number of slave registers to read

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

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[100]

CJ_WORD

0...65535

returns the values read in array

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

Input Pin Description


Input

Type

Range

Description

enable

CJ_BIT

0, 1

enables the master/slave transmission process of a Modbus


reading frame

register

CJ_WORD

1...65535

identifier of the registers that you want to access

slave

CJ_BYTE

0...247

slave node address:


0 = Broadcast

num

CJ_BYTE

1...100

number of slave registers to read

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

returns the values read in array

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

Input Pin Description


Input

Type

Range

Description

enable

CJ_BIT

0, 1

enables the master/slave transmission process of a Modbus


reading frame

register

CJ_WORD

1...65535

identifier of the registers that you want to access

slave

CJ_BYTE

0...247

slave node address


0 = Broadcast.

num

CJ_BYTE

1...10

number of slave registers to read

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

returns the values read in array

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

Input Pin Description


Input

Type

Range

Description

enable

CJ_BIT

0, 1

enables the master/slave transmission process of a Modbus


reading frame

register

CJ_WORD

1...65535

identifier of the registers that you want to access

slave

CJ_BYTE

0...247

slave node address:


0 = Broadcast

num

CJ_BYTE

1...10

number of slave registers to read

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

returns the values read in array

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

enables the master/slave transmission process of a Modbus


reading frame

register

CJ_WORD

1...65535

identifier of the register that you want to access

slave

CJ_BYTE

0...247

slave node address


0 = Broadcast.

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

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 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

enables the master/slave transmission process of a Modbus


reading frame

register

CJ_WORD

1...65535

identifier of the register that you want to access

slave

CJ_BYTE

0...247

slave node address:


0 = Broadcast

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

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

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

Input Pin Description


Input

Type

Range

Description

enable

CJ_BIT

0, 1

enables the master/slave transmission process of a Modbus


reading frame

coil

CJ_WORD

1...65535

identifier of the coil that you want to access

slave

CJ_BYTE

0...255

slave node address


0 = Broadcast

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

Input Pin Description


Input

Type

Range

Description

enable

CJ_BIT

0, 1

enables the master/slave transmission process of a Modbus


reading frame

input

CJ_WORD

1...65535

identifier of the input that you want to access

slave

CJ_BYTE

0...255

slave node address


0 = Broadcast.

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.

NOTE: This is a single instance library.


NOTE: The library can be used only for Modbus Master.
Input Pin Description
Input

Type

Range

Default value

Unit

Description

in

CJ_BYTE

2...240

10

0.1s

sets the timeout of the


response during a
communication with the
slave

EIO0000000538 07/2014

143

System Libraries

Output Pin Description

144

Output

Type

Range

Unit

Description

out

CJ_BYTE

2...240

0.1s

returns the timeout of


the response during a
communication with the
slave

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

Input Pin Description


Input

Type

Range

Description

enable

CJ_BIT

0, 1

enables the master/slave transmission process


of a Modbus writing frame

register

CJ_WORD

1...65535

identifier of the registers that you want to


access

slave

CJ_BYTE

0...247

slave node address:


0 = Broadcast

value[100]

CJ_WORD

0...65535

array of values that you want to write

num

CJ_BYTE

1...100

number of slave registers to write

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

completed (that is, NAK reply or timeout)


5 = Modbus queue is full communication

cannot be performed or invalid register


requested (0)

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

Input Pin Description


Input

Type

Range

Description

enable

CJ_BIT

0, 1

enables the master/slave transmission process


of a Modbus writing frame

register

CJ_WORD

1...65535

identifier of the registers that you want to


access

slave

CJ_BYTE

0...247

slave node address


0 = Broadcast.

value[10]

CJ_WORD

0...65535

array of values that you want to write

num

CJ_BYTE

1...10

number of slave registers to write

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

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)

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

Input Pin Description


Input

Type

Range

Description

enable

CJ_BIT

0, 1

enables the master/slave transmission process


of a Modbus writing frame

register

CJ_WORD

1...65535

identifier of the register that you want to access

slave

CJ_BYTE

0...247

slave node address


0 = Broadcast.

value

CJ_WORD

0...65535

value that you want to write

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

Input Pin Description


Input

Type

Range

Description

enable

CJ_BIT

0, 1

enables the master/slave transmission process of a Modbus


writing frame

coil

CJ_WORD

1...65535

identifier of the coil that you want to access

slave

CJ_BYTE

0...255

slave node address


0 = Broadcast.

value

CJ_WORD

1...65535

value that you want to write

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_IP_Address

0.0.0.0
...
255.255.255.255

192.168.2.44

sets the IP address

Output Pin Description

154

Output

Type

Range

Description

out

CJ_IP_Address

0.0.0.0
...
255.255.255.255

returns the IP address

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_IP_Address

0.0.0.0
...
255.255.255.255

192.168.2.1

sets the gateway


IP address

Output Pin Description


Output

Type

Range

Description

out

CJ_IP_Address

0.0.0.0
...
255.255.255.255

returns the gateway IP address

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.

NOTE: This is a single instance library.


Input Pin Description

156

Input

Type

Range

Default value

Description

in

CJ_BYTE

0...2

sets the IP Configuration:


0= DHCP
1= Automatic (BootIP)
2= Local (Stored IP)

EIO0000000538 07/2014

System Libraries

Output Pin Description


Output

Type

Range

Description

out

CJ_BYTE

0...2

returns the IP Configuration:


0= DHCP
1= Automatic (BootIP)
2= Local (Stored IP)

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_IP_Address

0.0.0.0
...
255.255.255.255

255.255.255.0

sets the subnet mask

Output Pin Description

158

Output

Type

Range

Description

out

CJ_IP_Address

0.0.0.0
...
255.255.255.255

returns the subnet mask

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_BIT

0...1

sets Port 1 Auto Negotiation:


0= Disabled
1= Enabled

Output Pin Description


Output

Type

Range

Description

out

CJ_BIT

0...1

returns Port 1 Auto Negotiation:


0= Disabled
1= Enabled

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_BYTe

0...2

sets Port 1 Duplex Mode:


0= Default
1= Half-Duplex
2= Full-Duplex

Output Pin Description

160

Output

Type

Range

Description

out

CJ_BYTE

0...2

returns Port 1 Duplex Mode:


0= Default
1= Half-Duplex
2= Full-Duplex

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_BYTE

0...2

sets Port1 Speed:


0= Default
1= 10 Mbps
2= 100 Mbps

Output Pin Description


Output

Type

Range

Description

out

CJ_BYTE

0...2

returns Port1 Speed:


0=Default
1= 10 Mbps
2= 100 Mbps

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_BIT

0...1

sets Port 2 Auto Negotiation:


0= Disabled
1= Enabled

Output Pin Description

162

Output

Type

Range

Description

out

CJ_BIT

0...1

returns Port 2 Auto Negotiation:


0= Disabled
1= Enabled

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_BYTe

0...2

sets Port 2 Duplex Mode:


0= Default
1= Half-Duplex
2= Full-Duplex

Output Pin Description


Output

Type

Range

Description

out

CJ_BYTE

0...2

returns Port 2 Duplex Mode:


0= Default
1= Half-Duplex
2= Full-Duplex

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_BYTE

0...2

sets Port2 Speed:


0= Default
1= 10 Mbps
2= 100 Mbps

Output Pin Description

164

Output

Type

Range

Description

out

CJ_BYTE

0...2

returns Port2 Speed:


0= Default
1= 10 Mbps
2= 100 Mbps

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_BIT

0...1

sets SNMP Authentication trap:


0= Disabled
1= Enabled

Output Pin Description


Output

Type

Range

Description

out

CJ_BIT

0...1

returns SNMP Authentication trap:


0= Disabled
1= Enabled

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_BIT

0...1

sets SNMP Cold Start Trap:


0= Disabled
1= Enabled

Output Pin Description

166

Output

Type

Range

Description

out

CJ_BIT

0...1

returns SNMP Cold Start Trap:


0= Disabled
1= Enabled

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_BIT

0...1

sets SNMP Link Down Trap:


0= Disabled
1= Enabled

Output Pin Description


Output

Type

Range

Description

out

CJ_BIT

0...1

returns SNMP Link Down Trap:


0= Disabled
1= Enabled

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_BIT

0...1

sets SNMP Link Up Trap:


0= Disabled
1= Enabled

Output Pin Description

168

Output

Type

Range

Description

out

CJ_BIT

0...1

returns SNMP Link Up Trap:


0= Disabled
1= Enabled

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_IP_Address

0.0.0.0
...
255.255.255.255

192.168.2.1

sets the SNMP manager


1 IP address.

Output Pin Description


Output

Type

Range

Description

out

CJ_IP_Address

0.0.0.0
...
255.255.255.255

returns the SNMP manager 1 IP


address.

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.

NOTE: This is a single instance library.


Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_IP_Address

0.0.0.0
...
255.255.255.255

192.168.2.2

sets the SNMP manager


2 IP address.

Output Pin Description

170

Output

Type

Range

Description

out

CJ_IP_Address

0.0.0.0
...
255.255.255.255

returns the SNMP manager 2 IP


address.

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.

This is a template type library.

NOTE: This is a single instance library.

172

EIO0000000538 07/2014

System Libraries

Input Pin Description


Input

Type

Range

Default value

Description

in

CJ_BIT

0, 1

sets the value of EnablePrgLevel


driver parameter

Output Pin Description


Output

Type

Range

Description

out

CJ_BIT

0, 1

reads the value of EnablePrgLevel


driver parameter

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.

NOTE: This is a single instance library.


Input Pin Description

174

Input

Type

Range

Default value

Description

in

CJ_BIT

0, 1

sets the value of


PasswordIndependent driver
parameter

EIO0000000538 07/2014

System Libraries

Output Pin Description


Output

Type

Range

Description

out

CJ_BIT

0, 1

reads the value of


PasswordIndependent driver
parameter

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.

NOTE: This is a single instance library.


NOTE: For further details on configuring levels and passwords, refer to the SoHVAC Software
User Manual.
Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_BYTE

0...240

60

sets the number of seconds to


configure the timeout delay

Output Pin Description

176

Output

Type

Range

Description

out

CJ_BYTE

0...240

returns the number of seconds set for


the timeout delay
EIO0000000538 07/2014

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.

NOTE: This is a single instance library.


NOTE: For further details on configuring levels and passwords, refer to the SoHVAC Software
User Manual.
Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_SHORT

-32768...32767

sets the password for various levels of


protection

EIO0000000538 07/2014

177

System Libraries

Output Pin Description

178

Output

Type

Range

Description

out

CJ_SHORT

-32768...32767

reads the values of passwords for various levels of


protection

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.

NOTE: This is a single instance library.


NOTE: For further details on configuring levels and passwords, refer to the SoHVAC Software
User Manual.
Input Pin Description
Input

Type

Range

Default value

Description

in

CJ_BIT

0, 1

sets enabling for level n

Output Pin Description


Output

Type

Range

Description

out

CJ_BIT

0, 1

returns enabling for level n

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

returns the firmware number

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

returns the firmware revision number

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

returns the firmware version

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

returns the number of the current project

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

returns the revision number of the current project

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

returns the version of the current project

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

returns a status code for the E2 memory

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

returns a code for the status of RTC

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.

NOTE: This is a single instance library. This is a template type library.


NOTE: You can use the library only for Modbus master.
Input Pin Description
Input

Type

Range

Default
Value

Description

in

CJ_BYTE

0...2

0 = Off
1 = On
2 = Time

Output Pin Description


Output

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.

NOTE: This is a single instance library.


Input Pin Description

190

Input

Type

Range

Default value

Description

in

CJ_BYTE

0...255

sets the current selected language

EIO0000000538 07/2014

System Libraries

Output Pin Description


Output

Type

Range

Description

out

CJ_BYTE

0...255

returns the current selected language

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

returns the reset status


returns 1 if there is a reset, otherwise the output is 0

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

Reset the overflow error flag

Underflow

CJ_BIT

0, 1

Reset the underflow error flag

DivByZero

CJ_BIT

0, 1

Reset division by zero error flag

NaN

CJ_BIT

0, 1

Reset the invalid number error flag

Math

CJ_BIT

0, 1

Reset all the mathematical error flags. This


input activates the other inputs.

NOTE: An example of Not a Number is the square root of a negative value.

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

Refer to RTC_GetStatus functional description


(see page 188).

E2_Status

CJ_SHORT

0...2

Refer to E2_GetStatus functional description


(see page 187).

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

Returns controller power supply


value in volt.

5VoltAnaVal

CJ_SHORT

-3276732768

Returns 5 Volt sensor power


supply value in volt.

24VoltAnaVal

CJ_SHORT

-3276732768

Returns 24 Volt sensor power


supply value in volt.

24VoltBusVal

CJ_SHORT

-3276732768

Returns 24 Volt Expansion Bus


power supply value in volt.

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

Bit Shift Libraries

227

3.4

Comparator Libraries

240

3.5

Conversion Libraries

251

3.6

Counter Libraries

282

3.7

Edge Detection Libraries

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 reset the error bits:


void CJ_Overflow_Error_Reset(void)
void CJ_Underflow_Error_Reset(void)
void CJ_DivByZero_Error_Reset(void)
void CJ_NaN_Error_Reset(void)

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

Write programing instructions to test the validity of operands intended to be used in


mathematical operations.
Avoid using operands of different data types in mathematical operations by casting or
converting all operands to the type required by the output.
Test mathematical operations by using the diagnostic functions of the Arithmetic Library to
ensure the operation has returned a valid result.

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

Output Pin Description

204

Output

Type

Range

Description

out

CJ_SHORT

-32768...32767

result of the 16 bit addition

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

Output Pin Description


Output

Type

Range

Description

out

CJ_LONG

-2147483648...2147483647

result of the 32 bit addition

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

Output Pin Description

206

Output

Type

Range

Description

out

CJ_SHORT

-32768...32767

result of the 16 bit subtraction

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

Output Pin Description


Output

Type

Range

Description

out

CJ_LONG

-2147483648...2147483647

result of the 32 bit subtraction

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

Output Pin Description

208

Output

Type

Range

Description

out

CJ_SHORT

-32768...32767

result of the 16 bit


multiplication

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

Output Pin Description


Output

Type

Range

Description

out

CJ_LONG

-2147483648...2147483647

result of the 32 bit


multiplication

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

Output Pin Description

210

Output

Type

Range

Description

out

CJ_SHORT

-32768...32767

result of the 16 bit division

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

Output Pin Description


Output

Type

Range

Description

out

CJ_LONG

-2147483648...2147483647

result of the 32 bit division

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

Output Pin Description

212

Output

Type

Range

Description

out

CJ_SHORT

-16383...16383

the remainder from the division between


two 16 bit inputs

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

Output Pin Description


Output

Type

Range

Description

out

CJ_LONG

-1073741823...1073741823

the remainder from the


division between two 32 bit
inputs

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

Output Pin Description

214

Output

Type

Range

Description

out

CJ_SHORT

0...32767

absolute 16 bit value

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

Output Pin Description


Output

Type

Range

Description

out

CJ_LONG

0...2147483647

absolute 32 bit value

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

Output Pin Description

216

Output

Type

Range

Description

out

CJ_SHORT

0...181

16 bit square root

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

Output Pin Description


Output

Type

Range

Description

out

CJ_LONG

0...46340

32 bit square root

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

16 bit base input

CJ_SHORT

0...32767

16 bit exponent input

Output Pin Description

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

32 bit base input

CJ_LONG

0...2147483647

32 bit exponent input

Output Pin Description


Output

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

Input Pin Description


Input

Type

Range

Description

SET

CJ_BIT

0, 1

set input

RESET

CJ_BIT

0, 1

reset input

Output Pin Description

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

NOTE: Refer to the graph below.

Input Pin Description


Input

Type

Range

Description

SET

CJ_BIT

0, 1

set input

RESET

CJ_BIT

0, 1

reset input

EIO0000000538 07/2014

223

Standard Libraries

Output Pin Description

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

Input Pin Description


Input

Type

Range

Description

IN

CJ_BIT

0, 1

set input

CLOCK

CJ_BIT

0, 1

clock

RESET

CJ_BIT

0, 1

reset input

Output Pin Description

226

Output

Type

Range

Description

CJ_BIT

0, 1

output value

EIO0000000538 07/2014

Standard Libraries

Section 3.3
Bit Shift Libraries

Bit Shift Libraries


Overview
This section describes the bit shift libraries.
What Is in This Section?
This section contains the following topics:
Topic

Page

SHL (Shift Left)

228

SHL16 (Shift Left)

229

SHL32 (Shift Left)

230

SHR (Shift Right)

231

SHR16 (Shift Right)

232

SHR32 (Shift Right)

233

ROL (Rotary Left)

234

ROL16 (Rotary Left)

235

ROL32 (Rotary Left)

236

ROR (Rotary Right)

237

ROR16 (Rotary Right)

238

ROR32 (Rotary Right)

239

EIO0000000538 07/2014

227

Standard Libraries

SHL (Shift Left)


Function Block Diagram

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

the number of bits on which the shift is to be


performed

Output Pin Description


This table describes the output pin of the SHL_1 library.

228

Output

Type

Range

Description

out

CJ_BYTE

0...255

8 bit result

EIO0000000538 07/2014

Standard Libraries

SHL16 (Shift Left)


Function Block Diagram

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

the number of bits on which the shift is to


be performed

Output Pin Description


Output

Type

Range

Description

out

CJ_WORD

0...65535

16 bit result

EIO0000000538 07/2014

229

Standard Libraries

SHL32 (Shift Left)


Function Block Diagram

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

the number of bits on which the shift is to


be performed

Output Pin Description

230

Output

Type

Range

Description

out

CJ_DWORD

0...4294967295

32 bit result

EIO0000000538 07/2014

Standard Libraries

SHR (Shift Right)


Function Block Diagram

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

the number of bits on which the shift


is to be performed

Output Pin Description


Output

Type

Range

Description

out

CJ_BYTE

0...255

8 bit result

EIO0000000538 07/2014

231

Standard Libraries

SHR16 (Shift Right)


Function Block Diagram

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

the number of bits on which the shift is to


be performed

Output Pin Description

232

Output

Type

Range

Description

out

CJ_WORD

0...65535

16 bit result

EIO0000000538 07/2014

Standard Libraries

SHR32 (Shift Right)


Function Block Diagram

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

the number of bits on which the shift is to


be performed

Output Pin Description


Output

Type

Range

Description

out

CJ_DWORD

0...4294967295

32 bit result

EIO0000000538 07/2014

233

Standard Libraries

ROL (Rotary Left)


Function Block Diagram

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

the number of bits on which the


rotation is to be performed

Output Pin Description

234

Output

Type

Range

Description

out

CJ_BYTE

0...255

8 bit result

EIO0000000538 07/2014

Standard Libraries

ROL16 (Rotary Left)


Function Block Diagram

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

the number of bits on which the rotation


is to be performed

Output Pin Description


Output

Type

Range

Description

out

CJ_WORD

0...65535

16 bit result

EIO0000000538 07/2014

235

Standard Libraries

ROL32 (Rotary Left)


Function Block Diagram

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

the number of bits on which the rotation


is to be performed

Output Pin Description

236

Output

Type

Range

Description

out

CJ_DWORD

0...4294967295

32 bit result

EIO0000000538 07/2014

Standard Libraries

ROR (Rotary Right)


Function Block Diagram

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

the number of bits on which the


rotation is to be performed

Output Pin Description


Output

Type

Range

Description

out

CJ_BYTE

0...255

8 bit result

EIO0000000538 07/2014

237

Standard Libraries

ROR16 (Rotary Right)


Function Block Diagram

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

the number of bits on which the rotation


is to be performed

Output Pin Description

238

Output

Type

Range

Description

out

CJ_WORD

0...65535

16 bit result

EIO0000000538 07/2014

Standard Libraries

ROR32 (Rotary Right)


Function Block Diagram

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

the number of bits on which the rotation


is to be performed

Output Pin Description


Output

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

GE (Greater or Equal Comparator)

242

GT (Greater Comparator)

243

LE (Less or Equal Comparator)

244

LT (Less Comparator)

245

NE (Not Equal Comparator)

246

U_GE (Unsigned Greater or Equal Comparator)

247

U_GT (Unsigned Greater Comparator)

248

U_LE (Unsigned Less or Equal Comparator)

249

U_LT (Unsigned Less Comparator)

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

Output Pin Description


Output

Type

Range

Description

out

CJ_BIT

0, 1

output value

EIO0000000538 07/2014

241

Standard Libraries

GE (Greater or Equal Comparator)


Function Block Diagram

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

Output Pin Description

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

Output Pin Description


Output

Type

Range

Description

out

CJ_BIT

0, 1

output value

EIO0000000538 07/2014

243

Standard Libraries

LE (Less or Equal Comparator)


Function Block Diagram

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

Output Pin Description

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

Output Pin Description


Output

Type

Range

Description

out

CJ_BIT

0, 1

output value

EIO0000000538 07/2014

245

Standard Libraries

NE (Not Equal Comparator)


Function Block Diagram

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

Output Pin Description

246

Output

Type

Range

Description

out

CJ_BIT

0, 1

output value

EIO0000000538 07/2014

Standard Libraries

U_GE (Unsigned Greater or Equal Comparator)


Function Block Diagram

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

Output Pin Description


Output

Type

Range

Description

out

CJ_BIT

0, 1

output value

EIO0000000538 07/2014

247

Standard Libraries

U_GT (Unsigned Greater Comparator)


Function Block Diagram

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

Output Pin Description

248

Output

Type

Range

Description

out

CJ_BIT

0, 1

output value

EIO0000000538 07/2014

Standard Libraries

U_LE (Unsigned Less or Equal Comparator)


Function Block Diagram

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

Output Pin Description


Output

Type

Range

Description

out

CJ_BIT

0, 1

output value

EIO0000000538 07/2014

249

Standard Libraries

U_LT (Unsigned Less Comparator)


Function Block Diagram

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

Output Pin Description

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

DATETIME_GET_YEAR, DATETIME_GET_MONTH and DATETIME_GET_DAY

263

DATETIME_GET_WEEKDAY

264

DATETIME_GET_HOUR, DATETIME_GET_MIN and DATETIME_GET_SEC

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

Output Pin Description


Output

Type

Range

Description

OUT

CJ_BYTE

0...2

error type detected

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

Output Pin Description

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

Output Pin Description


Output

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

Output Pin Description

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

Input Pin Description


Input

Type

Range

Description

AI

CJ_ANALOG

Value: -32768...32767
Error: 0...2

sensor input

Output

Type

Range

Description

out

CJ_BIT

0, 1

value of digital input

Output Pin Description

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

Output Pin Description


Output
Out

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

Output Pin Description


Output
Out

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

date and time

Output Pin Description


Output

Type

Range

Description

YEAR
MONTH
DAY
WEEKDAY
HOUR
MIN,SEC

CJ_BYTE

00...68
1...12
1...31
0...6
0...23
0...59

year from the year 2000


month
day
day of the week (0: sunday; 6: saturday)
hour
minutes and seconds

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

year from the year 2000


month
day
hour
minutes and seconds

Output Pin Description

262

Output

Type

Range

Description

OUT

CJ_DATETIME

0...2147483647

date and time

EIO0000000538 07/2014

Standard Libraries

DATETIME_GET_YEAR, DATETIME_GET_MONTH and DATETIME_GET_DAY


Function Block Diagram

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

date and time

Output Pin Description


Output

Type

Range

Description

OUT

CJ_BYTE

0...68
1...12
1...31

year from the year 2000


month
day

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

date and time

Output Pin Description

264

Output

Type

Range

Description

OUT

CJ_BYTE

0...6

day of the week

EIO0000000538 07/2014

Standard Libraries

DATETIME_GET_HOUR, DATETIME_GET_MIN and DATETIME_GET_SEC


Function Block Diagram

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

date and time

Output Pin Description


Output

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

date and time

Output Pin Description

266

Output

Type

Range

Description

OUT

CJ_TIME

0...86400

returns the time (hour,


minute and second)

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

Output Pin Description


Output

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

8 bit input (without sign)

Output Pin Description

268

Output

Type

Range

Description

OUT

CJ_S_BYTE

-128...127

8 bit output (with sign)

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

LED type value

Output Pin Description


Output

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

Output Pin Description

270

Output

Type

Range

Description

OUT

CJ_BYTE

0...3

LED type value

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

32 bit input (with sign)

Output Pin Description


Output

Type

Range

Description

OUT

CJ_LONG

-2147483647...2147483648

32 bit output (without sign)

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

32 bit input (without sign)

Output Pin Description

272

Output

Type

Range

Description

OUT

CJ_DWORD

0...4294967295

32 bit output (with sign)

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

8 bit input (with sign)

Output Pin Description


Output

Type

Range

Description

OUT

CJ_BYTE

0...255

8 bit output (without sign)

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

16 bit input (with sign)

Output Pin Description

274

Output

Type

Range

Description

OUT

CJ_WORD

0...65535

16 bit output (without sign)

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

16 bit input (without sign)

Output Pin Description


Output

Type

Range

Description

OUT

CJ_SHORT

-32768...32767

16 bit output (with sign)

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

Output Pin Description

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

Output Pin Description


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

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

Output Pin Description


Output

Type

Range

Description

out

CJ_WORD

0...65535

Words extracted from the string of bits are inserted in


input.

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

Output Pin Description


Output

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

CTD (Down Counter)

283

CTU (Up Counter)

285

CTUD (Up Down Counter)

287

EIO0000000538 07/2014

Standard Libraries

CTD (Down Counter)


Function Block Diagram

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

Input Pin Description


Input

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

Output Pin Description

284

Output

Type

Range

Description

CV

CJ_WORD

0...65535

current value
returns the current counter value

CJ_BIT

0, 1

represents termination of count. This is set to 1, when the counter


internal status is set to zero (CV = 0).

EIO0000000538 07/2014

Standard Libraries

CTU (Up Counter)


Function Block Diagram

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

Input Pin Description


Input

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.

Output Pin Description

286

Output

Type

Range

Description

CV

CJ_WORD

0...65535

Current Value.
returns the current counter value

QU

CJ_BIT

0, 1

Represents termination of count. This is set to 1, when the counter


internal status is greater than or equal to the PV input. When the
output QU has reached its maximum limit, it will stop incrementing
until it has been reset.

EIO0000000538 07/2014

Standard Libraries

CTUD (Up Down Counter)


Function Block Diagram

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

Input Pin Description


Input

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.

Output Pin Description

288

Output

Type

Range

Description

CV

CJ_WORD

0...65535

Current Value.
returns the current counter value

QU

CJ_BIT

0, 1

This set to 1 if CV is greater than or equal to PV.

QD

CJ_BIT

0, 1

This set to 1 if CV is equal to 0.

EIO0000000538 07/2014

Standard Libraries

Section 3.7
Edge Detection Libraries

Edge Detection Libraries


Overview
This section describes the edge detection libraries.
What Is in This Section?
This section contains the following topics:
Topic

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

Output Pin Description

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

Output Pin Description


Output

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

AND (0, 1 AND)

293

OR (0, 1 OR)

294

NOT (0, 1 NOT)

295

NAND (0, 1 NAND)

296

NOR (0, 1 NOR)

297

XOR (0, 1 XOR)

298

AND16 (16 bit AND)

299

OR16 (16 bit OR)

300

NOT16 (16 bit NOT)

301

NAND16 (16 bit NAND)

302

NOR16 (16 bit NOR)

303

XOR16 (16 bit XOR)

304

AND32 (32 bit AND)

305

OR32 (32 bit OR)

306

NOT32 (32 bit NOT)

307

NAND32 (32 bit NAND)

308

NOR32 (32 bit NOR)

309

XOR32 (32 bit XOR)

310

EIO0000000538 07/2014

Standard Libraries

AND (0, 1 AND)


Function Block Diagram

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

Output Pin Description


Output

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

Output Pin Description

294

Output

Type

Range

Description

out

CJ_BIT

0, 1

output value

EIO0000000538 07/2014

Standard Libraries

NOT (0, 1 NOT)


Function Block Diagram

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

Output Pin Description


Output

Type

Range

Description

out

CJ_BIT

0, 1

output value

EIO0000000538 07/2014

295

Standard Libraries

NAND (0, 1 NAND)


Function Block Diagram

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

Output Pin Description

296

Output

Type

Range

Description

out

CJ_BIT

0, 1

output value

EIO0000000538 07/2014

Standard Libraries

NOR (0, 1 NOR)


Function Block Diagram

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

Output Pin Description


Output

Type

Range

Description

out

CJ_BIT

0, 1

output value

EIO0000000538 07/2014

297

Standard Libraries

XOR (0, 1 XOR)


Function Block Diagram

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

Output Pin Description

298

Output

Type

Range

Description

out

CJ_BIT

0, 1

output value

EIO0000000538 07/2014

Standard Libraries

AND16 (16 bit AND)


Function Block Diagram

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

Output Pin Description


Output

Type

Range

Description

out

CJ_WORD

0...65535

output value

EIO0000000538 07/2014

299

Standard Libraries

OR16 (16 bit OR)


Function Block Diagram

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

Output Pin Description

300

Output

Type

Range

Description

out

CJ_WORD

0...65535

output value

EIO0000000538 07/2014

Standard Libraries

NOT16 (16 bit NOT)


Function Block Diagram

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

Output Pin Description


Output

Type

Range

Description

out

CJ_WORD

0...65535

output value

EIO0000000538 07/2014

301

Standard Libraries

NAND16 (16 bit NAND)


Function Block Diagram

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

Output Pin Description

302

Output

Type

Range

Description

out

CJ_WORD

0...65535

output value

EIO0000000538 07/2014

Standard Libraries

NOR16 (16 bit NOR)


Function Block Diagram

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

Output Pin Description


Output

Type

Range

Description

out

CJ_WORD

0...65535

output value

EIO0000000538 07/2014

303

Standard Libraries

XOR16 (16 bit XOR)


Function Block Diagram

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

Output Pin Description

304

Output

Type

Range

Description

out

CJ_WORD

0...65535

output value

EIO0000000538 07/2014

Standard Libraries

AND32 (32 bit AND)


Function Block Diagram

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

Output Pin Description


Output

Type

Range

Description

out

CJ_DWORD

0...4294967295

output value

EIO0000000538 07/2014

305

Standard Libraries

OR32 (32 bit OR)


Function Block Diagram

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

Output Pin Description

306

Output

Type

Range

Description

out

CJ_DWORD

0...4294967295

output value

EIO0000000538 07/2014

Standard Libraries

NOT32 (32 bit NOT)


Function Block Diagram

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

Output Pin Description


Output

Type

Range

Description

out

CJ_DWORD

0...4294967295

output value

EIO0000000538 07/2014

307

Standard Libraries

NAND32 (32 bit NAND)


Function Block Diagram

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

Output Pin Description

308

Output

Type

Range

Description

out

CJ_DWORD

0...4294967295

output value

EIO0000000538 07/2014

Standard Libraries

NOR32 (32 bit NOR)


Function Block Diagram

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

Output Pin Description


Output

Type

Range

Description

out

CJ_DWORD

0...4294967295

output value

EIO0000000538 07/2014

309

Standard Libraries

XOR32 (32 bit XOR)


Function Block Diagram

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

Output Pin Description

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

Output Pin Description

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

Output Pin Description


Output

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

Output Pin Description

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

Output Pin Description


Output

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

Output Pin Description

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

Output Pin Description


Output

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

Output Pin Description

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

Output Pin Description


Output

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

Output Pin Description

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

Output Pin Description


Output

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

Output Pin Description

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

Output Pin Description


Output

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

Output Pin Description

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

Output Pin Description


Output

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

Output Pin Description

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

Output Pin Description


Output

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

Output Pin Description

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

Output Pin Description


Output

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

Output Pin Description

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

Output Pin Description


Output

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

Output Pin Description

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

TOF (Off Delay Timer)

334

TON (On Delay Timer)

336

TP (Pulse Timer)

338

EIO0000000538 07/2014

333

Standard Libraries

TOF (Off Delay Timer)


Function Block Diagram

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

Input Pin Description


Input

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

Output Pin Description


Output

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

TON (On Delay Timer)


Function Block Diagram

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

Input Pin Description


Input

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

Output Pin Description


Output

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

Input Pin Description


Input

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

Output Pin Description


Output

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

Input Pin Description


Input

Type

Range

Description

in

CJ_BIT

0, 1

input signal

time

CJ_WORD

0...65535

delay time (on the basis of seconds for TDELAY and on


100 ms for TDELAY_mS)

Output Pin Description

342

Output

Type

Range

Description

cnt

CJ_WORD

0...65535

current count down for the delay to be applied.

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.

Input Pin Description


Input

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

Output Pin Description

344

Output

Type

Range

Description

cnt

CJ_WORD

0...65535

current count for the delay to be applied.

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.

Input Pin Description


Input

Type

Range

Description

in

CJ_BIT

0, 1

input signal

time

CJ_WORD

0...65535

sustain time (on the basis of seconds for TSUSTAIN and on


100 ms for TSUSTAIN_mS)

EIO0000000538 07/2014

345

Standard Libraries

Output Pin Description

346

Output

Type

Range

Description

cnt

CJ_WORD

0...65535

current count for the delay to be applied.

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

Refer to the following graph:

Input Pin Description


Input

Type

Range

Description

In

CJ_WORD

0...10000

percentage input to two decimal places

CJ_BYTE

0...255

function time period (seconds)

Output Pin Description

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

Non Linear Libraries

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

Input Pin Description


Input

Type

Range

Description

CJ_ANALOG

Value: -32768...32767
Error: 0...2

analog 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

Output Pin Description

352

Output

Type

Range

Description

CJ_ANALOG

Value: -32768...32767
Error: 0...2

analog signal linearization


according to the set inputs

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

analog input signal

ts

CJ_WORD

0...65535

Settling time, in 100 ms.

en

CJ_BIT

0, 1

If 1, the filter is active.


If 0, the output corresponds to the
input.

Output Pin Description


Output

Type

Range

Description

CJ_ANALOG

Value: -32768...32767
Error: 0...2

analog signal settled according to


the set input settings

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

Output Pin Description

354

Output

Type

Range

Description

CJ_SHORT

-32768...32767

digital signal, linearized according to


the set inputs

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

Settling time, in 100ms.

en

CJ_BIT

0, 1

If 1, the filter is active.


If 0, the output corresponds to the
input.

Output Pin Description


Output

Type

Range

Description

CJ_SHORT

-32768...32767

Digital signal, settled according to


the input settings.

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

The graph illustrates the startValue value = 0:

Input Pin Description


Input

Type

Range

Description

startValue

CJ_SHORT

-32768...32767

initial value

stopValue

CJ_SHORT

-32768...32767

final value

time

CJ_WORD

0...65535

the time, in seconds, required for


going from the startValue to
the stopValue.

load

CJ_BIT

0, 1

loads the initial value and resets


the output to that value.

start

CJ_BIT

0, 1

enables the function.

Output

Type

Range

Description

out

CJ_SHORT

-32768...32767

the output of the function

Output Pin Description

EIO0000000538 07/2014

357

Control Libraries

Section 4.2
Non Linear Libraries

Non Linear Libraries


Overview
This section describes the non linear libraries.
What Is in This Section?
This section contains the following topics:
Topic

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:

Input Pin Description


Input

Type

Range

Description

lower

CJ_SHORT

-32768...upper

lower band limit

upper

CJ_SHORT

lower...32767

upper band limit

input

CJ_SHORT

-32768...32767

input to be checked

EIO0000000538 07/2014

359

Control Libraries

Output Pin Description

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:

Input Pin Description


Input

Type

Range

Description

lower

CJ_SHORT

-32768...upper

lower band limit

upper

CJ_SHORT

lower...32767

upper band limit

input

CJ_SHORT

-32768...32767

input to be checked

EIO0000000538 07/2014

361

Control Libraries

Output Pin Description

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

Input Pin Description


Input

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

Output Pin Description

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

Input Pin Description


Input

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

integration time (in seconds)

Td

CJ_WORD

0...999

differentiation time (in seconds)

Mode

CJ_BIT

0, 1

Mode of operation:
0 = direct action
1 = inverse action

Output Pin Description

366

Output

Type

Range

Description

out

CJ_WORD

0...10000

percentage output, to two decimal


places

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

Input Pin Description


Input

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

integration time (in seconds)

Mode

CJ_BIT

0, 1

Mode of operation:
0 = direct action
1 = inverse action

Output Pin Description

368

Output

Type

Range

Description

out

CJ_WORD

0...10000

percentage output, to two decimal


places

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

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

Output Pin Description

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

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

Output Pin Description

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

Output Pin Description

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

AHU Application Program Function Blocks


Overview
This chapter describes the SoHVAC AHU application program function blocks.
What Is in This Chapter?
This chapter contains the following topics:
Topic

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

Differential Pressure control

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

activate the evKeyOnOff


event. 1 indicates that event is
active. In case the machine is
off, it will be switched on.

activate the evKeyOnOff


event. 1 indicates that event
is active. In case the
machine is on, it will be
switched off.

Digital input

enByDI

switch-on is allowed if the


value of the on/off digital
contact is 1

the unit switches off if the


value of the on/off digital
contact is 0

Supervisor

enBySup

switch-on is allowed if the


supervisor status is set at 1

the unit switches off if the


supervisor status is set at 0

Schedule timer

enBySchedule

switch-on is allowed if the


enabling status is set at 1

the unit switches off if the


enabling status is set at 0

Alarm

onAlarms

the unit goes to off status, caused by alarms.


In order to use this function, all alarms must be connected
(eventually in OR) for which the unit must be switched-off. If
the onAlarms input always remains at 0, the off status from
alarm can never be reached.

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.

378

EIO0000000538 07/2014

AHU AFBs

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enByKey

CJ_BIT

enabling on/off status from key:


0 disabled
1 enabled

evKeyOnOff

CJ_BIT

switch-on/off event from key:


switch-on request if passing from 0
to 1
switch-off request if passing from 1
to 0

enByDI

CJ_BIT

enabling on/off status from digital


input:
0 disabled
1 enabled

statusDI

CJ_BIT

status of the digital input for on/off


from digital contact:
0 contact open, switch-off request
from DI
1 contact closed, switch-on request
from DI
The status interferes in on/off
management only if the respective
enabling parameter is configured.

enBySup

CJ_BIT

enabling on/off status from supervisor:


0 disabled
1 enabled

statusSup

CJ_BIT

supervisor status for on/off from


supervisor:
0 status not confirmed, switch-off
request from supervisor
1 status confirmed, switch-on
request from supervisor
The status interferes in on/off
management only if the respective
enabling parameter is configured.

enBySchedule

EIO0000000538 07/2014

CJ_BIT

enabling on/off status from schedule


timer:
0 disabled
1 enabled

379

AHU AFBs

Input

Type

Minimum

Maximum

Default

Description

statusSchedule

CJ_BIT

status for on/off from schedule timer:


0 status not confirmed, switch-off
request
1 status confirmed, switch-on
request
The status interferes in on/off
management only if the respective
enabling parameter is configured.

onAlarms

CJ_BIT

status for on/off from alarm:


0 no action
1 activates on/off caused by block
alarms
Keep the input at 0 if this function is
not to be used.

rtcFault

CJ_BIT

indicates a clock malfunctioning status


or that the clock is discharged and
must be set. Keep the input equal to 0
if this function is not to be used.

rtcDone

CJ_BIT

event for releasing the status of the


fan caused by discharged RTC. When
the unit is in off status from discharged
RTC and this input passes from 0 to 1,
the unit passes to the switch-on status
(if allowed).

Output Pin Description


Output

Type

Minimum

Maximum

Description

unitStatus

CJ_BYTE

describes the status of the unit:


0 off status from key
1 off status from digital input
2 off status from supervisor
3 off status from schedule timer
4 off status from alarm
5 off status from RTC
6 on status

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on

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

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled

fans

CJ_BIT

fan status:
0 fans not operating
1 fans operating

startupDelay

CJ_WORD

999

delay (in seconds) of flow switch


alarm signal from unit switch-on.
(See T1 graphics)

runningDelay

CJ_WORD

999

delay (in seconds) of flow switch


alarm signal during normal
functioning. (See T2 graphics)

DI_Flow

CJ_BIT

digital input for indicating flow:


0 no flow
1 flow present

resetAlarm

CJ_BIT

alarm input manual reset; when


passing from the 0 value to 1, if the
alarm conditions have returned, the
alarm is reset

Minimum

Maximum

Description

* undefined until input is connected.

Output Pin Description


Output

Type

enable

CJ_BIT

status of the enable input

flowAlarm

CJ_BIT

status of the flow switch alarm:


0 correct flow, no alarm
1 no flow, alarm active

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

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the macroblock:


0 function disabled
1 function enabled
If nothing is connected to the default
input, 1 is valid.

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on

regulationType

CJ_BIT

type of pump regulation:


0 continuous
1 on/off

setON

CJ_WORD

1.00

90.0

pump switch-on set on heating/cooling


request [%]

setOFF

CJ_WORD

1.00

90.0

pump switch-off set on heating/cooling


request [%]

minTimePumpON

CJ_WORD

99

minimum time for which the pump


remains active after a switch-off
request (in minutes)

enHeatPump

CJ_BIT

enable management of heating pump:


0 function disabled
1 function enabled
If nothing is connected to the default
input, 1 is valid.

rampHeat

CJ_WORD

0.00

100.00

effective heating request [%]

alarmHeatPump

CJ_BIT

heating pump thermal switch alarm

blockHeatPump

CJ_BIT

alarm generic input for heating pump


block

enCoolPump

CJ_BIT

enable management of the cooling


pump:
0 function disabled
1 function enabled
If nothing is connected to the default
input, 1 is valid.

rampCool

CJ_BIT

effective cooling request [%]

alarmCoolPump

CJ_BIT

cooling pump thermal switch alarm

blockCoolPump

CJ_BIT

alarm generic input for cooling pump


block

* undefined until input is connected.

EIO0000000538 07/2014

385

AHU AFBs

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

heatPump

CJ_BIT

heat pump control

statusHeatPump

CJ_BYTE

functioning status of the heat pump:


0 disabled
1 in thermal switch alarm
2 off
3 on
4 switch-off stand-by

coolPump

CJ_BIT

cooling pump control

statusCoolPump

CJ_BYTE

functioning status of the cool pump:


0 disabled
1 off
2 switch-off stand-by
3 on
4 in thermal switch alarm

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

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid.

enHeatPump

CJ_BIT

enables the heating pump thermal


switch alarm:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid.

DI_AlarmHeatPump

EIO0000000538 07/2014

CJ_BIT

digital input for signalling the heat


pump thermal switch alarm:
0 no alarm
1 alarm present

387

AHU AFBs

Input

Type

Minimum

Maximum

Default

Description

enCoolPump

CJ_BIT

enable the cooling pump thermal


switch alarm:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid.

DI_AlarmCoolPump

CJ_BIT

digital input for signalling the


cooling pump thermal switch
alarm:
0 no alarm
1 alarm present

* undefined until input is connected.

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

alarmHeatPump

CJ_BIT

heat pump thermal switch alarm status:


0 alarm not active
1 alarm active

alarmCoolPump

CJ_BIT

cooling pump thermal switch alarm status:


0 alarm not active
1 alarm active

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

summer operating mode

Heat Pump - Heating

winter operating mode

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

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enByKey

CJ_BIT

enabling of parameter mode change:


0 disabled
1 enabled

enBySup

CJ_BIT

enabling of supervisor mode change:


0 disabled
1 enabled

statusSup

CJ_BIT

supervisor status for mode


changeover from supervisor:
0 winter operating mode
1 summer operating mode
The status interferes with
management only if the respective
enabling parameter is configured.

enByChangeOver

CJ_BIT

enabling mode changeover from


change in outside temperature:
0 disabled
1 enabled

tempExternal

CJ_ANALOG

outside air temperature probe [ C].

setToHeating

CJ_SHORT

-58.0

302.0

set point on the external temperature


for changeover to winter operating
mode [ C].

setToCooling

CJ_SHORT

-58.0

302.0

set point on the outside temperature


for changeover to summer operating
mode [ C].

* undefined until input is connected.

390

EIO0000000538 07/2014

AHU AFBs

Internal Parameters/Status
Parameter

Type

Minimum

Maximum

Default

Description

MOdE

CJ_BIT

unit operating mode, can be modified


from keyboard
The parameter is always updated
automatically when the operating
mode changes due to mode
changeover from the other
procedures.

Output Pin Description


Output

Type

Minimum

Maximum

Description

mode

CJ_BIT

unit current operating mode:


0 summer mode (chiller)
1 winter mode (heat pump)

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

enable operating of the macroblock:


0 function disabled
1 function enabled
If nothing is connected to the default
input, 1 is valid.

mode

CJ_BIT

current operating mode:


0 summer mode (cooling)
1 winter mode (heating)

setPoint

CJ_SHORT

-58.0

302.0

room set point [ C]

maxSetPoint

CJ_SHORT

-58.0

302.0

maximum room compensation set


point value [ C]

setExtStart

CJ_SHORT

-58.0

302.0

compensation start set point on the


outside temperature [ C]

diffExt

CJ_SHORT

0.0

80.0

compensation differential on the


outside temperature [ C]

tempExternal

CJ_ANALOG

outside air temperature probe [ C]

* undefined until input is connected.

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

setPoint

CJ_SHORT

-58.0

302.0

compensated set point

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

Winter/heating operating mode:

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

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid.

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on

mode

CJ_BIT

current operating mode:


0 summer mode (cooling)
1 winter mode (heating)

setPoint

CJ_SHORT

-58.0

302.0

room set point [ C]

dif

CJ_SHORT

0.0

80.0

fans regulation differential [ C]

tempRoom

CJ_ANALOG

room air temperature probe [ C]

valOnErrorProbe

CJ_BIT

forces the status of the regulation


probe of the fans in inoperative
conditions

* undefined until input is connected.

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

requestFan

CJ_BIT

fans switch-on/off request

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:

Winter/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

Modulating Regulation with On/Off Step


This has the same logic as the modulating regulation with the additional possibility of switching the
fan off with a specific step on the regulation ramp. To set the regulation, activate enOnOffStep =
1.
The effective output (requestFan) of the fans is subject to a specific step on the regulation ramp
that decides whether to allow modulation to pass or keep the fan off.

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

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the default
input, 1 is valid.

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on

mode

CJ_BIT

current operating mode:


0 summer mode (cooling)
1 winter mode (heating)

setPoint

CJ_SHORT

-58.0

302.0

room set point [ C]

dif

CJ_SHORT

0.0

80.0

fans regulation differential [ C]

tempRoom

CJ_ANALOG

room air temperature probe [ C]

maxValue

CJ_WORD

0.00

100.00

maximum fans speed [%]

minValue

CJ_WORD

0.00

100.00

minimum fans speed [%]

398

EIO0000000538 07/2014

AHU AFBs

Input

Type

Minimum

Maximum

Default

Description

enOnOffStep

CJ_BIT

enables the modulating regulation


with on/off step:
0 modulating only
1 modulating with on/off enabling
step

diffRamp

CJ_WORD

0.00

60.00

8.00

fans switch-on differential on the


modulating regulation ramp [%]

delayOnOffFan

CJ_WORD

999

10

stand-by time (in seconds) for the


on/off step on the modulating
regulation ramp

valOnErrorProbe

CJ_WORD

0.00

100.00

forces the status of the regulation


probe of the fans in inoperative
conditions [%]

* undefined until input is connected.

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

requestFan

CJ_WORD

0.00

100.00

fans switch-on request [%]

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

Pressure Set Point Calculation


On unit switch-on, a ramp starts from value 0 until the maximum value is reached, which is the set
point (setPointPress). The ramp ascends with a time equal to the (setPointRampTime) input
expressed in bar/min.

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

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid.

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on

dischargePress

CJ_ANALOG

Discharge air static pressure


sensor [bar]

setPointPress

CJ_SHORT

0.0

750.0

pressure switch control set point


[bar]

setPointRampTime

CJ_WORD

0.0

750.0

ramp time of the pressure switch


set point [bar/min]

PropBand

CJ_SHORT

0.0

300

pressure switch control


proportional band [bar]

integralTime

CJ_WORD

999

pressure switch control integral


time (in seconds)

maxValue

CJ_WORD

0.00

100.00

maximum fans speed [%]

minValue

CJ_WORD

0.00

100.00

minimum fans speed [%]

valOnErrorProbe

CJ_WORD

0.00

100.00

forces the status of the regulation


probe of the fans in inoperative
conditions [%]

* undefined until input is connected.

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

actualSetPointPress

CJ_SHORT

0.0

750.0

pressure switch control current set point


[bar]

requestFan

CJ_WORD

0.00

100.00

fans switch-on request [%]

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

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the default
input, 1 is valid.

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on

waitTime

CJ_WORD

99

stand-by time (in minutes) before


starting the air quality (sniffing) cycle

activeTime

CJ_WORD

30

time (in minutes) for which the air


quality (sniffing) cycle lasts

enBothFans

CJ_BIT

enables both fans to air quality cycle


(to sniff):
0 return fan only
1 both fans

enReturnFan

CJ_BIT

enables management of the return


fan:
0 function disabled
1 function enabled
If nothing is connected to the default
input, 1 is valid.

CJ_WORD

0.00

100.00

regulation supply fan request [%]

reqReturnFan

CJ_WORD

0.00

100.00

regulation return fan request [%]

onReturnProbe

CJ_BIT

indicates whether the regulation


probe is positioned on the return
channel

reqSupplyFan

* undefined until input is connected.

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

outSupplyFan

CJ_WORD

0.00

100.00

switch-on request if the supply fan

outReturnFan

CJ_WORD

0.00

100.00

switch-on request if the return fan

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

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid.

minTimeStartOther

CJ_WORD

999

protection time (in seconds)


between fan start-up

minTimeStopOther

CJ_WORD

999

protection time (in seconds)


between fan switch-off

406

EIO0000000538 07/2014

AHU AFBs

Input

Type

Minimum

Maximum

Default

Description

enSupplyFan

CJ_BIT

enables management of the


supply fans:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid.

reqSupplyFan

CJ_WORD

0.0

100.00

regulation supply fan request


[%]

enManualSupplyFan

CJ_BIT

enabling of manual operating


mode of the supply fan:
0 automatic operating mode
1 manual operating mode

alarmSupplyFan

CJ_BIT

supply fan thermal switch alarm,


blocks the fan

blockSupplyFan

CJ_BIT

supply fan block generic alarm

enReturnFan

CJ_BIT

enables management of the


return fans:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid.

reqReturnFan

CJ_WORD

0.00

100.00

regulation return fan request [%]

enManualReturnFan

CJ_BIT

enabling of manual operating


mode of the return fan:
0 automatic operating mode
1 manual operating mode

alarmReturnFan

CJ_BIT

return fan thermal switch alarm,


blocks the fan

blockReturnFan

CJ_BIT

return fan block generic alarm

* undefined until input is connected.

Internal Parameters/Status
Parameter

Type

Minimum

Maximum

Description

forceSupplyFan

CJ_WORD

0.00

100.00

supply fan forcing into manual operating mode [%]

forceReturnFan

CJ_WORD

0.00

100.00

return fan forcing into manual operating mode [%]

EIO0000000538 07/2014

407

AHU AFBs

Output Pin Description


Output

Type

Minimum

enable

CJ_BIT

status of the enable input

outSupplyFan

CJ_WORD

0.00

100.00

supply fan control [%]

statusSupplyFan

CJ_BYTE

supply fan 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

outReturnFan

CJ_WORD

0.0

100.00

return fan control [%]

statusReturnFan

CJ_BYTE

return fan 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

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

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid.

enSupplyFan

CJ_BIT

enables the supply fan thermal


switch/inverter alarm:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid.

DI_AlarmSupplyFan

EIO0000000538 07/2014

CJ_BIT

digital input for signalling the


supply fan thermal switch/inverter
alarm:
0 no alarm
1 alarm present

409

AHU AFBs

Input

Type

Minimum

Maximum

Default

Description

enReturnFan

CJ_BIT

enables the return fan thermal


switch/inverter alarm:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid.

DI_AlarmReturnFan

CJ_BIT

digital input for signalling the


return fan thermal switch/inverter
alarm:
0 no alarm
1 alarm present

* undefined until input is connected.

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

alarmSupplyFan

CJ_BIT

status of the supply fan thermal switch/inverter


alarm:
0 alarm not active
1 alarm active

alarmReturnFan

CJ_BIT

status of the return fan thermal switch/inverter


alarm:
0 alarm not active
1 alarm active

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):

WINTER mode (mode = 1):

412

EIO0000000538 07/2014

AHU AFBs

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable operating of the macroblock:


0 function disabled
1 function enabled
If nothing is connected to the default
input, 1 is valid.

mode

CJ_BIT

current operating mode:


0 summer mode (cooling)
1 winter mode (heating)

coils

CJ_BYTE

number of coils configured

setPoint

CJ_SHORT

-58.0

302.0

room set point [ C]

diffTemp

CJ_SHORT

0.0

80.0

supply floating set point calculation


differential [ C]

zone

CJ_SHORT

0.0

80.0

neutral zone value [ C]

offsetTemp

CJ_SHORT

0.0

80.0

offset value [ C]

tempRoom

CJ_ANALOG

room air temperature probe [ C]

(Only single coil unit)

* undefined until input is connected.

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

setPointSupply

CJ_SHORT

-58.0

302.0

supply floating set point [ C]

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

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid.

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on

mode

CJ_BIT

current operating mode:


0 summer mode (cooling
1 winter mode (heating)

coils

CJ_BYTE

number of coils configured

setPointSupply

CJ_SHORT

-58.0

302.0

supply temperature set point


for temperature regulation [ C]

diffTemp

CJ_SHORT

0.0

50.0

supply temperature differential


for temperature regulation [ C]

integralTime

CJ_WORD

999

coil PI regulation integral time


(in seconds)

zoneTemp

CJ_SHORT

0.0

80.0

neutral zone for temperature


regulation [ C]

tempSupply

CJ_ANALOG

supply air probe [ C]

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

value to force at the coil in


supply probe inoperative
conditions [%]

antiFreeze

CJ_BIT

anti-freeze alarm, forces the


output to 100.00%

blockAlarm

CJ_BIT

coil block generic alarm

Minimum

Maximum

* undefined until input is connected.

Output Pin Description


Output

Type

Description

enable

CJ_BIT

status of the enable input

requestCoil

CJ_WORD

0.00

100.00

heating/cooling coil switch-on-off request [%]

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.

If the supply probe is inactive, the regulation is inhibited.


Input Pin Description
Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid.

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on

setPointSupply

CJ_SHORT

-58.0

302.0

supply temperature set point for


temperature regulation [ C]

diffTemp

CJ_SHORT

0.0

50.0

supply temperature differential for


temperature regulation [ C]

EIO0000000538 07/2014

419

AHU AFBs

Input

Type

Minimum

Maximum

Default

Description

integralTime

CJ_WORD

999

coil PI regulation integral time (in


seconds)

zoneTemp

CJ_SHORT

0.0

80.0

neutral zone for temperature


regulation [ C]

tempSupply

CJ_ANALOG

supply air probe [ C]

antiFreeze

CJ_BIT

anti-freeze alarm

blockAlarm

CJ_BIT

coil block generic alarm

* undefined until input is connected.

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

postHeatingCoil

CJ_WORD

0.00

100.00

post-heating coil switch-on-off request [%]

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

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid.

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on

numHeaters

CJ_BYTE

number of heaters

setPointSupply

CJ_SHORT

-58.0

302.0

supply temperature set point for


temperature regulation [ C]

diffTemp

CJ_SHORT

0.0

50.0

supply temperature differential


for temperature regulation [ C]

zoneTemp

CJ_SHORT

0.0

80.0

neutral zone for temperature


regulation [ C]

tempSupply

CJ_ANALOG

supply air probe [ C]

delayOnOffHeater

CJ_WORD

999

delay time (in seconds) between


switch-on/off of the heater
stages

alarmHeater

CJ_BIT

electric heater alarm

antiFreeze

CJ_BIT

anti-freeze alarm

blockAlarm

CJ_BIT

electric heaters block generic


alarm

* undefined until input is connected.

EIO0000000538 07/2014

423

AHU AFBs

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

heater1

CJ_BIT

heaters first stage switch-on/off request

heater2

CJ_BIT

heaters second stage switch-on/off request

heater3

CJ_BIT

heaters third stage switch-on/off request

statusHeater1

CJ_BYTE

heaters first stage status:


0 disabled
1 off
2 switch-on stand-by
3 on
4 switch-off stand-by
5 alarm

statusHeater2

CJ_BYTE

heaters second stage status:


0 disabled
1 off
2 switch-on stand-by
3 on
4 switch-off stand-by
5 alarm

statusHeater3

CJ_BYTE

resistances third stage status:


0 disabled
1 off
2 switch-on stand-by
3 on
4 switch-off stand-by
5 alarm

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

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid.

DI_AlarmHeater

CJ_BIT

digital input for signalling the heat


pump thermal switch alarm:
0 no alarm
1 alarm present

* undefined until input is connected.

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

alarmHeater

CJ_BIT

heating pump thermal switch alarm status:


0 alarm not active
1 alarm active

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

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid.

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on

coils

CJ_BYTE

number of coils configured

setPointSupply

CJ_SHORT

-58.0

302.0

supply temperature set point


for temperature regulation [ C]

diffTemp

CJ_SHORT

0.0

50.0

supply temperature differential


for temperature regulation [ C]

integralTime

CJ_WORD

999

coil PI regulation integral time


(in seconds)

zoneTemp

CJ_SHORT

0.0

80.0

neutral zone for temperature


regulation [ C]

tempSupply

CJ_ANALOG

supply air probe [ C]

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

value to force at the coil in


supply probe inoperative
conditions [%]

antiFreeze

CJ_BIT

anti-freeze alarm, forces the


output to 0.00%

blockAlarm

CJ_BIT

coil block generic alarm

* undefined until input is connected.

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

requestCoil

CJ_WORD

0.00

100.00

cooling coil switch-on/off request [%]

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.

Dehumidification Regulation Limit


When a dehumidification request is active and there is a pending continuous heating request, this
function (enabled from enLimitDeumid = 1 input) allows to limit the opening of the cooling valve.
This is to dehumidify in a way to contrast the continuous lowering of the temperature (due to
dehumidification) and go quickly back to the desired temperature conditions. This action has a
rapid effect on the temperature and is a source of energy saving, while optimizing the coil control.

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

In this condition, the dehumidification request to the coil is


40% (that is, 50% of the 80% of the effective request).

80

25

In this condition, the dehumidification request to the coil is


60% (that is, 25% of the 80% of the effective request).

80

In this condition, the dehumidification request passes entirely


to the coil.

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid.

CJ_BIT

coils

CJ_BYTE

number of coils configured

setPointHR

CJ_SHORT

100

humidity control set point [%]

diffHR

CJ_SHORT

100

humidity control differential [%]

zoneHR

CJ_SHORT

100

humidity control neutral zone [%]

integralTime

CJ_WORD

999

complete time (in seconds) of the


PI control for dehumidification

humidityRoom

CJ_ANALOG

probe for control of room humidity


[%]

enLimitDehumid

CJ_BIT

enabling of limit regulation


function on dehumidification

setPointSupply

CJ_SHORT

-58.0

302.0

supply temperature set point for


temperature regulation [ C]

diffTemp

CJ_SHORT

0.0

50.0

supply temperature differential for


temperature regulation [ C]

unitOnOff

EIO0000000538 07/2014

unit on/off status:


0 unit off
1 unit on

431

AHU AFBs

Input

Type

Minimum

Maximum

Default

Description

zoneTemp

CJ_SHORT

0.0

80.0

0.0

neutral zone for temperature


regulation [ C]

tempSupply

CJ_ANALOG

supply air probe [ C]

antiFreeze

CJ_BIT

anti-freeze alarm, forces the


output to 100.00%

blockAlarm

CJ_BIT

coil block generic alarm

* undefined until input is connected.

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

requestCoil

CJ_WORD

0.00

100.00

dehumidification request [%]

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

Enabling Humidifier by Supply Humidity


To work properly, humidifier requires a value not too high of humidity. So there is a setpoint
(setPointHsupply) and relative threshold (diffHsupply) for the supply humidity to
enable/disable the humidifier. This function is enabled by the input enHsupplyLimit = 1. If
enHsupplyLimit = 0 (function not embedded), the humidifier works on normal setpoint
percentage (setPointHR).

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

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid.

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on

humidifierType

CJ_BYTE

type of humidifier:
0 on/off
1 modulating

setPointHR

CJ_SHORT

100

humidity control set point [%]

diffHR

CJ_SHORT

100

humidity control differential [%]

zoneHR

CJ_SHORT

100

humidity control neutral zone [%]

humidityRoom

CJ_ANALOG

probe for control of room humidity


[%]

enTsupplyLimit

CJ_BIT

enables the control of the


humidifier depending on the
supply temperature
If nothing is connected to the
default input, 0 is valid.

setPointTsupply

CJ_SHORT

-58.0

302.0

set point for the control of the


humidifier depending on the
supply temperature [ C]

diffTsupply

CJ_SHORT

0.0

50.0

differential for the control of the


humidifier depending on the
supply temperature [ C]

tempTsupply

CJ_ANALOG

supply air temperature [ C]

enHsupplyLimit

CJ_BIT

enables the control of the


humidifier depending on the
supply humidity
If nothing is connected to the
default input, 0 is valid.

setPointHsupply

CJ_SHORT

95

set point for the control of the


humidifier depending on the
supply humidity [%]

diffHsupply

CJ_SHORT

40

differential for the control of the


humidifier depending on the
supply humidity [%]

436

EIO0000000538 07/2014

AHU AFBs

Input

Type

Minimum

Maximum

Default

Description

Hsupply

CJ_ANALOG

supply humidity [%]

alarmHumidifier

CJ_BIT

humidifier alarm

blockAlarm

CJ_BIT

humidifier block generic alarm

* undefined until input is connected.

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

statusHumidifier

CJ_BYTE

humidifier status:
0 disabled
1 off
2 off due to supply temperature
3 on
4 humidifier alarm

do_Humidifier

CJ_BIT

humidifier on/off switch-on/off status

ao_Humidifier

CJ_WORD

0.00

100.00

modulating humidifier switch-on/off status

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).

NOTE: The regulation is disabled if the air quality probe is inoperable.

438

EIO0000000538 07/2014

AHU AFBs

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on

setPointAQ

CJ_SHORT

10000

air quality control set point [ppm]

diffAQ

CJ_SHORT

2000

air quality control differential


[ppm]

airQualityProbe

CJ_ANALOG

probe for the control of the air


quality [ppm]

maxValue

CJ_WORD

0.00

100.00

air quality maximum value


requested [%]

minValue

CJ_WORD

0.00

100.00

air quality minimum value


requested [%]

* undefined until input is connected.

Output Pin Description


Output

Type

Minimum

enable

CJ_BIT

status of the enable input

requestAirQuality

CJ_WORD

0.00

100.00

damper opening/closing request for air quality

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:

Free-heating enabling in temperature:

If one of the 2 probes is inactive, the regulation is not enabled.


Free-Cooling and Free-Heating Regulation
The regulation of free-cooling/free-heating commands the opening of an outside air damper. When
there are free-cooling/free-heating conditions, that is, there is enabling of regulation and request is
greater than 0, the ramps that command heating/cooling are divided into 2 successive ramps. The
first (one half of differential) regulates the free-cooling/free-heating through the outside air damper,
the second regulates the heating cooling valves.

EIO0000000538 07/2014

441

AHU AFBs

Summer/Cooling Operating Mode: Free-Cooling

Winter/Heating Operating Mode: Free-Heating

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

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on

mode

CJ_BIT

current operating mode:


0 summer mode (chiller)
1 winter mode (heating)

coils

CJ_BYTE

number of coils configured

setPointFCH

CJ_SHORT

0.0

50.0

differential set point for enabling


free-cooling/heating [ C]

diffFCH

CJ_SHORT

0.0

50.0

differential for enabling freecooling/heating [ C]

tempRoom

CJ_ANALOG

room air temperature probe [ C]

tempExtern

CJ_ANALOG

outside air temperature probe [ C]

setPointSupply

CJ_SHORT

-58.0

302.0

supply temperature set point for


temperature regulation [ C]

diffTemp

CJ_SHORT

0.0

50.0

supply floating set point calculation


differential [ C]

zoneTemp

CJ_SHORT

0.0

80.0

neutral zone value [ C]

maxVal

CJ_WORD

0.00

100.00

air quality maximum value


requested [%]

minVal

CJ_WORD

0.00

100.00

air quality minimum value


requested [%]

tempSupply

CJ_ANALOG

supply air temperature probe [ C]

* undefined until input is connected.

EIO0000000538 07/2014

443

AHU AFBs

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

requestFCH

CJ_WORD

0.00

100.00

damper opening/closing request for freecooling/heating

enFCH

CJ_BYTE

free-cooling/heating request status:


0 no request
1 free-cooling request
2 free-heating request

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

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on

regType

CJ_BYTE

type of regulation:
0 disabled
1 modulating regulation
2 fixed opening regulation

fixValue

CJ_WORD

0.00

100.00

0.00

fixed opening value [%]


only valid if regType = 1

requestFCH

CJ_WORD

0.00

100.00

0.00

regulation request for freecooling/heating [%]


only valid if regType = 0

requestAQ

CJ_WORD

0.00

100.00

0.00

air quality regulation request [%]


valid only if regType = 0

cmdPriority

CJ_BYTE

type of priority for the damper


command:
0 free-cooling/heating
1 air quality
2 priority request
3 arithmetic average

runningTime

CJ_WORD

3600

running time (in seconds) of the


damper to pass from 0% to 100%

EIO0000000538 07/2014

447

AHU AFBs

Input

Type

Minimum

Maximum

Default

Description

endRunTime

CJ_WORD

600

signal maintenance time (in


seconds) at damper end run

minVariation

CJ_WORD

0.00

100.00

0.00

minimum variation before


satisfying an opening/closing
request

blockAlarm

CJ_BIT

damper block generic alarm,


closes the damper

* undefined until input is connected.

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

statusDumper

CJ_BYTE

outside air damper status:


0 disabled
1 closed
2 opening
3 open
4 closing
5 aligning

currentPosition

CJ_WORD

0.00

100.00

current opening value of the outside air damper


[%]

openCmd

CJ_BIT

air damper opening commands:


0 no command
1 opening

closeCmd

CJ_BIT

air damper closing commands:


0 no command
1 closing

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

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on

requestFCH

CJ_BYTE

free-cooling/heating request:
0 no request
1 free-cooling request
2 free-heating request

tempExhaust

CJ_ANALOG

exhaust air temperature probe [ C]

setPointMinTemp

CJ_SHORT

-58.0

302.0

recovery device with crossed flows


defrosting regulation set point

diffMinTemp

CJ_SHORT

0.0

50.0

recovery device with crossed flows


defrosting regulation differential

delayMinTemp

CJ_WORD

99

recovery device with crossed flow


by-pass delay time (in minutes) for
defrosting

* undefined until input is connected.

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

statusHE

CJ_BYTE

outside air damper status:


0 disabled
1 off
2 in defrosting
3 off due to free-cooling/heating
4 on

do_HE

CJ_BIT

recovery device switch-on/off command

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).

If the regulation probe is inactive, the function is disabled.

452

EIO0000000538 07/2014

AHU AFBs

Recovery Device Status


The recovery device can assume the following operating status (statusHE output):
Disabled recovery device disabled
Off the recovery device is off
Off due to free-cooling/heating the recovery device is off due to a free-cooling/heating request
On the recovery device is operating
Input Pin Description
Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on

requestFCH

CJ_BYTE

free-cooling/heating request:
0 no request
1 free-cooling request
2 free-heating request

tempExhaust

CJ_ANALOG

exhaust air temperature probe [ C]

tempExtern

CJ_ANALOG

outside air temperature probe [ C]

setPointHE

CJ_SHORT

-58.0

302.0

recovery device regulation


differential set point

diffHE

CJ_SHORT

0.0

50.0

recovery device regulation


differential

* undefined until input is connected.

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

statusHE

CJ_BYTE

outside air damper status:


0 disabled
1 off
2 off due to free-cooling/heating
3 on

do_HE

CJ_BIT

recovery device switch-on/off command

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

If the regulation probe is inactive, the function is disabled.

454

EIO0000000538 07/2014

AHU AFBs

HEType = 1 modulating regulation

With the regulation probes is 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
Off due to free-cooling/heating the recovery device is off due to a free-cooling/heating request
On the recovery device is operating
Input Pin Description
Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on

HEType

CJ_BIT

type of heat recovery device:


0 on/off rotary
1 modulating rotary

requestFCH

CJ_BYTE

free-cooling/heating request:
0 no request
1 free-cooling request
2 free-heating request

tempExhaust

CJ_ANALOG

exhaust air temperature probe [ C]

tempExtern

CJ_ANALOG

outside air temperature probe [ C]

setPointHE

CJ_SHORT

-58.0

302.0

recovery device regulation


differential set point

diffHE

CJ_SHORT

0.0

50.0

recovery device regulation


differential

EIO0000000538 07/2014

455

AHU AFBs

Input

Type

Minimum

Maximum

Default

Description

orFans

CJ_BIT

indicates that the fans are on

minValueHE_AO

CJ_WORD

0.00

100.00

rotary recovery device minimum


speed value

maxValueHE_AO

CJ_WORD

0.00

100.00

rotary recovery device maximum


speed value

* undefined until input is connected.

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

statusHE

CJ_BYTE

outside air damper status:


0 disabled
1 off
3 off due to free-cooling/heating
4 on

do_HE

CJ_BIT

recovery device switch-on/off command

ao_HE

CJ_WORD

0.00

100.00

modulating rotary recovery device switch-on/off command


[%]

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

enable functioning of the macroblock:


0 function disabled
1 function enabled
If nothing is connected to the default input, 1 is valid

device

CJ_BIT

indicates the status of the associated device:


0 off
1 functioning

enableHourAlarm

CJ_BIT

enables the alarms relative to the operating hours


of the 2 pumps

limitHoursAlarm

CJ_DWORD

99999

operating hours maximum limit, exceeding which


the alarm is triggered

Parameters/Internal Status
Parameter

Type

Minimum

Maximum

Default

Description

hoursCntDevice

CJ_DWORD

99999

number of operating hours of the


associated device

EIO0000000538 07/2014

457

AHU AFBs

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

alarmHourDevice

CJ_BIT

set operating hours exceeded alarm

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

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid

clockRTC

CJ_DATETIME

system clock for scheduler


control

alarmRTC

CJ_BIT

if there is a clock alarm


(alarmRTC = 1) the scheduler
does not function, the offset
output goes back to value of
0.0

dayA_enTZ_1

CJ_BIT

enabling of the first time band


for the type of day
workingDayA(1)

dayA_OffsetSP_1

CJ_SHORT

-58.0

302.0

-10.0

summer offset in the first time


band for the type of day
workingDayA(1)

dayA_enTZ_2

CJ_BIT

enabling of the second time


band for the type of day
workingDayA(1)

dayA_OffsetSP_2

CJ_SHORT

-58.0

302.0

-10.0

summer offset in the second


time band for the type of day
workingDayA(1)

dayB_enTZ_1

CJ_BIT

enabling of the first time band


for the type of day
workingDayB(2)

dayB_OffsetSP_1

CJ_SHORT

-58.0

302.0

-10.0

summer offset in the first time


band for the type of day
workingDayB(2)

dayB_enTZ_2

CJ_BIT

enabling of the second time


band for the type of day
workingDayB(2)

dayB_OffsetSP_2

CJ_SHORT

-58.0

302.0

-10.0

summer offset in the second


time band for the type of day
workingDayB(2)

* undefined until input is connected.

460

EIO0000000538 07/2014

AHU AFBs

Internal Parameters/Status
Parameter

Type

Minimum

Maximum

Default

Description

typeDay_Sunday

CJ_BYTE

type of day for Sunday:


0 not Workingday
1 workingDayA
2 workingDayB

typeDay_Monday

CJ_BYTE

type of day for Monday:


0 not Workingday
1 workingDayA
2 workingDayB

typeDay_Tuesday

CJ_BYTE

type of day for Tuesday:


0 not Workingday
1 workingDayA
2 workingDayB

typeDay_Wednesday

CJ_BYTE

type of day for Wednesday:


0 not Workingday
1 workingDayA
2 workingDayB

typeDay_Thursday

CJ_BYTE

type of day for Thursday:


0 not Workingday
1 workingDayA
2 workingDayB

typeDay_Friday

CJ_BYTE

type of day for Friday:


0 not Workingday
1 workingDayA
2 workingDayB

typeDay_Saturday

CJ_BYTE

type of day for Saturday:


0 not Workingday
1 workingDayA
2 workingDayB

dayA_StartTZ_1

CJ_TIME

0:00:00

23:59:59

8:00:00

start of the first time band for the


type of day workingDayA(1)

dayA_EndTZ_1

CJ_TIME

0:00:00

23:59:59

17:00:00

end of the first time band for the


type of day workingDayA(1)

dayA_StartTZ_2

CJ_TIME

0:00:00

23:59:59

18:00:00

start of the secod time band for


the type of day workingDayA(1)

dayA_EndTZ_2

CJ_TIME

0:00:00

23:59:59

21:00:00

end of the second time band for


the type of day workingDayA(1)

dayB_StartTZ_1

CJ_TIME

0:00:00

23:59:59

8:00:00

start of the first time band for the


type of day workingDayB(2)

dayB_EndTZ_1

CJ_TIME

0:00:00

23:59:59

17:00:00

end of the first time band for the


type of day workingDayB(2)

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

start of the secod time band for


the type of day workingDayB(2)

dayB_EndTZ_2

CJ_TIME

0:00:00

23:59:59

21:00:00

end of the second time band for


the type of day workingDayB(2)

* undefined until input is connected.

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

dayActive

CJ_BYTE

actual day of the week [0: Sunday... 6: Saturday]

typeDayActive

CJ_BYTE

type of currrent day:


0 not Workingday
1 workingDayA
2 workingDayB

offsetSP

CJ_SHORT

-58.0

302.0

offset at the set point calculated on the basis of the


scheduler status

timeZoneActive

CJ_BIT

indicates if it is a set time band:


0 no time band configured
1 in configured time band

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

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the default
input, 1 is valid

dayProbeAlarm

CJ_BYTE

240

time (in seconds) for signalling the


probe detected error alarms

alarm1_16

CJ_WORD

65535

alarms 1...16 packed in a WORD:


bit1= alarm 1, bit16 = alarm 16

alarm17_32

CJ_WORD

65535

alarms 17.0.32 packed in a WORD:


bit1 = alarm 17, bit16 = alarm 32

alarm33_48

CJ_WORD

65535

alarms 33.0.48 packed in a WORD:


bit1 = alarm 33, bit16 = alarm 48

alarm49_64

CJ_WORD

65535

Alarms 49.0.64 packed in a WORD:


bit1 = alarm 49, bit16 = alarm 64

alarm65_80

CJ_WORD

65535

Alarms 65.0.80 packed in a WORD:


bit1 = alarm 65, bit16 = alarm 80

alarm81_96

CJ_WORD

65535

alarms 81.0.96 packed in a WORD:


bit1 = alarm 81, bit16 = alarm 96

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

event for the reset of the structure

evRequestAlarm

CJ_BIT

event to request the first/successive


active alarm

* undefined until input is connected.

464

EIO0000000538 07/2014

AHU AFBs

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

activeAlarmIndex

CJ_BYTE

100

index of the alarm currently under examination; if


activeAlarmIndex = 0, there are no active
alarms

numActiveAlarm

CJ_BYTE

100

number of alarms currently active

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

enable functioning of the macroblock:


0 function disabled
1 function enabled
If nothing is connected to the default input, 1 is
valid

DI_Alarm

CJ_BIT

digital input for indicating alarm:


0 no alarm
1 alarm present

* undefined until input is connected.

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

alarmStatus

CJ_BIT

status of the alarm:


0 alarm not active
1 alarm active

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

enable functioning of the macroblock:


0 function disabled
1 function enabled
If nothing is connected to the default input, 1
is valid

delayAlarm

CJ_WORD

999

time (in seconds) of alarm by-pass

DI_Alarm

CJ_BIT

digital input for indicating alarm:


0 no alarm
1 alarm present

Minimum

Maximum

* undefined until input is connected.

Output Pin Description


Output

Type

Description

enable

CJ_BIT

status of the enable input

alarmStatus

CJ_BIT

status of the alarm:


0 alarm not active
1 alarm active

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

enable functioning of the macroblock:


0 function disabled
1 function enabled

delayAlarm

CJ_WORD

999

time (in seconds) of alarm by-pass

restoreType

CJ_BIT

type of alarm reset:


0 automatic reset
1 manual reset

DI_Alarm

CJ_BIT

digital input for indicating alarm:


0 no alarm
1 alarm present

resetAlarm

CJ_BIT

alarm input manual reset; when passing from the 0


value to 1, if the alarm conditions have returned, the
alarm is reset (only if restoreType = 1)

If nothing is connected to the default input, 1 is valid

* undefined until input is connected.

468

EIO0000000538 07/2014

AHU AFBs

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

alarmStatus

CJ_BIT

status of the alarm:


0 alarm not active
1 alarm active

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

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the default
input, 1 is valid

evReset

CJ_BIT

event for the reset of the alarm

actualStatus

CJ_WORD

65535

generic comparison status for the


reset of the alarm

myStatus

CJ_WORD

65535

status of the relative alarm for the


reset

* undefined until input is connected.

470

EIO0000000538 07/2014

AHU AFBs

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

reset

CJ_BIT

consent on manual reset of the alarm. When it equals to 1, it


indicates that reset of the relative alarm has been requested.

EIO0000000538 07/2014

471

AHU AFBs

Differential Pressure control


Function Block Diagram

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

enable functioning of the


macroblock:
0 function disabled
1 function enabled

fan

CJ_BIT

describes the status of the fans:


0 OFF
1 ON

startupDelay

CJ_WORD

999

delay (in seconds) of differential


pressure switch alarm signal from
unit switch-on. (See T1 graphics).

runningDelay

CJ_WORD

999

delay (in seconds) of differential


pressure switch alarm signal during
normal functioning. (See T2
graphics).

EIO0000000538 07/2014

473

AHU AFBs

Input

Type

Minimum

Maximum

Default

Description

restoreType

CJ_BIT

type of alarm reset:


0 automatic reset
1 manual reset

DI_Filter

CJ_BIT

digital input for indicating differential


pressure:
0 no differential pressure
1 differential pressure present

resetAlarm

CJ_BIT

alarm input manual reset when


passing from the value 0 to 1. If the
alarm conditions persist, the alarm
will not be able to be reset.

* undefined until input is connected.

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

alarm

CJ_BIT

status of the alarm:


0 no alarm
1 alarm active

474

EIO0000000538 07/2014

SoHVAC
Chiller AFBs
EIO0000000538 07/2014

Chapter 6
Chiller Application Program Function Blocks

Chiller Application Program Function Blocks


Overview
This chapter describes the SoHVAC chiller application program function blocks.
What Is in This Chapter?
This chapter contains the following topics:
Topic

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

activate the evKeyOnOff event. 1 activate the evKeyOnOff event. 1


indicates that event is active. In case the
indicates that event is active. In
machine is on, it will be switched off.
case the machine is off, it will be
switched on.

Digital input

enByDI

switch-on is allowed if the value of


the on/off digital contact is 1

the unit switches off if the value of the


on/off digital contact is 0

Supervisor

enBySup

switch-on is allowed if the


supervisor status is set at 1

the unit switches off if the supervisor


status is set at 0

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

the unit goes to off status, caused by alarms.


In order to use this function, all alarms must be connected (eventually in OR)
for which the unit must be switched-off. If the onAlarms input always remains
at 0, the off status from alarm can never be reached.

Automatic
change-over

onChangeMode

can only be reached with machines in on mode. This state automatically


makes the unit switch-off and on for summer/winter functioning mode
changeover.

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

enabling on/off status from key:


0 disabled
1 enabled

evKeyOnOff

CJ_BIT

switch-on/off event from key:


switch-on request if passing from 0
to 1
switch-off request if passing from 1
to 0

478

EIO0000000538 07/2014

Chiller AFBs

Input

Type

Minimum

Maximum

Default

Description

enByDI

CJ_BIT

enabling on/off status from digital


input:
0 disabled
1 enabled

statusDI

CJ_BIT

status of the digital input for on/off


from digital contact:
0 contact open, switch-off request
from DI
1 contact closed, switch-on request
from DI
The status interferes in on/off
management only if the respective
enabling parameter is configured.

enBySup

CJ_BIT

enabling on/off status from supervisor:


0 disabled
1 enabled

statusSup

CJ_BIT

supervisor status for on/off from


supervisor:
0 status not confirmed, switch-off
request from supervisor
1 status confirmed, switch-on
request from supervisor
The status interferes in on/off
management only if the respective
enabling parameter is configured.

enBySchedule

CJ_BIT

enabling on/off status from schedule


timer:
0 disabled
1 enabled

statusSchedule

CJ_BIT

status for on/off from schedule timer:


0 status not confirmed, switch-off
request
1 status confirmed, switch-on
request
The status interferes in on/off
management only if the respective
enabling parameter is configured.

onAlarms

CJ_BIT

status for on/off from alarm:


0 no action
1 activates on/off caused by block
alarms
Keep the input at 0 if this function is
not to be used.

EIO0000000538 07/2014

479

Chiller AFBs

Input

Type

Minimum

Maximum

Default

Description

onChangeMode

CJ_BIT

status for automatic on/off from


change-over:
0 no action
1 activates automatic on/off caused
by the summer/winter functioning
mode changeover
Keep the input at 0 if this function is
not to be used.

pumpDone

CJ_BIT

functioning consent of the circulation


pump (used for switch over of the
functioning mode)

rtcFault

CJ_BIT

indicates a clock malfunctioning status


or that the clock is discharged and
must be set. Keep the input at 0 if this
function is not to be used

rtcDone

CJ_BIT

event for releasing the status of the


fan caused by discharged RTC; when
the unit is in off status from discharged
RTC and this input passes from 0 to 1,
the unit passes to the switch-on status
(if allowed)

Output Pin Description


Output

Type

Minimum

Maximum

Description

unitStatus

CJ_BYTE

describes the status of the unit:


0 off status from key
1 off status from digital input
2 off status from supervisor
3 off status from schedule timer
4 off status from alarm
5 off status from RTC
6 off status for functioning mode change-over
7 off status for switch-on stand-by after functioning
mode change-over
8 on status

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on

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

enable functioning of the


macroblock:
0 function disabled
1 function enabled

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on
Flow switch management starts
when the input becomes 1.

startupDelay

CJ_WORD

999

delay (in seconds) of flow switch


alarm signal from unit switch-on
(see T1 graphics)

runningDelay

CJ_WORD

999

delay (in seconds) of flow switch


alarm signal during normal
functioning (see T2 graphics)

pumpCountOff

CJ_WORD

999

circulation pump block activation


delay (in seconds) due to lack of
flow

TimePumpLowWater

CJ_WORD

999

pumps functioning time with low


quantity of water (flow alarm)

DI_Flow

CJ_BIT

digital input for indicating flow:


0 no flow
1 flow present

maxEvHour

CJ_BYTE

10

number of hourly events after


which the alarm requires manual
reset

resetAlarm

CJ_BIT

alarm input manual reset; when


passing from the 0 value to 1, if the
alarm conditions have returned,
the alarm is reset

* undefined until input is connected

482

EIO0000000538 07/2014

Chiller AFBs

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

Alarm

CJ_BIT

status of the flow switch alarm:


0 correct flow, no alarm
1 no flow, alarm active

blockFlow

CJ_BIT

circulation pump block request:


0 correct flow, no block
1 no flow for a long time, circulation pump block
activation

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

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid.

CJ_BIT

numPumps

CJ_BYTE

pumps number

stopOnDefrost

CJ_BIT

blocks the pump during


defrosting

regulationType

CJ_BYTE

type of pump regulation:


0 continuous
1 from thermostat
2 cyclical

rotPumpTime

CJ_BYTE

240

difference (in hours) in rotation


between the 2 pumps requests

delaySwitchOnComp

CJ_WORD

999

compressors activation delay


(in seconds) from pump startup

delaySwitchOffPump

CJ_WORD

999

pump switch-off delay

unitOnOff

486

unit on/off status:


0 unit off
1 unit on

EIO0000000538 07/2014

Chiller AFBs

Input

Type

Minimum

Maximum

Default

Description

cycleTimePumpOn

CJ_WORD

999

120

pump switch-on time in cyclical


regulation

cycleTimePumpOff

CJ_WORD

999

120

pump switch-off time in cyclical


regulation

requestComp

CJ_BIT

request for thermostatic


regulation at the compressors

blockPump

CJ_BIT

generic alarm input for pumps


block

onDefrost_C1

CJ_BIT

circuit 1 defrosting state:


0 not active
1 circuit in defrosting

onDefrost_C2

CJ_BIT

circuit 2 defrosting state:


0 not active
1 circuit in defrosting

alarmPump1

CJ_BIT

pump 1 thermal switch alarm

alarmPump2

CJ_BIT

pump 2 thermal switch alarm

hoursP1

CJ_DWORD

99999

pump 1 functioning hours

hoursP2

CJ_DWORD

99999

pump 2 functioning hours

* undefined until input is connected

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

pumpDone

CJ_BIT

pump consent thermostatic regulation

pumpCompCount

CJ_WORD

999

switch-on delay timer (in seconds) of the


compressors from pump switch-on. The pumps
start when it becomes equal to 1.

pumpCountOff

CJ_WORD

999

time (in seconds) between switch-off of the pump


due to a switch-off request. The pump switches off
when it becomes equal to 0.

pump1

CJ_BIT

pump 1 control

statusPump1

CJ_BYTE

functioning status of pump 1:


0 disabled
1 off
2 on
3 in thermal switch alarm

pump2

CJ_BIT

pump 2 control

EIO0000000538 07/2014

487

Chiller AFBs

Output

Type

Minimum

Maximum

Description

statusPump2

CJ_BYTE

functioning status of pump 2:


0 disabled
1 off
2 on
3 in thermal switch alarm

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

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the default
input, 1 is valid.

numPumps

CJ_BYTE

pumps number
The alarm of the second pump is
enabled when numPumps = 2.

restoreType

CJ_BIT

type of alarm reset:


0 automatic reset
1 manual reset

EIO0000000538 07/2014

489

Chiller AFBs

Input

Type

Minimum

Maximum

Default

Description

DI_AlarmPump1

CJ_BIT

digital input for indicating the alarm of


pump 1:
0 no alarm
1 alarm present

resetAlarmPump1

CJ_BIT

pump 1 thermal switch alarm input


manual reset; when passing from the
0 value to 1, if the alarm conditions
have returned, the alarm is reset
(only if restoreType = 1)

DI_AlarmPump2

CJ_BIT

digital input for indicating the alarm of


pump 2:
0 no alarm
1 alarm present

resetAlarmPump2

CJ_BIT

pump 2 thermal switch alarm input


manual reset; when passing from the
0 value to 1, if the alarm conditions
have returned, the alarm is reset.
(only if restoreType = 1)

Minimum

Maximum

Description

* undefined until input is connected

Output Pin Description


Output

Type

enable

CJ_BIT

status of the enable input

alarmPump1

CJ_BIT

circulation pump 1 thermal switch alarm status:


0 alarm not active
1 alarm active

alarmPump2

CJ_BIT

circulation pump 2 thermal switch alarm status:


0 alarm not active
1 alarm active

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

summer functioning mode

Heat Pump - Heating

winter functioning mode

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.

the supervision protocol (function enabled by enBySup input)


Setting: connect the statusSup input with the command for mode change sent by the
supervision protocol.

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.

NOTE: Switch over is disabled during defrosting.


Input Pin Description
Input

Type

Minimum

Maximum

Default

Description

unitStatus

CJ_BYTE

describes the status of the unit:


0 off status from key
1 off status from digital input
2 off status from supervisor
3 off status from schedule timer
4 off status from alarm
5 off status from RTC
6 off status for functioning mode
change-over
7 off status for switch-on stand-by
after functioning mode changeover
8 on status

enByDI

CJ_BIT

enabling of mode change from digital


input:
0 disabled
1 enabled

492

EIO0000000538 07/2014

Chiller AFBs

Input

Type

Minimum

Maximum

Default

Description

statusDI

CJ_BIT

state of the digital input for mode


change from digital input:
0 winter functioning mode
1 summer functioning mode
The status interferes with
management only if the respective
enabling parameter is configured.

enBySup

CJ_BIT

enabling of supervisor mode change:


0 disabled
1 enabled

statusSup

CJ_BIT

supervisor status for mode


changeover from supervisor:
0 winter functioning mode
1 summer functioning mode
The status interferes with
management only if the respective
enabling parameter is configured.

enByChangeOver

CJ_BIT

enabling mode changeover from


changeover on outside temperature:
0 disabled
1 enabled

tempExternal

CJ_ANALOG

outside air temperature probe [ C].

setToHeating

CJ_SHORT

-58.0

302.0

20.0

set point on the external temperature


for changeover to winter functioning
mode [ C].

setToCooling

CJ_SHORT

-58.0

302.0

10.0

set point on the outside temperature


for changeover to summer
functioning mode [ C].

onDefrost_C1

CJ_BIT

circuit 1 defrosting state:


0 not active
1 circuit in defrosting

onDefrost_C2

CJ_BIT

circuit 2 defrosting state:


0 not active
1 circuit in defrosting

* undefined until input is connected

EIO0000000538 07/2014

493

Chiller AFBs

Internal Parameters/Status
Parameter

Type

Minimum

Maximum

Default

Description

MOdE

CJ_BIT

unit functioning mode, can be


modified from keyboard
The parameter is always updated
automatically when the functioning
mode changes due to mode
changeover from the other
procedures.

Output Pin Description


Output

Type

Minimum

Maximum

Description

onChangeMode

CJ_BIT

when equal to 1, it indicates that a functioning mode


changeover is in progress

mode

CJ_BIT

unit current functioning mode:


0 summer mode (chiller)
1 winter mode (heat pump)

valve_C1

CJ_BIT

command for the reverse valve of circuit 1

valve_C2

CJ_BIT

command for the reverse valve of circuit 2

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

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid.

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on

numCircuit

CJ_BYTE

number of circuits configured

numCompCirc

CJ_BYTE

number of compressors set per


circuit (number of compressors
must be the same on each of the
2 circuits)

numStepsAvail

CJ_BYTE

number of steps that can be used


(the compressors functioning in
manual mode could be removed)

mode

CJ_BIT

current functioning mode:


0 summer mode (chiller)
1 winter mode (heat pump)

setCooling

CJ_SHORT

-58.0

302.0

summer set point for functioning


in summer mode [ C]

setHeating

CJ_SHORT

-58.0

302.0

winter set point for functioning in


winter mode [ C]

zone

CJ_SHORT

0.0

50.0

neutral zone value [ C]

delayOutZone

CJ_WORD

999

999

stand-by time (in seconds) out of


the neutral zone before
intervention on switch-on or
switch-off of a further step

enAdaptiveZone

CJ_BIT

enabling of the self-adapting


function of the neutral zone:
0 disabled
1 enabled

adaptiveZone_Min

CJ_SHORT

0.0

50.0

1.0

minimum value that the neutral


zone can assume when the selfadapting function is used
(enAdaptiveZone = 1) [ C]

adaptiveZone_Max

CJ_SHORT

0.0

50.0

5.0

maximum value that the neutral


zone can assume when the selfadapting function is used
(enAdaptiveZone = 1) [ C]

EIO0000000538 07/2014

497

Chiller AFBs

Input

Type

Minimum

Maximum

Default

Description

tempOut_C1

CJ_ANALOG

temperature probe of the water at


output of circuit 1 [ C]

blockComp_C1

CJ_BIT

block alarms of the compressors


in circuit 1

tempOut_C2

CJ_ANALOG

temperature probe of the water at


output of circuit 2 [ C]

blockComp_C2

CJ_BIT

block alarms of the compressors


in circuit 2

numEvHour

CJ_BYTE

15

number of switch-ons per hour of


every compressor over which the
compressor is stopped

maxNumEvHour

CJ_BYTE

15

maximum number of compressor


switch-ons in the hour

* undefined until input is connected

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

reqSteps

CJ_BYTE

number of steps requested by the regulation in


neutral zone

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

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid.

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on

numStepsAvail

CJ_BYTE

number of steps that can be used


(the compressors functioning in
manual mode could be removed)

mode

CJ_BIT

current functioning mode:


0 summer mode (chiller)
1 winter mode (heat pump)

setCooling

CJ_SHORT

-58.0

302.0

summer set point for functioning


in summer mode [ C]

setHeating

CJ_SHORT

-58.0

302.0

winter set point for functioning in


winter mode [ C]

proportionalBand

CJ_SHORT

2.0

70.0

proportional band value [ C]

tempIn

CJ_ANALOG

input water temperature probe


[ C]

* undefined until input is connected

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

reqSteps

CJ_BYTE

number of steps requested by the lateral band


regulation

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

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the default
input, 1 is valid.

CJ_BYTE

total number of compressors. The


alarms on the compressors are
enabled if the compressors are
present.

delayAlarm

CJ_WORD

999

time (in seconds) of alarm by-pass

restoreType

CJ_BIT

type of alarm reset:


0 automatic reset
1 manual reset

DI_AlarmComp1

CJ_BIT

digital input for indicating the thermal


switch alarm of compressor 1:
0 no alarm
1 alarm present

resetAlarmComp1

CJ_BIT

compressor 1 thermal switch alarm


input manual reset; when passing
from the 0 value to 1, if the alarm
conditions have returned, the alarm
is reset (only if restoreType = 1)

DI_AlarmComp2

CJ_BIT

digital input for indicating the thermal


switch alarm of compressor 2:
0 no alarm
1 alarm present

resetAlarmComp2

CJ_BIT

compressor 2 thermal switch alarm


input manual reset; when passing
from the 0 value to 1, if the alarm
conditions have returned, the alarm
is reset (only if restoreType = 1)

DI_AlarmComp3

CJ_BIT

digital input for indicating the thermal


switch alarm of compressor 3:
0 no alarm
1 alarm present

resetAlarmComp3

CJ_BIT

compressor 3 thermal switch alarm


input manual reset; when passing
from the 0 value to 1, if the alarm
conditions have returned, the alarm
is reset (only if restoreType = 1)

numComp

EIO0000000538 07/2014

503

Chiller AFBs

Input

Type

Minimum

Maximum

Default

Description

DI_AlarmComp4

CJ_BIT

digital input for indicating the thermal


switch alarm of compressor 4:
0 no alarm
1 alarm present

resetAlarmComp4

CJ_BIT

compressor 4 thermal switch alarm


input manual reset; when passing
from the 0 value to 1, if the alarm
conditions have returned, the alarm
is reset (only if restoreType = 1)

* undefined until input is connected

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

alarmComp1

CJ_BIT

state of compressor 1 thermal switch alarm:


0 alarm not active
1 alarm active

alarmComp2

CJ_BIT

state of compressor 2 thermal switch alarm:


0 alarm not active
1 alarm active

alarmComp3

CJ_BIT

state of compressor 3 thermal switch alarm:


0 alarm not active
1 alarm active

alarmComp4

CJ_BIT

state of compressor 4 thermal switch alarm:


0 alarm not active
1 alarm active

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

3. FIFO + functioning hours


This rotation privileges the comparison of the functioning hours of various compressors. On
switch-on, the one with least functioning hours is privileged, while on switch-off, the one with
most hours is privileged.
If a choice has to be made between compressors with the same amount of functioning hours, a
FIFO rotation comes into practice in a way to guarantee rotation (see previous FIFO case).
4. LIFO + functioning hours
This rotation privileges the comparison of the functioning hours of various compressors. On
switch-on, the one with least functioning hours is privileged, while on switch-off, the one with
most hours is privileged.
If a choice has to be made between compressors with the same number of functioning hours, a
classical LIFO rotation comes into practice.
Method of Distributing the Steps Per Circuit
For twin circuit machines (numCircuit = 2), it is possible to decide (requestType input) how to
distribute the steps between the 2 circuits that are requested by the heat regulation.
0: balancing the circuits the system alternately requests a step per circuit in a way to balance the
loads between the 2 circuits, except alarms.
1: circuit saturation the system requests all the steps available for the first circuit and then all of
those for the second circuit, in a way to have a circuit always at full load, except for alarms.
Using the priorityCircuit input, it is possible to set which circuit has the priority in a way to
satisfy that circuit rather than the other.
If a defrosting phase is active in the circuit (onDefrost_C1 = 1, onDefrost_C2 = 1), it requests
the maximum steps available. If a dripping phase is in progress (onDrippingt_C1 = 1,
onDrippingt_C2 = 1), it requests switch-off of all compressors in the circuit.
If the input limit_BlockComp = 1, the compressors switches off due to the functioning limit
caused by the low external temperature.
If there are compressor alarms, generic block alarms of the forceShutDown input = 1, immediate
switch-off of the compressors is requested.
Protection Times
These times are used to protect the mechanical means from the various peaks to which they are
subjected:
minOnDelay once activated, the compressor remains on for this period of time before it can be
switched off
minOffDelay minimum time that must pass from last switch-off before the compressor can be
switched back to on again
minOnOnDelay establishes the minimum time that must pass between 2 switch-ons of the same
compressor
minOnOtherDelay establishes the minimum time that must pass between switch-on of one
compressor and the next

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

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid.

CJ_BIT

unit on/off status:


0 unit off
1 unit on

numCircuit

CJ_BYTE

number of circuits configured

numCompCirc

CJ_BYTE

number of compressors set per


circuit (the number of
compressors must be the same
on each of the 2 circuits.)

forceShutDown

CJ_BIT

when =1, it indicates that the


forced switch-off of the
compressors is active. It switches
the compressors off immediately.

regulationSteps

CJ_BYTE

number of steps enabled for


regulation

unitOnOff

508

EIO0000000538 07/2014

Chiller AFBs

Input

Type

Minimum

Maximum

Default

Description

requestType

CJ_BIT

type of step distribution on the


circuits:
0 circuits balancing
1 circuit saturation

priorityCircuit

CJ_BIT

selects which of the 2 circuits has


priority (only if numCircuit = 2):
0 circuit 1 priority
1 circuit 2 priority

limit_BlockComp

CJ_BIT

when =1, it indicates that the heat


pump (the compressors) must
switch-off due to the functioning
limit function

errorProbe_C1

CJ_BIT

when =1, it indicates that the


regulation probe of circuit 1 is in
inoperative condition

errorProbe_C2

CJ_BIT

when =1, it indicates that the


regulation probe of circuit 2 is in
inoperative condition

compOnErrorProbe

CJ_BYTE

indicates how many compressors


to switch-on for circuit in probe
detected error conditions

blockComp_C1

CJ_BIT

block alarms of the compressors


in circuit 1

onDefrost_C1

CJ_BIT

indicates that the defrosting


phase in circuit 1 is active

onDripping_C1

CJ_BIT

indicates that the dripping phase


in circuit 1 is active

blockComp_C2

CJ_BIT

block alarms of the compressors


in circuit 2

onDefrost_C2

CJ_BIT

indicates that the defrosting


phase in circuit 2 is active

onDripping_C2

CJ_BIT

indicates that the dripping phase


in circuit 2 is active

rotationType

CJ_BYTE

type of rotation of the


compressors:
0 FIFO
1 LIFO
2 timed FIFO
3 timed LIFO

pumpDone

CJ_BIT

pump consent thermostatic


regulation

EIO0000000538 07/2014

509

Chiller AFBs

Input

Type

Minimum

Maximum

Default

Description

pumpCompCount

CJ_WORD

999

switch-on delay timer (in seconds)


of the compressors from pump
switch-on. The pumps may start
when it becomes equal to 1.

minOnDelay

CJ_WORD

999

minimum switch-on time (in


seconds)

minOffDelay

CJ_WORD

999

minimum switch-off time (in


seconds)

minOnOnDelay

CJ_WORD

999

time (in seconds) between 2


consecutive switch-ons of the
same compressor

minOnOtherDelay

CJ_WORD

999

time (in seconds) between switchons of different compressors

minOffOtherDelay

CJ_WORD

999

time (in seconds) between switchoffs of different compressors

numEvHour

CJ_BYTE

14

number of switch-ons per hour of


every compressor over which the
compressor is stopped

enManualComp1

CJ_BIT

enabling of manual functioning


mode of the compressor 1:
0 automatic functioning mode
1 manual functioning mode

hourComp1

CJ_DWORD

99999

number of functioning hours of


compressor 1

alarmComp1

CJ_BIT

Compressor 1 thermal switch


alarm

enManualComp2

CJ_BIT

enabling of manual functioning


mode of the compressor 2:
0 automatic functioning mode
1 manual functioning mode

hourComp2

CJ_DWORD

99999

number of functioning hours of


compressor 2

alarmComp2

CJ_BIT

compressor 2 thermal switch


alarm

enManualComp3

CJ_BIT

enabling of manual functioning


mode of the compressor 3:
0 automatic functioning mode
1 manual functioning mode

hourComp3

CJ_DWORD

99999

number of functioning hours of


compressor 3

alarmComp3

CJ_BIT

compressor 3 thermal switch


alarm

510

EIO0000000538 07/2014

Chiller AFBs

Input

Type

Minimum

Maximum

Default

Description

enManualComp4

CJ_BIT

enabling of manual functioning


mode of the compressor 4:
0 automatic functioning mode
1 manual functioning mode

hourComp4

CJ_DWORD

99999

number of functioning hours of


compressor 4

alarmComp4

CJ_BIT

compressor 4 thermal switch


alarm

* undefined until input is connected

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

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

maxNumEvHour

CJ_BYTE

15

maximum number of compressor switch-ons


in the hour

reqSteps_C1

CJ_BYTE

number of steps requested of circuit 1 by the


regulation

reqSteps_C2

CJ_BYTE

number of steps requested of circuit 2 by the


regulation

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

power requested of the compressors [%]

powerSupplied

CJ_BYTE

100

power supplied from the compressors [%]

numStepsAvail

CJ_BYTE

number of steps that can be used (the


compressors functioning in manual mode are
removed)

numStepsAvail_C1

CJ_BYTE

number of circuit 1 steps that can be used (the


compressors functioning in manual mode are
removed)

numStepsAvail_C2

CJ_BYTE

number of circuit 2 steps that can be used (the


compressors functioning in manual mode are
removed)

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

Only Timed Pump-Down


On switch-on of the first circuit in the compressor, the solenoid valve is opened at the same time.
When there is the last switch-off request of the compressors, the solenoid valve positioned
upstream from the relative evaporator, remains open in a way that the last compressor stays on
for a time fixed by the delayPumpDown input. After the delay, the valve subsequently closes.
In the event of an alarm, the procedure ignores the compressors switch-off delay in pump-down
mode.
Pump-Down to Relative Threshold
If low pressure transducers are available, it is possible to perform the pump-down procedure by
leaving the last compressor in the circuit on only for the time necessary to empty a portion of
refrigerant. When the call ceases for the last compressor switched-on on the evaporator of interest,
the evaporation pressure is memorized, and the liquid electrovalve is disabled. When the value of
the evaporation pressure has dropped below the input value at diffPumpDown, the compressor
switches off.

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

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the default
input, 1 is valid.

pumpDownType

CJ_BIT

enables the pump-down procedure:


0 disabled
1 only timed pump-down
2 pump-down to relative threshold

delayPumpDown

CJ_WORD

999

delay (in seconds) before switch-off


of the last compressor of the circuit
due to pump-down

diffPumpDown

CJ_SHORT

300.0

1.5

evaporation pressure differential due


to switch-off in pump-down mode
[bar]

numCompCirc

CJ_BYTE

number of compressors set per


circuit (the number of compressors
must be the same on each of the 2
circuits)

pressEvap_C1

CJ_ANALOG

circuit 1 evaporation pressure probe


[bar]

pressEvap_C2

CJ_ANALOG

circuit 2 evaporation pressure probe


[bar]

comp1

CJ_BIT

compressor 1 switch-off/on request

comp2

CJ_BIT

compressor 2 switch-off/on request

comp3

CJ_BIT

compressor 3 switch-off/on request

comp4

CJ_BIT

compressor 4 switch-off/on request

alarmComp1

CJ_BIT

compressor 1 block alarms

alarmComp2

CJ_BIT

compressor 2 block alarms

alarmComp3

CJ_BIT

compressor 3 block alarms

alarmComp4

CJ_BIT

compressor 4 block alarms

* undefined until input is connected

EIO0000000538 07/2014

515

Chiller AFBs

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

compOut1

CJ_BIT

compressor 1 switch-off/on command

compOut2

CJ_BIT

compressor 2 switch-off/on command

compOut3

CJ_BIT

compressor 3 switch-off/on command

compOut4

CJ_BIT

compressor 4 switch-off/on command

solenoidValve_C1

CJ_BIT

circuit 1 solenoid valve command

solenoidValve_C2

CJ_BIT

circuit 2 solenoid valve command

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

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid.

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on
The flow switch management
starts when the input becomes
1.

numCircuit

CJ_BYTE

number of circuits configured


The anti-freeze of the second
circuit is enabled if
numCircuit = 2.

enSingleEvap

CJ_BIT

enabling unique evaporation:


0 disabled
1 enabled
If enabled, the circuit 2
evaporator is not controlled.

setPointHeater

CJ_SHORT

-58.0

302.0

set point for the activation of


anti-freeze heaters [ C]

diffHeater

CJ_SHORT

0.0

50.0

differential for the regulation of


the anti-freeze heaters [ C]

heaterOnErrorProbe

CJ_BIT

activates the anti-freeze


heaters when the relative probe
is in inoperative conditions:
0 not active
1 active

518

EIO0000000538 07/2014

Chiller AFBs

Input

Type

Minimum

Maximum

Default

Description

enAntiFreezeAlarm

CJ_BIT

enables the management of


the anti-freeze alarm:
0 disabled
1 enabled

setPointAlarm

CJ_SHORT

-58.0

302.0

3.0

set point for the detection of the


anti-freeze alarm [ C]

diffAlarm

CJ_SHORT

0.0

50.0

2.0

differential for the regulation of


the anti-freeze alarm [ C]

delayBlockPump

CJ_WORD

999

time (in seconds) for which the


blockPump output mains off
before passing to value 1 (that
indicates the necessity to block
the circulation pump)

tempOut_C1

CJ_ANALOG

temperature probe of the water


at output of circuit 1 [ C]

resetAlarm_C1

CJ_BIT

circuit 1 alarm input manual


reset; when passing from the 0
value to 1, if the alarm
conditions have returned, the
alarm is reset

tempOut_C2

CJ_ANALOG

temperature probe of the water


at output of circuit 2 [ C]

resetAlarm_C2

CJ_BIT

circuit 2 alarm input manual


reset; when passing from the 0
value to 1, if the alarm
conditions have returned, the
alarm is reset

* undefined until input is connected

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

heater_C1

CJ_BIT

circuit 1 anti-freeze heaters command

alarmAntiFreeze_C1

CJ_BIT

circuit 1 anti-freeze alarm

heater_C2

CJ_BIT

circuit 2 anti-freeze heaters command

alarmAntiFreeze_C2

CJ_BIT

circuit 2 anti-freeze alarm

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

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid.

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on

numCircuit

CJ_BYTE

number of circuits configured


The alarm of the second circuit
is enabled if numCircuit = 2.

numEvHourLP

CJ_BYTE

15

number of low pressure


alarms over which the reset
becomes manual

startUpCompDelay

CJ_WORD

999

by-pass time (in seconds)


from the start-up of the first
compressor for the detection
of the low pressure alarm

delayAlarmLPonStart

CJ_WORD

999

delay time (in seconds) due to


the detection of the low
pressure alarm on start-up
when a low pressure alarm
sub enters.

reqComp_C1

CJ_BYTE

number of steps requested by


the compressors regulation of
circuit 1

orComp_C1

CJ_BIT

circuit 1 compressors OR

DI_AlarmLP_C1

CJ_BIT

digital input for signalling the


low pressure alarm of circuit 1:
0 no alarm
1 alarm present

resetAlarmLP_C1

CJ_BIT

circuit 1 low pressure alarm


input manual reset; when
passing from the 0 value to 1,
if the alarm conditions have
returned, the alarm is reset
(only if restoreType = 1)

reqComp_C2

CJ_BYTE

number of steps requested by


the compressors regulation of
circuit 2

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

digital input for signalling the


low pressure alarm of circuit 2:
0 no alarm
1 alarm present

resetAlarmLP_C2

CJ_BIT

circuit 2 low pressure alarm


input manual reset; when
passing from the 0 value to 1,
if the alarm conditions have
returned, the alarm will be
reset (only if restoreType =
1)

Minimum

Maximum

* undefined until input is connected

Output Pin Description


Output

Type

Description

enable

CJ_BIT

status of the enable input

alarmLP_C1

CJ_BIT

circuit 1 low pressure alarm state:


0 alarm not present
1 alarm active

alarmLPStart_C1

CJ_BIT

circuit 1 start-up low pressure alarm state:


0 alarm not present
1 alarm active

alarmLP_C2

CJ_BIT

circuit 2 low pressure alarm state:


0 alarm not present
1 alarm active

alarmLPStart_C2

CJ_BIT

circuit 2 start-up low pressure alarm state:


0 alarm not present
1 alarm active

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

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the default
input, 1 is valid.

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on

numCircuit

CJ_BYTE

number of circuits configured


The alarm of the second circuit is
enabled if numCircuit = 2.

EIO0000000538 07/2014

523

Chiller AFBs

Input

Type

Minimum

Maximum

Default

Description

restoreType

CJ_BIT

type of alarm reset:


0 automatic reset
1 manual reset

DI_AlarmHP_C1

CJ_BIT

digital input for signalling the high


pressure alarm of circuit 1:
0 no alarm
1 alarm present

resetAlarmHP_C1

CJ_BIT

circuit 1 high pressure alarm input


manual reset; when passing from the
0 value to 1, if the alarm conditions
have returned, the alarm is reset
(only if restoreType = 1)

DI_AlarmHP_C2

CJ_BIT

digital input for signalling the high


pressure alarm of circuit 2:
0 no alarm
1 alarm present

resetAlarmHP_C2

CJ_BIT

circuit 2 high pressure alarm input


manual reset; when passing from the
0 value to 1, if the alarm conditions
have returned, the alarm is reset
(only if restoreType = 1)

* undefined until input is connected

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

alarmHP_C1

CJ_BIT

circuit 1 high pressure alarm state:


0 alarm not present
1 alarm active

alarmHP_C2

CJ_BIT

circuit 2 high pressure alarm state:


0 alarm not present
1 alarm active

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).

If the pressure probe is inactive, the relative alarm is disabled.


In the presence of low external air temperatures, the intake pressure could be lower than the
minimum pressure threshold and therefore prevent compressor start-up. In this situation it is
possible to activate (enLPLT = 1 input) a control that moves the alarm control threshold to a higher
temperature (setLPLT) for a certain period of time (timeLPLT) from the start-up of the first
compressor, however maintaining the safety conditions and pre-start control. This control is only
enabled in winter functioning mode (heat pump, mode = 1).
Low Pressure Alarm on Start-up
The low pressure start-up alarm 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 should disappear unless
there is a freon leak in the system.
On compressors 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.

526

EIO0000000538 07/2014

Chiller AFBs

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid.

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on

numCircuit

CJ_BYTE

number of circuits configured


The alarm of the second
circuit is enabled if
numCircuit = 2.

mode

CJ_BIT

current functioning mode:


0 summer mode (chiller)
1 winter mode (heat pump)

numEvHourLP

CJ_BYTE

15

number of low pressure


alarms over which the reset
becomes manual

startUpCompDelay

CJ_WORD

999

by-pass time (in seconds)


from the start-up of the first
compressor for the detection
of the low pressure alarm

delayAlarmLPonStart

CJ_WORD

999

delay time (in seconds) due to


the detection of the low
pressure alarm on start-up
when a low pressure alarm
sub enters.

setPointAlarmLP

CJ_SHORT

0.0

750.0

set point over which the low


pressure alarm from
transducer is tripped [bar]

diffAlarmLP

CJ_SHORT

0.0

300.0

differential for the regulation


of the low pressure alarm
from transducer [bar]

pressCond_C1

CJ_ANALOG

circuit 1 condensation
pressure probe [bar]

reqComp_C1

CJ_BYTE

number of steps requested by


the compressors regulation of
circuit 1

orComp_C1

CJ_BIT

circuit 1 compressors OR

EIO0000000538 07/2014

527

Chiller AFBs

Input

Type

Minimum

Maximum

Default

Description

resetAlarmLP_C1

CJ_BIT

circuit 1 low pressure alarm


input manual reset; when
passing from the 0 value to 1,
if the alarm conditions have
returned, the alarm is reset
(only if restoreType = 1)

pressCond_C2

CJ_ANALOG

circuit 2 condensation
pressure probe [bar]

reqComp_C2

CJ_BYTE

number of steps requested by


the compressors regulation of
circuit 2

orComp_C2

CJ_BIT

circuit 2 compressors OR

resetAlarmLP_C2

CJ_BIT

circuit 2 low pressure alarm


input manual reset; when
passing from the 0 value to 1,
if the alarm conditions have
returned, the alarm is reset
(only if restoreType = 1)

enLPLT

CJ_BIT

enabling of low pressure


alarm management at low
temperatures (mode = 1)

setPointLPLT

CJ_SHORT

0.0

750.0

1.0

low pressure alarm set-point


management time at low
temperatures (only if enLPLT
= 1 and mode = 1)

diffLPLT

CJ_SHORT

0.0

300.0

0.5

low pressure alarm regulation


differential at low
temperatures (only if enLPLT
= 1 and mode = 1)

timeLPLT

CJ_WORD

999

120

low pressure alarm


management time at low
temperatures (only if enLPLT
= 1 and mode = 1)

* undefined until input is connected

528

EIO0000000538 07/2014

Chiller AFBs

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

alarmLP_C1

CJ_BIT

circuit 1 low pressure alarm state:


0 alarm not active
1 alarm active

alarmLPStart_C1

CJ_BIT

circuit 1 start-up low pressure alarm state:


0 alarm not active
1 alarm active

alarmLP_C2

CJ_BIT

circuit 2 low pressure alarm state:


0 alarm not active
1 alarm active

alarmLPStart_C2

CJ_BIT

circuit 2 start-up low pressure alarm state:


0 alarm not active
1 alarm active

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.

If the pressure probe is inactive, the relative alarm is disabled.

530

EIO0000000538 07/2014

Chiller AFBs

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid.

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on

numCircuit

CJ_BYTE

number of circuits configured


The alarm of the second circuit is
enabled if numCircuit = 2.

restoreType

CJ_BIT

type of alarm reset:


0 automatic reset
1 manual reset

setPointAlarmHP

CJ_SHORT

0.0

750.0

set point over which the high


pressure alarm from transducer is
tripped [bar]

diffAlarmHP

CJ_SHORT

0.0

300.0

differential for the regulation of the


high pressure alarm from
transducer [bar]

pressCond_C1

CJ_ANALOG

circuit 1 condensation pressure


probe [bar]

resetAlarmHP_C1

CJ_BIT

circuit 1 high pressure alarm input


manual reset; when passing from
the 0 value to 1, if the alarm
conditions have returned, the alarm
is reset. (only if restoreType = 1)

pressCond_C2

CJ_ANALOG

circuit 2 condensation pressure


probe [bar]

resetAlarmHP_C2

CJ_BIT

circuit 2 high pressure alarm input


manual reset; when passing from
the 0 value to 1, if the alarm
conditions have returned, the alarm
is reset. (only if restoreType = 1)

* undefined until input is connected

EIO0000000538 07/2014

531

Chiller AFBs

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

alarmHP_C1

CJ_BIT

circuit 1 high pressure alarm state:


0 alarm not active
1 alarm active

alarmHP_C2

CJ_BIT

circuit 2 high pressure alarm state:


0 alarm not active
1 alarm active

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

Defrosting Cycle Compensation


With the decrease in external temperature, the content of water vapor in the air (responsible for the
formation of frost on the evaporating coil which in turn needs to be defrosted) decreases.
Therefore, it is convenient to increase the defrost activation delay depending on the decrease in
the external temperature to increase the average efficiency of the system. If the function is enabled
(enCompensation = 1 input), it activates starting from an initial external temperature set-point
(setStartTempExt) below which compensation starts with increase of the defrosting activation
delay, up to a maximum value (maxDelayDefrost) on reaching an external temperature final setpoint (setEndTempExt).

The function is disabled if the probe is inoperable.


Input Pin Description
Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to
the default input, 1 is valid.

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on

numCircuit

CJ_BYTE

number of circuits
configured

mode

CJ_BIT

current functioning mode:


0 summer mode (chiller)
1 winter mode (heat
pump)

setPointStartDefrost

CJ_SHORT

0.0

750.0

defrost start set point [bar]

setPointEndDefrost

CJ_SHORT

0.0

750.0

defrost end set point [bar]

EIO0000000538 07/2014

535

Chiller AFBs

Input

Type

Minimum

Maximum

Default

Description

delayDefrost

CJ_WORD

60

3600

defrosting start-up delay (in


seconds)

maxDefrostTime

CJ_WORD

10

999

maximum duration time (in


seconds) of defrosting

drippingTime

CJ_WORD

999

time (in seconds) of the


dripping phase

minTimeWaitPdc

CJ_WORD

999

restart time (in seconds)


before next defrosting

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

enabling the compensation


function of the defrosting
cycle

maxDelayDefrost

CJ_WORD

60

9600

3600

maximum start-up delay


time (in seconds) of
defrosting. Used only if
(enCompensation = 1)

setStartTempExt

CJ_SHORT

-58.0

302.0

5.0

initial set point on the


external temperature for the
compensation of the
defrosting cycle. Used only
if (enCompensation = 1).

setEndTempExt

CJ_SHORT

-58.0

302.0

0.0

final set point on the


external temperature for the
compensation of the
defrosting cycle. Used only
if (enCompensation = 1).

tempExternal

CJ_ANALOG

outside air temperature


probe [ C]. Used only if
(enCompensation = 1).

* undefined until input is connected

536

EIO0000000538 07/2014

Chiller AFBs

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

onDefrost_C1

CJ_BIT

indicates that the defrosting phase in circuit


1 is active

cntWaitDefrost_C1

CJ_WORD

999

residual time (in seconds) before defrosting


of circuit 1

cntOnDefrost_C1

CJ_WORD

999

residual time (in seconds) for defrosting


circuit 1

onDripping_C1

CJ_BIT

indicates that the dripping phase in circuit 1


is active

onDefrost_C2

CJ_BIT

indicates that the defrosting phase in circuit


2 is active

cntWaitDefrost_C2

CJ_WORD

999

residual time (in seconds) before defrosting


of circuit 2

cntOnDefrost_C2

CJ_WORD

999

residual time (in seconds) for defrosting


circuit 2

onDripping_C2

CJ_BIT

indicates that the dripping phase in circuit 2


is active

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

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the default
input, 1 is valid.

numCircuit

CJ_BYTE

number of circuits configured


The circuit 2 fan alarm is enabled if
numCircuit = 2.

delayAlarm

CJ_WORD

999

time (in seconds) of alarm by-pass

restoreType

CJ_BIT

type of alarm reset:


0 automatic reset
1 manual reset

538

EIO0000000538 07/2014

Chiller AFBs

Input

Type

Minimum

Maximum

Default

Description

DI_AlarmFan1

CJ_BIT

digital input for indicating the thermal


switch alarm of compressor 1:
0 no alarm
1 alarm present

resetAlarmFan1

CJ_BIT

fan 1 thermal switch alarm input


manual reset; when passing from the
0 value to 1, if the alarm conditions
have returned, the alarm is reset
(only if restoreType = 1)

DI_AlarmFan2

CJ_BIT

digital input for indicating the thermal


switch alarm of compressor 2:
0 no alarm
1 alarm present

resetAlarmFan2

CJ_BYTE

fan 2 thermal switch alarm input


manual reset; when passing from the
0 value to 1, if the alarm conditions
have returned, the alarm is reset
(only if restoreType = 1)

Minimum

Maximum

Description

* undefined until input is connected

Output Pin Description


Output

Type

enable

CJ_BIT

status of the enable input

alarmFan1

CJ_BIT

state of fan 1 thermal switch alarm:


0 alarm not active
1 alarm active

alarmFan2

CJ_BIT

state of fan 2 thermal switch alarm:


0 alarm not active
1 alarm active

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

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid.

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on

numCircuit

CJ_BYTE

number of circuits configured

mode

CJ_BIT

current functioning mode:


0 summer mode (chiller)
1 winter mode (heat pump)

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
If enabled, the circuit 2 fan is not
controlled

stopOnDefrost_C1

CJ_BIT

when = 1, it stops the fans of the


circuit in defrosting mode

valOnErrorProbe

CJ_BIT

fans value with relative probe in


inoperative conditions

minTimeStartOther

CJ_WORD

999

protection time (in seconds)


between fan start-up

minTimeStopOther

CJ_WORD

999

protection time (in seconds)


between fan switch-off

setPointHeating

CJ_SHORT

0.0

750.0

condensation set point in winter


mode [bar]

diffHeating

CJ_SHORT

300.0

PI proportional band in winter


mode [bar]

setPointCooling

CJ_SHORT

0.0

750.0

condensation set point in


summer mode [bar]

diffCooling

CJ_SHORT

300.0

PI proportional band in summer


mode [bar]

EIO0000000538 07/2014

543

Chiller AFBs

Input

Type

Minimum

Maximum

Default

Description

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

circuit 1 fan thermal switch


alarm, blocks the fan

blockFan_C1

CJ_BIT

block alarms of the fan in circuit


1

onDefrost_C1

CJ_BIT

indicates that the defrosting


phase in circuit 1 is active

pressCond_C1

CJ_ANALOG

circuit 1 condensation pressure


probe [bar]

forceManual_C1

CJ_BIT

circuit 1 fan forcing in manual


functioning mode

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

circuit 2 fan thermal switch


alarm, blocks the fan

blockFan_C2

CJ_BIT

block alarms of the fan in circuit


2

onDefrost_C2

CJ_BIT

indicates that the defrosting


phase in circuit 2 is active

pressCond_C2

CJ_ANALOG

circuit 2 condensation pressure


probe [bar]

forceManual_C2

CJ_BIT

circuit 2 fan forcing in manual


functioning mode

stopOnDefrost_C2

CJ_BIT

when =1, it stops the fans of the


circuit in defrosting mode

* undefined until input is connected

544

EIO0000000538 07/2014

Chiller AFBs

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

doFan_C1

CJ_BIT

circuit 1 condensation fan command [%]

statusFan_C1

CJ_BYTE

circuit 1 condensation fan 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

doFan_C2

CJ_BIT

circuit 2 condensation fan command [%]

statusFan_C2

CJ_BYTE

circuit 2 condensation fan 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

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

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to
the default input, 1 is valid.

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on

numCircuit

CJ_BYTE

number of circuits
configured

EIO0000000538 07/2014

549

Chiller AFBs

Input

Type

Minimum

Maximum

Default

Description

mode

CJ_BIT

current functioning mode:


0 summer mode (chiller)
1 winter mode (heat
pump)

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

fans value with relative


probe in inoperative
conditions

speedUpTime

CJ_WORD

999

speed-up time (in


seconds)

minTimeStartOther

CJ_WORD

999

protection time (in


seconds) between fan
start-up

minTimeStopOther

CJ_WORD

999

protection time (in


seconds) between fan
switch-off

enCutOff

CJ_BIT

enabling of cut-off
function:
0 disabled
1 enabled

diffCutOff

CJ_SHORT

0.0

300.0

2.0

cut-off differential [bar]

setPointHeating

CJ_SHORT

0.0

750.0

condensation set point in


winter mode [bar]

PI_Bp_Heating

CJ_SHORT

300.0

PI proportional band in
winter mode [bar]

PI_Ti_Heating

CJ_WORD

999

integral PI time (in


seconds) in winter
functioning mode

setPointCooling

CJ_SHORT

0.0

750.0

condensation set point in


summer mode [bar]

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

integral PI time (in


seconds) in summer
functioning mode

enForceMax

CJ_BIT

enabling forced regulation


at maximum speed

setPointForceHeating

CJ_SHORT

0.0

750.0

forcing set point at


maximum in winter mode
[bar]

diffForceHeating

CJ_SHORT

0.0

300.0

forcing differential at
maximum in winter mode
[bar]

setPointForceCooling

CJ_SHORT

0.0

750.0

forcing set point at


maximum in summer
mode [bar]

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

circuit 1 fan thermal switch


alarm, blocks the fan

blockFan_C1

CJ_BIT

block alarms of the fan in


circuit 1

onDefrost_C1

CJ_BIT

indicates that the


defrosting phase in circuit
1 is active

pressCond_C1

CJ_ANALOG

circuit 1 condensation
pressure probe [bar]

forceManual_C1

CJ_WORD

0.00

100.00

0.00

circuit 1 fan forcing in


manual functioning mode

stopOnDefrostC1

CJ_BIT

when =1 it stops the fans


of the circuit in defrosting
mode

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

circuit 2 fan thermal switch


alarm, blocks the fan

blockFan_C2

CJ_BIT

block alarms of the fan in


circuit 2

onDefrost_C2

CJ_BIT

indicates that the


defrosting phase in circuit
2 is active

pressCond_C2

CJ_ANALOG

circuit 2 condensation
pressure probe [bar]

forceManual_C2

CJ_WORD

0.00

100.00

0.00

circuit 2 fan forcing in


manual functioning mode

stopOnDefrost_C2

CJ_BIT

when = 1, it stops the fans


of the circuit in defrosting
mode

minOutFan

CJ_WORD

0.00

100.00

fan speed minimum limit

* undefined until input is connected

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

aoFan_C1

CJ_WORD

0.00

100.00

circuit 1 condensation fan command [%]

statusFan_C1

CJ_BYTE

circuit 1 condensation fan 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

aoFan_C2

CJ_WORD

0.00

100.00

circuit 2 condensation fan command [%]

552

EIO0000000538 07/2014

Chiller AFBs

Output

Type

Minimum

Maximum

Description

statusFan_C2

CJ_BYTE

circuit 2 condensation fan 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

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

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on

mode

CJ_BIT

current functioning mode:


0 summer mode (chiller)
1 winter mode (heat pump)

onChangeMode

CJ_BIT

when equal to 1, it indicates that a


functioning mode changeover is
in progress (control disabled)

delayAlarm

CJ_WORD

999

time (in seconds) of alarm bypass

delayAfterUnitOn

CJ_WORD

999

time (in seconds) of unit start-up


alarm by-pass

tempIn

CJ_ANALOG

input water temperature probe


[ C]

setPointAlarmHT

CJ_SHORT

-58.0

302.0

high temperature alarm regulation


set point [ C]

setPointAlarmLT

CJ_SHORT

-58.0

302.0

low temperature alarm regulation


set point [ C]

diffAlarm

CJ_SHORT

0.0

50.0

regulation differential for the


temperature alarms [ C]

* undefined until input is connected

EIO0000000538 07/2014

555

Chiller AFBs

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

alarmHT

CJ_BIT

high temperature alarm status:


0 alarm not active
1 alarm active

alarmLT

CJ_BIT

low temperature alarm status:


0 alarm not active
1 alarm active

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):

If the external temperature probe is in alarm conditions, the function is disabled.


Input Pin Description
Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to
the default input, 1 is valid

setPoint

CJ_SHORT

-58.0

302.0

value of the regulation set


point [ C]

offsetSetPoint

CJ_SHORT

-58.0

302.0

offset for the variation of the


regulation set point [ C]

setStartCompensation

CJ_SHORT

-58.0

302.0

initial value for the external


temperature for the
compensation of the setpoint [ C]

setEndCompensation

CJ_SHORT

-58.0

302.0

final value for the external


temperature for the
compensation of the setpoint [ C]

minSetPoint

CJ_SHORT

-58.0

302.0

minimum value of the


regulation set point [ C]

maxSetPoint

CJ_SHORT

-58.0

302.0

maximum value of the


regulation set point [ C]

tempExternal

CJ_ANALOG

outside air temperature


probe [ C]

* undefined until input is connected

558

EIO0000000538 07/2014

Chiller AFBs

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

setPoint

CJ_SHORT

-58.0

302.0

value of the calculated regulation set point. If


(enable = 0), the output corresponds to the
setPoint input

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

In winter functioning mode (heat pump, mode = 1):

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid

numCircuit

CJ_BYTE

number of circuits configured

mode

CJ_BIT

current functioning mode:


0 summer mode (chiller)
1 winter mode (heat pump)

setCooling

CJ_SHORT

-58.0

302.0

cooling set point for functioning in


summer mode [ C]

setHeating

CJ_SHORT

-58.0

302.0

heating set point for functioning in


winter mode [ C]

setCoolingForce

CJ_SHORT

-58.0

302.0

summer set point over which the


forced switch-off of the
compressors is activated [ C]

setHeatingForce

CJ_SHORT

-58.0

302.0

winter set point over which the


forced switch-off of the
compressors is activated [ C]

tempOut_C1

CJ_ANALOG

temperature probe of the water at


output of circuit 1 [ C]

tempOut_C2

CJ_ANALOG

temperature probe of the water at


output of circuit 2 [ C]

* undefined until input is connected

EIO0000000538 07/2014

561

Chiller AFBs

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

forceShutDown

CJ_BIT

commands for forced switch-off of the compressors

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

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid

numCircuit

CJ_BYTE

number of circuits configured

mode

CJ_BIT

current functioning mode:


0 summer mode (chiller)
1 winter mode (heat pump)

setTempExternal

CJ_SHORT

-58.0

302.0

external temperature threshold


over which it is allowed to chocke
[ C]

setPressHPHT

CJ_SHORT

0.0

750.0

High pressure set point for power


limitation control [bar]

diffPressHPHT

CJ_SHORT

0.0

300.0

differential in pressure for power


limitation control [bar]

564

EIO0000000538 07/2014

Chiller AFBs

Input

Type

Minimum

Maximum

Default

Description

minTimePart

CJ_WORD

99

minimum time (in minutes) for


power limitation

tempExternal

CJ_ANALOG

outside air temperature sensor [ C]

pressCond_C1

CJ_ANALOG

circuit 1 condensation pressure


sensor [bar]

pressCond_C2

CJ_ANALOG

circuit 2 condensation pressure


sensor [bar]

* undefined until input is connected

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

partHPHT

CJ_BIT

1 power limitation control active

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

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the
default input, 1 is valid

numCircuit

CJ_BYTE

number of circuits configured

unitOnOff

CJ_BIT

unit on/off status:


0 unit off
1 unit on

mode

CJ_BIT

current functioning mode:


0 summer mode (chiller)
1 winter mode (heat pump)

setTempExternal

CJ_SHORT

-58.0

302.0

external temperature threshold


over which it is allowed to chocke
[ C]

setTempOut

CJ_SHORT

-58.0

302.0

output water temperature threshold


over which it is allowed to chocke
[ C]

setPressLPLT

CJ_SHORT

0.0

750.0

set point in pressure for regulation


of chocking [bar]

diffPressLPLT

CJ_SHORT

0.0

300.0

differential in pressure for


regulation of chocking [bar]

minDelayPart

CJ_WORD

999

minimum delay time (in seconds)


for activation of chocking from low
pressure alarm

alarmLP

CJ_BIT

circuits low pressure alarm (if 2


circuits connect the OR of the
alarms)

resetAlarmLP

CJ_BIT

circuits low pressure alarm reset (if


2 circuits connect the OR of the
alarms)

tempExternal

CJ_ANALOG

outside air temperature probe [ C]

tempOut_C1

CJ_ANALOG

temperature probe of the water at


output of circuit 1 [ C]

pressCond_C1

CJ_ANALOG

circuit 1 condensation pressure


probe [bar]

568

EIO0000000538 07/2014

Chiller AFBs

Input

Type

Minimum

Maximum

Default

Description

tempOut_C2

CJ_ANALOG

temperature probe of the water at


output of circuit 2 [ C]

pressCond_C2

CJ_ANALOG

circuit 2 condensation pressure


probe [bar]

* undefined until input is connected

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

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

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to
the default input, 1 is valid

clockRTC

CJ_DATETIME -

system clock for scheduler


control

alarmRTC

CJ_BIT

if there is a clock alarm


(alarmRTC = 1) the
scheduler does not
function, the offset output
goes back to value of 0.0.

dayA_enTZ_1

CJ_BIT

enabling of the first time


band for the type of day
workingDayA(1)

dayA_OffsetCoolingTZ_1

CJ_SHORT

-58.0

302.0

-10.0

summer offset in the first


time band for the type of
day workingDayA(1)

dayA_OffsetHeatingTZ_1

CJ_SHORT

-58.0

302.0

10.0

winter offset in the first time


band for the type of day
workingDayA(1)

dayA_enTZ_2

CJ_BIT

enabling of the second


time band for the type of
day workingDayA(1)

dayA_OffsetCoolingTZ_2

CJ_SHORT

-58.0

302.0

-10.0

summer offset in the


second time band for the
type of day
workingDayA(1)

dayA_OffsetHeatingTZ_2

CJ_SHORT

-58.0

302.0

10.0

winter offset in the second


time band for the type of
day workingDayA(1)

dayB_enTZ_1

CJ_BIT

enabling of the first time


band for the type of day
workingDayA(2)

dayB_OffsetCoolingTZ_1

CJ_SHORT

-58.0

302.0

-10.0

summer offset in the first


time band for the type of
day workingDayA(2)

dayB_OffsetHeatingTZ_1

CJ_SHORT

-58.0

302.0

10.0

winter offset in the first time


band for the type of day
workingDayA(2)

EIO0000000538 07/2014

571

Chiller AFBs

Input

Type

Minimum

Maximum

Default

Description

dayB_enTZ_2

CJ_BIT

enabling of the second


time band for the type of
day workingDayA(2)

dayB_OffsetCoolingTZ_2

CJ_SHORT

-58.0

302.0

-10.0

summer offset in the


second time band for the
type of day
workingDayA(2)

dayB_OffsetHeatingTZ_2

CJ_SHORT

-58.0

302.0

10.0

winter offset in the second


time band for the type of
day workingDayA(2)

* undefined until input is connected

Internal Parameters/Status
Parameter

Type

Minimum

Maximum

Default

Description

typeDay_Sunday

CJ_BYTE

type of day for Sunday:


0 not Workingday
1 workingDayA
2 workingDayB

typeDay_Monday

CJ_BYTE

type of day for Monday:


0 not Workingday
1 workingDayA
2 workingDayB

typeDay_Tuesday

CJ_BYTE

type of day for Tuesday:


0 not Workingday
1 workingDayA
2 workingDayB

typeDay_Wednesday

CJ_BYTE

type of day for Wednesday:


0 not Workingday
1 workingDayA
2 workingDayB

typeDay_Thursday

CJ_BYTE

type of day for Thursday:


0 not Workingday
1 workingDayA
2 workingDayB

typeDay_Friday

CJ_BYTE

type of day for Friday:


0 not Workingday
1 workingDayA
2 workingDayB

typeDay_Saturday

CJ_BYTE

type of day for Saturday:


0 not Workingday
1 workingDayA
2 workingDayB

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

start of the first time band for the


type of day workingDayA(1)

dayA_EndTZ_1

CJ_TIME

0:00:00

23:59:59

17:00:00

end of the first time band for the


type of day workingDayA(1)

dayA_StartTZ_2

CJ_TIME

0:00:00

23:59:59

18:00:00

start of the secod time band for


the type of day workingDayA(1)

dayA_EndTZ_2

CJ_TIME

0:00:00

23:59:59

21:00:00

end of the second time band for


the type of day workingDayA(1)

dayB_StartTZ_1

CJ_TIME

0:00:00

23:59:59

8:00:00

start of the first time band for the


type of day workingDayA(2)

dayB_EndTZ_1

CJ_TIME

0:00:00

23:59:59

17:00:00

end of the first time band for the


type of day workingDayA(2)

dayB_StartTZ_2

CJ_TIME

0:00:00

23:59:59

18:00:00

start of the secod time band for


the type of day workingDayA(2)

dayB_EndTZ_2

CJ_TIME

0:00:00

23:59:59

21:00:00

end of the second time band for


the type of day workingDayA(2)

* undefined until input is connected

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

dayActive

CJ_BYTE

actual day of the week [0: Sunday... 6: Saturday]

typeDayActive

CJ_BYTE

type of day of currrent day:


0 not Workingday
1 workingDayA
2 workingDayB

offsetCooling

CJ_SHORT

-58.0

302.0

current offset in summer functioning mode (chiller)

offsetHeating

CJ_SHORT

-58.0

302.0

current offset in winter functioning mode (heat


pump)

timeZoneActive

CJ_BIT

indicates if it is a set time band:


0 no time band configured
1 in configured time band

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

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the default
input, 1 is valid

dayProbeAlarm

CJ_BYTE

240

time (in seconds) for signalling the


probe detected error alarms

alarm1_16

CJ_WORD

65535

alarms 1...16 packed in a


WORD:bit1= alarm 1, bit16 =
alarm 16

alarm17_32

CJ_WORD

65535

alarms 17.0.32 packed in a WORD:


bit1 = alarm 17, bit16 = alarm 32

alarm33_48

CJ_WORD

65535

alarms 33.0.48 packed in a WORD:


bit1 = alarm 33, bit16 = alarm 48

alarm49_64

CJ_WORD

65535

Alarms 49.0.64 packed in a WORD:


bit1 = alarm 49, bit16 = alarm 64

alarm65_80

CJ_WORD

65535

Alarms 65.0.80 packed in a WORD:


bit1 = alarm 65, bit16 = alarm 80

alarm81_96

CJ_WORD

65535

alarms 81.0.96 packed in a WORD:


bit1 = alarm 81, bit16 = alarm 96

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

event for the reset of the structure

evRequestAlarm

CJ_BIT

event to request the first/successive


active alarm

* undefined until input is connected

EIO0000000538 07/2014

575

Chiller AFBs

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

activeAlarmIndex

CJ_BYTE

100

index of the alarm currently under examination, if


activeAlarmIndex = 0 there are no active
alarms

numActiveAlarm

CJ_BYTE

100

number of alarms currently active

alarmIndex

CJ_BYTE

100

index of the alarm with the highest priority

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

enable functioning of the


macroblock:
0 function disabled
1 function enabled
If nothing is connected to the default
input, 1 is valid

evReset

CJ_BIT

event for the reset of the alarm

actualStatus

CJ_WORD

65535

generic comparison status for the


reset of the alarm

myStatus

CJ_WORD

65535

status of the relative alarm for the


reset

* undefined until input is connected

EIO0000000538 07/2014

577

Chiller AFBs

Output Pin Description


Output

Type

enable

CJ_BIT

status of the enable input

reset

CJ_BIT

consent on manual reset of the alarm. When it


equals 1, it indicates that reset of the relative alarm
has been requested.

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

enable functioning of the macroblock:


0 function disabled
1 function enabled
If nothing is connected to the default input, 1 is valid

device

CJ_BIT

indicates the status of the associated device:


0 off
1 functioning

enableHourAlarm

CJ_BIT

enables the alarms relative to the functioning hours


of the two pumps

limitHoursAlarm

CJ_DWORD

99999

functioning hours maximum limit, exceeding which


the alarm is triggered

Internal parameters/Status
Name

Type

Minimum

Maximum

Default

Description

hoursCntDevice

CJ_DWORD

99999

number of functioning hours of the


associated device

EIO0000000538 07/2014

579

Chiller AFBs

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

alarmHourDevice

CJ_BIT

set functioning hours exceeded alarm

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.

If the external temperature probe is incorrect, the function is disabled.


This functionality can only be used in the winter functioning mode, mode = 1)

EIO0000000538 07/2014

581

Chiller AFBs

Input Pin Description


Input

Type

Minimum

Maximum

Default

Description

enable

CJ_BIT

enable functioning of the macroblock:


0 function disabled
1 function enabled
If nothing is connected to the default
input, 1 is valid

mode

CJ_BIT

current functioning mode:


0 summer mode (chiller)
1 winter mode (heat pump)

limitType

CJ_BYTE

enabling of the type of functioning limit:


0 modulating only
1 auxiliary relay only
2 auxiliary relay and compressors

setPointLimit

CJ_SHORT

-58.0

302.0

set-point for the regulation of the


functioning limit [ C]

diffLimit

CJ_SHORT

0.0

50.0

differential for the regulation of the


functioning limit [ C]

tempExternal

CJ_ANALOG

outside air temperature probe [ C]

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

auxDO

CJ_BIT

auxiliary relay control

limit_BlockComp

CJ_BIT

output for management of the heat pump block.


When = 1, it indicates that the compressors must
be off.

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

enable functioning of the macroblock:


0 function disabled
1 function enabled
If nothing is connected to the default input, 1 is
valid

value

CJ_WORD

0.0

100.00

value of the analogue output to linearize

Internal Parameters/Status
Parameter

Type

Minimum

Maximum

Default

Description

x1

CJ_WORD

0.00

100.00

25.00

first point abscissa linearisation

x2

CJ_WORD

0.00

100.00

50.00

second point abscissa linearisation

x3

CJ_WORD

0.00

100.00

75.00

third point abscissa linearisation

y1

CJ_WORD

0.00

100.00

25.00

first point ordered linearisation

y2

CJ_WORD

0.00

100.00

50.00

second point ordered linearisation

y3

CJ_WORD

0.00

100.00

75.00

third point ordered linearisation

EIO0000000538 07/2014

583

Chiller AFBs

Output Pin Description


Output

Type

Minimum

Maximum

Description

enable

CJ_BIT

status of the enable input

linearValue

CJ_WORD

0.00

100.00

value of the analogue output linearized

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

Representation in one of the bases

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

Representation in one of the bases

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

Вам также может понравиться