Showing results 1 to 2 of 2

Thread: Numerical value representation style

  1. #1
    Join Date

    Default Numerical value representation style

    Hello Everyone,
    I have a plenty variables which stores a values from energy meters and other meters. The lenght of the displayed values is sometimes very long, for example "1092109 kWh". Im asking You if there is a possibility to show the values with the spaces inside it in that way "1 092 109 kWh" instead of "1092109 kWh".
    Is there a property in editor to change the type of represetation in that way?


  2. #2
    Join Date
    Salzburg, AT

    Default Re: Numerical value representation style

    Not directly, but you can solve it using zenon Logic with additional STRING variable (of stratonNG driver).
    1. configure the process variable with value of energy counter to be 'externally visible'
    2. create zenon Logic project.
    3. create in zenon a STRING variable in stratonNG driver
    4. in Logic Workbench add the fieldbus driver 'Logic to SCADA connection'
    5. and write a small program.

    On screenshot you can see my example in ST-language, the code:

    if oldVal <> energy_counter_UDINT then
        myStr := any_to_string( energy_counter_UDINT );
        myStr := Right('          ' + myStr, 10 ); //add leading spaces to have fix length
        //1 234 567 890
        myStr := Insert(myStr, ' ', 2);
        myStr := Insert(myStr, ' ', 6);
        myStr := Insert(myStr, ' ', 10);
        energy_counter_STRING := myStr + ' [kWh]';
        oldVal := energy_counter_UDINT;

    Attached Thumbnails Attached Thumbnails Format_string.png  

Similar Threads

  1. Numerical Value Box Maximum
    By cdaly2001 in forum zenon Service Engine Supervisor
    Replies: 2
    Last Post: 11th March 2016, 14:57
  2. Style L & Style H for Alarm picture items
    By stolyarov_as in forum zenon Service Engine Supervisor
    Replies: 1
    Last Post: 18th September 2014, 08:02
  3. PSC7 style faceplates in zenon SCADA
    By yolovs in forum Drivers
    Replies: 4
    Last Post: 20th May 2013, 23:52
  4. Form visual style windows XP/7
    By ippela in forum VSTA
    Replies: 1
    Last Post: 26th September 2011, 00:20
  5. Input Values in Elements Windows Style
    By acko01 in forum zenon Service Engine Supervisor
    Replies: 2
    Last Post: 27th October 2009, 17:31

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts