RobotStudio event

Event Manager Calls VSTA Macro Twice

Options
Hello,
I am developing a simulation of a robot picking products from an external axis and adding them to a pallet. I have created a macro that can import a library file representing the product and attaches it to the external axis. 

When I run the macro from RobotStudio -> Add-In tab, right-click -> Macro_ImportFile - > click Run Macro button, it works perfectly and calls the macro only once, and attaches only one product to the external axis. It does this everytime I push the button, no problems.

When I create a station signal Digital1 that calls the VSTA Macro when Digital1 goes high, the Macro is called twice, thus attaching two products to the station. This is the only event in the event manager, and nothing else should be calling the Macro. There is also only one Macro_ImportFile() call within the VSTA code.

Any ideas anyone?

Thanks,
Matt.

Comments

  • Just to note, this only happens in this particular project station. i.e. When the same macros are called from the event manager in another project, the macros are only called once.
  • Oyvind
    Options
    Hi
     

    I had the same problem in one of my stations. It turned out that my VSTA Add-In was loaded twice. It was loaded under "VSTA Station Add-Ins" and "VSTA User Add-Ins". 

    I unloaded it from "VSTA User Add-Ins" (so it was colored gray insted of blue) and it worked fine.

     

    Hope this may help.
    ?yvind Birkeland
    Systemdeveloper
    Frekhaug Vinduet AS
  • Hi Oyvind, 

    I realised this after a while and noted how it reloads the VSTA Add-Ins every time that the code is recompiled.

    Thanks,
    Matt.
  • Oyvind
    Options
    Yes, it does that in my application also. It reloads the VSTA Add-Ins under "Station Add-ins" AND "User Add-ins" every time I compile
     

    Very annoying....
    ?yvind Birkeland
    Systemdeveloper
    Frekhaug Vinduet AS
  • Oyvind
    Options
    Maybe we are doing something wrong? Anyone care to comment?
    ?yvind Birkeland
    Systemdeveloper
    Frekhaug Vinduet AS
  • Hi Oyvind,

    I created a new Add-In and immediately after saving added this new Add-In to my station. From here it ony appears under the "VSTA Station Add-Ins" and no longer duplicated in the "VSTA User Add-In" lists. From here I copied my code over to the new Add-In. This is worth doing if you have a lot of debugging to do.

    Good luck,
    Matt.