AdvancedHMI Software
General Category => Support Questions => Topic started by: PMT Tech on February 28, 2017, 09:39:14 AM
-
I need a bit of assistance from anyone available. I am attempting to create a new control, based on the AnalogValueDisplay, I don't understand how the PLCAddressValueLimit actualy works. My need is to have two sets of limits, as well and a Blink timer based on hitting the higher or lower of the two. My main concern is I can not seem to find the exact point at which the m_ValueLimitUpper and the v it is compared to actually changes. Any assistance would be appreciated.
-
Instead of creating a new control, see if the SevenSegment2 control might be useful for what you want to do.
-
I looked at that, however I did not see a plc addressable set of limits plus I need two sets of two, example hi hihi low lowlow limits. Which is why I was originally looking to simply copy and past the sections for the analogvaluedisplay to create two sets of limits, the hihi and lowlow being set to blink. I will reinvestigate the sevensegment2 control. Thank you
-
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.
-
Why not simply have 2 AnalogValueDisplays? One for Lo-LoLo and the other for Hi-HiHi.
And If you want only one to display , use valueChanged event to control visibility
-
Thanks Archie, I will start working on it with that information this coming week.
-
Most of the restraints I have, as far as what is on the screen, are hard restraints. My company, does not want to stray to far away from the current scheme on the rsview systems. I am hopeful after the system is proven they will let me go back and make the layouts more efficient and clean. That's why I couldn't use two AnalogValueDisplays. The value changed aspect crossed my mind but they change that value via the plc then the plc calculates what it considers the alarm bands. RSview triggered based on one bit for the hi/low alarm and one bit for the hihi/lowlow alarm so two bits this is different from the word or double that the valuelimits are looking for in the current AnalogValueDisplay. More or less the powers that be would like the machine to look and operate as close to identical as possible to the RSView system.
-
Is the objective to change the text color based on the 2 alarms bits?