Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Contact Us
  • Home

NA Asyncronous Subroutines

VB Subroutines

Written by Nicolas Donoso

Updated at March 10th, 2025

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Products
    Automation Systems Control Components Motion & Drives Quality control & Inspection Robotics Safety Sensing Services Software Switching Components
  • Amplify e-Store
    e-Store public
  • Public CSC
+ More

With Omron NA-HMI Range you are able to implement Visual Basic code in the background of each screen, but if program a loop within the code that will either take a long period of time to execute or potentially become an endless loop, if created within the screen it will be part of the synchronous execution of the HMI, therefore the screen will be blocked until the subroutine completes execution.

We can solve this problem by setting the subroutine to execute asynchronously, therefore the NA HMI thread is now able to perform other tasks if blocking occurs. The thread will come back to this subroutine cyclically when it has spare time.



A few things to note before showing how this can be setup in Sysmac Studio.

  • Asynchronous Execution only available through "Global Events"
  • Only "Global Subroutines" can be used within "Global Events"
  • Maximum of 5 subroutines can be executed simultaneously, anymore than that and processes will enter standby for execution
  • If more than 100 but less than 105 subroutines are executed, a warning dialog will appear
  • If more than 105 subroutines executed an error messaeg will appear to indicate that the subroutine execution has been rejected due to request queue is full.

For any further information refer to the following manuals

  • V117I [NA-series Hardware User's Manual]
  • V118I [NA-series Software User's Manual]


Example Video

Example Program (as per video above)

AsynExecution_Example_010323.smc2


Your browser does not support HTML5 video.

asynchronicity non-blocking na hmi subroutine visual basic sysmac studio

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

Definition by Author

0
0
Expand