Referencing Project variables in the PCE

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.

This is a migrated post! Originally posted on 19.02.2015 by user rajsiyer. Please be aware that information can be outdated.

    Disclaimer

    This document governs the use of our Community Forum. By registering and using the platform, you accept these conditions.

    The COPA-DATA Community Forum serves to encourage the exchange of information and experience about the zenon software between forum users respectively zenon users.

    Please mind that any published information on the Community Forum is the subjective opinion and view based on the experience and the level of knowledge of the author. COPA-DATA does not overtake any responsibility for the content and the accuracy of the shared information.

    Users of the Community Forum are encouraged to share only well-founded experiences and to point out any risks associated with the implementation of proposed solutions to problems. COPA-DATA at its absolute discretion, reserves the right to moderate the forum. In this connection COPA-DATA may remove any information containing false facts, potentially dangerous solutions, bad language or content that may insult, degrade or discriminate others. COPA-DATA may block a non-complying user from forum access if the user violated this provision.

    COPA-DATA reserves the right to change this document from time to time at own discretion.


    Ing. Punzenberger COPA-DATA GmbH
    Karolingerstraße 7b · 5020 Salzburg · Austria
    www.copadata.com