Configure PLC Limits with Equipment
- Last UpdatedJul 18, 2023
- 4 minute read
The steps for setting up and using PLC limits are:
1. Choose the default mode for limits (PLC tags or analog alarm limits).
To use PLC limits for all meters, set the INI parameter [SA_Library.Meter]UseDefaultPLCLimits.
To override the behavior of this parameter per equipment, add an equipment runtime parameter. For more details, see Step 5 below.
2. Define the Equipment Items Names that the meter limits will use as the source in [SA_Library.Meter]PLCLimitNames.
When PLC limits are used, you need to configure a set of custom Equipment Item names representing each of the limits. In the Setup activity, Parameters view, add the tags (item names) as a comma separated list as shown below.

The meter library objects will then look for items with these names on your equipment.
As these items will need to exist alongside your equipment's other items (for example, PV), it is recommended to use an identifier which makes it clear that they are limit items (for example, Limit).
Note: Up to 14 limits may be defined, but the Meter object supports display of only 4. However, you can build your own meter object with 6 limits for example.
3. Define the Analog Limit Labels to display in faceplates
Configure the limit labels for each of your limits (for example, HH). The limit labels are defined at a global level as a comma separated list via the parameter [SA_Library.Meter]PLCLimitLabels.

Note: The limits should be listed in the same order as the item names, and the number of items defined should be the same.
4. Define the default Analog Limits
Define the default PLC alarm limits to use for analog equipment. These are defined at a global level as a comma-separated list via the parameter [SA_Library.Meter]DefaultPLCLimits.
Typically, you would assign 0 = LL, 1 = L, 2 = H and 3 = HH. This matches the order in which the limit labels are specified. If you wanted to define only H and HH as the default, you would set the Value to -1, -1, 2, 3.
Note: The -1 in the Value column means “ignore” the first default limits.
5. Configure the "PLCLimits" equipment runtime parameter
When the alarm limits need to differ for a specific piece of equipment, the PLCLimits equipment runtime parameter can be configured to override the default.
For example, if only H and HH are required, then this can be configured using Equipment Runtime Parameters as shown below .

To configure this:
-
In Plant SCADA Studio, navigate to System Model activity and select Equipment. Select Runtime Parameters from the drop-down menu.
-
For each equipment that needs to override the default limits, in the Name property, type "PLCLimits".
-
In the Value property, specify your comma-separated list of default PLC limits, that is the order in which the defined PLC alarm limits need to be used. Use the value -1 to skip limits that are not required.
Note: Setting the Value property to * reverses the setting of the UseDefaultPLCLimits parameter. Therefore, if the UseDefaultPLCLimits parameter is set to TRUE, it will be reversed and applied as if it were set to FALSE. In this case, analog alarm limits will apply. If UseDefaultPLCLimits is FALSE, setting the value of the runtime parameter to * will cause the associated equipment to use the default PLC limits defined at the project level.
-
Set the Is Tag property to FALSE so that the PLC limit labels are displayed on the meter faceplates.
-
Click Save.
6. Generate variable tag Items for each limit item on your analog equipment.
All analog equipment that will be displayed as meters will then need to be configured to include variable items for these limits. Your PLC code can then set the defaults for those limits, or it could be done via Cicode.

7. Generate variable tags representing the condition of the PV against each limit
Once limits are set up, create a digital variable to reflect when the PV signal exceeds the limit.
For the variable, this can either be driven from the PLC itself, or, you can use a Calculated Variables that will run on the I/O Server as shown below:

8. Generate digital alarm tags.
Digital Alarms can then be created for each limit item giving you granular control of alarm priority (category). Each alarm should be bound to their respective digital condition tag defined in Step 7.