SVBRANCH
Change the status of a group of variables according to their branch.
WebVue support - Yes.
Mode |
Mnemonic |
Syntax |
2 | MASK | 1 |
3 | UNMASK | 1 |
4 | ENABLE | 2 |
5 | DISABLE | 2 |
8 | SIMU | 3 |
12 | SETALARMLEVEL | 5 |
13 | RESTOREALARMLEVEL | 2 |
14 | RESETANDSETALARM | 4 |
15 | RESETCOMPUTEALARM | 4 |
The changes performed by a call to the instruction SVBRANCH apply to all variable/alarms in the branch you pass as argument, and also recursively to all variables/alarms in sub-branches.
Syntax 1
IntVal = SVBRANCH (Mode, Branch, MaskLevel)
Return type: INTEGER.
Argument |
Meaning |
Branch |
The branch. Type STR. |
MaskLevel |
The mask level. Type INTEGER: 1 Masked by user program 1 |
Execution
Mode |
Mnemonic |
Action |
2 |
MASK |
All variables in Branch are masked. See also the VARIABLE instruction mode MASK. |
3 |
UNMASK |
All variables in Branch are unmasked. See also the VARIABLE instruction mode UNMASK. |
|
|
Return: 1 OK, else 0. |
The MaskLevel parameter is an integer whose value represents the binary combination of one or more levels. Values 0 to 29. For example, a value of 11 would represent User program 1, User program 2 and User program 4.
Syntax 2
IntVal = SVBRANCH (Mode, Branch)
Return type: INTEGER.
Argument |
Meaning |
Branch |
The branch. Type STR. |
Execution
Mode |
Mnemonic |
Action |
4 |
ENABLE |
All variables in Branch are enabled. |
5 |
DISABLE |
All variables in Branch are disabled. |
13 |
RESTOREALARMLEVEL |
Restore the configured alarm level of all alarm variables in Branch (after SETALARMLEVEL). |
|
|
Return: 1 OK, else 0. |
Syntax 3
IntVal = SVBRANCH (Mode, Branch, Flag)
Return type: INTEGER.
Argument |
Meaning |
Branch |
The branch. Type STR. |
Flag |
Simulated flag. Type INTEGER. 1 simulated. |
Execution
Mode |
Mnemonic |
Action |
8 |
SIMU |
Depending on the Flag argument, all I/O variables belonging to Branch are set to simulated or non-simulated. It is then possible to set them as any internal variable Return: 1 OK, else 0. |
Syntax 4
IntVal = SVBRANCH (Mode, Branch[, Filter[, Type]])
Return type: INTEGER.
Argument |
Meaning |
Branch |
The branch. Type STR. |
Filter |
A filter expression. See the topic Native Filter Expressions. Type STR. |
Type |
The alarm type. Type STR. "ALARMALLTYPE" - Perform the action on all alarms (default value). "ALARMTHRESHOLD" - Perform the action on alarms generated from the threshold system only. |
Execution
Mode |
Mnemonic |
Action |
14 |
RESETANDSETALARM |
Toggles (resets and set) all alarms of Branch matching the Filter and Type criteria (if any). It has no effect if the alarm is off. |
15 |
RESETCOMPUTEALARM |
Reset to 0 and re-calculate the number of alarms in Branch matching the Filter and Type criteria. |
|
|
Return: 1 OK, else 0. |
Syntax 5
IntVal = SVBRANCH (Mode, Branch, AlarmLevel)
Return type: INTEGER.
Argument |
Meaning |
Branch |
The branch. Type STR. |
AlarmLevel |
Priority level of alarms (0 to 29). Type INTEGER: |
Execution
Mode |
Mnemonic |
Action |
12 |
SETALARMLEVEL |
Set the alarm level of all alarm variables in Branch to the AlarmLevel Return: 1 OK, else 0. |