Showing results 1 to 6 of 6

Thread: Convert variable for Process Gateway

  1. #1
    Join Date
    16.07.2014
    Location
    Zaporizhia
    Posts
    43

    Default Convert variable for Process Gateway

    Hi! Have another one question

    I have some variables from different devices (IEC850, 870-104) with analog values (Current, Voltage, Power, etc.). I have already adjusted this values in "Variable -> Value calculation". For some points i used linear adjustment(kW -> MW, V -> KV), for some points used macros "AdjustHardwareValue".

    Now i need to send this points into central energy office via IEC870-104. Ok, i've succesfully created profile in Process Gateway. All ok, all working.
    The problem is that i must give all analog values as Type: 9 (Measured value, normalized value). As you know, variables in this type must have values (-1.....1).

    My question: What is the best way to convert ~100 different analog values in -1....1 values?

    Zenon 7.11 EE

  2. #2
    Join Date
    01.07.2008
    Location
    Salzburg, AT
    Posts
    813
    Best Answer

    Default Re: Convert variable for Process Gateway

    You need second set of these variables.

    Because you have totally different value ranges of a variable - parallel to value range you are showing and archiving in zenon you need second variable REAL in range -1..1 (and 4-5 decimal places for fraction) for T09 IOs for a Control Center (via zenPG iec870 Slave). It cannot be one and the same variable.

    I think the simplest solution is to make these process variables 'external visible' and create a Logic program calculating values to range -1..1 and storing in additional ("dummy") stratonNG variables - variables extra created for this. The zenPG iec870 Slave configure to send as T09 these stratonNG variables, not the original process variables.

    The program in Logic (ST-language) could look e.g.:

    #define scaling_factor 1000.0

    var_T09_01 := any_to_real( proces_variable1) / scaling_factor;
    var_T09_02 := any_to_real( proces_variable2) / scaling_factor;

    etc.

    where var_T09_xx are variable created in stratonNG driver and configured to be IOs in zenPG iec870 Slave. And proces_variableX are your iec850, iec870 etc variables. And scalling_factor should be rather common for all data points - you have to discuss with people making Control Center what scaling factor you should use.

    Do not forget to create in Logic the 'logic to SCADA connection' driver to transfer your external visible process variables (and do not set by stratonNG the 'external visible' property).

    In addition, when needed, you can copy timestamps of process_variableX to the responding startonNG variables using Logic functions vsiGetDate/Time() and vsiSetDate/Time() - to assure that values zenPG is sending to the Control Center have the same timestamps as values in zenon.

  3. #3
    Join Date
    16.07.2014
    Location
    Zaporizhia
    Posts
    43

    Default Re: Convert variable for Process Gateway

    Thx, ursulap. Have tested it with some variables - it works.
    One more questions:
    1. From Help: "If free variable names are used when using programming language ST or IL, they must be between curly brackets {}." - Seems not working for me. I have missed something?

    2. Can i call variables without Logic project name ("DNES/Global/")? Look at my screenshots. Its not necessary, just for me.
    Attached Thumbnails Attached Thumbnails ??????????.png   ??????????2.png   ??????????3.png  
    Last edited by diemon : 3rd March 2015 at 07:50

  4. #4
    Join Date
    16.07.2014
    Location
    Zaporizhia
    Posts
    43

    Default Re: Convert variable for Process Gateway

    Update for 1 question:
    Seems that code is working correctly because i see variables in brackets {} in runtime, and they have correct values. For some reason this variables not seen in "Online mode" in Logic.

  5. #5
    Join Date
    01.07.2008
    Location
    Salzburg, AT
    Posts
    813

    Default Re: Convert variable for Process Gateway

    Theoretically to make zenon to use stratonNG variable names without prefix is possible but circumstantial; only via VBA/VSTA.

    You can configure stratonNG driver to use for addressing not variable name but identification or better - symbolic address. Then with an VBA macro (in Editor, for current project in Workspace) you can - for all variables in stratonNG driver - copy the variable name to property 'Symbolic Address' and truncate prefix from 'Name'.

    Unfortunately when you later update some properties of the variable then it gets prefix again (so you will have to call again the macro truncating prefixes).

  6. #6
    Join Date
    01.07.2008
    Location
    Salzburg, AT
    Posts
    813

    Default Re: Convert variable for Process Gateway

    Logic fully supports only variable names with syntax according IEC61131 Standard. This means a name must start with a letter, can contain letters and numbers and only single "_" (underline) chars. Your variable names with double underline chars are not valid. The brackets {} make it works for RT but not for online mode in WB.

Similar Threads

  1. Process Gateway
    By yara in forum Drivers
    Replies: 1
    Last Post: 4th November 2014, 17:36
  2. Process Gateway
    By mehrdad66 in forum zenon Energy Edition
    Replies: 2
    Last Post: 30th October 2014, 19:28
  3. Process Gateway
    By murphys in forum Drivers
    Replies: 4
    Last Post: 8th February 2011, 09:45
  4. Zenon process gateway.
    By murphys in forum Drivers
    Replies: 6
    Last Post: 14th January 2010, 13:17
  5. Process Gateway
    By hoscillada in forum Drivers
    Replies: 12
    Last Post: 8th November 2009, 22:57

Posting Rules

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