MappView + Snippet on MappAlarmX

Hi All,

I created different snippets on my MappAlarmsX (to logg some information when alarm appears) and the value are “REAL” and when error appears, the value of the snippet is displayed on the Mappview Alarm with a lot on values (and often a lot of “0”) after the “DOT” (ie : 54.00000000). Is it possible to delete all values after the “DOT” (having only “54”) o nthe MappAlarmX or other configuration (OPCUA…) ?

Thank you

Hi!
Yes, this is possible with format strings:
https://help.br-automation.com/#/en/6/textsystem%2Flocalizabletexts%2Ftextsystem_edit_format_items.html
and
https://help.br-automation.com/#/en/6/visualization%2Fmappview%2Fengineering%2Fvariablesanddata%2Fsnippets%2Fsnippetformat.html

Best regards
Manfred

2 Likes

You can use formatstrings. If you type Formatstrings in the help it should guide you to right page. For example if you use {=$NS/TextId.{1|u}}. {1|u} is the formatstring. The 1 means at least 1 digit has to be displayed and the u means it makes an UINT cast. Thats actually what yout want. Hope this helps.

1 Like