FB_CP66xxTemperatureSensor
This functional block serves the purpose of delivering the temperature value in degree Celsius (°C) measured by temperature sensors PT100, PT1000 or NI1000 connected to the Building Automation control panel PC CP6608. The temperature sensor is connected directly to the 12 pole I/O connector available on the control panel exterior. The temperature value supported is -50°C to 200°C only.
Insert the device named 'CP PC (CP6608)' under I/O Devices.

Further on, the variable 'Analog Input 1' is to be mapped to the PLC input variable.

FUNCTION BLOCK FB_CP66xxTemperatureSensor
VAR_INPUT
VAR_INPUT
uiRawValue : UINT;
eSensorType : E_SensorType;
rTemperatureOffset : REAL;
END_VAR
uiRawValue : Analog Input 1 read from System Manager device CP PC(CP6608) is assigned to this variable.
eSensorType : Enum, including the sensor types supported.
TYPE E_SensorType :
(
eSensorType_PT100 := 0,
eSensorType_PT1000 := 1,
eSensorType_Ni1000TK := 2,
eSensorType_Ni1000DIN := 3
);
END_TYPE
rTemperatureOffset : Offset due to cable impedance or temperature offset can be given here.
VAR_OUTPUT
VAR_OUTPUT
rTemperature : REAL;
bErrorBrokenSensor : BOOL;
bErrorOverRange : BOOL;
bErrorUnderRange : BOOL;
END_VAR
rTemperture : The Temperature value calculated is shown here.
bErrorBrokenSensor : In case of broken sensor, short circuit or open circuit, error message is delivered.
bErrorOverRange : This variable is set to TRUE if rTemperature variable is greater than 200°C.
bErrorUnderRange : This variable is set to TRUE if rTemperature variable is less than -50°C.
Requirements
Development environment | Target platform | PLC Libraries to include |
---|---|---|
TwinCAT v2.10.0 | CP6608 (ARM) | TcSystemCP66xx.Lib |