Learn PLCs free
Type ConversionIntermediateIEC 61131-3

INT_TO_STRING (Integer to String Conversion)

Converts integer value to its decimal string representation for display or logging.

The INT_TO_STRING function converts an integer value to its string (text) representation. This is essential for displaying numeric values on HMI screens, constructing log messages, building communication strings, and creating formatted output. The resulting string contains the decimal representation of the number, including a leading minus sign for negative values.

Parameters

Inputs

NameTypeDescription
ININTInteger value to convert to text

Outputs

NameTypeDescription
OUTSTRINGString representation (e.g., 42 becomes '42')

Structured Text Example

// Build status message
Count_String := INT_TO_STRING(Part_Count);
Status_Msg := CONCAT('Parts produced: ', Count_String);

// Build log entry
Log_Entry := CONCAT('Error code: ', INT_TO_STRING(Error_Code));

20 Production-Ready Ladder Logic Templates

Stop writing the same rungs from scratch. Get copy-paste-ready templates for motor control, PID loops, safety interlocks, conveyors, and more.

Platform-Specific Implementation

S

Siemens (TIA Portal)

Use VAL_STRG or INT_TO_STRING in TIA Portal SCL.

AB

Allen-Bradley (Studio 5000)

Use DTOS (DINT to String) instruction in Studio 5000.

C

CODESYS

Use INT_TO_STRING() function in ST.

Common Applications

  • HMI display formatting
  • Log message construction
  • Serial communication strings
  • Report generation
  • Alarm message building

Frequently Asked Questions

What is INT_TO_STRING (Integer to String Conversion) in PLC programming?

Converts integer value to its decimal string representation for display or logging. The INT_TO_STRING function converts an integer value to its string (text) representation. This is essential for displaying numeric values on HMI screens, constructing log messages, building communication strings, and creating formatted output.

What are common applications of INT_TO_STRING (Integer to String Conversion)?

INT_TO_STRING (Integer to String Conversion) is commonly used for: HMI display formatting, Log message construction, Serial communication strings, Report generation, Alarm message building.

How do I use INT_TO_STRING (Integer to String Conversion) in different PLC platforms?

Siemens: Use VAL_STRG or INT_TO_STRING in TIA Portal SCL. Allen-Bradley: Use DTOS (DINT to String) instruction in Studio 5000. CODESYS: Use INT_TO_STRING() function in ST.

Stop Writing Ladder Logic From Scratch

Get 20 production-ready ladder logic templates for $29 -- download instantly and use them on your next project today.

20
Ready-Made Templates
LD + ST
Both Languages Included
$29
One-Time Purchase
Get Instant Access -- $29

Instant download - 30-day money-back guarantee - Use on unlimited projects

Free PLC simulator

Wire this block up and run it

Drop the instruction into a rung, hit Run, and watch it execute in your browser. 12 guided lessons across 8 PLC dialects — free account, no credit card.

Practice PLCs free →