The method RemoveAccessRule is used to remove a configured access rule from the function block.
The rule configuration to be removed is specified by a rule index. As the function block can store up to 30 rule configurations, the value range for the rule index is 1...30. In addition, this method can be used to remove the configured access rules from the function block.
Inputs |
Data type |
Description |
---|---|---|
i_uiRuleIndex |
UINT |
This input specifies the index of the rule to be removed. Value range: 1...30 If the input i_xRemoveAll is set to TRUE, the value of i_uiRuleIndex has no effect. |
i_xRemoveAll |
BOOL |
If this input is set to TRUE, the configured access rules are removed. |
Data type |
Description |
---|---|
The return value indicates the result of the method. If the value is ET_Result.Ok, the execution of the method was completed successfully. |
Return value |
Possible cause |
Solution |
---|---|---|
ET_Result.NoRule |
No rule is configured at the specified rule index. |
Verify the number of configured rules using the property NumberOfConfiguredAccessRules. The number of configured rules is equal to the greatest possible rule index for this method. |
ET_Result.InvalidInput |
The value of i_uiRuleIndex is invalid. |
Verify whether the value of i_uiRuleIndex is within the range 1...30. |