You are on page 1of 9

VAS AE Software Engineering

Function Description and Documentation for FB A-3-0033/-02-


Phoenix Contact System Blocks Page 1 of 9

Function Block

IL_AI_8_V2_1x

for the PC WORX V5.0x Control System

Function Description and Documentation for


Phoenix Contact System Blocks
Software created by:
Phoenix Contact GmbH & Co. KG
CCAX
Flachsmarktstraße 8
32825 Blomberg, Germany
Phone: +49 - 52 35 - 30 0
VAS AE Software Engineering
Function Block for IL_AI8_V2_1x FB A-3-0033/-02-
Page 2 of 9

Table of Contents

1 Introduction................................................................................................................. 3
1.1 Scope of Validity ..................................................................................................... 3
1.2 General ................................................................................................................... 3
1.3 Block Data............................................................................................................... 3
1.4 Block Call ................................................................................................................ 3

2 Block Description ....................................................................................................... 4


2.1 Operating Modes..................................................................................................... 4
2.1.1 Enabling ........................................................................................................... 4
2.1.2 Parameterizing Analog Channels ..................................................................... 4
2.1.3 Outputting Standardized Measured Values ...................................................... 4
2.2 Input Parameters..................................................................................................... 5
2.3 Output Parameters.................................................................................................. 6
2.4 Block Parameters.................................................................................................... 6
2.4.1 Channel Parameters ........................................................................................ 6
2.4.2 Measured Values and Channel Diagnostics ..................................................... 7
2.5 Diagnostics ............................................................................................................. 7

3 Index ............................................................................................................................ 9
VAS AE Software Engineering
Function Block for IL_AI8_V2_1x FB A-3-0033/-02-
Page 3 of 9

1 Introduction
1.1 Scope of Validity
This manual is valid for Version 2.1x (x = 0 - 9).

1.2 General
The IL_AI8 block is a function block used to parameterize and standardize measured
values for the terminal types listed in the Block Data below.
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 is required for each Inline terminal.
Knowledge of the INTERBUS Inline terminals used and PC WORX is required.

1.3 Block Data

Block number:
Block name: IL_AI8_V2_1x
Block type: Function block
Version: 2.1x
Author: PxC JPO
Controller variants: All controllers that support PC WORX V5.0x
Terminal types: IB IL AI8/SF 2MBD Order No. 2855648
IB IL AI8/SF Order No. 2727831
IB IL AI8/IS (only current measuring range) Order No. 2742748

1.4 Block Call


VAS AE Software Engineering
Function Block for IL_AI8_V2_1x FB A-3-0033/-02-
Page 4 of 9

2 Block Description
2.1 Operating Modes

2.1.1 Enabling
In order to use the block, integrate it into your application. A block call is required for
each analog terminal. Activate it after the first PLC cycle. This is done by controlling the
Activate input variable from FALSE to TRUE. The channels are parameterized with a
positive signal edge at Activate. As soon as this has been completed successfully, this
is indicated by Ready FALSE => TRUE.
Please note that at least one cycle is required with Activate = 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. Activate 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 SelectValid output parameter = TRUE. If a channel is read in with an
error (e.g., limit value exceeded), the status of the SelectValid output parameter =
FALSE. The error cause can be determined using the DeviceDiagCode block
parameter (see Section 2.4.2).

2.1.2 Parameterizing Analog Channels


In order to parameterize the channels the UDT_IL_AI8 _Para parameter structure must
be provided with the corresponding block parameters.
The Activate input parameter must have a positive edge. It can only be
reparameterized with a positive edge. The end of parameterization is indicated by
Ready (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 (DiagCode and AddDiagCode), 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.

2.1.3 Outputting Standardized Measured Values


In order to read measured values or error messages for channels 1 - 8 of an analog
terminal, the Select input variable must be provided with a corresponding value.
The channels are read in order from channel 1 to 8. Therefore, the Select input
parameter must be provided with a corresponding value. The activated bits in the
Select parameter permit the channels to be read. Therefore, the least significant bit
(bit 0) corresponds to channel 1, the most significant bit (bit 7) corresponds to
channel 8.
Channels that are not selected are skipped. This means that it is quicker to read in the
used channels.
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).
VAS AE Software Engineering
Function Block for IL_AI8_V2_1x FB A-3-0033/-02-
Page 5 of 9

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
Error or DeviceDiagCode 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 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. DeviceDiagCode contains the error code in IL format.
Please note that the last valid measured value is still displayed.

2.2 Input Parameters


Input Parameters
Name Type Description
xActivate BOOL Block activation.
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.
Activate = TRUE:
If block processing is activated all the selected
channels are read. The DiagCode and
AddDiagCode diagnostic registers contain the
status of the function and the terminal.
bSelect BYTE By activating the individual bits from 0 - 7
(correspond to channels 1 to 8), automatic
reading in of the individual channels is activated.
udtParameter ANL_ARR_IL_AI_8_Para Channel input parameter (see Section 2.4.1).
dwInputAddress DWORD Process data input address for the terminal.
VAS AE Software Engineering
Function Block for IL_AI8_V2_1x FB A-3-0033/-02-
Page 6 of 9

2.3 Output Parameters


Output Parameters
Name Type Description
xReady BOOL Block is ready, parameterization completed.
xError BOOL Error during initialization or operation (see
Section 2.5).
wDiagCode WORD Diagnostic information (see Section 2.5).
wAddDiagCode WORD Additional diagnostic information (see 2.5).
xSelectValid BOOL Selected channels are ready.
udtData ANL_ARR_IL_AI_8_Para Measured value and error output (see Section
2.4.2).
dwOutputAddress DWORD Process data output address for the terminal.

2.4 Block Parameters

2.4.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: Parameter[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 sheet1.

UDT_IL_AI_8_Para
Name Type Description
1
Filter BYTE Filter (value 0 to 3), user setting, see data sheet .
Range INT Measuring range (value 0 to 15), user setting, see data
1
sheet .
Measuring range 8-10, 12+13 only allowed for the IB IL
1
AI8/IS terminal, see data sheet .
Standardization BOOL TRUE: Standardization enabled, user setting
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.

1
IB IL AI8/SF-2MBD Order No. 2855648
IB IL AI8/SF Order No. 2727831
IB IL AI8/IS Order No. 2742748
VAS AE Software Engineering
Function Block for IL_AI8_V2_1x FB A-3-0033/-02-
Page 7 of 9

2.4.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 DeviceDiagCode, please refer to the data sheet1.

UDT_IL_AI_8_Data
Name Type Description
Value_PD WORD Measured value of a channel.
Value REAL Measured value of a channel.
Error BOOL Channel indicates an error.
2
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.

2.5 Diagnostics

DiagCode Meaning
C010hex Timeout during communication
AddDiagCode Meaning
0001hex Module not responding or indicates an error
Range 0-6 at terminal IB IL AI8/IS
C014hex Filter range limit exceeded
AddDiagCode Meaning
ccxxhex cc = channel, xx = range value
C017hex Range limit exceeded
AddDiagCode Meaning
ccxxhex cc = channel, xx = range value
C018hex LowLimit >= HighLimit
AddDiagCode Meaning
00CChex cc = channel
0000hex Block not active
8000hex Block active

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.
VAS AE Software Engineering
Function Block for IL_AI8_V2_1x FB A-3-0033/-02-
Page 8 of 9

3 Index

0 I

0000hex .............................................................7 InputAddress................................................... 5


InputAddress1................................................. 3
InputAddress2................................................. 3
8

8000hex .............................................................7 L

LowLimit...................................................... 6, 7
A

Activate ................................................3, 4, 5, 7 M
AddDiagCode ..................................3, 4, 5, 6, 7
Author ..............................................................3 Module types................................................... 3

B N

Block name......................................................3 NDR ............................................................ 5, 7


Block number...................................................3
Block type ........................................................3
O

C OutputAddress1 .............................................. 3
OutputAddress2 .......................................... 3, 6
C010hex ............................................................7
C014hex ............................................................7
C017hex ............................................................7 P
C018hex ............................................................7
Controller variants ...........................................3 Parameter ................................................... 3, 6
Parameters ......................................... 4, 5, 6, 7
PDOut ............................................................. 6
D

Data .........................................................3, 5, 7 R
DeviceDiagCode......................................4, 5, 7
DiagCode.........................................3, 4, 5, 6, 7 Range ......................................................... 6, 7
Ready...................................................... 3, 4, 6

E
S
Error.....................................................3, 5, 6, 7
Select ...................................................... 3, 4, 5
SelectValid .............................................. 3, 4, 6
F Standardization ........................................... 4, 6

Filter.............................................................6, 7
T

H Table of contents ............................................ 2

HighLimit......................................................6, 7
VAS AE Software Engineering
Function Block for IL_AI8_V2_1x FB A-3-0033/-02-
Page 9 of 9

U V

UDT_IL_AI_8_Data.........................................7 Value ........................................................... 5, 7


UDT_IL_AI_8_Para.........................................6 Value_PD .................................................... 5, 7
UDT_TEMP_4_8_RTD_Para ..................4, 5, 6 Version ............................................................ 3
UTD_IL_AI_8_Data .........................................7
UTD_TEMP_4_8_RTD_Data ..........................5

You might also like