Try a PLC free — no signup
Type ConversionBeginnerIEC 61131-3

INT_TO_REAL (Integer to Real Conversion)

Converts 16-bit integer to 32-bit floating-point real value.

The INT_TO_REAL function converts an integer value (INT, 16-bit signed) to a floating-point real value (REAL, 32-bit IEEE 754). This conversion is essential when integer values from counters, analog inputs (raw counts), or recipe parameters need to be used in floating-point calculations such as PID control, scaling, or engineering unit conversions. The conversion is always exact for INT values since REAL has sufficient precision to represent all INT values.

Parameters

Inputs

NameTypeDescription
ININTInteger value to convert (-32768 to 32767)

Outputs

NameTypeDescription
OUTREALFloating-point equivalent

Ladder Logic Example

// Ladder Logic - INT_TO_REAL (Analog Scaling)
//
// |----[INT_TO_REAL]----[DIV]----[MUL]----|
// | IN: Analog_Raw      Scale calculation |
// | OUT: Raw_Real        for engineering  |

Structured Text Example

// Convert raw analog (0-27648) to engineering units
Raw_Real := INT_TO_REAL(Analog_Raw);
Temperature := (Raw_Real / 27648.0) * 100.0;
// 0-27648 raw -> 0.0-100.0 degrees

Free · no signup to try

Run this block in your browser

Try the instruction on a live rung before you copy it into a project — nothing to install.

Try it in your browser — no signup

Opens plcsimulationsoftware.com — same team

Prefer ready-made code? Ladder Logic Pack — $29 on Gumroad

Platform-Specific Implementation

S

Siemens (TIA Portal)

Use CONVERT instruction or INT_TO_REAL in TIA Portal SCL.

AB

Allen-Bradley (Studio 5000)

Implicit conversion in most cases, or use COP instruction.

C

CODESYS

Use INT_TO_REAL() function in ST. Automatic in some contexts.

Common Applications

  • Analog input scaling
  • Counter value in calculations
  • Recipe parameter conversion
  • PID input preparation
  • HMI display formatting

Frequently Asked Questions

What is INT_TO_REAL (Integer to Real Conversion) in PLC programming?

Converts 16-bit integer to 32-bit floating-point real value. The INT_TO_REAL function converts an integer value (INT, 16-bit signed) to a floating-point real value (REAL, 32-bit IEEE 754). This conversion is essential when integer values from counters, analog inputs (raw counts), or recipe parameters need to be used in floating-point calculations such as PID control, scaling, or engineering unit conversions.

What are common applications of INT_TO_REAL (Integer to Real Conversion)?

INT_TO_REAL (Integer to Real Conversion) is commonly used for: Analog input scaling, Counter value in calculations, Recipe parameter conversion, PID input preparation, HMI display formatting.

How do I use INT_TO_REAL (Integer to Real Conversion) in different PLC platforms?

Siemens: Use CONVERT instruction or INT_TO_REAL in TIA Portal SCL. Allen-Bradley: Implicit conversion in most cases, or use COP instruction. CODESYS: Use INT_TO_REAL() function in ST. Automatic in some contexts.

Free · no signup to try

Wire this block up and run it

Drop the instruction into a rung, press Run and watch it execute in your browser — then adapt it to your vendor tool.

Try it in your browser — no signup

Opens plcsimulationsoftware.com — same team

Prefer ready-made code? Ladder Logic Pack — $29 on Gumroad