Sign In Help
Schneider Electric
HelpSign In
Schneider Electric Exchange
  • Home
  • Collaborate
  • Develop
  • Shop
Home Collaborate Develop Shop Log in or Register Help

Invite a Co-worker

Send a co-worker an invite to the Exchange 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
  • Home
  • Collaborate
  • Exchange Community
  • :
  • Knowledge Center
  • :
  • Building Automation Knowledge Base
  • :
  • Extending the range of the RTD-DI-16 temperature inputs
Community Menu
  • Forums
    • By Topic
        • EcoStruxure IT
          • EcoStruxure IT forum
        • Industrial Automation
          • Industry Automation and Control Forum
          • Alliance System Integrators Forum
          • Machine Solutions in the Digital Transformation
          • EcoStruxure Automation Expert / IEC 61499 Forum
          • Industrial Edge Computing Forum
          • Level and Pressure Instrumentation Forum
          • Modicon User Group
          • PLC Club Indonesia
          • SEE Automation Club Forum
          • Fabrika ve Makina Otomasyonu Çözümleri
          • Форум по промышленной автоматизации СНГ
        • SCADA & Telemetry Solutions
          • Geo SCADA Expert Forum
          • SCADA and Telemetry Devices Forum
        • Power Distribution IEC
          • Power Distribution and Digital
          • Power Standards & Regulations
          • Paneelbouw & Energie Distributie
        • Power Distribution Softwares
          • EcoStruxure Power Design Forum
          • SEE Electrical Building+ Forum
          • LayoutFAST User Group Forum
        • Wireless Information Network Solutions
          • Instrument Area Network
          • Remote Monitoring
          • Tank Level Monitoring
          • Remote Data Collection
        • Solutions for your Business
          • Solutions for Food & Beverage Forum
          • Solutions for Healthcare Forum
    • By Segment
        • Food & Beverage
          • Solutions for Food & Beverage Forum
        • Healthcare
          • Solutions for Healthcare Forum
      • EcoStruxure IT
        • EcoStruxure IT forum
      • Industrial Automation
        • Industry Automation and Control Forum
        • Alliance System Integrators Forum
        • Machine Solutions in the Digital Transformation
        • EcoStruxure Automation Expert / IEC 61499 Forum
        • Industrial Edge Computing Forum
        • Level and Pressure Instrumentation Forum
        • Modicon User Group
        • PLC Club Indonesia
        • SEE Automation Club Forum
        • Fabrika ve Makina Otomasyonu Çözümleri
        • Форум по промышленной автоматизации СНГ
      • SCADA & Telemetry Solutions
        • Geo SCADA Expert Forum
        • SCADA and Telemetry Devices Forum
      • Power Distribution IEC
        • Power Distribution and Digital
        • Power Standards & Regulations
        • Paneelbouw & Energie Distributie
      • Power Distribution Softwares
        • EcoStruxure Power Design Forum
        • SEE Electrical Building+ Forum
        • LayoutFAST User Group Forum
      • Wireless Information Network Solutions
        • Instrument Area Network
        • Remote Monitoring
        • Tank Level Monitoring
        • Remote Data Collection
      • Solutions for your Business
        • Solutions for Food & Beverage Forum
        • Solutions for Healthcare Forum
      • Food & Beverage
        • Solutions for Food & Beverage Forum
      • Healthcare
        • Solutions for Healthcare Forum
  • Blogs
    • By Topic
        • Industrial Automation
          • Industrial Edge Computing Blog
          • Industry 4.0 Blog
          • Industrie du Futur France
        • SCADA & Telemetry Solutions
          • SCADA and Telemetry Blog
        • Power Distribution IEC
          • Power Events & Webinars
          • Power Foundations Blog
        • Power Distribution NEMA
          • NEMA Power Foundations Blog
        • Power Distribution Softwares
          • EcoStruxure Power Design Blog
          • SEE Electrical Building+ Blog
        • Solutions for your Business
          • Solutions for Food & Beverage Blog
          • Solutions for Healthcare Blog
          • Solutions for Retail Blog
        • Community experts & publishers
          • Publishers Community
    • By Segment
        • Food & Beverage
          • Solutions for Food & Beverage Blog
        • Healthcare
          • Solutions for Healthcare Blog
        • Retail
          • Solutions for Retail Blog
      • Industrial Automation
        • Industrial Edge Computing Blog
        • Industry 4.0 Blog
        • Industrie du Futur France
      • SCADA & Telemetry Solutions
        • SCADA and Telemetry Blog
      • Power Distribution IEC
        • Power Events & Webinars
        • Power Foundations Blog
      • Power Distribution NEMA
        • NEMA Power Foundations Blog
      • Power Distribution Softwares
        • EcoStruxure Power Design Blog
        • SEE Electrical Building+ Blog
      • Solutions for your Business
        • Solutions for Food & Beverage Blog
        • Solutions for Healthcare Blog
        • Solutions for Retail Blog
      • Community experts & publishers
        • Publishers Community
      • Food & Beverage
        • Solutions for Food & Beverage Blog
      • Healthcare
        • Solutions for Healthcare Blog
      • Retail
        • Solutions for Retail Blog
  • Ideas
        • Industrial Automation
          • Modicon Ideas & new features
        • SCADA & Telemetry Solutions
          • Geo SCADA Expert Ideas
          • SCADA and Telemetry Devices Ideas
  • Knowledge Center
    • Building Automation Knowledge Base
    • Industrial Automation Knowledge Base
    • Industrial Automation How-to videos
    • SCADA & Telemetry Solutions Knowledge Base
    • Digital E-books
    • Success Stories Corner
    • Power Talks
  • Events & Webinars
    • Innovation Talks
    • Innovation Summit
    • Let's Exchange Series
    • Technology Partners
  • Support
    • Ask Exchange
    • Leaderboard
    • Our Community Guidelines
    • Community User Guide
    • How-To & Best Practices
    • More
Join Now
How can we help?
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: 
50955members
Join Now
244990posts
Join Now

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

Back to Building Automation Knowledge Base
Options
  • Article History
  • Subscribe to RSS Feed
  • Bookmark
  • Subscribe
  • Email to a Friend
  • Printer Friendly Page
  • Report Inappropriate Content
0 Likes
145 Views
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

Lt. Commander AbeMeran Lt. Commander
‎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 (1/1)
Contributors
  • RandyDavis
    RandyDavis
  • AbeMeran
    AbeMeran
Support

Have a question? Please contact us with details, and we will respond.

Contact Us
FAQ

Look through existing questions to find popular answers.

Learn More
About

Want to know more about Exchange and its possibilities?

Learn More

Full access is just steps away!

Join Exchange for FREE and get unlimited access to our global community of experts.

Connect with Peers & Experts

Discuss challenges in energy and automation with 30,000+ experts and peers.

Get Support in Our Knowledge Base

Find answers in 10,000+ support articles to help solve your product and business challenges.

Ask Questions. Give Solutions

Find peer based solutions to your questions. Provide answers for fellow community members!

Register today for FREE

Register Now

Already have an account?Log in

About Us FAQ Terms & Conditions Privacy Notice Change your cookie settings
©2020, Schneider Electric