Page 1 of 2 1 2 LastLast
Showing results 1 to 10 of 13

Thread: Read with main project (scada) variable form CE project

  1. #1
    Join Date
    30.09.2010
    Posts
    14

    Default Read with main project (scada) variable form CE project

    Hello,

    I have a scade project with two CE projects. The CE projects contains a beckhoff NG plc driver. The projects are linked with ethernet.

    Now I will read in Scada project with VSTA variables from the CE projects. Is it possible? So yes how?

    Thanks,

    DvG

  2. #2
    Join Date
    28.07.2008
    Posts
    64

    Default Re: Read with main project (scada) variable form CE project

    VSTA can't be used directly on CE.

    You have two possibilities:

    1. Without VSTA ->You can directly link your Variable from the CE Project directly to a Element to your Top-Project provided that your CE Project is under the Top-Project node.

    2. With VSTA-> You must set your Variable DDE active than you can read/ write it from your Top Project (normal PC) directly like this way:

    public void Macro_GetVariableFromCE_Project()
            {
                try
                {
                    this.Variables().Item("Top_Project").set_Value(0,
     this.Parent.Parent.Projects().Item("CE_Project").Variables().Item("Var_02").get_Value(0));
                }
                catch (Exception ex)
                {
                    System.Diagnostics.Debug.Print("ERROR  " + ex.Message + " " + ex.Source);
                }
            }
    Last edited by tulon : 6th October 2010 at 09:39

  3. #3
    Join Date
    30.09.2010
    Posts
    14

    Default Re: Read with main project (scada) variable form CE project

    I have in CE project the internal variable set to DDE Active.

    By methode 1 when this variable is linked to a element, is in the right corner a blue field and by right click the text NO UPDATE.

    Methode 2 gives de value -2147483638

    Is this a problem in nework topology/ routing?

  4. #4
    Join Date
    28.07.2008
    Posts
    64

    Default Re: Read with main project (scada) variable form CE project

    You must set in your CE Project properties the CE Project as Network active and as server . Did you?

  5. #5
    Join Date
    30.09.2010
    Posts
    14

    Default Re: Read with main project (scada) variable form CE project

    The property network active = yes.

    The name from the panel is set as sever from the CE project. This is the same place as the runtime folder.

  6. #6
    Join Date
    28.07.2008
    Posts
    64

    Default Re: Read with main project (scada) variable form CE project

    Blue rectangel ona number element means you have no network connection.

    Does the RT runing on your PC and even on your CE-Pannel?
    Is the PC connected to the CE-Pannel?-> Try do ping the CE-Pannel from your PC.

  7. #7
    Join Date
    30.09.2010
    Posts
    14

    Lächeln Re: Read with main project (scada) variable form CE project

    Thanks!!!!!!

    But I must first by Network topology -> select right server -> Transfer runtime files.... else make the scada project no link to the variabele.

  8. #8

    Default Re: Read with main project (scada) variable form CE project

    Hello,

    Would it be a problem if you set all your variables to DDE active ? Currently we have about 14000 variables. Or doesn't this matter at all ?

  9. #9
    Join Date
    30.05.2007
    Location
    Salzburg
    Posts
    879

    Default Re: Read with main project (scada) variable form CE project

    Setting all 14000 variables to DDE active would advise all of them at the driver(s). Thus all variables would be requested from the PLC (according to the cycle time of the PLC). Usually the zenon runtime itself nor the driver would be the bottleneck - it would be the PLC itself.
    Also it does not make sense to create an online container with all 14000 variables and starting the online container when starting the runtime.

    However, it is recommended to implement a dynamic online container. This means when variables should be read via the COM-Interface those variables should be defined in a online container and afterwards starting this online container (with .Define). After the variable values have been read the online container should be stopped again (with .Undefine).

    Note: you can easily check if a variable is available for reading its value with the method .IsOnline()
    -> if this method returns true you can read the value of the variable

    Regards,
    Herbert

  10. #10
    Join Date
    30.05.2007
    Location
    Salzburg
    Posts
    879

    Default Re: Read with main project (scada) variable form CE project

    ok.. i missed the point that this is a CE-Device....
    -> of course online containers are no option then because the COM-Interface is not available on CE-Devices...

Similar Threads

  1. VSTA read variable value's another project!
    By dvangenderen in forum VSTA
    Replies: 5
    Last Post: 1st December 2011, 10:04
  2. Replies: 4
    Last Post: 21st June 2010, 07:12
  3. how can be save the project that consist of the sub project?
    By michael_k in forum zenon Supervisor
    Replies: 1
    Last Post: 6th March 2010, 12:31
  4. s7 project import
    By gh_ounie in forum Drivers
    Replies: 1
    Last Post: 27th October 2008, 12:59

Posting Rules

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