Issue
Occasionally get a alarm in Vista that is connected to the bit 16 of the error block in Menta (Mainloop overrun. The application program can not execute within the specified cycle time)
Environment
- Vista
- Menta
- Xenta
Cause
In Menta under Program Specification there is a parameter called cycle time. This parameter tells how often the program should be run in the Xenta.
If the program take more time to execute then the specified value Vista will show a error connected to a error block in Menta, "Mainloop overrun. The application program can not execute within the specified cycle time" Vista will not show this specific text, Vista will show the text that you choose to show in the Alarm block connected to the Error block.
I.e. In Menta you have a error block that leads to a XPR block (expression block) that have the expression A&16, when this expression is meet it goes to the alarm block that will generate an alarm text of your choice. (16 is the bit that tells a Mainloop overrun. The application program can not execute within the specified cycle time have occurred.)
The Error block has several condition and work like this
The output of this block is an integer value where each bit represents an internal signal or error from the system program. Each output bit is set as long as the error condition remains, remains. In the case of a restart after a power failure, the output bit is set during the first program cycle after the restart. The output value is zero when no error conditions are set.
Conditions:
Bit no. |
Output value |
Description |
0 |
1 |
Restart after power failure |
1 |
2 |
Integer underflow/overflow |
2 |
4 |
CNT block overflow |
3 |
8 |
RT block overflow |
4 |
16 |
Mainloop overrun. The application program can not execute within the specified cycle time |
5 |
32 |
At least one of the switches on one of the I/O modules associated with the application, is in the position for manual override (ON, OFF, MAN) of the output |
6 |
64 |
Indicates that an OP is connected, and the user is logged in at medium (yellow) or high level (red). |
7 |
128 |
|
8 |
256 |
Dial-up modem line to TAC Xenta unit disabled |
9 |
512 |
Update of a Network variable value was not received within the set Period |
10 |
1024 |
There are tripped priority 1 alarms in the alarm list |
11 |
2048 |
One or several I/O modules offline |
12 |
4096 |
I/O in forced mode |
13 |
8192 |
There are tripped and unacknowledged alarms in the alarm list |
14 |
16384 |
There are tripped and not reset alarms in the alarm list |
Resolution
To remedy this error change the cycle time to a higher value or make the Menta code lighter