Showing results 1 to 6 of 6

Thread: How multiple macros will execute in VSTA runtime?

  1. #1
    Join Date
    17.04.2017
    Posts
    16

    Frage How multiple macros will execute in VSTA runtime?

    Hello,

    In our project i am having machine sequence in a VSTA VB.Net macros and calling the macros through online container variable change event.

    I have 10 stations and all macros should run parallel. 

    Is in VSTA the macros will work parallel or it will call one by one. 


    Regards

    Dhanapal

  2. #
    Join Date
    07.02.2017
    Posts
    9
    Best Answer

    Default Re: How multiple macros will execute in VSTA runtime?

    Maybe this little Schema will be helpful somehow?

    Attached Thumbnails Attached Thumbnails 2017-09-12_11h31_28.png  

  3. #2
    Join Date
    03.11.2015
    Posts
    12

    Default Re: How multiple macros will execute in VSTA runtime?

    Hi,
    The macros will not run parallel unless you defined them to run in an own thread. 
    But take care: the interface to the zenon API does not take multiple threads and calling methods or setting properties in the zenon API from multiple threads is IN NO WAY safe.

    please only consider using multithreading with anything of the "outside" .NET world. not with the zenon API.

    hf

  4. #3
    Join Date
    17.04.2017
    Posts
    16

    Default Re: How multiple macros will execute in VSTA runtime?

    Hello,

    So it is not a good solution to run a machine sequence with vsta in Zenon.
    Ok, I will check for other solutions.
    Thank you for your reply.
    Regards,
    Dhanapal

  5. #4
    Join Date
    17.04.2017
    Posts
    16

    Default Re: How multiple macros will execute in VSTA runtime?

    Hello,
    If I create the each machine sequence separate and convert it as a "dll" and call them from vsta then it will solve my issue.
    Please confirm this.
    In this case ensure me that dll will able to access the Zenon variable or not.
    I will create 15 dll.
    Waiting for the reply.
    Thanks,
    Dhanapal.L

  6. #5
    Join Date
    03.11.2015
    Posts
    12

    Default Re: How multiple macros will execute in VSTA runtime?

    Quote Originally Posted by Dhanapal View Post
    Hello,
    If I create the each machine sequence separate and convert it as a "dll" and call them from vsta then it will solve my issue.
    Please confirm this.
    confirm, if you do not call the zenon COM from the dll.

    Quote Originally Posted by Dhanapal View Post
    In this case ensure me that dll will able to access the Zenon variable or not.
    nope, this is exactly what you should not do. 

    All you get is one single main thread. This main thread can access the zenon COM and therefore also the zenon variables.
    The main thread can also start other threads. The other threads shall NOT access the zenon COM.
    If the other threads need information from the zenon COM (e.g. the variables) they need to halt, ask the main thread, the main thread needs to collect the information from the zenon COM and distribute it to the according threads.

    I'm sure there is a solution in zenon for your project. Here I can give just small answers to very specific topics.
    If you need guidance for getting to a clean, working and, maintainable  solution for your project please consult your local copadata support.
    support@copadata.com

    hf 



  7. #6
    Join Date
    07.02.2017
    Posts
    9
    Best Answer

    Default Re: How multiple macros will execute in VSTA runtime?

    Maybe this little Schema will be helpful somehow?

    Attached Thumbnails Attached Thumbnails 2017-09-12_11h31_28.png  

Similar Threads

  1. VBA macros not appearing
    By dnaf in forum VBA
    Replies: 3
    Last Post: 6th April 2017, 08:29
  2. Execute Functions from VSTA (VB.NET)
    By loucks80 in forum VSTA
    Replies: 1
    Last Post: 9th September 2016, 10:04
  3. VSTA FC not execute
    By abcd1234 in forum VSTA
    Replies: 3
    Last Post: 6th March 2014, 14:31
  4. My workspace Macros?
    By softart2 in forum VSTA
    Replies: 4
    Last Post: 27th December 2010, 00:58
  5. Multiple Monitor to display different pictures in Runtime
    By janlyndon in forum zenon Supervisor
    Replies: 1
    Last Post: 11th April 2010, 23:45

Posting Rules

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