Floating-Point Value Calculation (REAL and LREAL) in SCL

Becoming familiar with different data types is essential for writing PLC programs. One of the data types widely used in programming is REAL. Most PLC programmers ignore that the TIA Portal software specifies and calculates the data type REAL with a precision of six decimal places, which might lead to unexpected results. This issue, alongside possible solutions, will be discussed in detail in this tutorial.


This is a companion discussion topic for the original entry at https://www.solisplc.com/tutorials/floating-point-value-calculation-real-and-lreal-in-scl

It’s almost hard to find plc programming lessons on advanced plc programming languages around the internet and I really appreciate your effort. Do you guys have any courses on how to program PLCs using advanced programming languages such as Structured Text or Instruction List for Siemens PLCs?

1 Like

Hey Jake,

Welcome to the forum! We’re planning on releasing a few advanced Siemens PLC programming courses in the next few months.