Showing results 1 to 5 of 5

Thread: Referencing Project variables in the PCE

  1. #1
    Join Date
    23.06.2014
    Posts
    12

    Default Referencing Project variables in the PCE

    Hi friends,

    I have a runtime license for Zenon 7.0. In a trial application I tried to see the working of the PCE.

    A simple project was created having 3 internal tags ' UG_lev' (LReal), 'Inlet_XV '(Bool) and 'Pump' (Bool). The Tank level will have to increase by 1.23 when Inlet_XV was true, and also decrease by 2.34 when Pump is true..

    The following code was entered in a task set to100ms cyclic in the PCE... The above variables were also linked to the cyclic task..


    'Initfunction
    Sub Task_Init()

    End Sub

    'The Mainfunction is a cyclic function
    Sub Task_Main()
    If Inlet_XV = 1 Then
    UG_lev = UG_lev + 1.23
    End If

    If Pump = 1 Then
    UG_lev = UG_lev- 2.34
    End If

    End Sub

    'Exitfunction
    Sub Task_Exit()

    End Sub

    'Timerfunction
    Sub Task_Timer(lTimerId)

    End Sub

    This compiled without errors.. BUT the values of UG_lev did not update.


    When I tried the syntax

    Task.Value('UG_lev') = UG_lev + 1.23 then I get compile errors.

    Please help me out with this simple example.

  2. #2
    Join Date
    30.05.2007
    Location
    Salzburg
    Posts
    879

    Default Re: Referencing Project variables in the PCE

    An important note regarding the module "PCE" - below you can find a snippet from the realease notes of zenon version 7.20:

    Starting from version 7.20, PCE will not be supported anymore and it will not be shown in the module
    tree of zenon anymore. PCE will not further be developed and documented.
    While converting projects from versions lower than 7.20, which contain PCE tasks, the node PCE will be
    shown for these projects again.
    Please use zenon Logic instead of PCE.


  3. #3
    Join Date
    23.06.2014
    Posts
    12

    Default Re: Referencing Project variables in the PCE

    That was hardly helpful... sorry.. despite math variables and allocations and many ways of doing things your answer does not answer my question. I was trying out simple scripts which are the essentials of any SCADA. Unhappily with Zenon, even the help is brief and never useful.

    The zenon logic part, I'm using on the controllers. The above example was just my attempt to understand how project variables are to be referenced in the PCE. At least you can guide me whether that syntax was right or wrong.

  4. #4
    Join Date
    30.05.2007
    Location
    Salzburg
    Posts
    879

    Default Re: Referencing Project variables in the PCE

    Please again, do not spent effort to do this using PCE
    .... do not try to learn how to bestride a horse which will be dead tomorrow...

    You can use zenon Logic out of the zenon Runtime where you can exchange variable values in both directions.
    See following chapters in the help documentation
    Manual -> zenon Logic
    ... resp.
    Manual -> zenon Logic -> Basics zenon Logic Workbench (IEC 61131-3) -> Variable handling -> Using zenon variables in zenon Logic


  5. #5
    Join Date
    23.06.2014
    Posts
    12

    Cool Re: Referencing Project variables in the PCE

    Thank you,

    I am already quite adept with Straton so I dont need help with Zenon Logic..

    But what do you do when there is a controller that needs Zenon Logic? Plus there's some scripting needed on the HMI!

    We're on a project that has a Brodersen controller And a Panel-PC as the HMI using Zenon. For the purpose of let's say animating the fill level of a tank, or performing calculations or performing certain Boolean + arithmetic operations on the Zenon variables all on the Panel PC and not on the controller, what does one do?

    Do you create a 2nd project in Zenon Logic for doing all the calculations in the Panel PC that will not be downloaded into the controller? This way two Zenon Logic projects are running. One within the controller and the other in the panel-PC. I am not sure that it's ever possible!

    Please bear in mind that the Brodersen controller will run continuously 24 X7 whereas the panel PC may be switched on/off as required..

    IMHO there's another aspect too... the Zenon-logic/allocations/functions cannot do many things that the script written on the Zenon Scada. How does one address this?

    So instead of using the PCE, we have to use VBA right? Or do you plan to discontinue that as well?
    Last edited by rajsiyer : 20th February 2015 at 09:42

Similar Threads

  1. Syntax for referencing values
    By bsneddon in forum zenon Supervisor
    Replies: 3
    Last Post: 12th May 2014, 11:00
  2. Variables association error in child project
    By davide.galigani in forum VBA
    Replies: 2
    Last Post: 28th June 2012, 08:57
  3. PCE or ms in VBA
    By westbaaam in forum VBA
    Replies: 4
    Last Post: 6th November 2009, 07:44
  4. Replies: 0
    Last Post: 20th March 2008, 10:20
  5. Referencing variable on a picture
    By madphilly in forum VBA
    Replies: 8
    Last Post: 25th January 2008, 10: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
  •