Axl Analog Out V1 00 001

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Function description and documentation for

Phoenix Contact system blocks Page 1 of 11

Function block

AXL_ANALOG_OUT

for the PC WORX control system

Function description and documentation for


Phoenix Contact system blocks
Software created by:
Phoenix Contact GmbH & Co. KG
Flachsmarktstraße 8
32825 Blomberg, Germany
Phone: + 49 5235 3-00
AXL_ANALOG_OUT
Page 2 of 11

Table of contents

1 Introduction .................................................................................................................. 3
1.1 General ................................................................................................................... 3
1.2 Block data ............................................................................................................... 3
1.3 Block call ................................................................................................................. 3

2 Block description ......................................................................................................... 4


2.1 General ................................................................................................................... 4
2.2 Input parameters ..................................................................................................... 5
2.3 Output parameters .................................................................................................. 6
2.4 Diagnostics ............................................................................................................. 7
2.5 Startup .................................................................................................................... 8
2.6 Note .......................................................................................................................11
AXL_ANALOG_OUT
Page 3 of 11

1 Introduction

1.1 General
The AXL_ANALOG_OUT block uses the standardized data values of the control program to
calculate the relevant process data for the analog output terminal blocks of the Axioline
product range.

1.2 Block data

Block name: AXL_ANALOG_OUT


Version: 1.00
Environment: PC WORX 6.20 SP2
Controller types: Class ILC 3xx PN, RFC 4xx PN, PC WORX RT, and AXC controllers
Module types: Terminal blocks such as AXL AO8 (Order No. 2688080),
AXL F AO4 1H (Order No. 2688527), etc.

1.3 Block call

Figure: AXL_ANALOG_OUT block


AXL_ANALOG_OUT
Page 4 of 11

2 Block description
2.1 General
This block provides support in the output of signals via analog terminal blocks in the Axioline
product range. The analog output channels can be in the local bus of a class AXC controller
or in PROFINET stations after an AXL BK PN bus coupler.

To output the analog values, create a global variable for linking the block to the process data
of the analog terminal block and connect the variable using the AnalogOut output and the
iAnalogIn input. Reading back the process data of the terminal block enables the block to
provide extended diagnostics for the actuator. In addition, when accessing an analog
terminal block within a PROFINET IO station, the “PNIO Data Valid” status of the bus coupler
can be transferred to the block. This status enables the block to also monitor the PROFINET
connection and the validity of the incoming process data.

As well as linking the global variables, various parameters are transferred to the block. The
rLimitLow and rLimitHigh inputs indicate the lower and upper limit values for the program
variables. For example, your program variable takes values ranging from 0.0 to 100.0, which
are converted by the block to an analog output current with values ranging from 4 to 20 mA.
For this standardization, the block expects information about the selected output range at the
iRange input. The configuration of the output range of the analog channel can be found in the
“Bus Structure” of PC WORX in the “Device parameters” view for the analog terminal block.
The iSubstitute parameter can be used to determine how the block should deal with its
iAnalogOut output in the event that an abnormal operating state is detected.

Once the block has been configured and connected to the hardware, create your real
program variable directly at the rValue input, which can be used in your calculations. Each
block call processes the current data value and transfers it to the global process data
variables at the block output. If the block does not detect an error, the xValid output is set to
True. Invalid input parameters such as the output range, substitute value behavior or limit
values are indicated by the value False and a corresponding diagnostic status at the xValid
output. This is also used to indicate that the bus coupler is not providing valid process data
(possibly due to a connection error) or that the analog terminal block is indicating an error. In
the event of a hardware error message, the wStatus output provides diagnostic information
directly according to the description in the terminal block data sheet.

In the event of an abnormal operating state, typically the iAnalogOut output is set to 0, and
on request in the event of invalid values for the output range or the entry of a lower limit
value greater than the entry for the upper limit value, the last valid process data item is
output. To hold the last valid value, select the value Integer#1 for the iSubstitute input. If the
value of the rValue program variable is greater than the upper limit, the iAnalogOut output is
set to the maximum output value (e.g., +10 V, +20 mA, +5 V, etc.). If the value is below the
lower limit value, the minimum output value (0 V, 0 mA, -5 V, etc.) is selected.
AXL_ANALOG_OUT
Page 5 of 11

2.2 Input parameters

Input parameters
Name Type Description
rValue INT Data value in the standardized value range.

rLimitLow REAL Lower limit value of the standardized data value (default
value is REAL#0.0).

rLimitHigh REAL Upper limit value of the standardized data value (default
value is REAL#10.0).

iRange INT Output range of the analog channel:


INT#1 – 0 ... 10 V, 0 ... 5 V, 0 ... 20 mA (default value)
INT#2 – ±10 V, ±5 V, ±20 mA
INT#3 – 4 ... 20 mA
This parameter must correspond to the parameterization of
the analog channel.

iSubstitute INT Substitute value behavior for the rValue output in the event
of invalid block parameterization:
INT#0 – output value REAL#0.0 (default value)
INT#1 – last valid output value is held

iAnalogIn INT Process data item of the analog channel for diagnostic
purposes (actuator error).

xPnioDataValid BOOL Status PNIO_DATA_VALID for the connection between


controller and PROFINET IO bus coupler. When accessing
an analog channel in the local bus of an AXC type
controller, set this input to the value BOOL#true.
AXL_ANALOG_OUT
Page 6 of 11

2.3 Output parameters

Output parameters
Name Type Description
iAnalogOut REAL Process data value for the analog output.

xValid BOOL Status for output of the analog value:


BOOL#true – output value is calculated, transferred to the
output module, and output.
BOOL#false – PNIO communication error, actuator error,
invalid input parameters at the block or data value outside
the limit values.
In the event of an error, the wStatus output provides
additional information.

wStatus WORD Information for diagnostics of the internal block function,


process data communication, and signal output.
See overview in the diagnostics section.
AXL_ANALOG_OUT
Page 7 of 11

2.4 Diagnostics

Status Meaning
0000hex No information available.

0C01hex The entry for the output range (iRange) is invalid.

0C02hex The entries for the limit values (rLimitLow and rLimitHigh) are invalid.

0C03hex The entry for the substitute value behavior (iSubstitute) is invalid.

0C04hex The data value is less than the lower limit value.
The process data value is set to the minimum value.

0C05hex The data value is greater than the upper limit value.
The process data value is set to the maximum value.

0C20hex The process data of the PROFINET IO device is invalid (“PNIO Data Valid” status).

8002hex Actuator error – open circuit

8003hex Actuator error – short circuit

8010hex Actuator error – parameter table invalid

8020hex Actuator error – supply voltage faulty

8040hex Actuator error – channel faulty

80xxhex For other actuator errors, refer to the data sheet for the analog terminal block used.
AXL_ANALOG_OUT
Page 8 of 11

2.5 Startup
To integrate the AXL_ANALOG_OUT block, proceed as follows:

1. Create your bus configuration and select the output range of the analog channels and
the substitute value behavior of the hardware. The substitute value behavior is
relevant, for example, on connection aborts between the controller and the
PROFINET IO device. During parameterization, make sure that the data format is left
as “Inline”.

Figure: Device parameters view


AXL_ANALOG_OUT
Page 9 of 11

2. Instantiate the AXL_ANALOG_OUT block for each analog channel. The value at the
iRange input must correspond to your parameterization of the output range in the
“Device parameters” view (e.g., value int#1 is 0 ... 10 V, 0 ... 5 V, and 0 ... 20 mA).
To link the process data, create global variables at the iAnalogIn input and at the
iAnalogOut output. A third global variable can be created for the “PNIO Data Valid”
status of a PROFINET bus coupler as an option. Otherwise, set the xPnioDataValid
input to True.

Figure: Instance of the block for an analog output channel


AXL_ANALOG_OUT
Page 10 of 11

3. Now link the global variables to the process data of the analog terminal block and the
“PNIO Data Valid” status of the bus coupler (optional).

Figure: Process data linking for an analog channel

4. Compile your project and transfer it to your controller.


AXL_ANALOG_OUT
Page 11 of 11

2.6 Note

This function block can be used for analog output terminal blocks which use the distinctive
values listed below in Inline data format according to their data sheets.
At the time of writing this documentation, these are terminal blocks AXL AO8
(Order No. 2688080) and AXL F AO4 1H (Order No. 2688527). Please note that the use of
the AXL_ANALOG_OUT block could only be tested using these terminal blocks.

Figure: Significant values in Inline data format

You might also like