The valve's orientation (top, left, bottom, or right) is set when the dynamo is configured. The foreground color of the control valve is the active state color (based on the Pump_DValve_Fill_Color threshold table)
The following occurs at run time:
The valve body's outline becomes thicker and has the named Abnormal color when the numeric value of PV_D is equal to the configured abnormal state (0, 1, 2, or None).
The actuator top's outline top becomes thicker and has the Abnormal color when the numeric value of SP_D is equal to the configured abnormal state (0, 1, 2, or None).
The valve's edge color is based on the Pump_DValve_Edge_Color threshold table unless the abnormal color is being shown.