NA Asyncronous Subroutines
VB Subroutines
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.