Anda di halaman 1dari 9

Function Description and Documentation for

Phoenix Contact System Blocks

VAS AE Software Engineering


FB A-3-0033/-02Page 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
Flachsmarktstrae 8
32825 Blomberg, Germany
Phone: +49 - 52 35 - 30 0

Function Block for IL_AI8_V2_1x

VAS AE Software Engineering


FB A-3-0033/-02Page 2 of 9

Table of Contents
1
1.1
1.2
1.3
1.4

Introduction................................................................................................................. 3
Scope of Validity ..................................................................................................... 3
General ................................................................................................................... 3
Block Data............................................................................................................... 3
Block Call ................................................................................................................ 3

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

Index ............................................................................................................................ 9

Function Block for IL_AI8_V2_1x

VAS AE Software Engineering


FB A-3-0033/-02Page 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:
Block type:
Version:
Author:
Controller variants:
Terminal types:

1.4

Block Call

IL_AI8_V2_1x
Function block
2.1x
PxC JPO
All controllers that support PC WORX V5.0x
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

Function Block for IL_AI8_V2_1x

VAS AE Software Engineering


FB A-3-0033/-02Page 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).

Function Block for IL_AI8_V2_1x

VAS AE Software Engineering


FB A-3-0033/-02Page 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
xActivate

Type
BOOL

bSelect

BYTE

udtParameter
dwInputAddress

ANL_ARR_IL_AI_8_Para
DWORD

Description
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.
By activating the individual bits from 0 - 7
(correspond to channels 1 to 8), automatic
reading in of the individual channels is activated.
Channel input parameter (see Section 2.4.1).
Process data input address for the terminal.

Function Block for IL_AI8_V2_1x

2.3

Output Parameters
Output Parameters
Description

Name

Type

xReady
xError

BOOL
BOOL

wDiagCode
wAddDiagCode
xSelectValid
udtData

WORD
WORD
BOOL
ANL_ARR_IL_AI_8_Para

dwOutputAddress

DWORD

2.4

VAS AE Software Engineering


FB A-3-0033/-02Page 6 of 9

Block is ready, parameterization completed.


Error during initialization or operation (see
Section 2.5).
Diagnostic information (see Section 2.5).
Additional diagnostic information (see 2.5).
Selected channels are ready.
Measured value and error output (see Section
2.4.2).
Process data output address for the terminal.

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

Type
BYTE
INT

Standardization

BOOL
REAL
REAL

LowLimit

Description
1
Filter (value 0 to 3), user setting, see data sheet .
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 .
TRUE: Standardization enabled, user setting
Upper limit value, user setting
Lower limit value, user setting

An alternative to writing the parameter from the program to the array is to connect a
preceding function block.

IB IL AI8/SF-2MBD
IB IL AI8/SF
IB IL AI8/IS

Order No. 2855648


Order No. 2727831
Order No. 2742748

Function Block for IL_AI8_V2_1x

VAS AE Software Engineering


FB A-3-0033/-02Page 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
Value_PD
Value
Error
DeviceDiagCode
NDR

Type
WORD
REAL
BOOL
WORD
BOOL

Description
Measured value of a channel.
Measured value of a channel.
Channel indicates an error.
2
Error code for the channel (IL format), see data sheet
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
C010hex

C014hex

C017hex

C018hex

0000hex
8000hex

Meaning
Timeout during communication
AddDiagCode
Meaning
0001hex
Module not responding or indicates an error
Range 0-6 at terminal IB IL AI8/IS
Filter range limit exceeded
AddDiagCode
Meaning
ccxxhex
cc = channel, xx = range value
Range limit exceeded
AddDiagCode
Meaning
ccxxhex
cc = channel, xx = range value
LowLimit >= HighLimit
AddDiagCode
Meaning
00CChex
cc = channel
Block not active
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.

Function Block for IL_AI8_V2_1x

VAS AE Software Engineering


FB A-3-0033/-02Page 8 of 9

3 Index
0

0000hex .............................................................7

InputAddress................................................... 5
InputAddress1................................................. 3
InputAddress2................................................. 3

8
8000hex .............................................................7

L
LowLimit...................................................... 6, 7

Activate ................................................3, 4, 5, 7
AddDiagCode ..................................3, 4, 5, 6, 7
Author ..............................................................3

Block name......................................................3
Block number...................................................3
Block type ........................................................3

NDR ............................................................ 5, 7

OutputAddress1 .............................................. 3
OutputAddress2 .......................................... 3, 6

C010hex ............................................................7
C014hex ............................................................7
C017hex ............................................................7
C018hex ............................................................7
Controller variants ...........................................3

Module types................................................... 3

P
Parameter ................................................... 3, 6
Parameters ......................................... 4, 5, 6, 7
PDOut ............................................................. 6

D
Data .........................................................3, 5, 7
DeviceDiagCode......................................4, 5, 7
DiagCode.........................................3, 4, 5, 6, 7

R
Range ......................................................... 6, 7
Ready...................................................... 3, 4, 6

E
S
Error.....................................................3, 5, 6, 7

F
Filter.............................................................6, 7

H
HighLimit......................................................6, 7

Select ...................................................... 3, 4, 5
SelectValid .............................................. 3, 4, 6
Standardization ........................................... 4, 6

T
Table of contents ............................................ 2

Function Block for IL_AI8_V2_1x

VAS AE Software Engineering


FB A-3-0033/-02Page 9 of 9

UDT_IL_AI_8_Data.........................................7
UDT_IL_AI_8_Para.........................................6
UDT_TEMP_4_8_RTD_Para ..................4, 5, 6
UTD_IL_AI_8_Data .........................................7
UTD_TEMP_4_8_RTD_Data ..........................5

Value ........................................................... 5, 7
Value_PD .................................................... 5, 7
Version ............................................................ 3

Anda mungkin juga menyukai