JohnnyB Posted August 31, 2011 Report Share Posted August 31, 2011 Hi Mr (Mrs) Is possible i change (or replace) the format off values from a MI writed in a data table (data table example in attach) ? I have values starting in 0 until 990. In the data tables the values are writing (O, 10, 20,...100,....990). I need store in data table the values in format as like in display. On display is possible change the format (base format, leading zeroes) for show the values (001, 010,...020,...100,..110,...990). Is possible use this format (010, 020, 030...) in data table ? Thanks for your´s attention. Link to comment Share on other sites More sharing options...
MVP 2014 Simon Posted August 31, 2011 MVP 2014 Report Share Posted August 31, 2011 The only way I can see to do this would be to convert the number to an ASCII string and set those properties in the string conversion. Then save the value to the DT as a string instead of an MI. I guess the underlying question is: Why do you want to display the number in the DT with leading zeros? Usually that format is used to make a neat HMI screen or to simplify ASCII communications (for example with data from digital scales or barcode readers). Link to comment Share on other sites More sharing options...
JohnnyB Posted September 1, 2011 Author Report Share Posted September 1, 2011 The only way I can see to do this would be to convert the number to an ASCII string and set those properties in the string conversion. Then save the value to the DT as a string instead of an MI. I guess the underlying question is: Why do you want to display the number in the DT with leading zeros? Usually that format is used to make a neat HMI screen or to simplify ASCII communications (for example with data from digital scales or barcode readers). Mr Simon I need show zeros because the plc show values equal displayed in water meter´s (analogic display in device). Was possible leading zeros as you suggest :-) Many Thanks Link to comment Share on other sites More sharing options...
MVP 2014 Simon Posted September 2, 2011 MVP 2014 Report Share Posted September 2, 2011 no worries Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now