The value returned by the PLC (set by PLCAddressValue) is compared to ValueLimitLower. If the value is less, the ForeColor will change to the color specified by ForeColorUnderLimit
If an address is specified in PLCAddressValueLimitLower, then ValueLimitLower will be set to the value returned from the PLC.
The exact code at line 246 in AnalogValueDisplay.vb, where v=Value :
If v > m_ValueLimitUpper Then
MyBase.ForeColor = m_ForeColorOverLimit
ElseIf v < m_ValueLimitLower Then
MyBase.ForeColor = m_ForeColorUnderLimit
Else
MyBase.ForeColor = m_ForeColorInLimits
End If
On another note, any property of a control can be linked to a PLCAddress simply by adding a single line of code to the control code. For Example, you can add this to SevenSegment2.vb:
Public property PLCAddressForeColorHighLimitValue As String
The key to this working is the text following PLCAddress must be the exact match of the property name including the casing.