Author Topic: NumericSevenSegment to count in reverse  (Read 1295 times)

Darrell

  • Full Member
  • ***
  • Posts: 198
  • Electrician / PLC Technician
    • View Profile
NumericSevenSegment to count in reverse
« on: December 21, 2014, 07:58:36 PM »
 I have a NumericSevenSegment  the I now use to display  0 to 100 % I would like to reverse it so that 100 is  = 0 and display in the opposite direction.
65% would display 35% for example,  I would like to do this without changing the PLC program , Is there some vb code than can be written to this element , than can do this

Darrell

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: NumericSevenSegment to count in reverse
« Reply #1 on: December 21, 2014, 10:44:09 PM »
You can do this with the DigitalPanelMeter by putting a -1 in the ValueScaleFactor and a -100 in the ValueScaleOffset, but the NumericSevenSegment does not yet have this feature

DougLyons

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
NumericSevenSegment to count in reverse
« Reply #2 on: December 21, 2014, 11:09:24 PM »
Darrell,

Could you leave the "PLCAddressValue" blank in the NumericSevenSegment and add a DataSubscriber that has this code?

        NumericSevenSegment1.Value = 100 - e.Values(0)

Obviously the name I used has a "1" suffix, but you would have to match what your component has.
My tests seem to indicate that this will work.