Hello all,
it's the first time I work with CoDeSys WebVisu and there is an issue with input of a number.
There is a dialog for input of a value for PLC parameter.
For that, the VisuDialogs.Numpad is used.
Now, it should be possible to input a value between 0.0 and 50.0 with 1 decimal place (limits are set to 0 and 50).
But it is not possible to set a valie with a decimal. This is not accepted, the limit values are going to red (i.e. input value is 19.9). What's wrong? -- see picture
Is it possible to set the amount of decimal places with a placeholder?
I don't find any description for following (format) meanings:
%d, %s, %5.2f,....
Thanks in advance!
But you problem refers to datatype of your variable 'GlΓ€ttung' to which you try to write a floating point value.
I believe you use numeric variable for number (INT/UINT/DINT/UDINT). But you should use variable with floating point (REAL). Check out datatypes here (actually similar to all other programming):
Hello all,
it's the first time I work with CoDeSys WebVisu and there is an issue with input of a number.
There is a dialog for input of a value for PLC parameter.
For that, the VisuDialogs.Numpad is used.
Now, it should be possible to input a value between 0.0 and 50.0 with 1 decimal place (limits are set to 0 and 50).
But it is not possible to set a valie with a decimal. This is not accepted, the limit values are going to red (i.e. input value is 19.9). What's wrong? -- see picture
Is it possible to set the amount of decimal places with a placeholder?
I don't find any description for following (format) meanings:
%d, %s, %5.2f,....
Thanks in advance!
Hi,
you can find description for placeholders here:
https://help.codesys.com/webapp/_visu_placeholder_with_formatting_sequence_in_a_string;product=core_visualization;version=3.5.14.0
But you problem refers to datatype of your variable 'GlΓ€ttung' to which you try to write a floating point value.
I believe you use numeric variable for number (INT/UINT/DINT/UDINT). But you should use variable with floating point (REAL). Check out datatypes here (actually similar to all other programming):
https://help.codesys.com/webapp/_cds_struct_reference_datatypes;product=codesys;version=3.5.17.0
So that, I would recommend you to use %.1f as Placeholder for your value and change DataType of the variable to REAL
Last edit: ignat 2022-11-18