Analog unit instructions
1129
Part IV Tool Instructions
ExpansionUnitNumberToIO
WordOffset_FP0
Calculate the IO offset of analog units for FP0
REFERENCE
For technical information, please refer to the manual FP0 RTD Unit ACGM0159 on your FPWIN Pro
installation CD.
PLC types see see page 1320
Input variable Data type Function
iExpansionUnitNumber INT FP0 expansion unit number 1–3
Output variable
iIOWordOffset INT Offset of the I/O word (WX/WY 2/4/6)
Description
This instruction calculates the word offset using an FP0 analog unit connected to an FP0.
Data types
Example
In this example the function has been programmed in ladder diagram (LD) and structured text (ST).
(ST).The same POU header is used for all programming languages.
POU header
All input and output variables used for programming this function have been declared in the POU
header.
Body
The function block converts the FP0 expansion unit position number 1–3, where 0 is the FP0 or
FP CPU, to the corresponding I/O word offset 2, 4 and 6.
LD
ST
Unit_AnalogInOut_FP0_A21(iIOWordOffset :=
ExpansionUnitNumberToIOWordOffset_FP0(2),
iOutChannel := iA21out,
iInChannel0 => iA21in0,
iInChannel1 => iA21in1);