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. Quote 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). Quote 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 Quote 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.