Stephen Snow
This is a collection of two function blocks to be used in the conversion of NTC raw data from an analogue input point to real world engineering scaled values in degrees Kelvin, Centigrade/Celcius, or Fahrenheit, depending on the mode selected. There is an example "Main" program in FBD format to show how to use the function blocks. This method calculates the coefficients of the NTC based upon resistance/temperature pair values from the sensors published datasheet from the manufacturer. The three coefficients are calculated for three temp/res pairs, but could be expanded to use more, and realize greater precision and accuracy. For building automation projects, that is excessive since those levels of resolution, say down to better than 0.1 degrees C of accuracy, would be useless in practice. It is called rpiv2btest because I *was* going to use it on my Raspberry Pi 2b, and may still, but this example is setup to only use the simulator as it is currently. Please feel free to leave comments suggestions or ask questions of me if interested. Use them at your own risk. I created them originally for a Rockwell Logix Micro 820/830/850 micro PLC which has been installed in several residential buildings around Southwestern Ontario Canada by one of my customers. I had to convert them for OpenPLC, only the math instructions are somewhat different between the RA PLC and an OpenPLC.
Reply 2 0
Reply