Information

  • In PLANTA, there are different data items that calculate the threshold values (limiting values) and change the output value accordingly.
    • Traffic light data items
      • They are customized as complex DIs with sub DIs and are assigned to the required DIs.
        • You can define threshold values directly in the sub DIs
        • or enter global variables for threshold values in sub DIs. For further information, see Traffic Light Customizing
      • Traffic light DIs can be customized as regular DIs with value ranges with VR type = PY by calculating the threshold values via the calculate_traffic_light() function and the global variables in which the threshold values for the traffic light colors are saved are read.
    • OLE data items for traffic light values
      • Most of these DIs use value ranges with VR type = PY by calculating the threshold values via the calculate_traffic_light() function and the global variables in which the threshold values for the traffic light colors are saved are read.
    • Text data items
      • Most of these data items use value ranges with VR type = PY by calculating the threshold values via the calculate_traffic_light() function and the global variables in which the threshold values for the traffic light colors are saved are read.

Global Variables for Threshold Values

Information

  • PLANTA has defined threshold values for the traffic light colors red, yellow, green, which are controlled via global variables.
  • These threshold values can be adjusted individually in the Global Variables (for users with customizer rights) or Threshold values (for users without customizer rights) module.

Python Value Ranges for Threshold Value Calculation

Procedure

  • The traffic_lights.py contains the  calculate_traffic_light() function which takes on the calculation of the values and reads out the global variables or text constants.
  • The threshold values are grouped by application area within the function.
  • Groups serve as a key.
  • An OLE object and/or text constants are assigned to groups as values.
  • The global variables and text constants are stored in Python classes which are each assigned to a threshold value group.
  • Output is done depending on the PPMS class of the calling data item.

Note

  • Optionally, a mandatory DI can be specified, which defines that the calculation of the output value only takes place if this DI is filled.

Example

from ppms.calculations.traffic_lights import calculate_traffic_light
def computeOutput(di):
    mod_obj = ppms.get_active_module()
return calculate_traffic_light(di, mod_obj, 'dev_misc', 'cost', 'misc_budget')
computeOutput.deps = ('DI028529','DI028545')
PY

Predefined groups

Group keyOLEValues
MS
without delay / up to 5% / over 5%
Date
...
Date_Circle

Date_Trend

Cost

Effort

Trend

Tdi
delayed / today / future