Table of Contents

LREAL_TO_STRING

Function name

LREAL_TO_STRING

ST call

PROGRAM LREAL_TO_STRING_DEMO
   VAR
   STRING1: STRING; 
   LREAL1: LREAL;
      USINT1: USINT;
    END_VAR
    STRING1:=LREAL_TO_STRING(VALUE:=LREAL1,DECIMAL:=USINT1);
END_PROGRAM

Description

Function converts the input value on value to a string. The decimal value specifies how many decimal places shall the string contain.

Inputs

Input Type Description
VALUE ANY_LREALInput value
DECIMALANY_USINTNumber of decimal places

Outputs

OutputType Description
ANY_STRINGOutput: value converted to a string

Application example