Unit_AnalogInput_FP0_RTD_INT

Function block to read from an FP0-RTD6 unit (converted digital values are of data type INT).

This function block reads converted digital values from the analog input channels of the analog unit. The converted digital values from the analog unit are stored per channel in the output variables iChannel0 to iChannel5.

For measuring RTD input data, you can use the following devices: Pt100 (according to IEC751), Pt1000 (according to IEC751), Ni1000 (according to DIN43760), or a resistor.

The measurement device must be set with the DIP switches and in the function block.

The sampling cycle must be set with the DIP switches.

Parameters

Input

iIOWordOffset (INT)

Set the offset of the first WX/WY address of the analog unit according to its installation position.

For analog expansion units connected directly to the CPU (without adapter): Use ExpansionUnitToIOWordOffset_FP0 or make the following settings: 2 (WX2/WY2) for unit number 1, 4 (WX4/WY4) for unit number 2, 6 (WX6/WY6) for unit number 3

For analog expansion units connected to the CPU via an adapter: Use ExpansionUnitToIOWordOffset_FPX_FP0 or select the offset from the table.

Unit position relative to the adapter

Adapter position relative to the CPU

1st unit

2nd unit

3rd unit

4th unit

5th unit

6th unit

7th unit

8th unit

1st unit

30

40

50

60

70

80

90

100

2nd unit

32

42

52

62

72

82

92

102

3rd unit

34

44

54

64

74

84

94

104

bChannel0HighResolution to bChannel5HighResolution (BOOL)

Set the resolution of the corresponding channel.

Values:
  • TRUE: High resolution (0.01K/0.01°F/0.1Ω)
  • FALSE: Low resolution (0.1K/0.1°F/1Ω)

Do not change this value during runtime. Otherwise conversion will be inaccurate for 1s.

bTemperatureInFahrenheit (BOOL)

Set the temperature unit.

Values:
  • TRUE: °F
  • FALSE: °C
bChannel012DIPSwitchSetToResistor, bChannel345DIPSwitchSetToResistor (BOOL)

Set the RTD device.

Values:
  • TRUE: Resistor
  • FALSE: Pt100, Pt1000, Ni1000

The setting must match the DIP switch settings.

Output

iChannel0 to iChannel5 (INT)

Returns the converted digital data from the analog unit by channel.

Example:

  • Thermocouple, low resolution: 20.12°C → 201 (measurement value out of range: 8191)

  • Thermocouple, high resolution 20.12°C → 2012 (measurement value out of range: 8191)

  • Resistor, low resolution: 25Ω → 25 (measurement value out of range: 16383)

  • Resistor, high resolution: 25.4Ω → 254 (measurement value out of range: 16383)

NOTE
  • Between power ON and the first valid conversion data, the digital value will be 8191 or 16383. When programming, be sure not to use the data obtained during this period.

  • When the RTD is broken, the digital value will change to 8191 or 16383. When programming avoid any risks resulting from a broken RTD. A broken RTD needs to be replaced.

DIP switch settings

The DIP switch settings will become effective when the power is turned from OFF to ON.

Measurement device, channel 0 to 2
 

Pt100

Pt1000

Ni1000

Resistor

Measurement device, channel 3 to 5
 

Pt100

Pt1000

Ni1000

Resistor

Sampling cycle
 

0.1s

1s

Input wiring

Conversion characteristics

Resolution: 0.1K/0.1F, 1Ω

Pt100

Pt1000

Ni1000

Resistor

°C/°F

°C/°F

°C/°F

Analog value

Digital value

Analog value

Digital value

Analog value

Digital value

Analog value

Digital value

-200.0/-328.0

-2000/-3280

-200.0/-328.0

-2000/-3280

-30.0/-22.0

-300/-220

+20

+20

+500.0/+800.0

+5000/+8000

+300.0/+572.0

+3000/+5720

+150.0/+302.0

+1500/+3020

+2200

+2200

Resolution: 0.01K/0.01F, 0.1Ω

Pt100

Pt1000

Ni1000

Resistor

°C/°F

°C/°F

°C/°F

Analog value

Digital value

Analog value

Digital value

Analog value

Digital value

Analog value

Digital value

-80.00/-80.00

-8000/-8000

-80.00/-80.00

-8000/-8000

-30.00/-22.00

-3000/-2200

+20.0

+200

+80.00/+80.00

+8000/+8000

+80.00/+80.00

+8000/+8000

+80.00/+80.00

+8000/+8000

+1630.0

+16300

Tip

This command description provides basic hardware documentation only. For detailed technical information, consult the manual:

FP0 RTD Unit Technical Manual

Example

POU header

All input and output variables used for programming this function have been declared in the POU header. The same POU header is used for all programming languages.

VAR
		Inst_FP0_RTD_INT: Unit_AnalogInput_FP0_RTD_INT;
		iRTD_In_Ch0: INT:=0;
		iRTD_In_Ch1: INT:=0;
		iRTD_In_Ch2: INT:=0;
		iRTD_In_Ch3: INT:=0;
		iRTD_In_Ch4: INT:=0;
		iRTD_In_Ch5: INT:=0;
	END_VAR

LD body

Use ExpansionUnitNumberToIOWordOffset_FP0 or ExpansionUnitNumberToIOWordOffset_FPX_FP0 to calculate the word offset of the analog unit connected to the CPU.

BODY
    WORKSPACE
        NETWORK_LIST_TYPE := NWTYPELD ;
    END_WORKSPACE
    NET_WORK
        NETWORK_TYPE := NWTYPELD ;
        NETWORK_LABEL :=  ;
        NETWORK_TITLE :=  ;
        NETWORK_HEIGHT := 13 ;
        NETWORK_BODY
B(B_FB,Unit_AnalogInput_FP0_RTD_INT!,Inst_FP0_RTD_INT,20,1,38,13,,?BiIOWordOffset?BbChannel0HighResolution?BbChannel1HighResolution?BbChannel2HighResolution?BbChannel3HighResolution?BbChannel4HighResolution?BbChannel5HighResolution?BbTemperatureInFahrenheit?BbChannel012DIPSwitchSetToResistor?BbChannel345DIPSwitchSetToResistor?CiChannel0?CiChannel1?CiChannel2?CiChannel3?CiChannel4?CiChannel5);
B(B_VARIN,,2,18,2,20,4,);
B(B_VAROUT,,iRTD_In_Ch0,38,2,40,4,);
B(B_VARIN,,FALSE,18,3,20,5,);
B(B_VAROUT,,iRTD_In_Ch1,38,3,40,5,);
B(B_VARIN,,FALSE,18,4,20,6,);
B(B_VAROUT,,iRTD_In_Ch2,38,4,40,6,);
B(B_VARIN,,FALSE,18,5,20,7,);
B(B_VAROUT,,iRTD_In_Ch3,38,5,40,7,);
B(B_VARIN,,FALSE,18,6,20,8,);
B(B_VAROUT,,iRTD_In_Ch4,38,6,40,8,);
B(B_VARIN,,FALSE,18,7,20,9,);
B(B_VAROUT,,iRTD_In_Ch5,38,7,40,9,);
B(B_VARIN,,FALSE,18,8,20,10,);
B(B_VARIN,,FALSE,18,9,20,11,);
B(B_VARIN,,FALSE,18,10,20,12,);
B(B_VARIN,,FALSE,18,11,20,13,);
L(1,0,1,13);
        END_NETWORK_BODY
    END_NET_WORK
END_BODY

ST body

Inst_FP0_RTD_INT(iIOWordOffset := 2,
	bChannel0HighResolution := false,
	bChannel1HighResolution := false,
	bChannel2HighResolution := false,
	bChannel3HighResolution := false,
	bChannel4HighResolution := false,
	bChannel5HighResolution := false,
	bTemperatureInFahrenheit := false,
	bChannel012DIPSwitchSetToResistor := false,
	bChannel345DIPSwitchSetToResistor := false,
	iChannel0 => iRTD_In_Ch0,
	iChannel1 => iRTD_In_Ch1,
	iChannel2 => iRTD_In_Ch2,
	iChannel3 => iRTD_In_Ch3,
	iChannel4 => iRTD_In_Ch4,
	iChannel5 => iRTD_In_Ch5);

Modified on: 2023-10-18Feedback on this pagePanasonic hotline