Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Forums
  • Knowledge Center
  • Events & Webinars
  • Ideas
  • Blogs
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

Join our "Ask Me About" community webinar on May 20th at 9 AM CET and 5 PM CET to explore cybersecurity and monitoring for Data Center and edge IT. Learn about market trends, cutting-edge technologies, and best practices from industry experts.
Register and secure your Critical IT infrastructure

Extending the range of the RTD-DI-16 temperature inputs

Building Automation Knowledge Base

Schneider Electric Building Automation Knowledge Base is a self-service resource to answer all your questions about EcoStruxure Building suite, Andover Continuum, Satchwell, TAC…

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • Knowledge Center
  • Building Automation Knowledge Base
  • Extending the range of the RTD-DI-16 temperature inputs
Options
  • Bookmark
  • Subscribe
  • Email to a Friend
  • Printer Friendly Page
  • Report Inappropriate Content
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close

Related Forums

  • Intelligent Devices Forum

Previous Next
Contributors
  • RandyDavis
    RandyDavis
  • AbeMeran
    AbeMeran

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Back to Building Automation Knowledge Base
Options
  • Bookmark
  • Subscribe
  • Email to a Friend
  • Printer Friendly Page
  • Report Inappropriate Content
0 Likes
2149 Views

Link copied. Please paste this link to share this article on your social media post.

Trying to translate this page to your language?
Select your language from the translate dropdown in the upper right. arrow
Translate to: English
  • (Français) French
  • (Deutsche) German
  • (Italiano) Italian
  • (Português) Portuguese
  • (Русский) Russian
  • (Español) Spanish

Extending the range of the RTD-DI-16 temperature inputs

Captain AbeMeran Captain
‎2020-11-03 09:34 AM

on ‎2020-11-03 09:34 AM

Issue

RTD-DI-16 temperature input range is -50C to 150C, some applications require a wider range.

Product Line

EcoStruxure Building Operation.

Environment

  • Building Operation Automation Server
  • Building Operation Automation Server Premium
  • Building Operation I/O Module 16 Ch RTD

Cause

Script program sample and guidelines needed for implementing resistance to temperature table lookup and further temperature calculation using linear interpolation.

Resolution

We will present two solutions, the first solution is very simple to implement but at the expense of accuracy.

The second solution retains the 0.3C accuracy of the native RTD inputs.

For simplicity, both solutions implement a range of -50C to 250C using the RTD Resistance electrical type to convert resistance to temperature, the program can be easily modified to implement a wider range.

 

RTD-R-EType.png

 

SOLUTION #1

This solution simply uses the conversion settings of the RTD-Resistive input to convert from Ohms to Degrees C.

Because the change in resistance is not exactly linear across the temperature range, the accuracy of the converted value varies across the range as much as +/- 4 degrees C 

 

RTD-2W-R-Convert.png

 

STEPS TO IMPLEMENT SOLUTION #1

  1. Under the RTD-DI-16 IO module, create RTD-2W-Resistive input.
  2. Change the units to degrees Celsius.
  3. Select the sensor class, in this example, we are using the pt100 sensor.
  4. Look up the resistance value in the table for -50C and  250C and set the upper/low-level reliability. (see attached R versus T table from Omega)
  5. Use values from step #4 to set the input's conversion electrical scale. 
  6. Set the engineering scale top/bottom to 250 and -50 respectively. 

 

STEPS TO IMPLEMENT SOLUTION #2

  1. Under the RTD-DI-16 IO module, create RTD-2W-Resistive input.
  2. Look up the resistance value in the table for -50C and  250C and set the upper/low-level reliability. (see attached R versus T table from Omega)
  3. In the Automation Server, create an Analog Value object. This object will receive the calculated temperature value from the Script program. Set the AV units to degrees C
  4. In the Automation Server create a Script program, this program will read the resistance from the input object, look up the corresponding temperature range in the table, and then using linear interpolation calculates the temperature to an accuracy of +/- 0.3C. To ensure the program when runs when necessary, configure the program's flow type for fall thru and trigger the program off of the RTD-2W-Resistive input.
  5. Bind the RTD-2W-Resistive input and the Analog Value in the Script program as Numeric Input and Numeric Output respectively. 

Here is the code for the script program

 

'This program uses RTD temperature vs. resistance table combined with linear interpolation
'to implement RTD temperature input over the range -50C to 250C
'Program Flow Type is FallThru
'Program is triggered by the RTD resistance input.
'This program is provided as a sample for illustration purposes, it is not intended to be a complete solution
'SE PSS v1.0 101010111110

Numeric Input RTD_Raw 'the RTD Resistance input where the RTD sensor is connected
Numeric Output RTD_Temp 'Analog Value that receives the calculated temperature 

Numeric RTD_R[31]'Resistance to 
Numeric RTD_T[31]'temperature table for 100 Ohms based sensor

'NOTE: Since the resistance value changes in a nearly linear way over any 10 degree section
'of the table, we can use 10 degree increments of resistance/temperature values and apply linear
'interpolation to calculate readings in between those values, this method greatly reduces the size
'of the table in the program while maintaining very good accuracy.
'Accuracy is +/-0.3C for 100 Ohms based sensors and can be improved to +/-0.03C if 1000 Ohms based sensor used.

Numeric n, sLow, sHigh,sMid

Line INIT
'Due to limitations in Script we will use 2 arrays to implement the resistance to temperature table.
RTD_R[1]=80.31
RTD_R[2]=84.27
RTD_R[3]=88.22
RTD_R[4]=92.16
RTD_R[5]=96.09
RTD_R[6]=100
RTD_R[7]=103.9
RTD_R[8]=107.79
RTD_R[9]=111.67
RTD_R[10]=115.54
RTD_R[11]=119.4
RTD_R[12]=123.24
RTD_R[13]=127.08
RTD_R[14]=130.9
RTD_R[15]=134.71
RTD_R[16]=138.51
RTD_R[17]=142.29
RTD_R[18]=146.07
RTD_R[19]=149.83
RTD_R[20]=153.58
RTD_R[21]=157.33
RTD_R[22]=161.05
RTD_R[23]=164.77
RTD_R[24]=168.48
RTD_R[25]=172.17
RTD_R[26]=175.86
RTD_R[27]=179.53
RTD_R[28]=183.19
RTD_R[29]=186.84
RTD_R[30]=190.47
RTD_R[31]=194.1

'The temperature array could be easily omitted since once we have the first array index (n) we could easily calculate
'the corresponding temperature value, I have kept it for the purpose of simplicity.
RTD_T[1]=-50
RTD_T[2]=-40
RTD_T[3]=-30
RTD_T[4]=-20
RTD_T[5]=-10
RTD_T[6]=0
RTD_T[7]=10
RTD_T[8]=20
RTD_T[9]=30
RTD_T[10]=40
RTD_T[11]=50
RTD_T[12]=60
RTD_T[13]=70
RTD_T[14]=80
RTD_T[15]=90
RTD_T[16]=100
RTD_T[17]=110
RTD_T[18]=120
RTD_T[19]=130
RTD_T[20]=140
RTD_T[21]=150
RTD_T[22]=160
RTD_T[23]=170
RTD_T[24]=180
RTD_T[25]=190
RTD_T[26]=200
RTD_T[27]=210
RTD_T[28]=220
RTD_T[29]=230
RTD_T[30]=240
RTD_T[31]=250

n=0
sLow = 1
sHigh = MaxItem(RTD_R) 'Initialize to the size of the table

Line calculateTemp

'Bottom of range
If RTD_Raw <= RTD_R[1] then
 RTD_Temp = -50.0
 Stop
Endif

'Top of range
If RTD_Raw >= RTD_R[sHigh] then
 RTD_Temp = 250.0
 Stop
Endif

'Find the resistance input reading in the table using a binary search
'NOTE:
'In our case, what we are looking for is the lower value of the resistance range in the table that
'the input reading falls under.
'EXAMPLE if input value is 160.9 Ohms then it is in the range of RTD_R[21]=157.33 AND RTD_R[22]=161.05
'so the binary search will give us 21
While(1)
 If sHigh < sLow then
  n=sHigh 'the input value is not in the table but we now have RTD_R[n] of the range it is within
  break
 Endif
 'calculate the mid point
 sMid = Round(sLow + (sHigh - sLow) / 2)

 if RTD_R[sMid] < RTD_Raw then sLow = sMid + 1 'if read value is larger then look again in upper half
 if RTD_R[sMid] > RTD_Raw then sHigh = sMid - 1 'if read value is smaller then look again in lower half
 if RTD_R[sMid] = RTD_Raw then
  n = sMid 'we've located the input value in the table, this is actually the exception
  Break
 endIf
EndWhile

'Now, use linear interpolation to calculate the temperature
If n > 0 Then
RTD_Temp = (RTD_T[n+1]-RTD_T[n])*(RTD_Raw-RTD_R[n])/(RTD_R[n+1]-RTD_R[n])+RTD_T[n]
Endif

Stop

Line E
stop

 

NOTE:

The accuracy of the temperature reading can be further improved by the use of 1000 Ohms based sensors as well as the use of 3 wire sensors so that the resistance of the leading wires can be taken into account.

If 1000 Ohms based sensors are used then the resistance values in the table implemented in the Script program must be multiplied by 10

Labels (1)
Labels:
  • EcoStruxure Building Operation
Attachments
Tags (6)
  • Find more articles tagged with:
  • AbeMeran20
  • resistance
  • Resistive
  • rtd
  • rtd-di-16
  • table
Was this article helpful? Yes No
100% helpful (2/2)

Link copied. Please paste this link to share this article on your social media post.

To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2025 Schneider Electric

This is a heading

With achievable small steps, users progress and continually feel satisfaction in task accomplishment.

Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.

of