Jump to content

MI Value in Data Table


Recommended Posts

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.

post-1695-010417400 1314748908_thumb.jpg

post-1695-090963400 1314748915_thumb.jpg

Link to comment
Share on other sites

  • MVP 2014

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

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...