Showing results 1 to 10 of 10

Thread: OnlineVariableContainer Bulkmode not triggering

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date

    Default OnlineVariableContainer Bulkmode not triggering


    So we are working with OnlineVariableContainers to react to some Variablechanges.

    We Subscribe to our Variables like:
    project.OnlineVariableContainerCollection.Delete(c ontainerName);
    container = project.OnlineVariableContainerCollection.Create(c ontainerName);
    container.AddVariable(variables.ToArray());contain er.BulkChanged += eventHandler;
    if (!container.ActivateBulkMode())
    {errorLog.Add("Barcode Lookup FAILED (Bulkmode)");
                        Debug.Print("Barcode Lookup FAILED (Bulkmode)");

                    if (!container.Activate())
                        errorLog.Add("Barcode Lookup FAILED (Activation)");
                        Debug.Print("Barcode Lookup FAILED (Activation)");

  2. #2
    Join Date

    Default Re: OnlineVariableContainer Bulkmode not triggering

    Apparently "ENTER" submits a post instant... and i cannot find a edit button, so let me try it again:

    We are subscribing to Variables with following Commands:
    container.BulkChanged += eventhandler

    Our Debugpoints even return that the containers are up and running (We are checking the IProject var), but when we change one of the Variables (We tripple checked the names), no event is triggered.

    Very good to know: It only happens like that in our live project. In our Testproject it works UNTIL you switch pages. When switching Pages, no more events are triggered. No Errors thrown, nothing. The Addin is still running without errors, but no events are triggered.

    Is this a Zenon issue or are we somehow missing an option in our project which stops events from happening?

    Thanks in advance!

    Best Regards,

  3. #3
    Join Date

    Default Re: OnlineVariableContainer Bulkmode not triggering

    Adding some Details:
    Variable we are subscribing to(from Debuglog): Added Station: "STATION_1021.INTERN_Barcode[1]"
    Variablename copied from ZenonEditor: "STATION_1021.INTERN_Barcode[1]"

    Debuglogmessage after we subbed (comes from IProject var):
    Container OC_BARCODES |isActive: True |VarCount: 84
    Container OC_BARCODESDETAILS |isActive: True |VarCount: 1800

    More Detailed Information about second container:
        Count: 1800
        EventMode: Bulk
        IsActive: true
        Parent: Scada.AddIn.Contracts.IOnlineVariableContainerColl ection
        Results View: Expanding the Results View will enumerate the IEnumerable

    And YES, we have tested it with less Variables. The test was done with 10 Variables instead of 1884. It has not changed the result.

    Bulkchanged Event looks like this:

    private void StationsContainer_BulkChanged(object sender, BulkChangedEventArgs e)        {            Debug.Print("StationContainer_BulkChanged called...");

    It never reaches the Debug.Print, so the rest of the code is irrelevant


  4. #4
    Join Date

    Default Re: OnlineVariableContainer Bulkmode not triggering

    As for this case also a ticket with COPA-DATA support has been opened, COPA-DATA replies will be done in that ticket.

  5. #5
    Join Date

    Idee Re: OnlineVariableContainer Bulkmode not triggering

    Hey Guys!

    With the fast and good help from Copadata support we might have found a solution:

    When the Addin automatically starts with the RT, the Variables which will be added to an OnlineVariableCollection might not be ONLINE at that time. (variable.isOnline = false). If thats the case, adding the Variable to the Container still works with no Errors, BUT this Variable will never fire a changed Event.

    In order to prevent this from happening, we added a loop at the beginning of our Service to wait for the Variables to be ONLINE and then continue adding them to our OVCs.
    That worked like a charm.

    I will post any updates below, in case someone encounters a similar issue.

    Thanks and have a very nice day!

  6. #6
    Join Date

    Default AW: OnlineVariableContainer Bulkmode not triggering

    That seems very strange to me. The reason for using an Onlinevariable is to make sure the variables inside are online. Okay, sometimes it's for the ChangeEvent. But I never heard of a need that Variables already must be online before you can add them to an Onlinecontainer.
    What about variables that don't have an alarm, are not used in pictures and not in archives etc. they will never get online if you don't put them in an OV (while .IsOnline=false)

    I know that it's somtimes a bit tricky if you want to read Variables.Value right at start of RT. They won't be online right after you add them to an OV, you first have to wait for the ChangeEvent. But I don't understand how the variables magically getting online, only by waiting... Could you please post your code?

Similar Threads

  1. Online Container im BulkMode ?
    By hare1268 in forum VBA
    Replies: 10
    Last Post: 14th November 2014, 15:00
  2. Replies: 0
    Last Post: 10th February 2009, 13:54

Posting Rules

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