CODESYS - the IEC 61131-3 automation software
https://forum.codesys.com/

Text variable with Digits
https://forum.codesys.com/viewtopic.php?f=5&t=10127
Page 1 of 1

Author:  mawaloc [ Fri Nov 08, 2019 2:43 pm ]
Post subject:  Text variable with Digits

Hello to all

With Codesys V3.5

I'm trying to visualize a text variable.

For that I did a "box" where as
- Text I've used %i m
- Text variable My variable that is a REAL


But In that case what is shown as text is only number before the digit.

Example :
- My variable 0.0555 => show 0 => I would like to see 0.05
- My variable 1.355 => show 1 => I would like to see 1.35

Thank you for help

Author:  e.kislov [ Fri Nov 08, 2019 2:52 pm ]
Post subject:  Re: Text variable with Digits

Use %.2f instead %i.

Author:  mawaloc [ Fri Nov 08, 2019 4:04 pm ]
Post subject:  Re: Text variable with Digits

Thank You => It's work good

Page 1 of 1 All times are UTC+01:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/