Appendix
EL33xx-00x0
182
Version: 4.2
6
Appendix
6.1
Sample program for individual temperature calculation
in the PLC
The terminals from the EL331x-xxxx series are used for the convenient measurement of temperatures with
thermocouples. For this purpose they are equipped with various conversion tables for different types of
thermocouples as well as an internal cold junction measurement. However, it is possible that a type of
thermocouple might be used that is not stored in the firmware. In this case the EL331x offers the following
method:
• Measure the thermocouple voltage at the terminal in the
voltage mode
of the EL331x
• Measure the temperature of the internal cold junction (CJ) in the terminal. This is offered in the CoE for
each channel.
• Offset the two values in the controller/PLC in consideration of the desired linearization curve/table for
the temperature at the place of measurement.
This calculation method, called cold junction compensation (CJC), corresponds approximately to that which
is stored in the terminal for the implemented types.
The sample program implements such a procedure and produces a temperature value that takes into
account the channel-wise cold junction temperature from the CoE. By way of example the terminal is
continually switched between voltage and temperature measurement in the type K, thus enabling a
comparison of the two temperature values. A recording of the measured values from channel 1 of the
EL3314 on a type K thermocouple with the TwinCAT Scope is illustrated below (units 0.1 °C):
Fig. 190: Blue: temperature values from the PLC calculation; red: PDO values in the temperature
measurement range
Notes:
•
the EL331x-xxxx also offers a third way of determining temperature - via an externally measured cold
junction. See chapter
"Operation with an external cold junction" [
in this documentation.
• The sample program operates with a sampling points table with 10 entries for a type K thermocouple.
The values must be adjusted accordingly if a different thermocouple is used. The entries in the field
variable "aTCElement" are to be made in µV and the temperature values from -30 °C to +60 °C
allocated in 10° steps. The assignment of the value for "nBuffer_INT" in nState =14 in MAIN must also
be adjusted (e.g. 5 for type N thermocouple).
• The sample program contains a variable "
stUserNetId
" in the function block "FB_COE_ACCESS" in
which the AMS-Net-ID of the configuration to be used is to be entered. It is required among other
things for reading the cold junction temperatures. If the terminal is not located in the first position after
the coupler, then the entry for the variable "nUserSlaveAddr" must also be adjusted.
Summary of Contents for EL33-00 Series
Page 2: ......
Page 6: ...Table of contents EL33xx 00x0 6 Version 4 2...
Page 17: ...Product overview EL33xx 00x0 17 Version 4 2 Fig 10 EL3312 Fig 11 EL3314...
Page 18: ...Product overview EL33xx 00x0 18 Version 4 2 Fig 12 EL3314 0002 Fig 13 EL3314 0010...
Page 61: ...Mounting and wiring EL33xx 00x0 61 Version 4 2 Fig 45 EL3314 0010 Fig 46 EL3314 0090...