[go: up one dir, main page]

0% found this document useful (0 votes)
180 views149 pages

AnalogTechnology 9

This document provides documentation for the AnalogTechnology_9 function block library for PC Worx 6. It includes installation instructions, change notes listing updates between library versions, supported PLCs, and descriptions of numerous function blocks for acquiring and evaluating analog signals from PHOENIX CONTACT modules.

Uploaded by

Centrala Metala
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
180 views149 pages

AnalogTechnology 9

This document provides documentation for the AnalogTechnology_9 function block library for PC Worx 6. It includes installation instructions, change notes listing updates between library versions, supported PLCs, and descriptions of numerous function blocks for acquiring and evaluating analog signals from PHOENIX CONTACT modules.

Uploaded by

Centrala Metala
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 149

AnalogTechnology_9 1/149

Function block library

AnalogTechnology_9

for PC Worx 6
Documentation for
PHOENIX CONTACT function blocks
PHOENIX CONTACT GmbH Co. KG
Flachsmarktstrasse 8
D-32825 Blomberg, Germany
This documentation is available in English only.
AnalogTechnology_9 2/149

Table of Contents
1 Installation hint
2 General information
3 Change notes
4 Supported PLCs
5 Function blocks
6 AI_NORM
6.1 Function block call
6.2 Input parameters
6.3 Output parameters
6.4 Diagnosis
6.5 Module types
7 AO_NORM
7.1 Function block call
7.2 Input parameters
7.3 Output parameters
7.4 Diagnosis
7.5 Module types

8 IL_AI_2_SF
8.1 Function block call
8.2 Input parameters
8.3 Output parameters
8.4 Diagnosis
9 IL_AI_4_EF
9.1 Function block call
9.2 Input parameters
9.3 Output parameters
9.4 Diagnosis
9.5 Appendix
10 IL_AI_4_UI
10.1 IL_AI_4_UI_Para
10.2 IL_AI_4_UI_Com
10.3 IL_AI_4_UI_Diag
10.4 Appendix
11 IL_AI_8
11.1 Operating modes
11.2 Function block call
11.3 Input parameters
11.4 Output parameters
11.5 Block parameters
11.6 Diagnosis
11.7 Appendix
12 IL_AO_1_SF
12.1 Function block call
AnalogTechnology_9 3/149

12.2 Input parameters


12.3 Output parameters
12.4 Diagnosis
13 IL_AO
13.1 Function block call
13.2 Input parameters
13.3 Output parameters
13.4 Diagnosis
13.5 IL_AO_Channel
13.6 Appendix
14 IL_AO_2_UI
14.1 IL_AO_2_UI_Para
14.2 IL_AO_2_UI
14.3 IL_AO_2_UI_Diag
14.4 Appendix
15 IL_AO4_8
15.1 Function block call
15.2 Input parameters
15.3 Output parameters
15.4 Function block parameters
15.5 Diagnosis
15.6 Appendix
16 ANL_IL_SGI_2P_EF
16.1 Function block call
16.2 Input parameters
16.3 Output parameters
16.4 Inout parameters
16.5 Diagnosis
16.6 ANL_IL_SGI_2P_EF_Para
16.7 ANL_IL_SGI_2P_EF_Adju
16.8 ANL_IL_SGI_2P_EF_Val
16.9 ANL_IL_SGI_2P_EF_DIDE
16.10 ANL_IL_SGI_2P_EF_DIEN
16.11 Appendix
17 IL_SGI_1_CAL
17.1 Function block call
17.2 Input parameters
17.3 Output parameters
17.4 Inout parameters
17.5 Diagnosis
17.6 IL_SGI_1_CAL_Para
17.7 IL_SGI_1_CAL_AddV
17.8 IL_SGI_2P_EF_Adj
17.9 IL_SGI_1_CAL_Diag
17.10 IL_SGI_1_CAL_LMP
17.11 IL_SGI_1_CAL_SMP
17.12 Appendix
18 IL_SGI_2F
AnalogTechnology_9 4/149

18.1 Function block call


18.2 Input parameters
18.3 Output parameters
18.4 Diagnosis
18.5 IL_SGI_2F_Para
18.6 IL_SGI_2F_AddVal
18.7 IL_SGI_2F_MeanVal
18.8 IL_SGI_2F_Offset
18.9 Appendix
19 IL_SGI_2P_A
19.1 Function block call
19.2 Input parameters
19.3 Output parameters
19.4 Inout parameters
19.5 Diagnosis
19.6 IL_SGI_2P_A_Para
19.7 IL_SGI_2P_A_Value
19.8 IL_SGI_2P_A_Adju
19.9 IL_SGI_2P_A_Diag
19.10 Appendix
20 Startup examples
20.1 Example 1: ANL_*_EXA_AI_Norm
20.2 Example 2: ANL_*_EXA_AO_Norm
20.3 Example 3: ANL_*_EXA_IL_AI_2_SF
20.4 Example 4: ANL_*_EXA_IL_AI_4_EF
20.5 Example 5: ANL_*_EXA_IL_AI_4_UI
20.6 Example 6: ANL_*_EXA_IL_AI_8
20.7 Example 7: ANL_*_EXA_IL_AO
20.8 Example 8: ANL_*_EXA_IL_AO_2_UI
20.9 Example 9: ANL_*_EXA_IL_AO_1_SF_I
20.10 Example 10: ANL_*_EXA_IL_AO_1_SF_U
20.11 Example 11: ANL_*_EXA_IL_AO4_8
20.12 Example 12: ANL_*_EXA_IL_SGI_2_P_EF
20.13 Example 13: ANL_*_EXA_IL_SGI_2_P_EFPN
21 Support
AnalogTechnology_9 5/149

1 Installation hint
Please copy the library data to your PC Worx 6 working library directory.
If you did not specify a different directory during PC Worx 6 installation the default PC Worx 6 working library
directory is
C:\Users\Public\Documents\PC WORX\Libraries

2 General information
The AnalogTechnology library offers function blocks for acquisition and evaluation of analog signals.
AnalogTechnology_9 6/149

3 Change notes
Library Library PC Worx Change notes Supported
version build version PLCs
9 20220118 6.30.2972 Revised documentation Refer to
Revised all examples “Supported
Added ANL_*_EXA_IL_AI_4_UI_U.zwt example PLCs”
8 20210112 6.30.2907 "
AI_Norm:
Added ANL_8_EXA_AI_Norm.zwt example
AO_Norm:
Added ANL_8_EXA_AO_Norm.zwt example
IL_AI_4_UI:
Added ANL_8_EXA_IL_AI_4_UI_I.zwt example
IL_AO_2_UI:
Added ANL_8_EXA_IL_AO_2_UI.zwt example
IL_AI_8:
Added ANL_8_EXA_IL_AI_8.zwt example
IL_AO4_8:
Added ANL_8_EXA_IL_AO4_8.zwt example
IL_AO_1_SF:
Added ANL_8_EXA_IL_AO_1_SF.zwt example

ANL_IL_SGI_2P_EF:
Added ANL_8_EXA_IL_SGI_2P_EF.zwt example
Added ANL_8_EXA_IL_SGI_2P_EF_PN.zwt
example
Documentation improved
Added new functions: xResetTara and xAdjust2
Bug fixes
ANL_IL_SGI_2P_EF_Para: New input rAdjust2
ANL_IL_SGI_2P_EF_Adju: New inputs xAdjust2 and
xResetTara
ANL_IL_SGI_2P_EF_DiagInfo_EN/DE: Added new
DiagCodes

7 20201027 6.30.2907 IL_AO4_8: Documentation error fixed. Wrong module was "
specified.
7 20200512 6.30.2907 IL_AI_4_EF: Added ANL_7_EXA_IL_AI_4_EF.zwt example "
and adapted documentation.
7 20200324 6.30.2519 Documentation improved "
AnalogTechnology_9 7/149

7 20190925 6.30.2519 ANL_IL_SGI_2P_EF_4: Support of “Nominal characteristic "


value” = 14 added
AO_NORM_2: Bug fix for MODUL_TYPE = 7.
IL_AI_2_HART* removed. Please use separate function
block library HART_Basic.
6 20180830 6.30.1668 IL_AI_8_3: "
Output xSelectValid removed –> use channel diagnostic
Change of bSelect only with rising edge on xActivate
Bugfix: No operation, if bSelect changed during operation
Bugfix: No operation, if bSelect.X0 was not set
Bugfix: Error C018 if Standardization option was not set
5 - 6.30.1668 ANL_IL_SGI_2P_EF_3: Bug fixing "
ANL_IL_SGI_2P_EF_DIDE/DIEN_2: Add new DiagCodes
IL_AI_8_V1_17: Bug fixing in documentation
4 - 6.30.1668 AnalogTechnology_4: "

Can be used from PC Worx 6.30.1668 as the IB IL


SGI 2/P-EF-PAC module is only supported from this
version.
Bug fixing for “Referenced data type
‘ASYN_ARR_DATA_B_1_512’ not declared”
ANL_IL_SGI_2P_EF_2: Bug fixing
In some cases xActive = TRUE after xActivate =
FALSE.
Sporadic RDREC error.
Corrections and improvement of the
documentation.
ANL_IL_SGI_2P_EF_VAL_2: Bug fixing
xError = FALSE when bSelect = 0 (invalid).
rVal = 0 while process data contain valid values.

3 - 6.30.767 IL_AO_2: Bug fixing "


2 - 6.20.331 AnalogTechnology_2: Version numbers of the library and "
new / changed function blocks are a consecutive number.
ANL_IL_SGI_2P_EF_1: NEW
1.30 IL_AI4_EF_V1_11: Bug fixing in documentation "
IL_AI4_UI_V1_04: Bug fixing in documentation
IL_AI_8_V1_17: Bug fixing
IL_AO_2_UI_Para_V1_02: Bug fixing
IL_AO_2_UI_V1_02: Bug fixing
IL_AO_V1_02: Bug fixing
IL_SGI_2P_V*: Removed
1.29 IL_AI_4_UI_Com_V1_04: Bug fixing "
IL_AI_4_UI_Diag_V1_03: Bug fixing
IL_AI_4_UI_Para_V1_03: Bug fixing
IL_AI_4_UI_V1_04: Bug fixing in documentation
1.28 IL_AI_4_UI_Com_V1_03: Bug fixing "
IL_AI_4_UI_Diag_V1_02: Bug fixing
IL_AI_4_UI_Para_V1_02: Bug fixing
IL_AI_8_V2_16: Bug fixing
AnalogTechnology_9 8/149

1.27 IL_AI_4_UI_V1_02: Bug fixing "


IL_SGI_2P_A_V1_01: Bug fixing
1.26 IL_AI_4_EF_V1_11: Bug fixing "
IL_AI_4_UI_Com_V1_01: Bug fixing
1.25 IL_SGI_2P_A_V1_00: NEW "
IL_AI_2_HART_MD_V1_45: Bug fixing
New version number: Functional changes of at least one function block, incompatibilities (e.g. change of library
format)
New build number: No functional changes, but changes in the ZIP file (e.g. documentation update, additional
examples)
AnalogTechnology_9 9/149

4 Supported PLCs
AXC 1050 (2700988)
AXC 1050 XC (2701295)
AXC 3050 (2700989)
ILC 130 ETH (2988803)
ILC 131 ETH (2700973)
ILC 131 ETH/XC (2701034)
ILC 150 ETH (2985330)
ILC 151 ETH (2700974)
ILC 151 GSM/GPRS (2700977)
ILC 170 ETH 2TX (2916532)
ILC 171 ETH 2TX (2700975)
ILC 190 ETH 2TX (2700527)
ILC 191 ETH 2TX (2700976)
ILC 191 ME/AN (2700074)
ILC 191 ME/INC (2700075)
ILC 330 ETH (2737193)
ILC 330 PN (2988191)
ILC 350 ETH (2737203)
ILC 350 ETH/M (2985819)
ILC 350 PN (2876928)
ILC 370 ETH 2TX-IB (2876999)
ILC 370 PN 2TX-IB (2876915)
ILC 370 PN 2TX-IB/M (2985576)
ILC 390 PN 2TX-IB (2985314)
RFC 430 ETH-IB (2730190)
RFC 450 ETH-IB (2730200)
RFC 470S PN 3TX (2916794)
RFC 470 PN 3TX (2916600)
RFC 480S PN 4TX (2404577)
AnalogTechnology_9 10/149

5 Function blocks
Function block Description Version Supported License
articles
ANL_IL_SGI_2P_EF Function block for evaluating and parameterizing 5 IB IL SGI none
the IB IL SGI 2/P/EF-PAC (2702373) module for 2/P/EF-PAC
load cells and force tranducers. (2702373)
AI_NORM Function block for standardization of analog input 1.03 IBS RT 24 none
values for analog modules. AIO 4/2-T
(?)
IBS RT 24
AI 8-T
(2723194)
IB IL AI
2/SF
(2726285)
IB ST 24 AI
4/SF-WT
(2752534)
IB ST 24
BAI 8/I
(2721028)
IB ST 24
BAI 8/U
(2721015)
IB ST ZF 24
AI 4/BP
(2724737)
IB ST ZF 24
AI 4/I
(2721264)
IB ST ZF 24
AI 4/SF
(2750620)
IB ST ZF 24
AI 4/SF4
(2750594)
IB ST ZF 24
BAI 2/BP
(2724957)
IB ST ZF 24
BAI 2/SF
(2723958)
AnalogTechnology_9 11/149

AO_NORM Function block for standardization of analog 2 IB IL AO none


output values for analog modules. 1/U/SF
(2727776)
IB IL AO
1/U/SF-PAC
(2861399)
IB ST 24
AO 4/BP
(2752521)
IB ST 24
AO 4/SF
(2754312)
IB ST 24
AO 4/SF/4
(2750578)
IB ST 24
AO 4/EF
(2700839)
IB ST 24
BAO 8/U-8B
(2721031)
IB ST ZF 24
AO 4/BP
(2750617)
IB ST ZF 24
AO 4/SF
(2750604)
IB ST ZF 24
AO 4/SF4
(2750581)
IB ST ZF 24
BAO 8/U-8B
(2721248)
IB ST ZF 24
BAO 8/U
(2721251)
IBS RT 24
AO 4-T
(2723181)
IBS RT 24
AO 4-T
(2723181)
IBSL BOX
AO 1/2/I
M12
(2723398)
IBSL BOX
AO 1/2/U
M12
(2724025)
IL_AI_2_SF Function block for parameterization and control of 1.02 IB IL AI none
the IB IL AI 2/SF-PAC (2861302) module. 2/SF
(2726285)
IB IL AI
2/SF-PAC
(2861302)
AnalogTechnology_9 12/149

IL_AI_4_EF Function block for parameterization and control of 1.11 IB IL AI none


the IB IL AI 4/EF-PAC (2878447) module. 4/EF
(2863478)
IB IL AI
4/EF-PAC
(2878447)
IB IL AI
4/EF-2MBD
(2878544)
IB IL AI
4/EF-2MBD-
PAC
(2878641)
IL_AI_8 Function block for parameterization and 3 IB IL AI none
standardization of the IB IL AI 8/SF (2727831) or 8/SF
IB IL AI 8/IS-PAC (2861661) module. (2727831)
IB IL AI
8/SF-PAC
(2861412)
IB IL AI
8/SF
(2727831)
IB IL AI
8/SF-PAC
(2861412)
IB IL AI
8/SF-2MBD
(2855648)
IB IL AI
8/SF-2MBD-
PAC
(2862042)
Only for
current
range:
IB IL AI 8/IS
(2742748)
IB IL AI
8/IS-PAC
(2861661)
IL_AO_1_SF Function block for parameterization and control of 1.00 IB IL AO none
the IB IL AO 1/SF-PAC (2861315) module. 1/SF-PAC
(2861315)
IL_AO Function block for parameterization and operation 2 IB IL AO 2 none
of the IB IL AO 2 /SF-PAC (2863083) module. /U/BP-PAC
(2861467 )
IB IL AO 2
/SF-PAC
(2863083)
IL_AO_2_UI Function block for parameterization and control of 1.02 IB IL AO none
the IB IL AO 2/UI-PAC (2700775) module. 2/UI-PAC
(2700775)
IL_AI_4_UI Function block for parameterization and 1.04 IB IL AI 4 /I- none
standardization IB IL AI 4 /I-PAC (2700458) or IB PAC
IL AI 4 /U-PAC (2700459) module. (2700458)
IB IL AI 4
/U-PAC
(2700459)
AnalogTechnology_9 13/149

IL_AO4_8 Function block for parameterization and 1.12 IB IL AO none


standardization of the IB IL AO 4/8/U/BP-PAC 4/8/U/BP-
(2878036) module. PAC
(2878036)
IB IL AO 4/8
/U/BP
2MBD-PAC
(2878052)
IL_SGI_1_CAL Function block for control and parameterization of 1.01 IB IL SGI 1 none
the IB IL SGI 1 /CAL (2700064) module. /CAL
(2700064)
IL_SGI_2F Function block for control and parameterization of 1.00 IB IL SGI none
the IB IL SGI 2/F-PAC (2878638) module. 2/F-PAC
(2878638)
IB IL SGI
2/F-2MBD-
PAC
(2878735)
IL_SGI_2P_A Function block for evaluating and parameterization 1.01 IB IL SGI none
of the IB IL SGI 2/P-PAC (2884907) module for 2/P-PAC
load cells and transducers. (2884907)
AnalogTechnology_9 14/149

6 AI_NORM
The AI_NORM function block cyclically converts the analog values of the Phoenix Contact analog modules in a
measuring range preset by the user (rLoLim to rHiLim).
Caution: The function block does not support 16-bit representation of hardware error messages (iModuleType = 3,
6, 7).
The function block is not responsible for hardware error messages (module) or for parameterizing the module.
Example

Measuring range : 0 V to 10 V (unipolar)


Parameterized rLoLim : 2000
Parameterized rHiLim : 4000
Applied analog value at
wIn ->Output at rOUT
0 V -> 2000
5 V -> 3000
10 V -> 4000

6.1 Function block call


AnalogTechnology_9 15/149

6.2 Input parameters


Name Type Description
IN_AI WORD Analog data from module
HI_LIM REAL Upper limit value of the standardized range
LO_LIM REAL Lower limit value of the standardized range
MODUL_TYPE INT Module type

6.3 Output parameters


Name Type Description
ERR INT
0 = No error
1 = Invalid module type
2 = Limit value error: rHiLim <= rLoLim
3 = Overrange
4 = Open circuit (not for iModuleType = 3, 6, 7)

OUT REAL Standardized value linear between rLoLim and rHiLim


Caution: In case of error, the last valid output values remain unchanged in status.

6.4 Diagnosis
This function block has no diagnosis. Please refer to output parameter “ERR”.
AnalogTechnology_9 16/149

6.5 Module types


6.5.1 Inline

Module Type Data width Polarity Range MODUL_TYPE


IB IL AI 2/SF (2726285) ST 12 bits unipolar 0-10 V, 0-20 mA 1
. ST 12 bits unipolar 4-20 mA 2
. ST 12 bits bipolar +/-10 V, +/-20 mA 4
. RT 16 bits unipolar 0-10 V, 0-20 mA 3
. RT 16 bits unipolar 4-20 mA 2
. RT 16 bits bipolar +/-10 V, +/-20 mA 6
. IL 16 bits unipolar 0-10 V, 0-20 mA, 4-20 mA 7
. IL 16 bits unipolar +/-10 V, +/-20 mA 8
IB ST ZF 24 AI 4/BP (2724737) . 12 bits unipolar 4-20 mA 2
. . 12 bits bipolar +/-10 V 4
IB ST ZF 24 AI 4/I (2721264) . 12 bits unipolar 0-10 V, 0-20 mA 1
. . 12 bits unipolar 2-10 V, 4-20 mA 2
IB ST ZF 24 AI 4/SF (2750620) . 12 bits unipolar 0-10 V, 0-20 mA 1
IB ST ZF 24 AI 4/SF4 (2750594) . 12 bits unipolar 0-10 V, 4-20 mA 1
IB ST 24 AI 4/SF-WT (2752534) . 12 bits unipolar 0-10 V, 0-20 mA 1
IB ST ZF 24 BAI 2/BP (2724957) . 12 bits bipolar +/- 10 V, +/- 20 mA 4
IB ST ZF 24 BAI 2/SF (2723958) . 12 bits unipolar 0-10 V, 0-20 mA 1
IBS RT 24 AI 8-T (2723194) . 12 bits unipolar 0-10 V, 0-5 V 1
. . 12 bits unipolar 1-5 V, 0-20 mA 1
. . 12 bits unipolar 4-20 mA 1
. . 12 bits bipolar +/- 5/10 V, +/- 20 mA 4
IBS RT 24 AIO 4/2-T (?) . 16 bits unipolar 0-10V, 0-5V 3
. . 16 bits unipolar 0.2-1V, 0-1V 3
. . 16 bits unipolar 1-5V, 0-20mA 3
. . 16 bits unipolar 4-20mA, 2-10V 3
. . 16 bits bipolar +/- 5/10V, +/- 20mA 6
. . 16 bits bipolar +/- 1V 6
IB ST 24 BAI 8/I (2721028) . 12 bits unipolar 0-20mA, 4-20mA 9
IB ST 24 BAI 8/U (2721015) . 12 bits unipolar 0-10V, 0-20mA 9
AnalogTechnology_9 17/149

7 AO_NORM
The AO_NORM function block converts a standardized value on an analog output module. This module is intended
for the listed output modules manufactured by Phoenix Contact.
The AO_NORM function block cyclically converts the rIn values into analog values for the Phoenix Contact analog
modules. The block is not responsible for hardware error messages (module) or for parameterizing the module.

7.1 Function block call


AnalogTechnology_9 18/149

7.2 Input parameters


Name Type Description
IN_AO REAL Analog value to be output (value in the range between LO_LIM and HI_LIM)
HI_LIM REAL Upper limit value of the standardized range
LO_LIM REAL Lower limit value of the standardized range
MODUL_TYPE INT Module type. Please refer to list below.

7.3 Output parameters


Name Type Description
ERR INT
0 = No error
1 = Invalid module type
2 = Limit value error: ULV = LLV or ULV < LLV
3 = IN_AO is not in range between HI_LIM in LO_LIM

OUT WORD Output variable of analog channel


Caution: In case of error, the last valid output values remain unchanged in status.

7.4 Diagnosis
This function block has no diagnosis. Please refer to output parameter “ERR”.
AnalogTechnology_9 19/149

7.5 Module types


7.5.1 Inline

Module Type Range MODUL_TYPE


IB IL AO 1/U/SF (2727776) 0-10V 3
IB IL AO 1/U/SF-PAC (2861399)
IB ST 24 AO 4/BP (2752521) +/- 10V 2
IB ST 24 AO 4/SF (2754312) 0-10 V 1
0-20 mA
IB ST 24 AO 4/SF/4 (2750578) 0-10 V 1
0-20 mA
IB ST 24 AO 4/EF (2700839) 0-10 V 1
0-20 mA
IB ST 24 AO 4/EF (2700839) 4-20 mA 2
IB ST 24 AO 4/EF (2700839) +/- 10 V 4
IB ST 24 BAO 8/U-8B (2721031) 0-10 V 4
IB ST ZF 24 AO 4/BP (2750617) +/- 10 V 2
IB ST ZF 24 AO 4/SF (2750604) 0-10 V 1
0-20 mA
IB ST ZF 24 AO 4/SF4 (2750581) 0-10 V 1
4-20 mA
IB ST ZF 24 BAO 8/U-8B (2721248) 0-10 V 4
IB ST ZF 24 BAO 8/U (2721251) +/- 10V 2
+/- 12 V
IBS RT 24 AO 4-T (2723181) +/- 10V 2 (Voltage)
IBS RT 24 AO 4-T (2723181) 0-20 mA 1 (Current)
4-20 mA
IBSL BOX AO 1/2/I M12 (2723398) 0-20 mA 3
4-20 mA
IBSL BOX AO 1/2/U M12 (2724025) +/- 10 V 2
AnalogTechnology_9 20/149

8 IL_AI_2_SF
The IL_AI_2_SF function standardized an analog value from the IB IL AI 2/SF-PAC (2861302) analog input module
between the limits rLO_Limit and rHI_Limit.
Example:

Measuring Parameterized Parameterized Applied analog Output


range rLO_Limit rHI_Limit value rNormValue
0-10V 2000.0 4000.0 0.0 2000.0
0-10V 2000.0 4000.0 5.0 3000.0
0-10V 2000.0 4000.0 10.0 4000.0
The IL_AI_2_SF function block cyclically converts the analog values of the IB IL AI 2/SF-PAC (2861302) analog
Inline module in a measuring range preset by the user (rLO_Limit to rHI_Limit).
The right configuration of the Inline module for the operation will be build by the function block and is defined by the
wOutputAddress parameter. The IB IL AI 2/SF-PAC (2861302) provides different formats (IL, ST, RT) and they can
be enabled by parameter.
Also the different ranges of the module can be enabled by parameter. The IB IL AI 2/SF-PAC (2861302) module
consists of two analog input channels. The channels will be read and configured with process data.
The IL_AI_2_SF function block can always read or configure only one channel of the module. If you want to use
both channels for your application, you have to create two instances of this function block in the PC Worx program.

8.1 Function block call


AnalogTechnology_9 21/149

8.2 Input parameters


Name Type Description
xActivate BOOL Block activation (TRUE = Active)
wInputAddress WORD Analog input value
rHI_Limit REAL High limit of the normed range
rLO_Limit REAL Low limit of the normed range
xNoFilter BOOL Disables the filter (In default mode, a filter is activated which generates a
measurement of the last 16 values. With this parameter you can disable this filter) -
> For more details see datasheet
iSelectFormat INT Choose the format:
0: (IL) IB-IL-Format (15 Bit)
1: (ST) IB-ST-Format (12 Bit)
2: (RT) IB-RT-Format (15 Bit)
-> For more details see data sheet
iSelectRange INT Choose the range:
0: Unipolar (0-10V)
1: Unipolar (0-20mA)
2: Unipolar (4-20mA)
3: Bipolar (+-10V)
4: Bipolar (+-20mA)
-> For more details see data sheet

8.3 Output parameters


Name Type Description
xActive BOOL TRUE: Function block is active. FALSE: Function block is not active.
xError BOOL Error during initialization or operation.
wDiagCode WORD TRUE: An error has occurred. For details refer to wDiagCode and wAddDiagCode.
wOutputAddress WORD Control word for configuration of the inline-clip. (Take care to connect this
parameter with the right channel) -> For more details see the data sheet
rNormValue REAL Normed value between rLO_Limit and rHI_Limit
AnalogTechnology_9 22/149

8.4 Diagnosis
wDiagCode Meaning
16#0000 Block is not activated.
16#8000 Block is active and operating without errors.
16#C001 Error from the Inline clip.
Measuring range exceeded (overrange).
16#C002 Error from the Inline clip.
Open circuit.
16#C003 Error from the Inline clip.
Measured value invalid/no valid measured value available (e.g.,because the channel has not
been configured).
16#C004 Error from the Inline clip.
Configuration faulty.
16#C005 Error from the Inline clip.
Device faulty
16#C006 Error from the Inline clip.
Below measuring range (underrange).
16#C010 Error from the function block.
The desired format is not allowed. Valid values are from 0 to 2.
16#C020 Error from the function block
The desired format is not allowed. Valid values are from 0 to 4.
16#C030 Error from the function block.
The Limits are not correct. OGR <= UGR
AnalogTechnology_9 23/149

9 IL_AI_4_EF
This function block is used to parameterize the IB IL AI 4/EF (2863478) and IB IL AI 4/EF-PAC (2878447) module.
In addition, the block offers detailed diagnostic properties.
Available operating modes:

Read analog values (default): Analog input values are read in the set format.
Read configuration: The set configuration of the channels is displayed.
Read device data: The firmware and device data is displayed.

9.1 Function block call


AnalogTechnology_9 24/149

9.2 Input parameters


Name Type Description
xActivate BOOL Rising edge: Activates the function block.
FALSE: Deactivates the function block.
iSelect INT Selection of the operating mode:

0= Read analog values (default):(Output: wValueChannel1…4)


1= Read configuration:(Output: wValueChannel1)
2= Read configuration:(Output: wValueChannel2)
3= Read configuration: (Output: wValueChannel3)
4= Read configuration:(Output: wValueChannel4)
5= Read device data:(Output: wValueChannel1)

dwConfig DWORD

If, for example, all channels are set to 0 mA - 20 mA, ST format, and average
value of 32, dwConfig is 0xD8D8D8D8
xReset BOOL Resets the block to its initial settings. Errors will be acknowledged.
arrPDU_IN AIEF_ARR_b_0_9 Input process data item of the IB IL AI 4/EF-PAC (2878447) module.
AnalogTechnology_9 25/149

9.3 Output parameters


Name Type Description
xReady BOOL The block is ready for operation and working without errors.
xError BOOL TRUE: An error has occurred. For more details refer to wDiagCode and
wAddDiagCode.
wDiagCode WORD Diagnosis code. Refer to diagnostic table.
wAddDiagCode WORD Additional diagnosis code. Refer to diagnostic table.
wValueChannel1 WORD Output channel 1.
wValueChannel2 WORD Output channel 2.
wValueChannel3 WORD Output channel 3.
wValueChannel4 WORD Output channel 4.
arrPDU_OUT AIEF_ARR_b_0_9 Output process data item of the IB IL AI 4/EF-PAC (2878447) module.
AnalogTechnology_9 26/149

9.4 Diagnosis
wDiagCode wAddDiagCode Description
16#0000 16#0000 Function block is deactivated.
16#8000 Function block is in regular operation
16#C100 16#0000 Value of iSelect must be between 0…5.
16#C200 16#0000 No communication with the block. Check process data connection. Device
may not be ready for operation.
16#C210 16#0000 Incorrect dwConfig.
16#xxx1 Incorrect configuration, byte 0 channel 1.
16#xx1x Incorrect configuration, byte 1 channel 2.
16#x1xx Incorrect configuration, byte 2 channel 3.
16#1xxx Incorrect configuration, byte 3 channel 4.
16#C300 16#0000 Range error/error bit.
16#xxx1 Overrange, channel 1.
16#xxx2 Underrange, channel 1.
16#xxx3 Open circuit, channel 1.
16#xxx4 Measured value invalid, channel 1.
16#xxx5 Sensor – analog voltage of channel 1 too low.
16#xxx6 Channel 1 faulty.
16#xx1x Overrange, channel 2.
16#xx2x Underrange, channel 2.
16#xx3x Open circuit, channel 2.
16#xx4x Measured value invalid, channel 2.
16#xx5x Sensor – analog voltage of channel 2 too low.
16#xx6x Channel 2 faulty.
16#x1xx Overrange, channel 3.
16#x2xx Underrange, channel 3.
16#x3xx Open circuit, channel 3.
16#x4xx Measured value invalid, channel 3.
16#x5xx Sensor – analog voltage of channel 3 too low.
16#x6xx Channel 3 faulty.
16#1xxx Overrange, channel 4.
16#2xxx Underrange, channel 4.
16#3xxx Open circuit, channel 4.
16#4xxx Measured value invalid, channel 4.
16#5xxx Sensor – analog voltage of channel 4 too low.
16#6xxx Channel 4 faulty.
16#C400 16#0000 Communication with block aborted/faulty.
16#CFFF 16#0000 Error bit received, cause unknown.
AnalogTechnology_9 27/149

9.5 Appendix
9.5.1 Data types
TYPE
AIEF_ARR_b_0_9 : ARRAY[0..9] OF BYTE;
END_TYPE
AnalogTechnology_9 28/149

10 IL_AI_4_UI
The IL_AI_4_UI_Com function block is recommended for using the modules IB IL AI 4 /I-PAC (2700458) and IB IL
AI 4 /U-PAC (2700459).
For easier handling, the IL_AI_4_UI_Para function block is available to parameterize the module.
The IL_AI_4_UI_Diag function block is indicating the standardized value and the diagnostic information in the event
of an error.
Function block group
The IL_AI_4_UI_Com block is used to parameterize modules IB IL AI 4 /I-PAC (2700458) and IB IL AI 4 /U-PAC
(2700459). In addition, the block outputs the four inputs standardized in a structure. The modules can be
parameterized by using a structure or with the help of the IL_AI_4_UI_Para function block.
The IL_AI_4_UI_Para function block can be used to select the measuring filter and measuring range. The
measuring value is standardized according to the values set at rHighLimit and rLowLimit, and output as a real
value.
The value is output in the udtStatus structure of the IL_AI_4_UI_Com function block or by using the
IL_AI_4_UI_Diag function block at the rCurentValue output. In this block, the structure is split and the standardized
real value is output. In addition, information about the validity of the value as well as an error description for invalid
values can be found here.
If no parameters are set for iMode, iFilter, rHighLimit and/or rLowLimit, the default values of the module are
accepted. All other input parameters require the use of values for operation.
The standard error codes and diagnostic messages are implemented. They are indicated via wDiagCode.
After block activation, the firmware version and the module number are indicated at strFirmware output additionally.
Changes to the parameters in the block are only implemented after a positive edge at the xActivate input.
An error state can be acknowledged with a positive edge at the xActivate input.
AnalogTechnology_9 29/149

10.1 IL_AI_4_UI_Para
The IL_AI_4_UI_Para block is used to parameterize modules IB IL AI 4 /I-PAC (2700458) and IB IL AI 4 /U-PAC
(2700459).

10.1.1 Function block call

10.1.2 Input parameters

Name Type Description


iChannel INT Parameterizes the specified channel:
1 = Channel 1 is being parameterized.
2 = Channel 2 is being parameterized.
3 = Channel 3 is being parameterized.
4 = Channel 4 is being parameterized.
iMode INT Selects the input range:
0 = 0 V….10 V, 0 mA …. 20 mA (default)
1 = +-10 V, 4 mA …. 20 mA
iFilter INT Selects the filter:
0 = 16 times the average value (default)
1 = Filter is disabled
2 = 4 times the average value
3 = 32 times the average value
rHighLimit REAL Setting the upper standardized value.
rLowLimit REAL Setting the lower standardized value.
AnalogTechnology_9 30/149

10.1.3 Inout parameters

Name Type Description


udtPara ANL_UDT_Para_1_5 This structure acquires the parameters.
CH1, CH2, CH3 and CH4 should be used for CHX.
udtPara.CHXiChannel: CH1 = 1, CH2 = 2, CH3 = 3, CH4 = 4
CHX = X: Parameters are accepted
CHX <> X: Parameters are not accepted
udtPara.CHXiMode:
Selects the input range:
0 = 0 V…. 10 V, 0 mA …. 20 mA (default)
1 = +-10 V, 4 mA…. 20 mA
udtPara.CHXiFilter:
Selects the filter
0 = 16 times the average value (default)
1 = Filter is disabled
2 = 4 times the average value
3 = 32 times the average value
udtPara.CHXrHighLimit:
Setting the upper standardized value.
udtPara.CHXrLowLimit:
Setting the lower standardized value.
AnalogTechnology_9 31/149

10.2 IL_AI_4_UI_Com
The function block can be operated in various operating modes. The operating modes are set via iModul, iMode,
iFilter and bSelect. However, bSelect only selects the channels for which the parameterization is to be applied.

10.2.1 Function block call


AnalogTechnology_9 32/149

10.2.2 Input parameters

Name Type Description


xActivate BOOL Rising edge: Activates the function block.
FALSE: Deactivates the function block.
bSelect BYTE Selects the inputs to be parameterized:
bSelect Channel 4 Channel 3 Channel 2 Channel 1
00
01 x
02 x
03 x x
04 x
05 x x
06 x x
07 x x x
08 x
09 x x
0A x x
0B x x x
0C x x
0D x x x
0E x x x
0F x x x x
xVoltage BOOL Selects the connected module
TRUE: IB IL AI 4 /U-PAC (2700459)
FALSE: IB IL AI 4 /I-PAC (2700458)
arrInputPD ANL_ARR_W_1_4 64-bit input of the module
AnalogTechnology_9 33/149

10.2.3 Output parameters

Name Type Description


xReady BOOL FALSE: The function block is executing services.
TRUE: The function block is ready to execute services.
xError BOOL TRUE: An error has occurred. For more details refer to wDiagCode and
wAddDiagCode.
wDiagCode WORD Diagnosis code. Refer to diagnostic table.
strFirmware STRING Firmware version and module number
udtStatus ANL_UDT_Status_1_5 This structure outputs the current module information. CH1, CH2, CH3
and CH4 should be used for CHX.
udtStatus.CHXDataValid:
TRUE = The output value is valid.
FALSE = The output value is invalid.
udtStatus.CHXDiagCode:
Provides information about the error type in the event of an error.
udtStatus.CHXCurentValue:
Provides the standardized analog value as a real value
arrOutputPD ANL_ARR_W_1_4 64-bit output of the module

10.2.4 Inout parameters

Name Type Description


udtPara ANL_UDT_Para_1_5 This structure acquires the parameters.
CH1, CH2, CH3 and CH4 should be used for CHX.
udtPara.CHXiChannel: CH1 = 1, CH2 = 2, CH3 = 3, CH4 = 4
CHX = X: Parameters are accepted
CHX <> X: Parameters are not accepted
udtPara.CHXiMode:
Selects the input range:
0 = 0 V…. 10 V, 0 mA …. 20 mA (default)
1 = +-10 V, 4 mA…. 20 mA
udtPara.CHXiFilter:
Selects the filter
0 = 16 times the average value (default)
1 = Filter is disabled
2 = 4 times the average value
3 = 32 times the average value
udtPara.CHXrHighLimit:
Setting the upper standardized value.
udtPara.CHXrLowLimit:
Setting the lower standardized value.
AnalogTechnology_9 34/149

10.2.5 Diagnosis

DiagCode Description
16#0000 Function block is deactivated
16#8000 Function block is in regular operation
16#8001 Measuring range exceeded (overrange)
16#8002 Open circuit
16#8004 Measured value invalid/no valid measured value available
16#8010 Configuration invalid
16#8020 Supply voltage faulty
16#8040 Device faulty
16#8080 Below measuring range (underrange)
16#C100 Incorrect parameters
16#C101 Invalid parameter for iMode
16#C102 Invalid parameter for iFilter
16#C103 Invalid parameter for bSelect
16#C104 Invalid limit values at rHighLimit and rLowLimit
AnalogTechnology_9 35/149

10.3 IL_AI_4_UI_Diag
The IL_AI_4_UI_Diag block is used for diagnostics.

10.3.1 Function block call

10.3.2 Input parameters

Name Type Description


iChannel INT Parameterizes the specified channel:
1 = Channel 1 is being parameterized.
2 = Channel 2 is being parameterized.
3 = Channel 3 is being parameterized.
4 = Channel 4 is being parameterized.
udtStatus ANL_UDT_Status_1_5 This structure outputs the current module information. CH1, CH2, CH3
and CH4 should be used for CHX.
udtStatus.CHXDataValid
TRUE = The output value is valid.
FALSE = The output value is invalid.
udtStatus.CHXDiagCode
Provides information about the error type in the event of an error.
udtStatus.CHXCurentValue
Provides the standardized analog value as a real value.

10.3.3 Output parameters

Name Type Description


xDataValid BOOL Indicates whether it was possible to calculate the specified value correctly
TRUE = The analog value is valid.
FALSE = The analog value is invalid.
wDiagCode WORD Diagnosis code. Refer to diagnostic table.
rCurrentValue REAL Standardized analog value
AnalogTechnology_9 36/149

10.4 Appendix
10.4.1 Data types
TYPE
ANL_udt_Status_1_5: STRUCT
CH1xDataValid : BOOL;
CH1wDiagCode : WORD;
CH1rCurrentValue: REAL;
CH1iChannel : INT;
CH2xDataValid : BOOL;
CH2wDiagCode : WORD;
CH2rCurrentValue: REAL;
CH2iChannel : INT;
CH3xDataValid : BOOL;
CH3wDiagCode : WORD;
CH3rCurrentValue: REAL;
CH3iChannel : INT;
CH4xDataValid : BOOL;
CH4wDiagCode : WORD;
CH4rCurrentValue: REAL;
CH4iChannel : INT;
END_STRUCT
ANL_udt_Para_1_5: STRUCT
CH1iChannel : INT;
CH1iMode : INT;
CH1iFilter : INT;
CH1rHighLimit : REAL;
CH1rLowLimit : REAL;
CH1wDiagCode : WORD;
CH2iChannel : INT;
CH2iMode : INT;
CH2iFilter : INT;
CH2rHighLimit : REAL;
CH2rLowLimit : REAL;
CH2wDiagCode : WORD;
CH3iChannel : INT;
CH3iMode : INT;
CH3iFilter : INT;
CH3rHighLimit : REAL;
CH3rLowLimit : REAL;
CH3wDiagCode : WORD;
CH4iChannel : INT;
CH4iMode : INT;
CH4iFilter : INT;
CH4rHighLimit : REAL;
CH4rLowLimit : REAL;
CH4wDiagCode : WORD;
END_STRUCT
ANL_ARR_AI4UI_ChaDats : ARRAY[1..4] OF ANL_UDT_AI4UI_ChaDat;
ANL_UDT_AI4UI_ChaDat :STRUCT(* Internal data of one channel *)
iChannel : INT; (* Channel number *)
iMode : INT; (* Parameter *)
iFilter : INT; (* Parameter *)
rHighLimit : REAL; (* Parameter *)
rLowLimit : REAL; (* Parameter *)
xConfigured : BOOL; (* TRUE = Channel is configured and configuration is valid *)
xSelected : BOOL; (* TRUE = Channel is selected by bSelect *)
AnalogTechnology_9 37/149

wDiagCode : WORD; (* Diag code *)


xDataValid : BOOL; (* internal xDataValid *)
wInput : WORD; (* internal input process data *)
wOut : WORD; (* internal output process data *)
rCurVal : REAL; (* internal calculated current value *)
xError : BOOL; (* Error *)
END_STRUCT
END_TYPE
AnalogTechnology_9 38/149

11 IL_AI_8
The IL_AI_8 function block is used to parameterize and standardize measured values for the terminal types listed
in chapter 5 Function blocks.
A plausibility check is performed on the parameter data entered with this block.
Errors detected by the function block are displayed in the diagnostic register of the function block. These include
device error messages and exceeding parameter data limit values. A block call for each Inline terminal is required.

11.1 Operating modes


11.1.1 Enabling
In order of using the block, integrate it into your application. A block call for each analog terminal is required.
Activate it after the first PLC cycle. This is done by controlling the xActivate input variable from FALSE to TRUE.
The channels are parameterized with a positive signal edge at xActivate. As soon as this has been completed
successfully, this is indicated by xReady FALSE => TRUE.
Please note that at least one cycle is required with xActivate = FALSE for the internal variables to be initialized.
If the module is stopped (voltage failure, bus system stopped, etc.) it may be necessary to repeat
parameterization. xActivate should be controlled as described above.
As soon as all the selected channels have been read in without any errors, this is indicated by the xSelectValid
output parameter = TRUE. If a channel is read in with an error (e.g. limit value exceeded), the status of the
xSelectValid output parameter = FALSE. The error cause can be determined using the wDeviceDiagCode block
parameter.

11.1.2 Parameterizing analog channels


In order of parameterizing the channels the UDT_IL_AI8_Para parameter structure must be provided with the
corresponding block parameters. The xActivate input parameter must have a positive edge. It can only be
reparameterized with a positive edge. The end of parameterization is indicated by xReady (FALSE => TRUE). This
procedure is also required to reset an error that has been removed. The function block performs a plausibility check
on the specified parameter values. If invalid values have been specified for a parameter, the block generates an
error message (wDiagCode and wAddDiagCode), which precisely identifies the faulty channel and parameter.
The parameters are provided with the default values on initial instantiation of the block. The block parameter
initialization values correspond to the default values of the analog terminals.

11.1.3 Outputting standardized measured values


In order to read measured values or error messages for channels 1 - 8 of an analog terminal, the selected input
variable must be provided with a corresponding value.
The channels are read in order to channel 1 to 8. Therefore, the selected input parameter must be provided with a
corresponding value. The activated bits of the selected parameter permit the channels to be read. Therefore, the
latest significant bit (bit 0) corresponds to channel 1 the most significant bit (bit 7) corresponds to channel 8. Not
selected channels are skipped. So used channels will be read faster.
In addition, standardization can be deactivated for certain channels with standardization block parameter = FALSE.
This increases the speed, especially for slow CPUs (-> no floating point calculation). The measured values, validity
indication, and channel-specific error messages for channels are indicated and output following activation of the
block in the UTD_IL_AI8_Data structure of the Data output parameter. The values read by the terminal are analyzed
by the function block and error messages are returned in the Errorcode variable. Measured values are
standardized in the Value variables as a real value according to the limit values. The process data word (in IL
format) for the channel is stored in the Value_PD variable. The NDR variable (FALSE => TRUE) indicates that a
AnalogTechnology_9 39/149

new measured value has been read for a cycle. If an error is detected for a channel by the function block (e.g. limit
value exceeded), the Error bit is controlled from FALSE to TRUE. The Errorcode contains the error code in IL
format. Please note the last valid measured values are still displayed.
AnalogTechnology_9 40/149

11.2 Function block call

11.3 Input parameters


Name Type Description
xActivate BOOL Block activation / deactivation. This parameter should be
controlled by a value that represents the status of connected I/O
devices (active/not active). This ensures that an incorrect
diagnostic message is not generated by the block when I/O
devices are disconnected. If block processing is activated
(xActivate = TRUE) all the selected channels are read. The
wDiagCode and wAddDiagCode diagnostic registers contain the
status of the function and the terminal.
bSelect BYTE By activating the individual bits from 0 to 7 (correspond to
channels 1 to 8), automatic reading in of the individual channels
is activated.
udtParameter ANL_ARR_IL_AI_8_Para Array of channel input parameter
dwInputAddress DWORD Process data input address for the terminal.

11.4 Output parameters


Name Type Description
xReady BOOL Block is ready, parameterization completed.
xError BOOL Error during initialization or operation.
wDiagCode WORD Diagnostic information.
wAddDiagCode WORD Additional diagnostic information.
xSelectValid BOOL Selected channels are ready.
udtData ANL_ARR_IL_AI_8_Para Measured value and error output.

dwOutputAddress DWORD Process data output address for the terminal.


AnalogTechnology_9 41/149

11.5 Block parameters


11.5.1 Channel parameters
The table describes the UDT_IL_AI_8_Para data structure of the Parameter input parameter.
The channels can be configured with the Filter, Range, Standardization, HighLimit, and LowLimit parameters. To
configure the filter, for example, use the following call at the Parameter input parameter: udtParameter[1].Filter. The
number in the array corresponds to the relevant channel (1 to 8).
For the meaning of the configuration values, please refer to the data sheet.

Name Type Description


Filter INT Filter (value 0 to 3), user setting, see data sheet.
Range INT Measuring range (value 0 to 15), user setting, see data sheet1. Please note: IB IL AI
8/IS-PAC (2861661) terminal is only allowed for measuring range 8 to 10, 12 and 13.
Standardization BOOL TRUE: Standardization enabled, user setting.
HighLimit REAL Upper limit value, user setting.
LowLimit REAL Lower limit value, user setting.
An alternative to writing the parameter from the program to the array is to connect a preceding function block.

11.5.2 Measured values and channel diagnostics


The table describes the UTD_IL_AI_8_Data data structure of the data output parameter. The read measured value
of a channel is represented as a real number in the Value parameter, the process data word is represented in
Value_PD. The NDR bit can be used to determine whether the values have been updated. This bit is always only =
TRUE for one cycle. In the event of a channel-specific error (Error), the cause must be removed. The error is then
reset on the next read cycle.
For the error code, please refer to the data sheet of the module.

Name Type Description


ValuePD WORD Measured value of a channel.
Value REAL Measured value of a channel.
Error BOOL Channel indicates an error.
DeviceDiagCode WORD Error code for the channel (IL format), see data sheet.
NDR BOOL TRUE = New measured value present.
An alternative to calling the measured value information for the program from the array is to connect to a
subsequent function block.
AnalogTechnology_9 42/149

11.6 Diagnosis
wDiagCode wAddDiagCode Description
16#0000 Block is not active.
16#8000 Block is active.
16#C010 Timeout during communication
16#0001 Module not responding or indicates an error Range 0-6 at terminal IB IL
AI8/IS
16#C014 Filter - range limit exceeded
16#CCXX CC = channel, XX = range value
16#C017 Range - limit exceeded
16#CCXX CC = channel, XX = range value
16#C018 LowLimit >= HighLimit
16#00CC CC = channel
If several errors occur simultaneously, only the first error is indicated initially. The other error messages are
displayed once the first error has been removed and acknowledged. The error is reset by generating a positive edge
at xActivate. This process is repeated until all the errors have been removed.
AnalogTechnology_9 43/149

11.7 Appendix
11.7.1 Data types
TYPE
(* UDT_IL_AI_8_Para *)
ANL_UDT_AI_8_IN_V_1 : STRUCT
Filter : INT; (* Filter by mean-value generation *)
Range : INT; (* Current measuring range *)
Standardization : BOOL; (* TRUE: Standardization enabled *)
LoLim : REAL; (* Lower limit value *)
HiLim : REAL; (* Upper limit value *)
END_STRUCT;
(* UDT_IL_AI_8_Data *)
ANL_UDT_AI_8_OUT_V_1 : STRUCT
Value_PD : WORD; (* Measured value as WORD *)
Value : REAL; (* Measured value as REAL *)
Error : BOOL; (* TRUE: Channel indicates an error *)
ErrorCode : WORD; (* Error code of the channel *)
NDR : BOOL; (* TRUE: New value present *)
END_STRUCT;
(* Array of UDT_IL_AI_8_Para *)
ANL_ARR_IL_AI_8_Para : ARRAY[1..8] OF ANL_UDT_AI_8_IN_V_1;
(* Array of UDT_IL_AI_8_Data *)
ANL_ARR_IL_AI_8_Data : ARRAY[1..8] OF ANL_UDT_AI_8_OUT_V_1;
(* Array of Bool for selected channels *)
ANL_ARR_IL_AI_8_SelectCH : ARRAY[1..8] OF BOOL;
END_TYPE
AnalogTechnology_9 44/149

11.7.2 Error codes of the module

Code(hex) Error
16#8001 Overrange
16#8002 Open circuit
16#8004 Measured value invlaid/no valid measured value available
16#8010 Invalid configuration
16#8020 I/O supply voltage fault
16#8040 Module faulty
16#8001 Underrange
AnalogTechnology_9 45/149

12 IL_AO_1_SF
The IL_AO_1_SF function block converts a standardized value at the analog output of the IB IL AO 1/SF (2726298)
and IB IL AO 1/U/SF (2727776) modules.
The IL_AO_1_SF function block outputs a standardized analog value to the analog output of the IB IL AO 1/SF
(2726298) or IB IL AO 1/U/SF (2727776) module.
Example:
Please also refer to chapter 12.5.

Measuring Parameterized Parameterized Applied rNormValue Output at analog


range rLO_Limit rHI_Limit value output
0-10V 2000.0 4000.0 2000.0 0.0
0-10V 2000.0 4000.0 3000.0 5.0
0-10V 2000.0 4000.0 4000.0 10.0
The function block cyclically converts the rNormValue values into analog values for the Phoenix Contact analog
modules IB IL AO 1/SF (2726298) or IB IL AO 1/U/SF (2727776). Errors and error codes will be reported by time if
an error occures. The IB IL AO 1/U/SF (2727776) and IB IL AO 1/SF (2726298) Inline modules provide one analog
output with a voltage range from 0 V to 10 V. Additionally, the IB IL AO 1/SF (2726298) Inline module provides a
current range from 0 mA to 20 mA or 4 mA to 20 mA. The different ranges can be tapped from different connecting
points of the module.

12.1 Function block call


AnalogTechnology_9 46/149

12.2 Input parameters


Name Type Description
xActivate BOOL Rising edge: Activates the function block.
FALSE: Deactivates the function block.
rNormValue REAL Analog value to be output (value in the range between rLO_Limit and rHI_Limit)
rHI_Limit REAL High limit of the normed range
rLO_Limit REAL Low limit of the normed range

12.3 Output parameters


Name Type Description
xActive BOOL FALSE: Function block is not active.
TRUE: Function block is active. Do not start any further action unless xActive is
TRUE after activation!
xError BOOL TRUE: An error has occurred. For more details refer to wDiagCode and
wAddDiagCode.
wDiagCode WORD Diagnosis code. Refer to diagnostic table.
wOutputAddress WORD Output variable of analog channel

12.4 Diagnosis
DiagCode Description
16#0000 Function block is deactivated
16#8000 Function block is in regular operation
C030hex Error from the function block: The limits are not correct. rHILimit <= rLOLimit
C040hex Error from the function block: High limit overranged rIN_AO > rHILimit
C050hex Error from the function block Low limit underranged rIN_AO < rLO_Limit
AnalogTechnology_9 47/149

13 IL_AO
The IL_AO function block serves for parameterization and operation of the Inline analog output modules IB IL AO 2
/U/BP-PAC (2861467 ) and IB IL AO 2 /SF-PAC (2863083).
The function block is responsible for the following tasks:

Parameterization of the the analog module


Standardization and output of the analog values for channel 1 and/or channel 2 and
the diagnostic function by outputting diagnostic codes.

Additionally the IL_AO_Channel function block is to be used for connection or transmission of the standardized
values and their upper and lower limits. With the help of this block, three values (one for each channel) will be
made available by structure to the IL_AO function block at the udtChannelX input parameter.

13.1 Function block call


AnalogTechnology_9 48/149

13.2 Input parameters


Name Type Description
xActivate BOOL Rising edge: Activates the function block.
FALSE: Deactivates the function block.
xReset BOOL Rising edge: Resets the function block.
dwInputAddress DWORD Channel 1+2: Input process data double word
udtChannel1 ST_Value Structure with the analog values, upper and lower limits to be outputted (for
channel 1)
udtChannel2 ST_Value Structure with the analog values, upper and lower limits to be outputted (for
channel 2)
iSelectChannels INT Channel selection:
0 = channel 1 and channel 2
1 = channel 1
2 = channel 2
iModulType INT Module type:
1 = IB IL AO 2/U/BP (unipolar)
2 = IB IL AO 2/U/BP (bipolar)
3 = IB IL AO 2/SF
iOutputBehavior INT Behavior of the outputs in the event of an error:
0 = Outputs hold the last value (Hold)
1 = Outputs are set to 0 (Reset)
iParameters INT Parameterization of the terminal:
0 = volatile parameterization
1 = non-volatile parameterization
bTyp_BP_SF BOOL Parameterization/selection of hardware used
FALSE = IB IL AO 2 /U/BP (2732732)
TRUE = IB IL AO 2 /SF-PAC (2863083)

13.3 Output parameters


Name Type Description
xActive BOOL FALSE: Function block is not active.
TRUE: Function block is active. Do not start any further action
unless xActive is TRUE after activation!
xError BOOL TRUE: An error has occurred. For more details refer to wDiagCode
and wAddDiagCode.
wDiagCode WORD Diagnosis code. Refer to diagnostic table.
wAddDiagCode WORD Additional diagnosis code. Refer to diagnostic table.
udtDiag ANL_UDT_AO_DIAG Additional diag information: iState = State of the internal state
machine
dwOutputAddress DWORD Channel 1 + 2: Output process data double word
AnalogTechnology_9 49/149

13.4 Diagnosis
wDiagCode wAddDiagCode Description
16#0000 16#0000 Function block is deactivated.
16#8000 16#0000 Function block is in regular operation.
16#C200 Error during activation of the block
16#0001 Channel 1: Incorrect parameterization of the upper limit <= lower limit
(rHI_Limit_CH1 <= rLO_Limit_CH1)
16#0002 Channel 2: Incorrect parameterization of the upper limit <= lower limit
(rHI_Limit_CH2 <= rLO_Limit_CH2)
16#0003 Incorrect parameterization channel selection (iSelectChannels)
16#0004 Incorrect parameterization: Module type (iModulType)
16#0005 Incorrect parameterization: Volatile or non-volatile parameterization
(iParameters)
16#0006 Incorrect parameterization: Output behavior in the case of error
(iOutputBehavior)
16#0007 Analog module does not acknowledges parameterization within 5 seconds -
> Timeout
Possible errors:
Incorrect module type was parameterized
Incorrect process data assignment
16#0008 The parameters iModulType and bTyp_BP_SF do not correspond
16#C300 Error in run
16#0001 Channel 1: Input value < lower limit
16#0002 Channel 1: Input value > upper limit
16#0003 Channel 2: Input value < lower limit
16#0004 Channel 2: Input value > upper limit
16#FFFF Error in hardware
16#8010 Invalid configuration or wrong wire bridges
16#8020 Error in the I/O voltage supply.
16#8040 Module is defect.
AnalogTechnology_9 50/149

13.5 IL_AO_Channel
The function block IL_AO_Channel serves to determine the limit values. Corresponding data is made available to
the function block IL_AO_2 as a structure.

13.5.1 Function block call

13.5.2 Input parameters

Name Type Description


wNormValue WORD Analog value to be outputted (value in a range rLO_Limit and rHI_Limit)
rHI_Limit REAL Upper limit value
rLO_Limit REAL Lower limit value

13.5.3 Output parameters

Name Type Description


udtChannel ST_Value Structure with the values analog value to be outputted, upper and lower limits
AnalogTechnology_9 51/149

13.6 Appendix
13.6.1 Data types
TYPE
ST_Value : STRUCT
rNormValue : REAL; (* Input raw value *)
rHI_Limit : REAL; (* Upper limit *)
rLO_Limit : REAL; (* Lower limit *)
END_STRUCT;
ANL_UDT_AO_DIAG : STRUCT
iState : INT;
END_STRUCT;
END_TYPE
AnalogTechnology_9 52/149

14 IL_AO_2_UI
The function block is used for parameterizing and operating the IB IL AO 2/UI-PAC (2700775) Inline analog output
terminal. The input values within the value range (rLoLim and rHiLim) that is set by the user, are standardized and
are output as corresponding analog value by the Inline analog output terminal.
The following output ranges are supported:

Unipolar: 0-10 V/ 0 - 20 mA/ 4 - 20 mA


Bipolar: -10 V - +10 V/ -20 mA - +20 mA

The function block only supports the IB IL format.


The IB IL AO 2/UI-PAC (2700775) Inline analog output terminal can be operated with the IL_AO_2_UI function
block.
The tasks of the function block are the following:

Parameterization of the analog terminal,


standardization and output of analog values for channel 1 and/or channel 2 and
diagnostic function by the output of diagnosis codes.

For the setting or transmission of standardization values and their upper and lower limits, the IL_AO_UI_2_Para
function block has to be used. Using the IL_AO_2_UI function block the values are provided at the input parameter
arrParameter by structure. For differentiated channel diagnostics, the IL_AO_UI_2_Diag function block can be
used. Using this function block the data of the arrDiag structure of IL_AO_2_UI function block can be read out and
provided more easily.
AnalogTechnology_9 53/149

14.1 IL_AO_2_UI_Para
The IL_AO_2_UI_Para function block defines the limit values and the output range. The corresponding data for the
IL_AO_2_UI_Para function block is provided by structure. The illustration in the startup example shows the setting
for both channels.

14.1.1 Function block call

14.1.2 Input parameters

Name Type Description


iChannelNo INT Channel selection
1 Channel 1
2 Channel 2
iRange INT Output range
0 0 V to 10 V
1 -10 V to +10 V
2 0 mA to 20 mA
3 -20 mA to +20 mA
4 4 mA to 20 mA
rHiLim REAL Upper limit value of the standardized range.
rLoLim REAL Lower limit value of the standardized range.
rSetValue REAL Analog value to be output (value in the range between /“rLoLim/” and
/“rHiLim/”).
arrParameter ANL_ARR_Para_1_2 Structure with the values channel selection, output range, analog value
to be output, upper and lower limit.

14.1.3 Inout parameters

Name Type Description


arrParameter ANL_ARR_Para_1_2 Structure with the values channel selection, output range, analog value
to be output, upper and lower limit.
AnalogTechnology_9 54/149

14.2 IL_AO_2_UI
The function block is used for parameterizing and operating the IB IL AO 2/UI-PAC (2700775) Inline analog output
terminal. The input values within the value range (rLoLim and rHiLim) that is set by the user, are standardized and
are output as corresponding analog value by the Inline analog output terminal.
The following output ranges are supported:

Unipolar: 0-10 V/ 0 - 20 mA/ 4 - 20 mA


Bipolar: -10 V - +10 V/ -20 mA - +20 mA

The function block only supports the IB IL format.

14.2.1 Function block call


AnalogTechnology_9 55/149

14.2.2 Input parameters

Name Type Description


xActivate BOOL Rising edge: Activates the function block.
FALSE: Deactivates the function block.
iSelectCH INT Channel selection
1 Channel 1
2 Channel 2
3 Channel 1 and 2
arrParameter ANL_ARR_Para_1_2 Structure with the values channel selection, output range, analog value
to be output, upper and lower limit.
arrProcIN ANL_ARR_W_1_4 Input process data

14.2.3 Output parameters

Name Type Description


xReady BOOL The block is ready for operation and working without errors.
xError BOOL TRUE: An error has occurred. For more details refer to wDiagCode
and wAddDiagCode.
wDiagCode WORD Diagnosis code. Refer to diagnostic table.
wAddDiagCode WORD Additional diagnosis code. Refer to diagnostic table.
arrDiag ANL_ARR_DIAG_1_2 Structure with error message of the analog terminal during the
operation for channel 1 and channel 2.
arrProcOUT ANL_ARR_W_1_4 Output process data
AnalogTechnology_9 56/149

14.2.4 Diagnosis

wDiagCode wAddDiagCode Description


16#0000 16#0000 Function block is deactivated.
16#8000 Function block is in regular operation
16#C100 Configuration errors
16#0001 Incorrect parameterization of the channel selection iSelectCH.
16#0002 Incorrect parameterization of the output range.
16#0003 Incorrect parameterization of the limit values (HiLim <= LoLim)
16#0004 Timeout. Possible errors: An incorrect module type has been parameterized
or the process data assignment is incorrect.
16#0005 Incorrect parameterization of the channel selection iChannelNo.
16#0006 Incorrect parameterization of the limit values and the analog value to be
output.
16#C200 Errors in run.
16#0001 Analog input value > upper limit value.
16#0002 Analog input value < lower limit value.
AnalogTechnology_9 57/149

14.3 IL_AO_2_UI_Diag
The function block IL_AO_2_UI_Diag is used for the simplified readout of data from the arrDiag structure of the
IL_AO_2_UI function block. The output structure is assigned to the function block IL_AO_2_UI_Diag and dissolved
in single output variables.

14.3.1 Function block call

14.3.2 Input parameters

Name Type Description


iChannelNo INT Channel selection
1 Channel 1
2 Channel 2

14.3.3 Output parameters

Name Type Description


xError BOOL TRUE: An error has occurred. For more details refer to wDiagCode and wAddDiagCode.
wErrorCode WORD Error message of the analog terminal during the operation for channel 1 and channel 2:
8001hex: Measuring range exceeded (Overrange).
8002hex: Broken wire (only in operating mode 4-20mA).
8003hex: Short circuit/overload of the output.
8010hex: Invalid configuration.
8020hex: Supply voltage incorrect.
8040hex: Device is defective.
8080hex: Below measuring range(Underrange).

14.3.4 Inout parameters

Name Type Description


arrDiag ANL_ARR_Diag_1_2 Structure with the values channel selection, error message of the analog
terminal for channel 1 and channel 2.
AnalogTechnology_9 58/149

14.4 Appendix
14.4.1 Data types
TYPE
udtDiag : STRUCT
xError : BOOL; (* TRUE: error *)
wErrorCode : WORD; (* Error message *)
iDelay : INT; (* Delay of arrInputPD[3/4] to arrOutputPD[3/4] *)
END_STRUCT;
ANL_ARR_Diag_1_2 : ARRAY [1..2] OF udtDiag;
(* Values for channel parameterization *)
udtPara : STRUCT
iRange : INT; (* Output range *)
rHiLim : REAL; (* Upper limit value *)
rLoLim : REAL; (* Lower limit value *)
rSetValue : REAL; (* Analog value to be output *)
xError : BOOL; (* TRUE: channel indicates an error *)
END_STRUCT;
ANL_ARR_Para_1_2 : ARRAY [1..2] OF udtPara;

(** At 1 ms cycle the module needs up to 12 cycles for mirroring the process data.
** New output process data in between this duration are ignored!
*)
ANL_ARR_AO2UI_PD_BUF : ARRAY[0..31] OF WORD;
ANL_ARR_AO2UI_PD_BAK : ARRAY[1..2] OF ANL_ARR_AO2UI_PD_BUF;
ANL_UDT_AO2UI_CHA : STRUCT
xSelected : BOOL; (* TRUE: channel is selected *)
iRange : INT; (* Output range of channel *)
rLoLim : REAL; (* Lower limit value of channel *)
rHiLim : REAL; (* Upper limit value of channel *)
rMaxLimit : REAL; (* Max allowable value for this output range *)
rMinLimit : REAL; (* Min allowable value for this output range *)
wConfigCode : WORD; (* Configuration parameter *)
wParameter : WORD;
rParameter : REAL;
END_STRUCT;
ANL_ARR_AO2UI_CHA : ARRAY[1..2] OF ANL_UDT_AO2UI_CHA;
END_TYPE
AnalogTechnology_9 59/149

15 IL_AO4_8
The IL_AO4_8 function block is used to parameterize and standardize measured values for the IB IL AO 4/8/U/BP-
PAC (2878036) and IB IL AO 4/8 /U/BP 2MBD-PAC (2878052) terminal types. A plausibility check is performed on
the parameter data entered with this block. Errors detected by the function block are displayed in the diagnostic
register of the function block. These include exceeding parameter data limit values. A function block call is required
for each Inline terminal.

15.1 Function block call

15.2 Input parameters


Name Type Description
Activate BOOL Rising edge: Activates the function block.
FALSE: Deactivates the function block.
Select BYTE By activating the individual bits from 0 - 7 (correspond to channels 1 to
8), automatic reading in of the individual channels is activated
(Multiplex mode).
Parameter UDT_IL_AO4_8_Para Structure with parameter data for the terminals (see 15.4.2).
InputAddress1 WORD Process data input address for the terminal (status message).
AnalogTechnology_9 60/149

15.3 Output parameters


Name Type Description
Ready BOOL Function block is ready and parameterization is completed.
xError BOOL TRUE: An error has occurred. For more details refer to wDiagCode
and wAddDiagCode.
SelectValid BOOL Selected channels are ready.
wDiagCode WORD Diagnosis code. Refer to diagnostic table.
wAddDiagCode WORD Additional diagnosis code. Refer to diagnostic table.
Confirmation UDT_IL_AO4_8_Conf Structure with confirmation data (see 15.4.3).
wOutputAddress1 WORD Process data output address for the terminal (commands).
wOutputAddress2 WORD Process data output address for the terminal (parameters/output
values).
wOutputAddress3 WORD Process data output address for the terminal (parameters/output
values).
wOutputAddress4 WORD Process data output address for the terminal (parameters/output
values).
wOutputAddress5 WORD Process data output address for the terminal (parameters/output
values).
AnalogTechnology_9 61/149

15.4 Function block parameters


15.4.1 Channel parameters
The channels can be configured with the Hold and Range parameters. For the meaning of the configuration values,
please refer to the data sheet. The value to be written is written to the Value parameter in real format. The
maxValue and minValue limit values are used for standardization. If the value has been successfully transmitted to
the module, the Done parameter = TRUE for one cycle. In the event of an error, the Error bit is assigned. Errors
occur if the value to be written is greater or smaller than the limit values, or if the limit values are faulty (minValue >
maxValue).

15.4.2 UDT_AO4_8_Para structure parameters

Name Type Description


HOLD BOOL Output behavior on bus reset.
Range INT Channel output range.
Value REAL Set point.
MinValue REAL Minimum set point.
MaxValue REAL Maximum set point.

15.4.3 UDT_AO4_8_Data structure confirmation

Name Type Description


DONE BOOL Set point transmitted (for one cycle set to TRUE).
AnalogTechnology_9 62/149

15.5 Diagnosis
wDiagCode wAddDiagCode Description
16#0000 16#0000 Function block is deactivated.
16#8300 16#0000 Function block is in regular operation
16#C001 Timeout
16#0000 Timeout at request to module.
16#C011 Range limit exceeded.
16#000X X = Channel
16#C012 MinValue > MaxValue
16#000X X = Channel
16#C013 Value < MinValue
16#000X X = Channel
16#C014 Value > MaxValue
16#000X X = Channel
16#C015 MinValue = MaxValue
16#000X X = Channel
If several errors occur simultaneously, only the first error is indicated initially. The other error messages are
displayed once the first error has been removed and acknowledged. The error is reset by generating a positive edge
at Activate. This process is repeated until all the errors have been removed.
AnalogTechnology_9 63/149

15.6 Appendix
15.6.1 Data types
TYPE
(* UDT_AO4_8_Para *)
Analog_UDT_AO4_8_IN : STRUCT
Hold : BOOL; (* Output behavior on bus reset *)
Range : INT; (* Channel output range *)
Value : REAL; (* Set point *)
MinValue : REAL; (* Minimum set point *)
MaxValue : REAL; (* Maximum set point *)
END_STRUCT;
(* UDT_AO4_8_Data *)
Analog_UDT_AO4_8_OUT : STRUCT
(* Set point transmitted (for one cycle set to TRUE) *)
Done : BOOL;
END_STRUCT;
UDT_IL_AO4_8_Para : ARRAY[1..8] OF Analog_UDT_AO4_8_IN;
UDT_IL_AO4_8_Conf : ARRAY[1..8] OF Analog_UDT_AO4_8_OUT;
AR_W_1_8 : ARRAY[1..8] OF WORD;
END_TYPE
AnalogTechnology_9 64/149

16 ANL_IL_SGI_2P_EF
We recommend the ANL_IL_SGI_2P_EF function block when using the IB IL SGI 2/P/EF-PAC (2702373) module.
For easier handling, the following function blocks are available additionally:

ANL_IL_SGI_2P_EF_Para,
ANL_IL_SGI_2P_EF_Adju,
ANL_IL_SGI_2P_EF_Val,
ANL_IL_SGI_2P_EF_DIEN,
ANL_IL_SGI_2P_EF_DIDE.

The ANL_IL_SGI_2P_EF_Para and ANL_IL_SGI_2P_EF_Adju function blocks are sufficient to start up the IB IL
SGI 2/P/EF-PAC (2702373) module.
The ANL_IL_SGI_2P_EF_Val function block is for decoding the measurement data.
The ANL_IL_SGI_2P_EF_DIEN and ANL_IL_SGI_2P_EF_DIDE function blocks can be used for decoding the error
code of the ANL_IL_SGI_2P_EF block.
The ANL_IL_SGI_2P_EF function block is the main block for communication with an IB IL SGI 2/P/EF-PAC
(2702373) module.
In addition, the Asyn_Com library is required for startup.
NOTE: Do not use the Asyn_Com struct of the ANL_IL_SGI_2P_EF with another function block.

16.1 Function block call


AnalogTechnology_9 65/149

16.2 Input parameters


Name Type Description
xActivate BOOL Rising edge: Activates the function block.
FALSE: Deactivates the function block.
bSelect BYTE Selects the channel to be used
0: Channel 1 and channel 2
1: Channel 1
2: Channel 2
xSetDefaultSettings BOOL Rising edge: Resets to factory defaults (PCP object 16#009A).
xReadExtValue BOOL Rising edge: Reads out measured and display values.
xReadMinMaxVal BOOL Rising edge: Reads out min./max. values.
xResetMinMaxVal BOOL Rising edge: Resets min./max. values.
arrInputPD ANL_ARR_SGI_PD Input process data.

16.3 Output parameters


Name Type Description
xActive BOOL FALSE: Function block is not active.
TRUE: Function block is active. Do not start any further action unless
xActive is TRUE after activation!
xError BOOL TRUE: An error has occurred. For details refer to udtSGI_Data.udtDiag
arrOutputPD ANL_ARR_SGI_PD Output process data.

16.4 Inout parameters


Name Type Description
udtSGI_Data ANL_UDT_SGI_2P_EF Data structure for IL_SGI_2P_EF.
udtAsynCom ASYN_UDT_COM Data exchange structure for asynchronous communication.
Connected to AsynCom* function block.
AnalogTechnology_9 66/149

16.5 Diagnosis
wDiagCode wAddDiagCode Description
16#0000 16#00000000 Function block is deactivated
16#8000 16#00000000 Function block is in regular operation
16#8100 16#0000.0000 Initialization.
16#C110 Invalid input value.
16#0000.0001 Invalid input parameter at bSelect.
16#0000.0102 Invalid mean value - channel 1.
16#0000.0202 Invalid mean value - channel 2.
16#0000.0103 Invalid characteristic - channel 1.
16#0000.0203 Invalid characteristic - channel 2.
16#0000.0104 Invalid nominal load - channel 1.
16#0000.0204 Invalid nominal load - channel 2.
16#0000.0105 Invalid adjustment value - channel 1.
16#0000.0205 Invalid adjustment value - channel 2.
16#0000.0106 Invalid conversion time - channel 1.
16#0000.0206 Invalid conversion time - channel 2.
16#0000.0107 Invalid Characteristic value - channel 1.
16#0000.0207 Invalid Characteristic value - channel 2.
16#0000.0108 Invalid adjustment value2 - channel 1.
16#0000.0208 Invalid adjustment value2 - channel 2.
16#C210 16#0000.0000 Device faulty.
16#C211 16#0000.0000 Measured value invalid/no valid measured value available (e.g., because
channel was not configured).
16#C212 Measuring range exceeded (overrange).
16#0000.0100 Channel 1.
16#0000.0200 Channel 2.
16#C213 Below measuring range (underrange).
16#0000.0100 Channel 1.
16#0000.0200 Channel 2.
16#C214 Open circuit.
16#0000.0100 Channel 1.
16#0000.0200 Channel 2.
16#C215 16#0000.0000 Supply voltage faulty.
16#C310 Error PCP_CONNECT.
16#0000.C410 Timeout PCP_CONNECT.
16#xxxx.xxxx Error of PCP_CONNECT.
16#C311 Error PCP_READ.
16#0000.C411 Timeout PCP_READ.
16#xxxx.xxxx Error of PCP_READ.
16#C312 Error PCP_WRITE.
16#0000.C412 Timeout PCP_WRITE.
16#xxxx.xxxx Error of PCP_WRITE.
16#C350 RDREC error.
AnalogTechnology_9 67/149

16#0000.C411 Timeout RDREC.


16#xxxx.xxxx Error of RDREC.
16#C351 WRREC error.
16#0000.C412 Timeout WRREC.
16#xxxx.xxxx Error of WRREC.
16#C411 16#0000.0000 Error while reading the firmware version.
16#C510 Error of AsynCom function block.
16#0000.0010 Error at input parameter strPartner/dwSlot.
16#xxxx.xxxx See documentation of AsynCom function block .
AnalogTechnology_9 68/149

16.6 ANL_IL_SGI_2P_EF_Para
This function block parameterizes the ANL_IL_SGI_2P_EF main block. The input parameters, iFilter,
iCharacteristic, rNominalWeight, rAdjustValue and iConversionTime, of a channel are transferred to the main block
via the structure. The channel to be parameterized by the block is selected via the bSelect input.
All parameters are registered in ANL_IL_SGI_2P_EF with the rising edge of ANL_IL_SGI_2P_EF.xActivate.
Changes at ANL_IL_SGI_2P_EF_Para have no effect until next rising edge of ANL_IL_SGI_2P_EF.xActivate.

16.6.1 Function block call


AnalogTechnology_9 69/149

16.6.2 Input parameters

Name Type Description


bSelect BYTE Selects the channel to be used
0: Channel 1 and channel 2
1: Channel 1
2: Channel 2
iFilter INT Setting the filter of the channel
0: 16-sample mean value
1: No mean value
2: 4-sample mean value
3: 32-sample mean value
4: Dynamic filter
iCharacteristic INT Properties of the strain gauge characteristic
0 = ±1 mV/V
1 = ±2 mV/V
2= ±3 mV/V
3 = ±3.33 mV/V
4 = ±4 mV/V
5= ±5 mV/V
6 = ±6 mV/V
wCharacteristic WORD Used Characteristic value
Min. value = 16#03EB = 0,1 mV/V
Max. value = 16#FFFF = 6,5535 mV/V
Default value = 16#4E20 = 2 mV/V
rNominalWeight REAL Nominal load of the strain gauge (e.g. 10.00 for 10 kg)
rAdjustValue REAL Adjusted value in % of the nominal load.
rAdjustValue2 REAL Adjusted value2 in % of the nominal load.
iConversionTime INT Conversion time of the analog-to-digital converter
0: 100 ms
1: 12.5 ms
2: 200 µs
3: 500 µs
4: 1 ms
5: 2 ms
6: 5 ms
7: 10 ms
8: 20 ms
9: 50 ms

16.6.3 Output parameters

Name Type Description


xError BOOL Invalid value at bSelect (< 0 or > 2).

16.6.4 Inout parameters

Name Type Description


udtSGI_Data ANL_UDT_SGI_2P_EF Data structure for IL_SGI_2P_EF.
AnalogTechnology_9 70/149

16.7 ANL_IL_SGI_2P_EF_Adju
This auxiliary block supports the following functions:
Zero point:
Once the input xZeroPoint is activated, the terminal determines the zero point, and sets the status bit xZeroPoint
to TRUE, when it is reached.
Contact Ka_Kb:
A resistance can be added with the potential-free contact. The upper and lower switching threshold can be defined
via the variables wKa_Kb_Up and wKa_Kb_Dn. The behavior of the contact can be defined via the input iKa_Kb.
The contact is activated or deactivated via the input xKa_Kb.
Adjustment:
The terminal determines the current measured value and is adjusted to the adjustment value. Each weight value is
now displayed with the highest possible degree of accuracy. Before the adjustment process can be performed, the
zero point must be defined and the scale loaded with the adjustment weight.
Tare:
The tare function calculates the difference between the gross and net weight.
ResetTara:
The ResetTara function resets the tare function.

16.7.1 Function block call

16.7.2 Input parameters


AnalogTechnology_9 71/149

Name Type Description

bSelect BYTE Selects the channel to be used


0: Channel 1 and channel 2
1: Channel 1
2: Channel 2
xAdjust BOOL Rising edge: Adjusts - Adjustment value(PCP object 16#0092).
xAdjust2 BOOL Rising edge: Adjusts - Adjustment value2 (PCP object 16#0092).
xTara BOOL Rising edge: Tares (PCP object 16#0091).
xResetTara BOOL Rising edge: Reset Tara via process data.
xZeroPoint BOOL Rising edge: Sets zero point of the channel (PCP object 16#0092).
xKa_Kb BOOL Rising edge: Adjusts shunt (PCP object 16#00A0).
iKa_Kb INT Contact behavior.

0: N/O contacts can be controlled via “Control Static” PCP object (0092hex)
1: Close in the event of upper switching threshold overrange and open in the event
of lower switching threshold underrange
2: Open in the event of upper switching threshold overrange and close in the event
of lower switching threshold underrange
3: Close when within the lower and upper switching threshold
4: Open when within the lower and upper switching threshold

wKa_Kb_Up BOOL Upper switching threshold.


-32512 … +32512
wKa_Kb_Dn BOOL Lower switching threshold.
-32512 … +32512
AnalogTechnology_9 72/149

16.7.3 Output parameters

Name Type Description


xError BOOL Invalid value at bSelect (< 0 or > 2).

16.7.4 Inout parameters

Name Type Description


udtSGI_Data ANL_UDT_SGI_2P_EF Data structure for IL_SGI_2P_EF.
AnalogTechnology_9 73/149

16.8 ANL_IL_SGI_2P_EF_Val
This auxiliary block decrypts the data structure udtSGI_Data of the main block, and outputs data like firmware
version, measured values, min/max values, as well as display values.
The function block also outputs some status information on the terminal.
This function block has to be instantiated separately for each channel.

16.8.1 Function block call

16.8.2 Input parameters

Name Type Description


bSelect BYTE Selects the channel to be used
0: Channel 1 and channel 2
1: Channel 1
2: Channel 2
AnalogTechnology_9 74/149

16.8.3 Output parameters

Name Type Description


xError BOOL Invalid value at bSelect (< 0 or > 2).
xValid BOOL TRUE: The measured values output are valid.
rVal REAL Real value of wVal, see below.
wVal WORD Standardized measured value of the specified channel. wVal is the raw value of input
process data IN1. For details please refer to the IB IL SGI 2/P/EF-PAC (2702373)
datasheet.
rMinVal REAL Minimum value of the channel (from process data).
rMaxVal REAL Maximum value of the channel (from process data).
rDisplayVal REAL Display value of the channel (For details please refer to PCP object 16#0083 in the IB
IL SGI 2/P/EF-PAC (2702373) datasheet).
Has to be enabled with ANL_IL_SGI_2P_EF.xReadExtValue := TRUE.
rFloatVal REAL Value in extended float format of the channel (For details please refer to PCP object
16#0082 in the IB IL SGI 2/P/EF-PAC (2702373) datasheet).
Has to be enabled with ANL_IL_SGI_2P_EF.xReadExtValue := TRUE.
xStandStill BOOL TRUE: Stand still reached (corresponding LED on display is on)
FALSE: Stand still not reached (corresponding LED on display is off) (For details
please refer to PCP object 16#0093 in the IB IL SGI 2/P/EF-PAC (2702373) datasheet)
xZeroPoint BOOL TRUE: Zero point reached (corresponding LED on display is on)
FALSE: Standstill not reached (corresponding LED on display is off) (For details
please refer to PCP object 16#0093 in the IB IL SGI 2/P/EF-PAC (2702373)
datasheet).
xNettoValue BOOL TRUE: The tare function was activated; the net value is displayed (corresponding LED
on display is on)
FALSE: The tare function was not activated; the gross value is displayed
(corresponding LED on display is on) (For details please refer to PCP object 16#0093
in the IB IL SGI 2/P/EF-PAC (2702373) datasheet)
xDefault BOOL TRUE: The adjustment values do not correspond to the default setting
FALSE: The adjustment values correspond to the default setting (For details please
refer to PCP object 16#0093 in the IB IL SGI 2/P/EF-PAC (2702373) datasheet)
wDeviceInfo WORD Firmware version and module ID.

16.8.4 Inout parameters

Name Type Description


udtSGI_Data ANL_UDT_SGI_2P_EF Data structure for IL_SGI_2P_EF.
AnalogTechnology_9 75/149

16.9 ANL_IL_SGI_2P_EF_DIDE
In the event of an error at the main block, the block displays the diagnostics as text in German. The source code is
neither read- nor write-protected, and can be adapted by the user to individual requirements. In this way, diagnostic
messages can be changed, expanded, or translated into a different language. The text output of the outputs
strDiagInfo and strAddDiagInfo is limited to 80 characters respectively.

16.9.1 Function block call

16.9.2 Input parameters

Name Type Description


xError BOOL TRUE: An error has occurred. For more details refer to wDiagCode and wAddDiagCode.

16.9.3 Output parameters

Name Type Description


strDiagInfo STRING The output displays the diagnostics of the main block as German text.
strAddDiagInfo STRING The output displays the expanded diagnostics of the main block as German text.

16.9.4 Inout parameters

Name Type Description


udtSGI_Data ANL_UDT_SGI_2P_EF Data structure for IL_SGI_2P_EF.
AnalogTechnology_9 76/149

16.10 ANL_IL_SGI_2P_EF_DIEN
In the event of an error at the main block, the block displays the diagnostics as text in English. The source code is
neither read- nor write-protected, and can be adapted by the user to individual requirements. In this way, diagnostic
messages can be changed, expanded, or translated into a different language. The text output of the outputs
strDiagInfo and strAddDiagInfo is limited to 80 characters respectively.

16.10.1 Function block call

16.10.2 Input parameters

Name Type Description


xError BOOL TRUE: An error has occurred. For more details refer to wDiagCode and wAddDiagCode.

16.10.3 Output parameters

Name Type Description


strDiagInfo STRING The output displays the diagnostics of the main block as English text.
strAddDiagInfo STRING The output displays the expanded diagnostics of the main block as English text.

16.10.4 Inout parameters

Name Type Description


udtSGI_Data ANL_UDT_SGI_2P_EF Data structure for IL_SGI_2P_EF.
AnalogTechnology_9 77/149

16.11 Appendix
16.11.1 Data types
TYPE
(* Process data *)
ANL_ARR_SGI_PD : ARRAY[0..2] OF WORD;
(* ANL_IL_SGI_2P_EF_Adju *)
ANL_UDT_SGI_ADJUST : STRUCT
(*Inputs*)
xAdjust : BOOL;
xAdjust2 : BOOL;
xSetZeroPoint : BOOL;
xTara : BOOL;
xResetTara : BOOL;
xKa_Kb : BOOL;
wKa_Kb : WORD;
wKa_Kb_Up : WORD;
wKa_Kb_Dn : WORD;
END_STRUCT;
(* ANL_IL_SGI_2P_EF_Para *)
ANL_UDT_SGI_PARA : STRUCT
(* Inputs *)
iFilter : INT;
iCharacteristic : INT;
wCharacteristic : WORD;
rNominalWeight : REAL;
iConversionTime : INT;
rAdjustValue : REAL;
rAdjustValue2 : REAL;
wAdjustValue : WORD;
wAdjustValue2 : WORD;
wNominalWeight : WORD;
END_STRUCT;
(* ANL_IL_SGI_2P_EF_Val *)
ANL_UDT_SGI_VALUE : STRUCT
(* Outputs *)
rVal : REAL;
xValid : BOOL;
rMinVal : REAL;
rMaxVal : REAL;
arrFloatValue : SGI_2P_PN_ARR_B_1_4;
arrDisplayValue : SGI_2P_PN_ARR_B_1_4;
xStandstill : BOOL;
xZeroPoint : BOOL;
xNettoValue : BOOL;
xDefault : BOOL;
END_STRUCT;
(* Diag struct *)
ANL_UDT_SGI_DIAG : STRUCT
wDiagCode : WORD;
dwAddDiagCode : DWORD;
END_STRUCT;
(* Struct for one channel *)
ANL_UDT_SGI_CHANNEL : STRUCT
udtAdjust : ANL_UDT_SGI_ADJUST;
udtPara : ANL_UDT_SGI_PARA;
AnalogTechnology_9 78/149

udtVal : ANL_UDT_SGI_VALUE;
xSelected : BOOL; (* TRUE- Channel is active *)
xAdjust : BOOL;
xTara : BOOL;
xZeroPoint : BOOL;
xKa_Kb : BOOL;
wConfig : WORD;(* Config parameter *)
(* Padding *)
wPadding : DWORD;
END_STRUCT;
(* Array of channels *)
ANL_ARR_SGI_CHANNELS : ARRAY[1..2] OF ANL_UDT_SGI_CHANNEL;
ANL_UDT_SGI_2P_EF : STRUCT
iState : INT; (* Actual state of the state machine *)
wDeviceInfo : WORD; (* Firmware of the device *)
xConnect : BOOL; (* Activate the AysnCom-FB *)
xWrite : BOOL; (* Activate write/service *)
xRead : BOOL; (* Activate read service *)
iCNT : INT; (* Number of data to be read/write *)
wIndexWrite : WORD; (* PCP-command write *)
wSubIndexWrite : WORD; (* Add. PCP-command write *)
wIndexRead : WORD; (* PCP-command read *)
wSubIndexRead : WORD; (* Add. PCP-command read *)
iValue : INT; (* Internal paramter *)
xConnectError : BOOL; (* Error during connection *)
xWriteDone : BOOL; (* Write process successfully finished *)
xWriteError : BOOL; (* Error write *)
xNDR : BOOL; (* New data received *)
xReadError : BOOL; (* Error read *)
xConnectValid : BOOL; (* Valid connection exits *)
xSetDefaultSettings : BOOL; (* Reset on default settings *)
udtDiag : ANL_UDT_SGI_DIAG; (* Diag struct *)
arrCH : ANL_ARR_SGI_CHANNELS; (* Array of the two channels *)
END_STRUCT;
END_TYPE
AnalogTechnology_9 79/149

17 IL_SGI_1_CAL
The IL_SGI_1_CAL function block is intended for parameterization and operation of the IB IL SGI 1 /CAL (2700064)
module for load cells and force transducers.
For easier handling, the following function blocks are available additionally:

IL_SGI_1_CAL_Para,
IL_SGI_1_CAL_AddV,
IL_SGI_1_CAL_Adj,
IL_SGI_1_CAL_Diag,
IL_SGI_1_CAL_SMP.

In order to operate the module, only the IL_SGI_1_CAL, IL_SGI_1_CAL_Adj as well as the IL_SGI_1_CAL_Para
blocks are required. The other blocks are used to meet additional requirements.

17.1 Function block call


AnalogTechnology_9 80/149

17.2 Input parameters


Name Type Description
xActivate BOOL Rising edge: Activates the function block.
FALSE: Deactivates the function block.
xReset BOOL Rising edge: Resets the function block.
StrCR STRING Communication reference. Depends on INTERBUS configuration.
xExtendedValues BOOL Rising edge:
Reads extended configuration values.
iResolution INT 0: Without decimal places
1: 0…3000 Raw value * d
2: 0…30000 Raw value * d / 10
1 and 2 are only possible as from firmware version 1.30.
Example:
0 1 2
Data word 000Ehex = 14dec — 14.0
Conversion 0126hex = 294dec 294 * d 14.7
Measured value 0B77hex = 2935dec 2935 * d / 10 14.675
d = division factor
xDefaultSettings BOOL Reset to default settings.
xMeasurementProtocol BOOL Rising edge:
Saves the current measured value with tare value, date, measured value
number, status and serial number. The process can be repeated after 1.1
seconds. During this action, the “Protocol at work” status bit is set.
(Service91)
xReadLastProtocol BOOL Last logged measurement.
xReadSelectedProtocol BOOL Selected logged measurement.
xBaseNumberProtocol BOOL Enables the protocol number for IL_SGI_CAL_1_SMP.
wStatusWord WORD Process data word IN 1.
wInputAddress WORD Process data word IN 2.

17.3 Output parameters


Name Type Description
xActive BOOL FALSE: Function block is not active.
TRUE: Function block is active. Do not start any further action unless xActive is
TRUE after activation!
xError BOOL TRUE: An error has occurred. For more details refer to wDiagCode and
wAddDiagCode.
wDiagCode WORD Diagnosis code. Refer to diagnostic table.
wAddDiagCode WORD Additional diagnosis code. Refer to diagnostic table.
rValue REAL Standardized measured value.
wControlWord WORD Process data word OUT 1.
wOutputAddress WORD Process data word OUT 2.
AnalogTechnology_9 81/149

17.4 Inout parameters


Name Type Description
udtPara udtSGI_1_CAL Data structure for IL_SGI_1_CAL.

17.5 Diagnosis
wDiagCode wAddDiagCode Description
16#0000 16#0000 Function block is deactivated.
16#8000 16#0000 Function block is in regular operation.
16#C100 16#0000 Timeout while reading the firmware version.
16#C101 16#0000 Timeout during initialization.
16#C111 16#0000 Error message from the terminal during initialization.
16#C113 16#0000 Invalid characteristic value.
16#C114 16#0000 Invalid nominal load.
16#C115 16#0000 Invalid adjustment value.
16#C116 16#0000 Invalid mean value.
16#C118 16#0000 Invalid floating point.
16#C301 16#0000 Timeout during operation.
16#C312 Error message from the terminal during operation.
16#8001 Overrange.
16#8002 Open circuit.
16#8004 Measured value invalid/no valid measured value available
(e.g., because channel was not configured).
16#8020 Supply voltage faulty.
16#8040 Device faulty.
16#8090 Underrange.
16#C050 Error message in PCP mode.
16#0020 Service cannot be executed in current state.
16#0021 Service cannot be executed in current state.
16#xx30 Outside value range or parameterization error.
16#0000 Hardware fault.
16#8C00 Refer to data sheet of the IB IL SGI Error message in PCP mode not causing operation to be
1 /CAL (2700064) module interrupted.
AnalogTechnology_9 82/149

17.6 IL_SGI_1_CAL_Para
This auxiliary block groups the iFilter, iCharacteristic, rNominalWeight and rAdjustValue input parameters of one
channel to form a data structure, which is transferred to the udtChannel1 or udtChannel2 inputs of the
IL_SGI_1_CAL block for parameterization.

17.6.1 Function block call


AnalogTechnology_9 83/149

17.6.2 Input parameters

Name Type Description


iCharacteristic INT Nominal characteristic value
0 = ±1 mV/V
1 = ±2 mV/V
2= ±3 mV/V
3 = ±3.33 mV/V
4 = ±4 mV/V
5= ±5 mV/V
iOrdinalNumber INT Ordinal number:
0: 2nd ordinal number
1: 4th ordinal number
2: 6th ordinal number
3: 8th ordinal number
iFilter INT Enables/disables internal mean-value generation
0: Critical attenuation
1: Bessel
2: ButterWorth
3: TschebyScheff 05 dB
iFrequencyLimit INT Cut-off frequency
0: 1 Hz
1: 0.5 Hz
2: 0.2 Hz
3: 0.1 Hz
4: 0.05 Hz
xSaveRemanend BOOL FALSE: Do not store configuration table retentively.
TRUE: Store configuration table retentively.
rAdjustValue REAL This value is used for adjustment. The current measured value is converted to the
adjustment value.
Where:
0.0 < rAdjustValue < 65535.0
rDivisionCount REAL Permissible division factors
0.001 0.01 0.1 1.0 10.0
0.002 0.02 0.2 2.0 20.0
0.005 0.05 0.5 5.0 50.0
There are 3 conditions.
The following applies:
1) uintNominalWeight / rDivisionCount < 3000
2) uintNominalWeight > rDivisionCount
3) rDivisionCount > 0.0
iMeasurementUnit INT Measurement unit:
0: “g”
1: “kg”
2: “t”
unitNominalWeight UINT Strain gauge nominal load (maximum power).

17.6.3 Inout parameters

Name Type Description


udtPara udtSGI_1_CAL Data structure for IL_SGI_1_CAL.
AnalogTechnology_9 84/149

17.7 IL_SGI_1_CAL_AddV
This auxiliary block decodes the udtPara data structure of the IL_SGI_1_CAL function block. It contains the
following data, the firmware version, minimum/maximum measured values as well as measured and display values
of the channels in the highest possible accuracy of the terminal.

17.7.1 Function block call

17.7.2 Output parameters

Name Type Description


rTaraValueFloat REAL Tare value in float format.
rTaraValue REAL Tare value in REAL format.
rDisplayValueFloat REAL Display value in float format.
rDisplayValue REAL Display value in REAL format.
rMeasuredValueFloat REAL This object provides the measured value in the highest internal accuracy of
the terminal in float format.
rMeasuredValue REAL This object provides the measured value in the highest internal accuracy of
the terminal in REAL format.
wDeviceInfo WORD Firmware version indication.

17.7.3 Inout parameters

Name Type Description


udtPara udtSGI_1_CAL Data structure for IL_SGI_1_CAL.
AnalogTechnology_9 85/149

17.8 IL_SGI_2P_EF_Adj
This auxiliary block is used for path calibration and supports the following functions:
Zero point:
Once the input is activated, the terminal determines the zero point and sets the status bit -0- to TRUE when the
zero point is reached.
Adjustment:
The terminal determines the current measured value and is adjusted to the adjustment value. Each weight value is
now displayed with the highest possible degree of accuracy.
Tare:
The tare function calculates the difference between the gross and net weight of the good to be weighed.

17.8.1 Function block call

17.8.2 Input parameters

Name Type Description


xAdjust BOOL Perform adjustment. The adjustment and determine zero point services cannot be carried
out simultaneously. After the block is activated and xReady is set, the service can be
carried out once by an edge. (Service 92)
xZeroPoint BOOL Carry out determine zero point service. The adjustment and determine zero point
services cannot be carried out simultaneously. After the block is activated and xReady is
set, the service can be carried out once by an edge. (Service 92)
xTara BOOL Tare. After the block is activated and xReady is set, the service can be carried out once
by an edge. (Service 91)

17.8.3 Inout parameters

Name Type Description


udtPara udtSGI_1_CAL Data structure for IL_SGI_1_CAL.
AnalogTechnology_9 86/149

17.9 IL_SGI_1_CAL_Diag
This auxiliary block contains the status of the status display LEDs as well as information on the default state of the
adjustment values.

17.9.1 Function block call


AnalogTechnology_9 87/149

17.9.2 Output parameters

Name Type Description


xStandStill BOOL TRUE: The measured value has been in the standstill range of 1/2d for 400 ms.
FALSE: The measured value is not in the standstill range of 1/2d.
xZeroPoint BOOL TRUE: The measured value is within the zero point range of 1/4d.
FALSE: The measured value is above the zero point range of 1/4d.
xNettoValue BOOL TRUE: The measured value is the net value.
FALSE: The measured value is the gross value.
xDefault BOOL TRUE: The adjustment values of the path adjustment function are not default values.
FALSE: The adjustment values of the path calibration function are default values.
xFault BOOL TRUE: A malfunction has occurred.
FALSE: There is no malfunction.
xParaLock BOOL TRUE: The parameter lock is active.
FALSE: The parameter lock is not active.
xMax BOOL TRUE: The measured value is above the maximum value of MAX + 9e.
FALSE: The measured value is below the maximum value of MAX + 9e.
xMin BOOL TRUE: The measured value is below the minimum value of 20d.
FALSE: The measured value is above the minimum value of 20d.
xResolution BOOL TRUE: The measured value is displayed with 10-fold resolution.
FALSE: The measured value is displayed with standard resolution.
xProtocol BOOL TRUE: Measurement protocols are generated.
FALSE: No measurement protocols are currently generated.

17.9.3 Inout parameters

Name Type Description


udtPara udtSGI_1_CAL Data structure for IL_SGI_1_CAL.
AnalogTechnology_9 88/149

17.10 IL_SGI_1_CAL_LMP
This auxiliary block contains the status of the status display LEDs as well as information on the default state of the
adjustment values.

17.10.1 Function block call

17.10.2 Output parameters

Name Type Description


udintMeasurementNo UDINT Is incremented with every measured value protocol. Value range: 1 …
16777215.
rMeasurementDisplayValue REAL Value indicating the gross/net value in the digital display; in float
format.
rMeasurementGrossValue REAL Weight value before tare is subtracted; in float format.
rMeasurementTaraValue REAL Tare value; in float format.
strDate STRING Date and time in BCD format (dd.mm.yy hh:mm:ss).
strASCII STRING The two ASCII characters for the unit are specified in the Config Table
object.
iNoOfRightHandDigits INT Indicates with how many decimal places the three float values (display
of measured value, gross and tare values) will be displayed. Mask the
byte with 07hex, because five bits are reserved.
wStatus WORD Identical with the contents of the “Status” object.
strSerialNo STRING Ten places, used for unique assignment of the measured value to the
module.
wCRC WORD Is CRC16 and calculated from the previous 31 bytes.
AnalogTechnology_9 89/149

17.10.3 Inout parameters

Name Type Description


udtPara udtSGI_1_CAL Data structure for IL_SGI_1_CAL.
AnalogTechnology_9 90/149

17.11 IL_SGI_1_CAL_SMP
This auxiliary block contains the status of the status display LEDs as well as information on the default state of the
adjustment values.

17.11.1 Function block call

17.11.2 Input parameters

Name Type Description


xReadSelectedProtocol BOOL Rising edge: Read of selected protocol.
uintBaseNumber UINT The base number is the basis for reading the memory. When the “Selected
Measure Protocol” object (index 0096hex) is read, the measurement will be
read of which the number was specified as Base Number before. Writing the
Base Number one time is sufficient because the number is automatically
incremented every time object index 0096hex is accessed again.
Only the three lower bytes of the four bytes are supported. Up to 65536
measurement protocols are present. If, for example, the last measured value
number is 65540, then the oldest measured value number is
65540 - 65536 + 1 = 4 + 1 = 5.
AnalogTechnology_9 91/149

17.11.3 Output parameters

Name Type Description


udintMeasurementNo UDINT Is incremented with every measured value protocol. Value range: 1 …
16777215.
rMeasurementDisplayValue REAL Value indicating the gross/net value in the digital display; in float
format.
rMeasurementGrossValue REAL Weight value before tare is subtracted; in float format.
rMeasurementTaraValue REAL Tare value; in float format.
strDate STRING Date and time in BCD format (dd.mm.yy hh:mm:ss).
strASCII STRING The two ASCII characters for the unit are specified in the Config Table
object.
iNoOfRightHandDigits INT Indicates with how many decimal places the three float values (display
of measured value, gross and tare values) will be displayed. Mask the
byte with 07hex, because five bits are reserved.
wStatus WORD Identical with the contents of the “Status” object.
strSerialNo STRING Ten places, used for unique assignment of the measured value to the
module.
wCRC WORD Is CRC16 and calculated from the previous 31 bytes.

17.11.4 Inout parameters

Name Type Description


udtPara udtSGI_1_CAL Data structure for IL_SGI_1_CAL.
AnalogTechnology_9 92/149

17.12 Appendix
17.12.1 Data types
TYPE
ANA_ARR_B_1_33 : ARRAY [1..33] OF BYTE;
ANA_ARR_B_1_3 : ARRAY [1..3] OF BYTE;
ANA_ARR_B_1_5 : ARRAY [1..5] OF BYTE;
ANA_ARR_B_0_3 : ARRAY [0..3] OF BYTE;
ANA_ARR_STR_1_12 : ARRAY [1..12] OF STRING;
(******************************************************************************)
(* PCP - 83 *)
ANA_UDT_SGI_1_CAL_AddValues_V1:
STRUCT
xMeasurmentProtocol : BOOL;
xReadLastProtocol : BOOL;
xReadSelectProtocol : BOOL;
iBaseNoProtocol : INT;
rTaraValue : REAL;
wDeviceInfo : WORD;
arrMeasuredValueFloat : ANA_ARR_B_1_6;(* PCP - 82 *)
arrDisplayValueFloat : ANA_ARR_B_1_6;(* PCP - 83 *)
arrTaraValueFloat : ANA_ARR_B_1_6;(* PCP - 84 *)
END_STRUCT;
ANA_UDT_SGI_1_CAL_Adjust_V1 :
STRUCT
xAdjust : BOOL;
xZeroPoint : BOOL;
xTara : BOOL;
END_STRUCT;
ANA_UDT_SGI_1_CAL_Para_V1 :
STRUCT
(* X15=0: Do not store configuration table retentively *)
xSaveRemanend : BOOL;
(* X12-X14: 0..4*)
iFrequencyLimit : INT;
(* X8-X10: 0..3, Critical attenuation *)
iFilter : INT;
(* X4, X5: 0..3 *)
iOrdinalNumber : INT;
(* X0-X3: 0..5: Nominal characteristic value *)
iCharacteristic : INT;
(* Nominal weight value *)
uintNominalWeight : UINT;
(* Adjustment value *)
rAdjustValue : REAL;
(* Division factor *)
rDivisionCount : REAL;
(* g, Kg, t *)
strMeasurementUnit : STRING;
wDummy : WORD;
END_STRUCT;
(******************************************************************************)
(* PCP - 94 *)
ANA_UDT_SGI_1_CAL_SMP_V1 :
STRUCT
arrSelectedMeasureProtocol : ANA_ARR_B_1_33;(* PCP - 96 *)
xRSP : BOOL;
iMeasurementNo : INT;
AnalogTechnology_9 93/149

strDate : STRING;
rMeasurementDisplay : REAL;
rMeasurementGross : REAL;
rMeasurementTara : REAL;
strASCII : STRING;
rCommaValue : REAL;
iStatus : INT;
uintSerialNo : UINT;
iCRC : INT;
dwBaseNumber : DWORD;
END_STRUCT;
ANA_UDT_SGI_1_CAL_LMP_V1 :
STRUCT
arrLastMeasureProtocol : ANA_ARR_B_1_33;(* PCP - 94 *)
iMeasurementNo : INT;
strDate : STRING;
rMeasurementDisplay : REAL;
rMeasurementGross : REAL;
rMeasurementTara : REAL;
strASCII : STRING;
rCommaValue : REAL;
iStatus : INT;
uintSerialNo : UINT;
iCRC : INT;
wDummy : WORD;
END_STRUCT;
(******************************************************************************)
(* PCP - 94 *)
ANA_UDT_SGI_1_CAL_DiagState_V1:
STRUCT
xFault : BOOL;(* TRUE: A malfunction has occurred. *)
xParaLock : BOOL;(* TRUE: The parameter lock is active. *)
xMax : BOOL;(* TRUE: The measured value is above the
maximum value of MAX + 9e*)
xMin : BOOL;(*TRUE: The measured value is below the
minimum value of 20d. *)
xResolution : BOOL;(* TRUE: The measured value is displayed
with 10-fold resolution. *)
xProtocol : BOOL;(*TRUE: Measurement protocols are
generated. *)
xStandStill : BOOL;
xZeroPoint : BOOL;
xNettoValue : BOOL;
xDefault : BOOL;
END_STRUCT;
END_TYPE
TYPE
ANA_UDT_REAL_TO_BYTE:
STRUCT
Byte0 : BYTE;
Byte1 : BYTE;
Byte2 : BYTE;
Byte3 : BYTE;
Byte4 : BYTE;
Byte5 : BYTE;
Byte6 : BYTE;
Byte7 : BYTE;
RealWert : REAL;
END_STRUCT ;
END_TYPE
AnalogTechnology_9 94/149

TYPE
udtSGI_1_CAL:
STRUCT
(* 21 Bytes + 3 Bits *)
AddValues : ANA_UDT_SGI_1_CAL_AddValues_V1;
(* 3 Bits *)
AdjustValues : ANA_UDT_SGI_1_CAL_Adjust_V1;
Parameter : ANA_UDT_SGI_1_CAL_Para_V1;
RD_LMP : ANA_UDT_SGI_1_CAL_LMP_V1;
RD_SMP : ANA_UDT_SGI_1_CAL_SMP_V1;
Diagnose : ANA_UDT_SGI_1_CAL_DiagState_V1;
xActivato : BOOL;
wDummy : WORD;
wDummy1 : WORD;
END_STRUCT;
END_TYPE
AnalogTechnology_9 95/149

18 IL_SGI_2F
The SGI blocks are used to parameterize and operate the IB IL SGI 2/F-PAC (2878638) module.
For easier handling, the following function blocks are available additionally:

IL_SGI_2F_Para,
IL_SGI_2F_AddVal,
IL_SGI_2F_MeanVal,
IL_SGI_2F_Offset.

The IL_SGI_2F and IL_SGI_2F_Para function blocks alone are sufficient to operate the module; the other blocks
meet more advanced requirements.
This IL_SGI_2F function block is used to evaluate and parameterize the IB IL SGI 2/F-PAC (2878638) module for
load cells and force transducers. It converts raw measured data into standardized and scaled output values.
Furthermore, the minimum and maximum values and the raw measured data for both channels can be read out via
the IL_SGI_2F_AddVal auxiliary block, as can the firmware version.

18.1 Function block call


AnalogTechnology_9 96/149

18.2 Input parameters


Name Type Description
xActivate BOOL Rising edge: Activates the function block.
FALSE: Deactivates the function block.
xReset BOOL Rising edge: Resets the function block.
xReadMinMaxVal BOOL Rising edge: Reads out min./max. values.
xResetMinMaxVal BOOL Rising edge: Resets min./max. values.
bSelect BYTE Selects the channel to be used
0: Channel 1 and channel 2
1: Channel 1
2: Channel 2
udtChannel1 ANL_UDT_SGI_2F_PARA_V1 Parameter structure for channel 1.
udtChannel2 ANL_UDT_SGI_2F_PARA_V1 Parameter structure for channel 2.
wStatusWord WORD Status word.
wInputAddress2 WORD Process data input word 2.
wInputAddress3 WORD Process data input word 3.

18.3 Output parameters


Name Type Description
xActive BOOL FALSE: Function block is not active.
TRUE: Function block is active. Do not start any
further action unless xActive is TRUE after activation!
xError BOOL TRUE: An error has occurred. For more details refer
to wDiagCode and wAddDiagCode.
rValCh1 REAL Standardized measured value for channel 1.
rValCh2 REAL Standardized measured value for channel 2.
udtAddValues ANL_UDT_SGI_2F_AddValues_V1 Additional output values (raw, min./max. values,
etc.).
wDiagCode WORD Diagnosis code. Refer to diagnostic table.
wAddDiagCode WORD Additional diagnosis code. Refer to diagnostic table.
wControlWord WORD Control word.
wOutputAddress2 WORD Process data output word 2.
wOutputAddress3 WORD Process data output word 3.
AnalogTechnology_9 97/149

18.4 Diagnosis
wDiagCode wAddDiagCode Description
16#0000 16#0000 Function block is deactivated.
16#8000 16#0000 Function block is in regular operation.
16#C101 16#0000 Timeout during initialization.
16#C700 16#0000 Error message during configuration.
16#C800 16#0000 Invalid entry for bSelect.
16#C101 16#0000 Timeout during initialization.
16#C112 16#0000 Terminal error message during initialization of channel 1.
16#C122 16#0000 Terminal error message during initialization of channel 2.
16#C113 16#0000 Invalid characteristic for channel 1.
16#C123 16#0000 Invalid characteristic for channel 2.
16#C301 16#0000 Timeout in Active state.
16#C312 Terminal error message during operation of channel 1.
16#C322 Terminal error message during operation of channel 2.
16#8001 Measuring range exceeded (overrange).
16#8002 Open circuit.
16#8004 Measured value invalid/no valid measured value available (e.g., because
channel was not configured).
16#8020 Supply voltage faulty.
16#8040 Device faulty.
16#8080 Below measuring range (underrange).
AnalogTechnology_9 98/149

18.5 IL_SGI_2F_Para
This auxiliary block groups together the xFilterOnOff, bCharacteristic, rNominalWeight, and wOffset input
parameters of a channel to form a data structure, to which the udtChannel1/udtChannel2 inputs of the IL_SGI_2F
function block are transferred for parameterization. The block is connected to the udtChannel1 and udtChannel2
input parameters of the IL_SGI_2F function block.

18.5.1 Function block call

18.5.2 Input parameters

Name Type Description


xFilterOnOff BOOL Enables/disables internal calculation of a 16-sample average value.
bCharacteristic BYTE Properties of the strain gauge characteristic
0 = +1 mV/V
1 = ±1 mV/V
2= +2 mV/V
3 = ±2 mV/V
4 = +3 mV/V
5= ±3 mV/V
6 = +4 mV/V
7 = ±4 mV/V
rNominalWeight REAL Nominal load of the strain gauge (e.g., 10.00 for 10 kg).
wOffset WORD Entry of the offset with strain gauge at its zero position.

18.5.3 Output parameters

Name Type Description


udtParaOut ANL_UDT_SGI_2F_PARA_V1 Structure for parameterization of the IB IL SGI 2/F-PAC
(2878638) module.
AnalogTechnology_9 99/149

18.6 IL_SGI_2F_AddVal
This auxiliary block decodes the udtAddValues output parameter of the IL_SGI_2F function block. The block
contains the following data: min./max. and raw measured values of channels and the module’s firmware version.

18.6.1 Function block call

18.6.2 Input parameters

Name Type Description


udtAddValues ANALOG_UDT_AddValues_V1 udtAddValues output parameter of the IL_SGI_2F function
block.

18.6.3 Output parameters

Name Type Description


rMinValCh1 REAL Minimum value for channel 1.
rMaxValCh1 REAL Maximum value for channel 1.
wRawValCh1 WORD Raw value for channel 1.
rMinValCh2 REAL Minimum value for channel 2.
rMaxValCh2 REAL Maximum value for channel 2.
wRawValCh2 WORD Raw value for channel 2.
wDeviceInfo WORD Firmware version and module ID.
AnalogTechnology_9 100/149

18.7 IL_SGI_2F_MeanVal
This auxiliary block not only calculates the internal 16-sample average value of the module, but also an average
value from either 16 or 32 input values; it then outputs this value in a variable string format, which is defined at the
strFormat input. Calculation of the average value can be disabled by entering a value of 0 at the iSelectGrade input
(1 => 16-sample; 2 => 32-sample).

18.7.1 Function block call

18.7.2 Input parameters

Name Type Description


rIn REAL Input for measured data.
strFormat STRING Format of output data (decimal places).
iSelectedGrade INT Grade of average-value calculation (0; 16-sample; 32-sample).

18.7.3 Output parameters

Name Type Description


strOut STRING Output of measured values.
AnalogTechnology_9 101/149

18.8 IL_SGI_2F_Offset
This auxiliary block outputs the instantaneous input value as a constant output value when there is a positive edge
at the xCalibrate input. It is provided in order to implement a TARE function.

18.8.1 Function block call

18.8.2 Input parameters

Name Type Description


wIn WORD Input for measured data.
xCalibrate BOOL Performs calibration.

18.8.3 Output parameters

Name Type Description


wOut WORD Output of the offset.
AnalogTechnology_9 102/149

18.9 Appendix
18.9.1 Data types
(* Arrays *)
TYPE
ANL_ARR_W_1_3 : ARRAY [1..3] OF WORD;
ANL_ARR_R_1_32 : ARRAY [1..32] OF REAL;
ANL_ARR_R_0_32 : ARRAY [0..32] OF REAL;
(* Structures *)
ANL_UDT_SGI_2F_PARA_V1 :
STRUCT
xFilterOnOff : BOOL;
bCharacteristic : BYTE;
rNominalweight : REAL;
wOffset : WORD;
wDummy : WORD;
END_STRUCT;
ANL_UDT_SGI_2F_AddValues_V1 :
STRUCT
rMinValCh1 : REAL; (* Min value channel 1 *)
rMaxValCh1 : REAL; (* Max value channel 1 *)
rMinValCh2 : REAL; (* Min value channel 2 *)
rMaxValCh2 : REAL; (* Max value channel 2 *)
wRawValCh1 : WORD; (* Raw value channel 1 *)
wRawValCh2 : WORD; (* Raw value channel 2 *)
wDeviceInfo : WORD; (* FW/HW version *)
wDummy : WORD;
END_STRUCT;
END_TYPE
AnalogTechnology_9 103/149

19 IL_SGI_2P_A
The IL_SGI_2P_A function block is recommended for using module IB IL SGI 2/P-PAC (2884907) module for load
cells and force transducers.
For easier handling, the following function blocks are available additionally:

IL_SGI_2P_A_Para - for decoding of the channel configuration parameters,


IL_SGI_2P_A_Adju - for module calibration,
IL_SGI_2P_A_Value - for decoding of the measured data as well as the firmware version,
IL_SGI_2P_A_Diag - for decoding of status messages.

The IL_SGI_2P_A and IL_SGI_2P_A_Adju as well as the IL_SGI_2P_A_Para blocks are already sufficient for
operation of the module. The other blocks are optionally used to meet additional requirements.
Furthermore, one of the communication function blocks from the AsynCom library is required.

19.1 Function block call


AnalogTechnology_9 104/149

19.2 Input parameters


Name Type Description
xActivate BOOL Rising edge: Activates the function block.
FALSE: Deactivates the function block.
xReset BOOL Rising edge: Resets the function block.
xDefaultSettings BOOL Rising edge: Resets to default settings.
xExtendedValues BOOL Reads measured and displayed values with the highest
level of internal accuracy, as well as the LED status.
dwNodeID DWORD Communication reference. This is based on the Profinet
configuration.
bSelect BYTE Selects the channel to be used
0: channel 1 and 2<br< 1: channel 1
2: channel 2
xReadMinMaxVal BOOL Positive edge: Reads out min./max. values.
xResetMinMaxVal BOOL Positive edge: Resets min./max. values.
udtAdjustCh1 SGI_2P_A_UDT_Adjust_V1 Structure with adjustment value for channel 1.
udtAdjustCh2 SGI_2P_A_UDT_Adjust_V1 Structure with adjustment value for channel 2.
udtChannel1 SGI_2P_A_UDT Para_V1 Structure for parameterizing channel 1.
udtChannel2 SGI_2P_A_UDT Para_V1 Structure for parameterizing channel 2.
wStatusWord WORD Status word.
wInputAddress2 WORD Process data input word 2.
wInputAddress3 WORD Process data input word 3.

19.3 Output parameters


Name Type Description
xActive BOOL FALSE: Function block is not active.
TRUE: Function block is active. Do not start any further
action unless xActive is TRUE after activation!
xError BOOL TRUE: An error has occurred. For more details refer to
wDiagCode and wAddDiagCode.
rValCh1 REAL Standardized measured value for channel 1.
rValCh2 REAL Standardized measured value for channel 2.
udtAddValues ANL_UDT_AddValues_V1 Additional output values (measured, min./max. and
displayed values).
udtDiagStateCh1 SGI_2P_A_UDT_DiagState_V1 LEDs indicating the display status and information on
default state of adjustment values for channel 1.
udtDiagStateCh2 SGI_2P_A_UDT_DiagState_V1 LEDs indicating the display status and information on
default state of adjustment values for channel 2.
wDiagCode WORD Diagnosis code. Refer to diagnostic table.
wAddDiagCode WORD Additional diagnosis code. Refer to diagnostic table.
wControlWord WORD Control word.
wOutputAddress2 WORD Process data output word 2.
wOutputAddress3 WORD Process data output word 3.
AnalogTechnology_9 105/149

19.4 Inout parameters


Name Type Description
udtAsynCom ASYN_UDT_COM Data exchange structure for asynchronous communication. Connected to
AsynCom* function block.

19.5 Diagnosis
wDiagCode wAddDiagCode Description
16#0000 16#0000 Function block is deactivated.
16#8000 16#0000 Function block is in regular operation.
16#C100 16#0000 Timeout while reading the firmware version.
16#C101 16#0000 Timeout during initialization.
16#C800 16#0000 Invalid entry for bSelect.
16#C111 16#0000 Error message from the terminal block during initialization of channel 1.
16#C112 16#0000 Error message from the terminal block during initialization of channel 2.
16#C113 16#0000 Invalid characteristic for channel 1.
16#C123 16#0000 Invalid characteristic for channel 2.
16#C114 16#0000 Invalid nominal load for channel 1.
16#C124 16#0000 Invalid nominal load for channel 2.
16#C115 16#0000 Invalid adjustment value for channel 1.
16#C125 16#0000 Invalid adjustment value for channel 2.
16#C116 16#0000 Invalid mean value for channel 1.
16#C126 16#0000 Invalid mean value for channel 2.
16#C312 Terminal error message during operation of channel 1.
16#C322 Terminal error message during operation of channel 2.
16#8001 Measuring range exceeded (overrange).
16#8002 Open circuit.
16#8004 Measured value invalid/no valid measured value available (e.g., because
channel was not configured).
16#8020 Supply voltage faulty.
16#8040 Device faulty.
16#8080 Below measuring range (underrange).
16#C050 Error message in PCP mode.
16#0020 Service cannot be executed in current state.
16#0021 Service cannot be executed in current state.
16#xx30 Outside value range or parameterization error.
16#0000 Hardware fault.
AnalogTechnology_9 106/149

19.6 IL_SGI_2P_A_Para
This auxiliary block groups the iFilter, iCharacteristic, rNominalWeight, xConversionTime, and rAdjustValuet input
parameters of one channel to form a data structure, which is transferred for parameterization to the udtChannel1 or
udtChannel2 inputs of the IL_SGI_2P_A function block.

19.6.1 Function block call

19.6.2 Input parameters

Name Type Description


iFilter INT Selects the filter
0: 16 times the mean value (default)
1: Filter is disabled
2: 4 times the mean value
3: 32 times the mean value
bCharacteristic BYTE Properties of the strain gauge characteristic
0 = ±1 mV/V
1 = ±2 mV/V (default)
2= ±3 mV/V
3 = ±3.33 mV/V
4 = ±4 mV/V
5= ±5 mV/V
rNominalWeight REAL Nominal load of the strain gauge (e.g., 10.00 for 10 kg).
xConversionTime BOOL Conversion time of the analog/digital converter
TRUE: 12.5 ms
FALSE: 100 ms
rAdjustValue REAL The adjustment value as a percentage of the nominal load.

19.6.3 Output parameters

Name Type Description


udtParaOut ANL_UDT_PARA_V1 Structure for parameterization of the IB IL SGI 2/P-PAC (2884907)
module.
AnalogTechnology_9 107/149

19.7 IL_SGI_2P_A_Value
This auxiliary block decodes the udtAddValues output parameter of the IL_SGI_2P_A function block. This contains
the following data: the firmware version, min/max measured values as well as measured and display values of the
channels in the highest possible accuracy of the module.

19.7.1 Function block call

19.7.2 Input parameters

Name Type Description


udtAddValues ANALOG_UDT_AddValues_V1 udtAddValues output parameter of the IL_SGI_2P_A function
block.

19.7.3 Output parameters

Name Type Description


rMinValCh1 REAL Minimum value for channel 1.
rMaxValCh1 REAL Maximum value for channel 1.
wRawValCh1 WORD Raw value for channel 1.
rMinValCh2 REAL Minimum value for channel 2.
rMaxValCh2 REAL Maximum value for channel 2.
wRawValCh2 WORD Raw value for channel 2.
wDeviceInfo WORD Firmware version and module ID.
AnalogTechnology_9 108/149

19.8 IL_SGI_2P_A_Adju
This auxiliary block supports the following functions:
Zero point:
Once the input is activated, the terminal determines the zero point and sets the status bit -0- to TRUE when the
zero point is reached.
Contact Ka_Kb:
The shunt resistance is switched on with the Ka-Kb N/O contact, and an output signal of 80% of the nominal
pressure is created. When the system is in a steady state, the status bit standstill reached >< is set.
Adjustment:
The terminal determines the current measured value and is adjusted to the adjustment value. Each weight value is
now displayed with the highest possible degree of accuracy.
Tare:
The tare function calculates the difference between the gross and net weight of the goods to be weighed.

19.8.1 Function block call

19.8.2 Input parameters

Name Type Description


xAdjust BOOL Rising edge: Adjusting.
xZeroPoint BOOL Rising edge: Determining zero point.
xTara BOOL Rising edge: Taring.
xKa_Kb BOOL Rising edge: Shunt adjustment.

19.8.3 Output parameters

Name Type Description


udtAdjust SGI_2P_A_UDT_Adjust_V1 Groups the adjustment values to form an output data structure.
AnalogTechnology_9 109/149

19.9 IL_SGI_2P_A_Diag
This auxiliary block contains the status of the status display LEDs as well as information on the default state of the
adjustment values.

19.9.1 Function block call

19.9.2 Input parameters

Name Type Description


udtDiagState SGI_2P_A_UDT_Diag_V1 udtDiagState output parameter of the !IB_IL_SGI_2_P_A_PAC
module.

19.9.3 Output parameters

Name Type Description


xStandStill BOOL TRUE: LED on
FALSE: LED off
xZeroPoint BOOL TRUE: LED on
FALSE: LED off
xNettoValue BOOL TRUE: LED on
FALSE: LED off
xDefault BOOL TRUE: The adjustment values do not correspond to the default settings
FALSE: The adjustment values correspond to the default settings
AnalogTechnology_9 110/149

19.10 Appendix
19.10.1 Data types
(* Arrays *)
TYPE
SGI_2P_PN_ARR_B_1_33 : ARRAY [1..33] OF BYTE;
SGI_2P_PN_ARR_B_1_3 : ARRAY [1..3] OF BYTE;
SGI_2P_PN_ARR_B_1_5 : ARRAY [1..5] OF BYTE;
SGI_2P_PN_ARR_B_0_3 : ARRAY [0..3] OF BYTE;
SGI_2P_PN_ARR_STR_1_12 : ARRAY [1..12] OF STRING;
SGI_2P_PN_ARR_W_1_2 : ARRAY [1..2] OF WORD;
SGI_2P_PN_ARR_W_1_8 : ARRAY [1..8] OF WORD;
SGI_2P_PN_ARR_B_1_16 : ARRAY [1..16] OF BYTE;
SGI_2P_PN_ARR_B_1_6 : ARRAY [1..6] OF BYTE;
SGI_2P_PN_ARR_B_1_2 : ARRAY [1..2] OF BYTE;
SGI_2P_PN_ARR_B_1_4 : ARRAY [1..4] OF BYTE;
END_TYPE
TYPE
SGI_2P_PN_UDT_REAL_TO_BYTE :
STRUCT
Byte0 : BYTE;
Byte1 : BYTE;
Byte2 : BYTE;
Byte3 : BYTE;
Byte4 : BYTE;
Byte5 : BYTE;
Byte6 : BYTE;
Byte7 : BYTE;
RealWert : REAL;
END_STRUCT ;
(******************************************************************)
SGI_2P_PN_UDT_AddValues_V1 :
STRUCT
rMinValCh1 : REAL;
rMaxValCh1 : REAL;
rMinValCh2 : REAL;
rMaxValCh2 : REAL;
wDeviceInfo : WORD;
arrFloatValueCh1 : SGI_2P_PN_ARR_B_1_4;
arrDispalyValueCh1 : SGI_2P_PN_ARR_B_1_4;
arrFloatValueCh2 : SGI_2P_PN_ARR_B_1_4;
arrDispalyValueCh2 : SGI_2P_PN_ARR_B_1_4;
wDummy : WORD;
END_STRUCT;
(*****************************************************************)
SGI_2P_PN_UDT_Adjust_V1 :
STRUCT
xAdjust : BOOL;
xZeroPoint : BOOL;
xTare : BOOL;
xKa_Kb : BOOL;
END_STRUCT;
(*****************************************************************)
SGI_2P_PN_UDT_Para_V1 :
STRUCT
iFilter : INT;(* Average value *)
iCharacteristic : INT;(* Nominal value *)
rNominalWeight : REAL;(* Nominal load *)
AnalogTechnology_9 111/149

xConversionTime : BOOL;(* Conversion time *)


rAdjustValue : REAL;(* Adjustment value *)
END_STRUCT;
(*****************************************************************)
SGI_2P_PN_UDT_DiagState_V1 :
STRUCT
xStandstill : BOOL;
xZeroPoint : BOOL;
xNettoValue : BOOL;
xDefault : BOOL;
END_STRUCT;
END_TYPE
AnalogTechnology_9 112/149

20 Startup examples
For the startup instruction of the FB_Name function block please find the following example(s):

Example 1: ANL_*_EXA_AI_Norm.zwt
Example 2: ANL_*_EXA_AO_Norm.zwt
Example 3: ANL_*_EXA_IL_AI_2_SF.zwt
Example 4: ANL_*_EXA_IL_AI_4_EF.zwt
Example 5: ANL_*_EXA_IL_AI_4_UI.zwt
Example 6: ANL_*_EXA_IL_AI_8.zwt
Example 7: ANL_*_EXA_IL_AO_2.zwt
Example 8: ANL_*_EXA_IL_AO_2_UI.zwt
Example 9: ANL_*_EXA_IL_AO_1_SF_I.zwt (Current mode)
Example 10: ANL_*_EXA_IL_AO_1_SF_U.zwt (Voltage mode)
Example 11: ANL_*_EXA_IL_AO4_8.zwt
Example 12: ANL_*_EXA_IL_SGI_2P_EF.zwt (Local bus)
Example 13: ANL_*_EXA_IL_SGI_2P_EFPN.zwt (Profinet)

These examples are packed in the zipped Examples folder of the library.
They describe the use of different Inline input and output modules with the function blocks of AnalogTechnology
library.
AnalogTechnology_9 113/149

20.1 Example 1: ANL_*_EXA_AI_Norm


20.1.1 Bus structure
For this example, the following hardware is used:

ILC 370 PN 2TX-IB (2876915)


IB IL AI 2/SF-PAC (2861302)

20.1.2 Example description


20.1.2.1 Example machine

For starting ExampleMachine function block, xStart input has set to TRUE.

20.1.2.2 Example E_1000

CASE udtExample.iState OF
0: (* Init *)
IF xStart = TRUE THEN
udtExample.udtANL_AI_NORM.rHiLim := 4000.0;
udtExample.udtANL_AI_NORM.rLoLim := 2000.0;
udtExample.udtANL_AI_NORM.iModuleType := 1;
udtExample.iState := 10;
END_IF;
10: (* Checking for iError *)
IF
udtExample.udtANL_AI_NORM.iError = INT#0
THEN
udtExample.iState := 32000;
ELSE
udtExample.iState := 9000;
END_IF;
9000: (* Error handling *)
(* Insert your error handling here *)
IF xStart = FALSE THEN
udtExample.iState := 32000;
END_IF;
32000: (* Example is finished *)
(* Deactivation of FB *)
udtExample.udtANL_AI_NORM.rHiLim := 0.0;
udtExample.udtANL_AI_NORM.rLoLim := 0.0;
udtExample.udtANL_AI_NORM.iModuleType := 0;
IF xStart = FALSE THEN
AnalogTechnology_9 114/149

udtExample.iState := 0;
END_IF;
END_CASE;
iState := udtExample.iState;
AnalogTechnology_9 115/149

20.2 Example 2: ANL_*_EXA_AO_Norm


20.2.1 Bus structure
For this example, the following hardware is used:

ILC 370 PN 2TX-IB (2876915)


IB IL AO 1/U/SF-PAC (2861399)

20.2.2 Example description


20.2.2.1 Example machine

For starting ExampleMachine function block, xStart input has set to TRUE.

20.2.2.2 Example E_1000

CASE udtExample.iState OF
0: (* Init *)
IF xStart = TRUE THEN
udtExample.udtANL_AO_NORM.rHiLim := 4000.0;
udtExample.udtANL_AO_NORM.rIn_AO := 3000.0;
udtExample.udtANL_AO_NORM.rLoLim := 2000.0;
udtExample.udtANL_AO_NORM.iModuleType := 3;
udtExample.iState := 10;
END_IF;
10: (* Checking for iError *)
IF
udtExample.udtANL_AO_NORM.iError = INT#0
THEN
udtExample.iState := 32000;
ELSE
udtExample.iState := 9000;
END_IF;
9000: (* Error handling *)
(* Insert your error handling here *)
IF xStart = FALSE THEN
udtExample.iState := 32000;
END_IF;
32000: (* Example is finished *)
(* Deactivation of FB *)
udtExample.udtANL_AO_NORM.rHiLim := 0.0;
udtExample.udtANL_AO_NORM.rIn_AO := 0.0;
udtExample.udtANL_AO_NORM.rLoLim := 0.0;
udtExample.udtANL_AO_NORM.iModuleType := 0;
AnalogTechnology_9 116/149

IF xStart = FALSE THEN


udtExample.iState := 0;
END_IF;
END_CASE;
iState := udtExample.iState;
AnalogTechnology_9 117/149

20.3 Example 3: ANL_*_EXA_IL_AI_2_SF


20.3.1 Bus structure
For this example the following hardware is used:

ILC 150 ETH (2985330)


IB IL AI 2/SF-PAC (2861302)
IB IL AO 2/UI-PAC (2700775)

To provide voltage and current values for the IB IL AI 2/SF-PAC (2861302) analog input module, the analog output
module IB IL AO 2/UI-PAC (2700775) is used additionally.

20.3.2 Example description


This example describes the use of the IB IL AI 2/SF (2726285) module and the IL_AI_2_SF function block with
voltage (U) or current (I) mode.

20.3.2.1 Example machine

For starting ExampleMachine function block, xStart input has set to TRUE.

20.3.2.2 Example E_1000

CASE udtExample.iState OF
0: (* Init *)
IF xStart = TRUE THEN
(* Parameterization of IL_AO_2_UI function block *)
(* Channel selection *)
udtExample.udtANL_AO2_UI.iSelectCH := 3;
(* Parameterization of IL_AO_2_UI_Para function block for CH1 *)
(* Voltage mode *)
(* Output range *)
udtExample.arrANL_AO2_UI_Para[1].iRange := 0;
(* Upper limit value of the standardized range *)
udtExample.arrANL_AO2_UI_Para[1].rHiLim := 10.0;
(* Lower limit value of the standardized range *)
udtExample.arrANL_AO2_UI_Para[1].rLoLim := 0.0;
(* Analog value to be output *)
udtExample.arrANL_AO2_UI_Para[1].rSetValue := 5.0;
(* Parameterization of IL_AO_2_UI_Para function block for CH2 *)
(* Current mode *)
(* Output range *)
udtExample.arrANL_AO2_UI_Para[2].iRange := 2;
(* Upper limit value of the standardized range *)
udtExample.arrANL_AO2_UI_Para[2].rHiLim := 20.0;
(* Lower limit value of the standardized range *)
udtExample.arrANL_AO2_UI_Para[2].rLoLim := 0.0;
(* Analog value to be output *)
AnalogTechnology_9 118/149

udtExample.arrANL_AO2_UI_Para[2].rSetValue := 10.0;
(* Parameterization of IL_AI_2_SF function block for CH1 *)
(* Voltage mode *)
(* High limit of the normed range *)
udtExample.arrANL_AI2_SF[1].rHI_Limit := 10.0;
(* Low limit of the normed range *)
udtExample.arrANL_AI2_SF[1].rLO_Limit := 0.0;
(* Disables the filter *)
udtExample.arrANL_AI2_SF[1].xNoFilter := FALSE;
(* Choose the format *)
udtExample.arrANL_AI2_SF[1].iSelectFormat := 0;
(* Choose the range *)
udtExample.arrANL_AI2_SF[1].iSelectRange := 0;
(* Parameterization of IL_AI_2_SF function block for CH2 *)
(* Current mode *)
(* High limit of the normed range *)
udtExample.arrANL_AI2_SF[2].rHI_Limit := 20.0;
(* Low limit of the normed range *)
udtExample.arrANL_AI2_SF[2].rLO_Limit := 0.0;
(* Disables the filter *)
udtExample.arrANL_AI2_SF[2].xNoFilter := FALSE;
(* Choose the format *)
udtExample.arrANL_AI2_SF[2].iSelectFormat := 0;
(* Choose the range *)
udtExample.arrANL_AI2_SF[2].iSelectRange := 1;
(* Activation of function block *)
udtExample.udtANL_AO2_UI.xActivate := TRUE;
FOR iChannel := 1 TO 2 DO
udtExample.arrANL_AI2_SF[iChannel].xActivate := TRUE;
END_FOR;
udtExample.iState := 100;
END_IF;
10: (*Checking for an error of IL_AO_2_UI function block *)
IF udtExample.udtANL_AO2_UI.xError = TRUE THEN
udtExample.iState := 9000;
ELSE
udtExample.iState := 20;
END_IF;
20: (*Checking for an error of IL_AI_2_SF function blocks *)
FOR iChannel := 1 TO 2 DO
IF udtExample.arrANL_AI2_SF[iChannel].xError = TRUE THEN
udtExample.iState := 9000;
ELSIF udtExample.arrANL_AI2_SF[iChannel].xActive = TRUE THEN
udtExample.iState := 32000;
END_IF;
END_FOR;
9000: (* Error handling *)
(* Insert your error handling here *)
IF xStart = FALSE THEN
udtExample.iState := 32000;
END_IF;
32000: (* Example is finished *)
(* Deactivation of all FBs *)
FOR iChannel := 1 TO 2 DO
udtExample.arrANL_AO2_UI_Para[iChannel].iRange := 0;
udtExample.arrANL_AO2_UI_Para[iChannel].rHiLim := 0.0;
AnalogTechnology_9 119/149

udtExample.arrANL_AO2_UI_Para[iChannel].rLoLim := 0.0;
udtExample.arrANL_AO2_UI_Para[iChannel].rSetValue := 0.0;
udtExample.arrANL_AI2_SF[iChannel].xActivate := FALSE;
udtExample.arrANL_AI2_SF[iChannel].rHI_Limit := 0.0;
udtExample.arrANL_AI2_SF[iChannel].rLO_Limit := 0.0;
udtExample.arrANL_AI2_SF[iChannel].xNoFilter := FALSE;
udtExample.arrANL_AI2_SF[iChannel].iSelectFormat := 0;
udtExample.arrANL_AI2_SF[iChannel].iSelectRange := 0;
END_FOR;
udtExample.udtANL_AO2_UI.iSelectCH := 0;
udtExample.udtANL_AO2_UI.xActivate := FALSE;
IF xStart = FALSE THEN
udtExample.iState := 0;
END_IF;
END_CASE;
iState := udtExample.iState;
AnalogTechnology_9 120/149

20.4 Example 4: ANL_*_EXA_IL_AI_4_EF


This example describes the use of the IB IL AI 4/EF-PAC (2878447) module with the IL_AI_4_EF function block.

20.4.1 Bus structure


For this example, the following hardware is used:

ILC 150 ETH (2985330)


IB IL AI 4/EF-PAC (2878447)

20.4.2 Example description


20.4.2.1 Example machine

For starting ExampleMachine function block, xStart input has set to TRUE.

20.4.2.2 Example E_1000

CASE udtExample.iState OF
0: (* Init *)
IF xStart = TRUE THEN
(* Selection of the operating mode:
Read analog values (default):(Output: wValueChannel1…4) *)
udtExample.udtANL_IL_AI4_EF.iSelect := 0;
(* Configuration of channels:
CH1 = 0-10 V, ST, Average 16
CH2 = +/- 5 V, ST, No average
CH3 = 0-20 mA, IL, Average 4
CH4 = +/- 20 mA, NORM, Average 32 *)
udtExample.udtANL_IL_AI4_EF.dwConfig := DWORD#16#F9885310;
(* Resets the block to its initial settings *)
udtExample.udtANL_IL_AI4_EF.xReset := FALSE;
(* Activation of function block *)
udtExample.udtANL_IL_AI4_EF.xActivate := TRUE;
udtExample.iState := 10;
END_IF;
10: (* Checking for xError *)
IF udtExample.udtANL_IL_AI4_EF.xError THEN
udtExample.iState := 9000;
ELSE
udtExample.iState := 32000;
END_IF;
9000: (* Error handling *)
(* Insert your error handling here *)
IF xStart = FALSE THEN
AnalogTechnology_9 121/149

udtExample.iState := 32000;
END_IF;
32000: (* Example is finished *)
(* Deactivation of FB *)
udtExample.udtANL_IL_AI4_EF.iSelect := 0;
udtExample.udtANL_IL_AI4_EF.dwConfig := DWORD#16#00000000;
udtExample.udtANL_IL_AI4_EF.xReset := FALSE;
udtExample.udtANL_IL_AI4_EF.xActivate := FALSE;
IF xStart = FALSE THEN
udtExample.iState := 0;
END_IF;
END_CASE;
iState := udtExample.iState;
AnalogTechnology_9 122/149

20.5 Example 5: ANL_*_EXA_IL_AI_4_UI


This example describes the use of the IB IL AI 4 /I-PAC (2700458) module in current mode and the IB IL AI 4 /U-
PAC (2700459) module in voltage mode with the IL_AI_4_UI_* function block group.

20.5.1 Bus structure


For this example, the following hardware is used:

ILC 150 ETH (2985330)


IB IL AO 2/UI-PAC (2700775)
IB IL AI 4 /U-PAC (2700459)
IB IL AI 4 /I-PAC (2700458)

To provide current and voltage values for the analog input modules, the analog output module IB IL AO 2/UI-PAC
(2700775) is used additionally.
AnalogTechnology_9 123/149

20.5.2 Example description


The following examples can be executed:

Function iExample Codesheet


Parameterization and standardization in voltage mode. 1000 E_1000
Parameterization and standardization in current mode. 2000 E_2000

20.5.2.1 Example machine

For starting ExampleMachine function block, the requested example can be selected at iExample input and xStart
input has set to TRUE.

20.5.2.2 Example E_1000

IF udtExample.iExample = 1000 THEN


CASE udtExample.iState OF
0: (* Init *)
(* IL_AO_2_UI_Para function block *)
(* Parameterization of CH1 in voltage mode *)
(* Output range 0-10V *)
udtExample.arrANL_AO2_UI_PARA[1].iRange := 1;
(* Upper limit value of the standardized range *)
udtExample.arrANL_AO2_UI_PARA[1].rHiLim := 10.0;
(* Lower limit value of the standardized range *)
udtExample.arrANL_AO2_UI_PARA[1].rLoLim := 0.0;
(* Analog value to be output *)
udtExample.arrANL_AO2_UI_PARA[1].rSetValue := 10.0;
(* IL_AO_2_UI function block *)
(* Select CH1 *)
udtExample.udtANL_AO2_UI.iSelectCH := 1;
(* Activates function block *)
udtExample.udtANL_AO2_UI.xActivate := TRUE;
(* IL_AI_4_UI_Para function block *)
(* Parameterization of CH1 in voltage mode *)
(* Select CH1 *)
udtExample.udtANL_AI4_UI_PARA.iChannel := 1;
(* Select input range *)
udtExample.udtANL_AI4_UI_PARA.iMode := 0;
(* Select the filter *)
udtExample.udtANL_AI4_UI_PARA.iFilter := 0;
(* Setting the upper standardized value *)
udtExample.udtANL_AI4_UI_PARA.rHighLimit := 10.0;
(* Setting the lower standardized value *)
udtExample.udtANL_AI4_UI_PARA.rLowLimit := 0.0;
(* IL_AI_4_UI_COM_U function block *)
(* Select CH1 *)
udtExample.arrANL_AI4_UI_COM[1].bSelect := BYTE#16#01;
AnalogTechnology_9 124/149

(* Selects the connected module: IB IL AI 4 /U-PAC (2700459) *)


udtExample.arrANL_AI4_UI_COM[1].xVoltage := TRUE;
(* Activates function block *)
udtExample.arrANL_AI4_UI_COM[1].xActivate := TRUE;
(* IL_AI_4_UI_DIAG_U function block *)
(* Selects CH1 *)
udtExample.arrANL_AI4_UI_DIAG[1].iChannel := 1;
udtExample.iState := 10;
10: (* Checking for an error of IL_AO_2_UI function block *)
IF udtExample.udtANL_AO2_UI.xError = TRUE THEN
udtExample.iState := 9000;
ELSE
udtExample.iState := 20;
END_IF;
20: (* Checking for an error of IL_AI_4_UI_COM_U function block *)
IF udtExample.arrANL_AI4_UI_COM[1].xError = TRUE THEN
udtExample.iState := 9000;
ELSIF udtExample.arrANL_AI4_UI_COM[1].xReady = TRUE THEN
udtExample.iState := 32000;
END_IF;
9000: (* Error handling *)
(* Insert your error handling here *)
IF xStart = FALSE THEN
udtExample.iState := 32000;
END_IF;
32000: (* Example is finished *)
(* Deactivation of FBs *)
udtExample.arrANL_AO2_UI_PARA[1].iRange := 0;
udtExample.arrANL_AO2_UI_PARA[1].rHiLim := 0.0;
udtExample.arrANL_AO2_UI_PARA[1].rLoLim := 0.0;
udtExample.arrANL_AO2_UI_PARA[1].rSetValue := 0.0;
udtExample.udtANL_AO2_UI.iSelectCH := 0;
udtExample.udtANL_AO2_UI.xActivate := FALSE;
udtExample.udtANL_AI4_UI_PARA.iChannel := 0;
udtExample.udtANL_AI4_UI_PARA.iMode := 0;
udtExample.udtANL_AI4_UI_PARA.iFilter := 0;
udtExample.udtANL_AI4_UI_PARA.rHighLimit := 0.0;
udtExample.udtANL_AI4_UI_PARA.rLowLimit := 0.0;
udtExample.arrANL_AI4_UI_COM[1].bSelect := BYTE#16#00;
udtExample.arrANL_AI4_UI_COM[1].xVoltage := FALSE;
udtExample.arrANL_AI4_UI_COM[1].xActivate := FALSE;
udtExample.arrANL_AI4_UI_DIAG[1].iChannel := 0;
udtExample.iState := 0;
udtExample.iExample := 32000;
END_CASE;
END_IF;
AnalogTechnology_9 125/149

20.5.2.3 Example E_2000

IF udtExample.iExample = 2000 THEN


CASE udtExample.iState OF
0: (* Init *)
(* IL_AO_2_UI_Para function block *)
(* Parameterization of CH2 in current mode *)
(* Output range 0-20mA *)
udtExample.arrANL_AO2_UI_PARA[2].iRange := 2;
(* Upper limit value of the standardized range *)
udtExample.arrANL_AO2_UI_PARA[2].rHiLim := 20.0;
(* Lower limit value of the standardized range *)
udtExample.arrANL_AO2_UI_PARA[2].rLoLim := 0.0;
(* Analog value to be output *)
udtExample.arrANL_AO2_UI_PARA[2].rSetValue := 10.0;
(* IL_AO_2_UI function block *)
(* Select CH2 *)
udtExample.udtANL_AO2_UI.iSelectCH := 2;
(* Activates function block *)
udtExample.udtANL_AO2_UI.xActivate := TRUE;
(* IL_AI_4_UI_Para function block *)
(* Parameterization of CH2 in current mode *)
(* Select CH2 *)
udtExample.udtANL_AI4_UI_PARA.iChannel := 2;
(* Select input range *)
udtExample.udtANL_AI4_UI_PARA.iMode := 0;
(* Select the filter *)
udtExample.udtANL_AI4_UI_PARA.iFilter := 0;
(* Setting the upper standardized value *)
udtExample.udtANL_AI4_UI_PARA.rHighLimit := 20.0;
(* Setting the lower standardized value *)
udtExample.udtANL_AI4_UI_PARA.rLowLimit := 0.0;
(* IL_AI_4_UI_COM_I function block *)
(* Select CH2 *)
udtExample.arrANL_AI4_UI_COM[2].bSelect := BYTE#16#02;
(* Selects the connected module: IB IL AI 4 /I-PAC (2700458) *)
udtExample.arrANL_AI4_UI_COM[2].xVoltage := FALSE;
(* Activates function block *)
udtExample.arrANL_AI4_UI_COM[2].xActivate := TRUE;
(* IL_AI_4_UI_DIAG function block *)
(* Selects CH2 *)
udtExample.arrANL_AI4_UI_DIAG[2].iChannel := 2;
udtExample.iState := 10;
10: (* Checking for an error of IL_AO_2_UI function block *)
IF udtExample.udtANL_AO2_UI.xError = TRUE THEN
udtExample.iState := 9000;
ELSE
udtExample.iState := 20;
END_IF;
20: (* Checking for an error of IL_AI_4_UI_COM_I function block *)
IF udtExample.arrANL_AI4_UI_COM[2].xError = TRUE THEN
udtExample.iState := 9000;
ELSIF udtExample.arrANL_AI4_UI_COM[2].xReady = TRUE THEN
udtExample.iState := 32000;
END_IF;
AnalogTechnology_9 126/149

9000: (* Error handling *)


(* Insert your error handling here *)
IF xStart = FALSE THEN
udtExample.iState := 32000;
END_IF;
32000: (* Example is finished *)
(* Deactivation of FBs *)
udtExample.arrANL_AO2_UI_PARA[2].iRange := 0;
udtExample.arrANL_AO2_UI_PARA[2].rHiLim := 0.0;
udtExample.arrANL_AO2_UI_PARA[2].rLoLim := 0.0;
udtExample.arrANL_AO2_UI_PARA[2].rSetValue := 0.0;
udtExample.udtANL_AO2_UI.iSelectCH := 0;
udtExample.udtANL_AO2_UI.xActivate := FALSE;
udtExample.udtANL_AI4_UI_PARA.iChannel := 0;
udtExample.udtANL_AI4_UI_PARA.iMode := 0;
udtExample.udtANL_AI4_UI_PARA.iFilter := 0;
udtExample.udtANL_AI4_UI_PARA.rHighLimit := 0.0;
udtExample.udtANL_AI4_UI_PARA.rLowLimit := 0.0;
udtExample.arrANL_AI4_UI_COM[2].bSelect := BYTE#16#00;
udtExample.arrANL_AI4_UI_COM[2].xVoltage := FALSE;
udtExample.arrANL_AI4_UI_COM[2].xActivate := FALSE;
udtExample.arrANL_AI4_UI_DIAG[2].iChannel := 0;
udtExample.iState := 0;
udtExample.iExample := 32000;
END_CASE;
END_IF;
AnalogTechnology_9 127/149

20.6 Example 6: ANL_*_EXA_IL_AI_8


For the startup instruction of the IL_AI_8 function block please find the following example:

ANL_*_EXA_IL_AI_8.zwt

This example is packed in the zipped Examples folder of the library.


It describes the use of the IB IL AI 8/SF-PAC (2861412) module in current mode with the IL_AI_8 function block.

20.6.1 Bus structure


For this example, the following hardware is used:

ILC 150 ETH (2985330)


IB IL AO 2/UI-PAC (2700775)
IB IL AI 8/SF-PAC (2861412)

To provide current and voltage values for the IB IL AI 8/SF-PAC (2861412) analog input module, the analog output
module IB IL AO 2/UI-PAC (2700775) is used additionally.
AnalogTechnology_9 128/149

20.6.2 Example description


In this example CH 1 is parameterized in voltage mode and CH 2 in current mode.

20.6.2.1 Example machine

For starting ExampleMachine function block, xStart input has set to TRUE.

20.6.2.2 Example E_1000

CASE udtExample.iState OF
0: (* Init *)
IF xStart = TRUE THEN
(* Parameterization of IL_AO_2_UI function block *)
(* Channel selection *)
udtExample.udtANL_IL_AO_2_UI.iSelectCH := 3;
(* Activation of function block *)
udtExample.udtANL_IL_AO_2_UI.xActivate := TRUE;
(* Parameterization of IL_AO_2_UI_Para function block for CH1 *)
(* Voltage mode *)
(* Output range *)
udtExample.arrANL_IL_AO_2_UI_Para[1].iRange := 0;
(* Upper limit value of the standardized range *)
udtExample.arrANL_IL_AO_2_UI_Para[1].rHiLim := 10.0;
(* Lower limit value of the standardized range *)
udtExample.arrANL_IL_AO_2_UI_Para[1].rLoLim := 0.0;
(* Analog value to be output *)
udtExample.arrANL_IL_AO_2_UI_Para[1].rSetValue := 5.0;
(* Parameterization of IL_AO_2_UI_Para function block for CH2 *)
(* Current mode *)
(* Output range *)
udtExample.arrANL_IL_AO_2_UI_Para[2].iRange := 2;
(* Upper limit value of the standardized range *)
udtExample.arrANL_IL_AO_2_UI_Para[2].rHiLim := 20.0;
(* Lower limit value of the standardized range *)
udtExample.arrANL_IL_AO_2_UI_Para[2].rLoLim := 0.0;
(* Analog value to be output *)
udtExample.arrANL_IL_AO_2_UI_Para[2].rSetValue := 10.0;
(* Parameterization of IL_AI_8 function block for CH1 and CH2 *)
(* CH1: Voltage mode *)
(* Selection of filter *)
udtExample.udtANL_IL_AI_8.udtParameter[1].Filter := 0;
(* Measuring range: 0-10V *)
udtExample.udtANL_IL_AI_8.udtParameter[1].Range := 0;
(* Standardization enabled *)
udtExample.udtANL_IL_AI_8.udtParameter[1].Standardization := TRUE;
(* Upper limit value *)
udtExample.udtANL_IL_AI_8.udtParameter[1].LoLim := 0.0;
(* Lower limit value *)
udtExample.udtANL_IL_AI_8.udtParameter[1].HiLim := 10.0;
(* CH2: Current mode *)
(* Selection of filter *)
udtExample.udtANL_IL_AI_8.udtParameter[2].Filter := 0;
(* Measuring range: 0-20mA *)
AnalogTechnology_9 129/149

udtExample.udtANL_IL_AI_8.udtParameter[2].Range := 8;
(* Standardization enabled *)
udtExample.udtANL_IL_AI_8.udtParameter[2].Standardization := TRUE;
(* Upper limit value *)
udtExample.udtANL_IL_AI_8.udtParameter[2].LoLim := 0.0;
(* Lower limit value *)
udtExample.udtANL_IL_AI_8.udtParameter[2].HiLim := 20.0;
(* Selection of used CH1 and CH2 *)
udtExample.udtANL_IL_AI_8.bSelect := BYTE#16#03;
(* Activation of function block *)
udtExample.udtANL_IL_AI_8.xActivate := TRUE;
udtExample.iState := 10;
END_IF;
10: (*Checking for an error of IL_AO_2_UI function block *)
IF
udtExample.udtANL_IL_AO_2_UI.xError = TRUE OR
udtExample.udtANL_IL_AI_8.xError = TRUE
THEN
udtExample.iState := 9000;
ELSE
udtExample.iState := 32000;
END_IF;
9000: (* Error handling *)
(* Insert your error handling here *)
IF xStart = FALSE THEN
udtExample.iState := 32000;
END_IF;
32000: (* Example is finished *)
(* Deactivation of all FBs *)
FOR iChannel := 1 TO 2 DO
udtExample.arrANL_IL_AO_2_UI_Para[iChannel].iRange := 0;
udtExample.arrANL_IL_AO_2_UI_Para[iChannel].rHiLim := 0.0;
udtExample.arrANL_IL_AO_2_UI_Para[iChannel].rLoLim := 0.0;
udtExample.arrANL_IL_AO_2_UI_Para[iChannel].rSetValue := 0.0;
udtExample.udtANL_IL_AI_8.udtParameter[iChannel].Filter := 0;
udtExample.udtANL_IL_AI_8.udtParameter[iChannel].Range := 0;
udtExample.udtANL_IL_AI_8.udtParameter[iChannel].Standardization := FALSE;
udtExample.udtANL_IL_AI_8.udtParameter[iChannel].LoLim := 0.0;
udtExample.udtANL_IL_AI_8.udtParameter[iChannel].HiLim := 0.0;
END_FOR;
udtExample.udtANL_IL_AO_2_UI.iSelectCH := 0;
udtExample.udtANL_IL_AO_2_UI.xActivate := FALSE;
udtExample.udtANL_IL_AI_8.xActivate := FALSE;
IF xStart = FALSE THEN
udtExample.iState := 0;
END_IF;
END_CASE;
iState := udtExample.iState;
AnalogTechnology_9 130/149

20.7 Example 7: ANL_*_EXA_IL_AO


This example describes the use of the IB IL AO 2 /SF-PAC (2863083) module in current and voltage mode with the
IL_AO function block.

20.7.1 Bus structure


For this example the following hardware is used:

ILC 150 ETH (2985330)


IB IL AO 2 /SF-PAC (2863083)
IB IL AI 4/EF-PAC (2878447)

In order to be able to evaluate the output voltage and current values of the IB IL AO 2 /SF-PAC (2863083) analog
output module, the IB IL AI 4/EF-PAC (2878447) input module is used additionally.

20.7.2 Example description


Channel 1 is parameterized in voltage mode (0-10V) and channel 2 in current mode (0-20mA).

20.7.2.1 Example machine

For starting ExampleMachine function block, xStart input has set to TRUE.

20.7.2.2 Example E_1000

CASE udtExample.iState OF
0: (* Init *)
IF xStart = TRUE THEN
(* Parameterization of IL_AO_Channel function blocks *)
(* CH1 *)
(* Analog value to be outputted *)
udtExample.arrANL_IL_AO_CH[1].rNormValue := 5.0;
(* Upper limit value *)
udtExample.arrANL_IL_AO_CH[1].rHI_Limit := 10.0;
(* Lower limit value *)
udtExample.arrANL_IL_AO_CH[1].rLO_Limit := 0.0;
(* CH2 *)
(* Analog value to be outputted *)
udtExample.arrANL_IL_AO_CH[2].rNormValue := 15.0;
(* Upper limit value *)
udtExample.arrANL_IL_AO_CH[2].rHI_Limit := 20.0;
(* Lower limit value *)
udtExample.arrANL_IL_AO_CH[2].rLO_Limit := 0.0;
(* Parameterization of IL_AO function block *)
(* Resets the function block *)
udtExample.udtANL_IL_AO.xReset := FALSE;
(* Channel selection of CH1 and CH2 *)
AnalogTechnology_9 131/149

udtExample.udtANL_IL_AO.iSelectChannels := 0;
(* Module type 3 = IB IL AO 2/SF *)
udtExample.udtANL_IL_AO.iModulType := 3;
(* Behavior of the outputs in the event of an error *)
udtExample.udtANL_IL_AO.iOutputBehavior := 1;
(* Parameterization of the terminal *)
udtExample.udtANL_IL_AO.iParameters := 1;
(* Parameterization/selection of hardware used *)
(* IB IL AO 2 /SF-PAC (2863083) *)
udtExample.udtANL_IL_AO.bTyp_BP_SF := TRUE;
(* Activation of function blocks *)
udtExample.udtANL_IL_AO.xActivate := TRUE;
(* Parameterization of IL_AI_4_EF function block *)
(* Selection of the operating mode 0= read channel 1-4 *)
udtExample.udtANL_IL_AI_4_EF.iSelect := 0;
(* Configuration of channels:
CH1 = 0-10 V, IL, average 16
CH2 = 0-20 mA, IL, no average *)
udtExample.udtANL_IL_AI_4_EF.dwConfig := DWORD#16#00004800;
(* Resets the block to its initial settings *)
udtExample.udtANL_IL_AI_4_EF.xReset := FALSE;
(* Activation of function block *)
udtExample.udtANL_IL_AI_4_EF.xActivate := TRUE;
udtExample.iState := 10;
END_IF;
10: (* Checking for xError *)
IF
udtExample.udtANL_IL_AI_4_EF.xError = TRUE OR
udtExample.udtANL_IL_AO.xError = TRUE
THEN
udtExample.iState := 9000;
ELSE
udtExample.iState := 32000;
END_IF;
9000: (* Error handling *)
(* Insert your error handling here *)
IF xStart = FALSE THEN
udtExample.iState := 32000;
END_IF;
32000: (* Example is finished *)
(* Deactivation of function blocks *)
FOR iChannel := 1 TO 2 DO
udtExample.arrANL_IL_AO_CH[iChannel].rNormValue := 0.0;
udtExample.arrANL_IL_AO_CH[iChannel].rHI_Limit := 0.0;
udtExample.arrANL_IL_AO_CH[iChannel].rLO_Limit := 0.0;
END_FOR;
udtExample.udtANL_IL_AO.xReset := FALSE;
udtExample.udtANL_IL_AO.iSelectChannels := 0;
udtExample.udtANL_IL_AO.iModulType := 0;
udtExample.udtANL_IL_AO.iOutputBehavior := 0;
udtExample.udtANL_IL_AO.iParameters := 0;
udtExample.udtANL_IL_AO.bTyp_BP_SF := FALSE;
udtExample.udtANL_IL_AO.xActivate := FALSE;
udtExample.udtANL_IL_AI_4_EF.iSelect := 0;
udtExample.udtANL_IL_AI_4_EF.dwConfig := DWORD#16#00000000;
udtExample.udtANL_IL_AI_4_EF.xReset := FALSE;
udtExample.udtANL_IL_AI_4_EF.xActivate := FALSE;
AnalogTechnology_9 132/149

IF xStart = FALSE THEN


udtExample.iState := 0;
END_IF;
END_CASE;
iState := udtExample.iState;
AnalogTechnology_9 133/149

20.8 Example 8: ANL_*_EXA_IL_AO_2_UI


20.8.1 Bus structure
For this example the following hardware is used:

ILC 150 ETH (2985330)


IB IL AO 2/UI-PAC (2700775)
IB IL AI 2/SF-PAC (2861302)

In order to be able to evaluate the output voltage values of the IB IL AO 2/UI-PAC (2700775) analog output module,
the IB IL AI 2/SF-PAC (2861302) input module is used additionally.

20.8.2 Example description

20.8.3 Example machine


For starting ExampleMachine function block, xStart input has set to TRUE.

20.8.3.1 Example E_1000

CASE udtExample.iState OF
0: (* Init *)
IF xStart = TRUE THEN
(* Parameterization of IL_AO_2_UI function block *)
(* Channel selection *)
udtExample.udtANL_AO2_UI.iSelectCH := 3;
(* Activation of function block *)
udtExample.udtANL_AO2_UI.xActivate := TRUE;
(* Parameterization of IL_AO_2_UI_Para function block for CH1 *)
(* Voltage mode *)
(* Output range *)
udtExample.arrANL_AO2_UI_Para[1].iRange := 0;
(* Upper limit value of the standardized range *)
udtExample.arrANL_AO2_UI_Para[1].rHiLim := 10.0;
(* Lower limit value of the standardized range *)
udtExample.arrANL_AO2_UI_Para[1].rLoLim := 0.0;
(* Analog value to be output *)
udtExample.arrANL_AO2_UI_Para[1].rSetValue := 5.0;
(* Parameterization of IL_AO_2_UI_Para function block for CH2 *)
(* Current mode *)
(* Output range *)
udtExample.arrANL_AO2_UI_Para[2].iRange := 2;
(* Upper limit value of the standardized range *)
udtExample.arrANL_AO2_UI_Para[2].rHiLim := 20.0;
(* Lower limit value of the standardized range *)
udtExample.arrANL_AO2_UI_Para[2].rLoLim := 0.0;
(* Analog value to be output *)
udtExample.arrANL_AO2_UI_Para[2].rSetValue := 10.0;
AnalogTechnology_9 134/149

(* Parameterization of IL_AI_2_SF function block for CH1 *)


(* Voltage mode *)
(* High limit of the normed range *)
udtExample.arrANL_AI2_SF[1].rHI_Limit := 10.0;
(* Low limit of the normed range *)
udtExample.arrANL_AI2_SF[1].rLO_Limit := 0.0;
(* Disables the filter *)
udtExample.arrANL_AI2_SF[1].xNoFilter := FALSE;
(* Choose the format *)
udtExample.arrANL_AI2_SF[1].iSelectFormat := 0;
(* Choose the range *)
udtExample.arrANL_AI2_SF[1].iSelectRange := 0;
(* Parameterization of IL_AI_2_SF function block for CH2 *)
(* Current mode *)
(* High limit of the normed range *)
udtExample.arrANL_AI2_SF[2].rHI_Limit := 20.0;
(* Low limit of the normed range *)
udtExample.arrANL_AI2_SF[2].rLO_Limit := 0.0;
(* Disables the filter *)
udtExample.arrANL_AI2_SF[2].xNoFilter := FALSE;
(* Choose the format *)
udtExample.arrANL_AI2_SF[2].iSelectFormat := 0;
(* Choose the range *)
udtExample.arrANL_AI2_SF[2].iSelectRange := 1;
(* Activation of function block *)
udtExample.udtANL_AO2_UI.xActivate := TRUE;
FOR iChannel := 1 TO 2 DO
udtExample.arrANL_AI2_SF[iChannel].xActivate := TRUE;
END_FOR;
udtExample.iState := 100;
END_IF;
10: (*Checking for an error of IL_AO_2_UI function block *)
IF udtExample.udtANL_AO2_UI.xError = TRUE THEN
udtExample.iState := 9000;
ELSE
udtExample.iState := 20;
END_IF;
20: (*Checking for an error of IL_AI_2_SF function blocks *)
FOR iChannel := 1 TO 2 DO
IF udtExample.arrANL_AI2_SF[iChannel].xError = TRUE THEN
udtExample.iState := 9000;
ELSIF udtExample.arrANL_AI2_SF[iChannel].xActive = TRUE THEN
udtExample.iState := 32000;
END_IF;
END_FOR;
9000: (* Error handling *)
(* Insert your error handling here *)
IF xStart = FALSE THEN
udtExample.iState := 32000;
END_IF;
32000: (* Example is finished *)
(* Deactivation of all FBs *)
FOR iChannel := 1 TO 2 DO
udtExample.arrANL_AO2_UI_Para[iChannel].iRange := 0;
udtExample.arrANL_AO2_UI_Para[iChannel].rHiLim := 10.0;
udtExample.arrANL_AO2_UI_Para[iChannel].rLoLim := 0.0;
AnalogTechnology_9 135/149

udtExample.arrANL_AO2_UI_Para[iChannel].rSetValue := 0.0;
udtExample.arrANL_AI2_SF[iChannel].xActivate := FALSE;
udtExample.arrANL_AI2_SF[iChannel].rHI_Limit := 0.0;
udtExample.arrANL_AI2_SF[iChannel].rLO_Limit := 0.0;
udtExample.arrANL_AI2_SF[iChannel].xNoFilter := FALSE;
udtExample.arrANL_AI2_SF[iChannel].iSelectFormat := 0;
udtExample.arrANL_AI2_SF[iChannel].iSelectRange := 0;
END_FOR;
udtExample.udtANL_AO2_UI.iSelectCH := 0;
udtExample.udtANL_AO2_UI.xActivate := FALSE;
IF xStart = FALSE THEN
udtExample.iState := 0;
END_IF;
END_CASE;
iState := udtExample.iState;
AnalogTechnology_9 136/149

20.9 Example 9: ANL_*_EXA_IL_AO_1_SF_I


In this example CH 1 of both modules is used in current mode with a range of 0-20mA.

20.9.1 Bus structure


For this example, the following hardware is used:

ILC 150 ETH (2985330)


IB IL AO 1/SF (2726298)
IB IL AI 2/SF-PAC (2861302)

In order to be able to evaluate the output voltage values of the IB IL AO 1/SF (2726298) analog output module, the
IB IL AI 2/SF-PAC (2861302) input module is used additionally.

20.9.2 Example description


20.9.2.1 Example machine

For starting ExampleMachine function block, xStart input has set to TRUE.

20.9.2.2 Example E_1000

CASE udtExample.iState OF
0: (* Init *)
IF xStart = TRUE THEN
(* Parameterization of IL_AO_1_SF function block *)
(* Analog value to be output *)
udtExample.udtANL_IL_AO_1_SF.rNormValue := 10.0;
(* High limit of the normed range *)
udtExample.udtANL_IL_AO_1_SF.rHI_Limit := 20.0;
(* Low limit of the normed range *)
udtExample.udtANL_IL_AO_1_SF.rLO_Limit := 0.0;
(* Activation of function block *)
udtExample.udtANL_IL_AO_1_SF.xActivate := TRUE;
(* Parameterization of IL_AI_2_SF function block *)
(* CH1: current mode *)
(* High limit of the normed range *)
udtExample.udtANL_IL_AI_2_SF.rHI_Limit := 20.0;
(* Low limit of the normed range *)
udtExample.udtANL_IL_AI_2_SF.rLO_Limit := 0.0;
(* Disables filter *)
udtExample.udtANL_IL_AI_2_SF.xNoFilter := FALSE;
(* Chooses IB IL format *)
udtExample.udtANL_IL_AI_2_SF.iSelectFormat := 0;
(* Chooses range 0-20mA *)
udtExample.udtANL_IL_AI_2_SF.iSelectRange := 1;
(* Activates function block *)
AnalogTechnology_9 137/149

udtExample.udtANL_IL_AI_2_SF.xActivate := TRUE;
udtExample.iState := 10;
END_IF;
10: (*Checking for an error of IL_AO_2_UI function block *)
IF
udtExample.udtANL_IL_AO_1_SF.xError = TRUE OR
udtExample.udtANL_IL_AI_2_SF.xError = TRUE
THEN
udtExample.iState := 9000;
ELSE
udtExample.iState := 32000;
END_IF;
9000: (* Error handling *)
(* Insert your error handling here *)
IF xStart = FALSE THEN
udtExample.iState := 32000;
END_IF;
32000: (* Example is finished *)
(* Deactivation of function blocks *)
udtExample.udtANL_IL_AO_1_SF.rNormValue := 0.0;
udtExample.udtANL_IL_AO_1_SF.rHI_Limit := 0.0;
udtExample.udtANL_IL_AO_1_SF.rLO_Limit := 0.0;
udtExample.udtANL_IL_AO_1_SF.xActivate := FALSE;
udtExample.udtANL_IL_AI_2_SF.rHI_Limit := 0.0;
udtExample.udtANL_IL_AI_2_SF.rLO_Limit := 0.0;
udtExample.udtANL_IL_AI_2_SF.xNoFilter := FALSE;
udtExample.udtANL_IL_AI_2_SF.iSelectFormat := 0;
udtExample.udtANL_IL_AI_2_SF.iSelectRange := 0;
udtExample.udtANL_IL_AI_2_SF.xActivate := FALSE;
IF xStart = FALSE THEN
udtExample.iState := 0;
END_IF;
END_CASE;
iState := udtExample.iState;
AnalogTechnology_9 138/149

20.10 Example 10: ANL_*_EXA_IL_AO_1_SF_U


In this example CH 1 of both modules is used in voltage mode with a range of 0-10V.

20.10.1 Bus structure


For this example, the following hardware is used:

ILC 150 ETH (2985330)


IB IL AO 1/SF (2726298)
IB IL AI 2/SF-PAC (2861302)

In order to be able to evaluate the output voltage values of the IB IL AO 1/SF (2726298) analog output module, the
IB IL AI 2/SF-PAC (2861302) input module is used additionally.

20.10.2 Example description


20.10.2.1 Example machine

For starting ExampleMachine function block, xStart input has set to TRUE.

20.10.2.2 Example E_1000

CASE udtExample.iState OF
0: (* Init *)
IF xStart = TRUE THEN
(* Parameterization of IL_AO_1_SF function block *)
(* Analog value to be output *)
udtExample.udtANL_IL_AO_1_SF.rNormValue := 3000.0;
(* High limit of the normed range *)
udtExample.udtANL_IL_AO_1_SF.rHI_Limit := 4000.0;
(* Low limit of the normed range *)
udtExample.udtANL_IL_AO_1_SF.rLO_Limit := 2000.0;
(* Activation of function block *)
udtExample.udtANL_IL_AO_1_SF.xActivate := TRUE;
(* Parameterization of IL_AI_2_SF function block *)
(* CH1: voltage mode *)
(* High limit of the normed range *)
udtExample.udtANL_IL_AI_2_SF.rHI_Limit := 10.0;
(* Low limit of the normed range *)
udtExample.udtANL_IL_AI_2_SF.rLO_Limit := 0.0;
(* Disables filter *)
udtExample.udtANL_IL_AI_2_SF.xNoFilter := FALSE;
(* Chooses IB IL format *)
udtExample.udtANL_IL_AI_2_SF.iSelectFormat := 0;
(* Chooses range 0-10V *)
udtExample.udtANL_IL_AI_2_SF.iSelectRange := 0;
(* Activates function block *)
AnalogTechnology_9 139/149

udtExample.udtANL_IL_AI_2_SF.xActivate := TRUE;
udtExample.iState := 10;
END_IF;
10: (*Checking for an error of IL_AO_2_UI function block *)
IF
udtExample.udtANL_IL_AO_1_SF.xError = TRUE OR
udtExample.udtANL_IL_AI_2_SF.xError = TRUE
THEN
udtExample.iState := 9000;
ELSE
udtExample.iState := 32000;
END_IF;
9000: (* Error handling *)
(* Insert your error handling here *)
IF xStart = FALSE THEN
udtExample.iState := 32000;
END_IF;
32000: (* Example is finished *)
(* Deactivation of function blocks *)
udtExample.udtANL_IL_AO_1_SF.rNormValue := 0.0;
udtExample.udtANL_IL_AO_1_SF.rHI_Limit := 0.0;
udtExample.udtANL_IL_AO_1_SF.rLO_Limit := 0.0;
udtExample.udtANL_IL_AO_1_SF.xActivate := FALSE;
udtExample.udtANL_IL_AI_2_SF.rHI_Limit := 0.0;
udtExample.udtANL_IL_AI_2_SF.rLO_Limit := 0.0;
udtExample.udtANL_IL_AI_2_SF.xNoFilter := FALSE;
udtExample.udtANL_IL_AI_2_SF.iSelectFormat := 0;
udtExample.udtANL_IL_AI_2_SF.iSelectRange := 0;
udtExample.udtANL_IL_AI_2_SF.xActivate := FALSE;
IF xStart = FALSE THEN
udtExample.iState := 0;
END_IF;
END_CASE;
iState := udtExample.iState;
AnalogTechnology_9 140/149

20.11 Example 11: ANL_*_EXA_IL_AO4_8


In this example CH 1 of both modules is parameterized in voltage mode with a range of 0-10V.

20.11.1 Bus structure


For this example, the following hardware is used:

ILC 150 ETH (2985330)


IB IL AO 4/8/U/BP-PAC (2878036)
IB IL AI 2/SF-PAC (2861302)

In order to be able to evaluate the output voltage values of the IB IL AO 4/8/U/BP-PAC (2878036) analog output
module, the IB IL AI 2/SF-PAC (2861302) input module is used additionally.
AnalogTechnology_9 141/149

20.11.2 Example description


20.11.2.1 Example machine

For starting ExampleMachine function block, xStart input has set to TRUE.

20.11.2.2 Example E_1000

CASE udtExample.iState OF
0: (* Init *)
IF xStart = TRUE THEN
(* Parameterization of IL_AO4_8 function block *)
(* Activation of function block *)
udtExample.udtANL_IL_AO4_8.xActivate := TRUE;
(* Selection of channel 1 *)
udtExample.udtANL_IL_AO4_8.bSelect := BYTE#16#01;
(* Output behavior on bus reset *)
udtExample.udtANL_IL_AO4_8.udtParameter[1].Hold := TRUE;
(* Maximum set point *)
udtExample.udtANL_IL_AO4_8.udtParameter[1].MaxValue := 10.0;
(* Minimum set point *)
udtExample.udtANL_IL_AO4_8.udtParameter[1].MinValue := 0.0;
(* Channel output range *)
udtExample.udtANL_IL_AO4_8.udtParameter[1].Range := 0;
(* Set point *)
udtExample.udtANL_IL_AO4_8.udtParameter[1].Value := 7.5;
(* Parameterization of IL_AI_2_SF function block *)
(* Activation of function block *)
udtExample.udtANL_IL_AI_2_SF.xActivate := TRUE;
(* High limit of the normed range *)
udtExample.udtANL_IL_AI_2_SF.rHI_Limit := 10.0;
(* Low limit of the normed range *)
udtExample.udtANL_IL_AI_2_SF.rLO_Limit := 0.0;
(* Disabling filter *)
udtExample.udtANL_IL_AI_2_SF.xNoFilter := FALSE;
(* Selection of format 0 = IB-IL-Format (15 Bit) *)
udtExample.udtANL_IL_AI_2_SF.iSelectFormat := 0;
(* Selection of range 0 = Unipolar (0-10V) *)
udtExample.udtANL_IL_AI_2_SF.iSelectRange := 0;
udtExample.iState := 10;
END_IF;
10: (* Checking for xError *)
IF
udtExample.udtANL_IL_AO4_8.xError = TRUE OR
udtExample.udtANL_IL_AI_2_SF.xError = TRUE
THEN
udtExample.iState := 9000;
ELSE
udtExample.iState := 32000;
END_IF;
AnalogTechnology_9 142/149

9000: (* Error handling *)


(* Insert your error handling here *)
IF xStart = FALSE THEN
udtExample.iState := 32000;
END_IF;
32000: (* Example is finished *)
(* Deactivation of FBs *)
udtExample.udtANL_IL_AO4_8.xActivate := FALSE;
udtExample.udtANL_IL_AO4_8.bSelect := BYTE#16#00;
udtExample.udtANL_IL_AO4_8.udtParameter[1].Hold := FALSE;
udtExample.udtANL_IL_AO4_8.udtParameter[1].MaxValue := 0.0;
udtExample.udtANL_IL_AO4_8.udtParameter[1].MinValue := 0.0;
udtExample.udtANL_IL_AO4_8.udtParameter[1].Range := 0;
udtExample.udtANL_IL_AO4_8.udtParameter[1].Value := 0.0;
udtExample.udtANL_IL_AI_2_SF.xActivate := FALSE;
udtExample.udtANL_IL_AI_2_SF.rHI_Limit := 0.0;
udtExample.udtANL_IL_AI_2_SF.rLO_Limit := 0.0;
udtExample.udtANL_IL_AI_2_SF.xNoFilter := FALSE;
udtExample.udtANL_IL_AI_2_SF.iSelectFormat := 0;
udtExample.udtANL_IL_AI_2_SF.iSelectRange := 0;
IF xStart = FALSE THEN
udtExample.iState := 0;
END_IF;
END_CASE;
iState := udtExample.iState;
AnalogTechnology_9 143/149

20.12 Example 12: ANL_*_EXA_IL_SGI_2_P_EF


20.12.1 Bus structure
For this example, the following hardware is used:

ILC 191 ETH 2TX (2700976)


IB IL SGI 2/P/EF-PAC (2702373)

20.12.2 Example description


20.12.2.1 Example machine

For starting ExampleMachine function block, xStart input has set to TRUE.

20.12.2.2 Example E_1000

CASE udtExample.iState OF
0: (* Wait for xStart *)
IF xStart = TRUE THEN
(* Parameterization of AsynCom_IBS function block *)
(* Connect slot *)
udtExample.udtAsynCom_IBS.strPartner := 'CR2';
(* Channel selection for adjustment *)
(* Selects channel 1 *)
udtExample.arrSGI_2P_EF_Adju[1].bSelect := BYTE#16#01;
(* Selects channel 2 *)
udtExample.arrSGI_2P_EF_Adju[2].bSelect := BYTE#16#02;
(* Selects channels for parameterization *)
(* Selects channel 1 *)
udtExample.arrSGI_2P_EF_Para[1].bSelect := BYTE#16#01;
(* Selects channel 2 *)
udtExample.arrSGI_2P_EF_Para[2].bSelect := BYTE#16#02;
(* Selection of channels for status information *)
(* Selects channel 1 *)
udtExample.arrSGI_2P_EF_Val[1].bSelect := BYTE#16#01;
(* Selects channel 2 *)
udtExample.arrSGI_2P_EF_Val[2].bSelect := BYTE#16#02;
(* Parameterization of ANL_IL_SGI_2P_EF function block *)
(* Select both channels *)
udtExample.udtSGI_2P_EF.bSelect := BYTE#16#00;
(* Add parameter to ANL_IL_SGI_2P_EF_Para function block *)
FOR iIndex := 1 TO 2 DO
(* Setting the filter of the channel *)
udtExample.arrSGI_2P_EF_Para[iIndex].iFilter := 3;
(* Properties of the strain gauge characteristic 0= ±1 mV/V *)
udtExample.arrSGI_2P_EF_Para[iIndex].iCharacteristic := 0;
AnalogTechnology_9 144/149

(* Nominal load of the strain gauge *)


udtExample.arrSGI_2P_EF_Para[iIndex].rNominalWeight := 10.0;
(* Adjusted value in % of the nominal load *)
udtExample.arrSGI_2P_EF_Para[iIndex].rAdjustValue := 50.0;
(* Adjusted value2 in % of the nominal load *)
udtExample.arrSGI_2P_EF_Para[iIndex].rAdjustValue2 := 30.0;
(* Conversion time of the analog-to-digital converter 8 = 20 ms*)
udtExample.arrSGI_2P_EF_Para[iIndex].iConversionTime := 8;
END_FOR;
(* Activation of ANL_IL_SGI_2P_EF function block *)
udtExample.udtSGI_2P_EF.xActivate := TRUE;
udtExample.iState := 10;
END_IF;
10: (* Checking for xError *)
IF udtExample.udtSGI_2P_EF.xError = TRUE THEN
udtExample.iState := 9000;
ELSE
(* Read min/max values and exteded values *)
udtExample.udtSGI_2P_EF.xReadMinMax := TRUE;
udtExample.udtSGI_2P_EF.xReadValue := TRUE;
(* Set zero point for channel 1 & 2 *)
udtExample.arrSGI_2P_EF_Adju[1].xSetZeroPoint := TRUE;
udtExample.arrSGI_2P_EF_Adju[2].xSetZeroPoint := TRUE;
udtExample.iState := 32000;
END_IF;
9000: (* Error handling *)
(* Insert your error handling here *)
IF xStart = FALSE THEN
udtExample.iState := 32000;
END_IF;
32000: (* Example is finished *)
(* Deactivation of all function blocks *)
udtExample.udtAsynCom_IBS.strPartner := '';
udtExample.arrSGI_2P_EF_Adju[1].bSelect := BYTE#16#00;
udtExample.arrSGI_2P_EF_Adju[2].bSelect := BYTE#16#00;
udtExample.arrSGI_2P_EF_Para[1].bSelect := BYTE#16#00;
udtExample.arrSGI_2P_EF_Para[2].bSelect := BYTE#16#00;
udtExample.arrSGI_2P_EF_Val[1].bSelect := BYTE#16#00;
udtExample.arrSGI_2P_EF_Val[2].bSelect := BYTE#16#00;
udtExample.udtSGI_2P_EF.bSelect := BYTE#16#00;
FOR iIndex := 1 TO 2 DO
udtExample.arrSGI_2P_EF_Para[iIndex].iFilter := 0;
udtExample.arrSGI_2P_EF_Para[iIndex].iCharacteristic := 0;
udtExample.arrSGI_2P_EF_Para[iIndex].rNominalWeight := 0.0;
udtExample.arrSGI_2P_EF_Para[iIndex].rAdjustValue := 0.0;
udtExample.arrSGI_2P_EF_Para[iIndex].rAdjustValue2 := 0.0;
udtExample.arrSGI_2P_EF_Para[iIndex].iConversionTime := 0;
END_FOR;
udtExample.udtSGI_2P_EF.xActivate := FALSE;
IF xStart = FALSE THEN
udtExample.iState := 0;
END_IF;
END_CASE;
AnalogTechnology_9 145/149

iState := udtExample.iState;
AnalogTechnology_9 146/149

20.13 Example 13: ANL_*_EXA_IL_SGI_2_P_EFPN


20.13.1 Bus structure
For these examples, the following hardware is used:

AXC 1050 (2700988)


IL PN BK DI8 DO4 2TX-PAC (2703994)
IB IL SGI 2/P/EF-PAC (2702373)

20.13.2 Example description


20.13.2.1 Example machine

For starting ExampleMachine function block, xStart input has set to TRUE.

20.13.2.2 Example E_1000

CASE udtExample.iState OF
0: (* Wait for xStart *)
IF xStart = TRUE THEN
(* Parameterization of AsynCom_IBS function block *)
(* Connect slot *)
udtExample.udtAsynCom_IBS.strPartner := 'CR2';
(* Channel selection for adjustment *)
(* Selects channel 1 *)
udtExample.arrSGI_2P_EF_Adju[1].bSelect := BYTE#16#01;
(* Selects channel 2 *)
udtExample.arrSGI_2P_EF_Adju[2].bSelect := BYTE#16#02;
(* Selects channels for parameterization *)
(* Selects channel 1 *)
udtExample.arrSGI_2P_EF_Para[1].bSelect := BYTE#16#01;
(* Selects channel 2 *)
udtExample.arrSGI_2P_EF_Para[2].bSelect := BYTE#16#02;
(* Selection of channels for status information *)
(* Selects channel 1 *)
udtExample.arrSGI_2P_EF_Val[1].bSelect := BYTE#16#01;
(* Selects channel 2 *)
udtExample.arrSGI_2P_EF_Val[2].bSelect := BYTE#16#02;
(* Parameterization of ANL_IL_SGI_2P_EF function block *)
(* Select both channels *)
udtExample.udtSGI_2P_EF.bSelect := BYTE#16#00;
(* Add parameter to ANL_IL_SGI_2P_EF_Para function block *)
FOR iIndex := 1 TO 2 DO
(* Setting the filter of the channel *)
udtExample.arrSGI_2P_EF_Para[iIndex].iFilter := 3;
AnalogTechnology_9 147/149

(* Properties of the strain gauge characteristic 0= ±1 mV/V *)


udtExample.arrSGI_2P_EF_Para[iIndex].iCharacteristic := 0;
(* Nominal load of the strain gauge *)
udtExample.arrSGI_2P_EF_Para[iIndex].rNominalWeight := 10.0;
(* Adjusted value in % of the nominal load *)
udtExample.arrSGI_2P_EF_Para[iIndex].rAdjustValue := 50.0;
(* Adjusted value2 in % of the nominal load *)
udtExample.arrSGI_2P_EF_Para[iIndex].rAdjustValue2 := 30.0;
(* Conversion time of the analog-to-digital converter 8 = 20 ms*)
udtExample.arrSGI_2P_EF_Para[iIndex].iConversionTime := 8;
END_FOR;
(* Activation of ANL_IL_SGI_2P_EF function block *)
udtExample.udtSGI_2P_EF.xActivate := TRUE;
udtExample.iState := 10;
END_IF;
10: (* Checking for xError *)
IF udtExample.udtSGI_2P_EF.xError = TRUE THEN
udtExample.iState := 9000;
ELSE
(* Read min/max values and exteded values *)
udtExample.udtSGI_2P_EF.xReadMinMax := TRUE;
udtExample.udtSGI_2P_EF.xReadValue := TRUE;
(* Set zero point for channel 1 & 2 *)
udtExample.arrSGI_2P_EF_Adju[1].xSetZeroPoint := TRUE;
udtExample.arrSGI_2P_EF_Adju[2].xSetZeroPoint := TRUE;
udtExample.iState := 32000;
END_IF;
9000: (* Error handling *)
(* Insert your error handling here *)
IF xStart = FALSE THEN
udtExample.iState := 32000;
END_IF;
32000: (* Example is finished *)
(* Deactivation of all function blocks *)
udtExample.udtAsynCom_IBS.strPartner := '';
udtExample.arrSGI_2P_EF_Adju[1].bSelect := BYTE#16#00;
udtExample.arrSGI_2P_EF_Adju[2].bSelect := BYTE#16#00;
udtExample.arrSGI_2P_EF_Para[1].bSelect := BYTE#16#00;
udtExample.arrSGI_2P_EF_Para[2].bSelect := BYTE#16#00;
udtExample.arrSGI_2P_EF_Val[1].bSelect := BYTE#16#00;
udtExample.arrSGI_2P_EF_Val[2].bSelect := BYTE#16#00;
udtExample.udtSGI_2P_EF.bSelect := BYTE#16#00;
FOR iIndex := 1 TO 2 DO
udtExample.arrSGI_2P_EF_Para[iIndex].iFilter := 0;
udtExample.arrSGI_2P_EF_Para[iIndex].iCharacteristic := 0;
udtExample.arrSGI_2P_EF_Para[iIndex].rNominalWeight := 0.0;
udtExample.arrSGI_2P_EF_Para[iIndex].rAdjustValue := 0.0;
udtExample.arrSGI_2P_EF_Para[iIndex].rAdjustValue2 := 0.0;
udtExample.arrSGI_2P_EF_Para[iIndex].iConversionTime := 0;
END_FOR;
udtExample.udtSGI_2P_EF.xActivate := FALSE;
IF xStart = FALSE THEN
udtExample.iState := 0;
END_IF;
AnalogTechnology_9 148/149

END_CASE;
iState := udtExample.iState;
AnalogTechnology_9 149/149

21 Support
For technical support please contact your local PHOENIX CONTACT agency
at https://www.phoenixcontact.com
Owner:
PHOENIX CONTACT Electronics GmbH
Business Unit Automation Systems
System Services
Library Services

You might also like