General Discussions
Zero Centered Gauge Widget

I am trying find a gauge widget that will do the following.

  1. Accept input from an Analog Status Tag that produces values from -100 to 100.
  2. Has a zero centered dial which rotates to the left of center for negative values and to the right of center for positive values.

I originally thought this would be easy, but I can't figure out how to do it.

Any help would be appreciated,

Pat

I am trying find a gauge widget that will do the following. 1. Accept input from an Analog Status Tag that produces values from -100 to 100. 2. Has a zero centered dial which rotates to the left of center for negative values and to the right of center for positive values. I originally thought this would be easy, but I can't figure out how to do it. Any help would be appreciated, Pat

Well, I finally figured it out. It ain't pretty, but it works. Below are an image and the code. As they say, "Form follows Function". Got the Function, got to work on the Form. The tag the dial references is an Analog Status with a range of -70 to 70.

5c6f28d20dd69

[
  Title = "TestPage";
  Color = "<FF000000>";
]

Main [
  Return(Self);
  GUITransform(1454, 488, 1863, 83,
               1, 1, 1, 1, 1 { Scaling              },
               0, 0          { Movement             },
               1, 0          { Opacity, Reserved    },
               0, 0, 0       { Selectability        },
               Scope(\Code, "UserMethods", TRUE)\Group_e5bdae37_14b2_48f2_b655_359a310ec695(Scope(\VTSDB, "qdp96j{2Lr\8d-@$7((6c\4ogg.^shb-", TRUE), Scope(\VTSDB, "qdp96j{2Lr\8d-@$7((6c\3)0%_--mi$", TRUE)));
  GUIEllipse(172, 561, 496, 237,
             1, 1, 1, 1, 1 { Scaling              },
             0, 0          { Movement             },
             1, 0          { Visibility, Reserved },
             0, 0, 0       { Selectability        },
             Brush("<FFFFFFFF>", 0, 1), Pen("<FF000000>", 1, 1));
  GUITransform(172, 561, 496, 237,
               1, 1, 1, 1, 1 { Scaling              },
               0, 0          { Movement             },
               1, 0          { Visibility, Reserved },
               0, 0, 0       { Selectability        },
               Scope(\Code, "MeterParts", TRUE)\RadialIndicator(Scope(\VTSDB, "u!3dL5w3#x\s5_-s4!@^j\)0maqt5ck&", TRUE), \ImageParmSet("Bitmaps\Meter Parts\Indicators\Radial\Needle2.png", "<FF000000>", Invalid, Invalid, 0, 1, 1, 1, 0, 1, 0, 0), 0, 0, 0, 135, 0, 1, 1, 1, 1, 0, 0, 0, 0, 70, 0, "<FFFFFFFF>"));
  GUITransform(172, 561, 496, 237,
               1, 1, 1, 1, 1 { Scaling              },
               0, 0          { Movement             },
               1, 0          { Visibility, Reserved },
               0, 0, 0       { Selectability        },
               Scope(\Code, "MeterParts", TRUE)\RadialIndicator(Scope(\VTSDB, "u!3dL5w3#x\s5_-s4!@^j\)0maqt5ck&", TRUE), \ImageParmSet("Bitmaps\Meter Parts\Indicators\Radial\Needle2.png", "<FF000000>", Invalid, Invalid, 0, 1, 1, 1, 0, 1, 0, 0), 0, 0, 225, 0, 0, 1, 1, 1, 1, 0, 0, 0, -70, 0, 0, "<FFFFFFFF>"));
  GUITransform(172, 561, 496, 237,
               1, 1, 1, 1, 1 { Scaling              },
               0, 0          { Movement             },
               1, 0          { Visibility, Reserved },
               0, 0, 0       { Selectability        },
               Scope(\Code, "MeterParts", TRUE)\RadialLegend(Invalid, 0, 135, 6, Scope(\VTSDB, "MeterFont", TRUE), "<FF000000>", 0, 0, 0, 0, 70, 1));
  GUITransform(172, 561, 496, 237,
               1, 1, 1, 1, 1 { Scaling              },
               0, 0          { Movement             },
               1, 0          { Visibility, Reserved },
               0, 0, 0       { Selectability        },
               Scope(\Code, "MeterParts", TRUE)\RadialLegend(Invalid, 225, 0, 6, Scope(\VTSDB, "MeterFont", TRUE), "<FF000000>", 0, 0, 0, -70, 0, 1));
  GUITransform(228, 504, 439, 293,
               1, 1, 1, 1, 1 { Scaling              },
               0, 0          { Movement             },
               1, 0          { Visibility, Reserved },
               0, 0, 0       { Selectability        },
               Scope(\Code, "MeterParts", TRUE)\SimpleRadialScale(6, 4, 0.1, 0.05, 1, 1, 225, 0, 0, 9, "<FF000000>", "<FF000000>"));
  GUITransform(228, 504, 439, 293,
               1, 1, 1, 1, 1 { Scaling              },
               0, 0          { Movement             },
               1, 0          { Visibility, Reserved },
               0, 0, 0       { Selectability        },
               Scope(\Code, "MeterParts", TRUE)\SimpleRadialScale(6, 4, 0.1, 0.05, 1, 1, 0, 135, 0, 9, "<FF000000>", "<FF000000>"));
]
Well, I finally figured it out. It ain&#039;t pretty, but it works. Below are an image and the code. As they say, &quot;Form follows Function&quot;. Got the Function, got to work on the Form. The tag the dial references is an Analog Status with a range of -70 to 70. ![5c6f28d20dd69](serve/attachment&amp;path=5c6f28d20dd69) ```` [ Title = &quot;TestPage&quot;; Color = &quot;&lt;FF000000&gt;&quot;; ] Main [ Return(Self); GUITransform(1454, 488, 1863, 83, 1, 1, 1, 1, 1 { Scaling }, 0, 0 { Movement }, 1, 0 { Opacity, Reserved }, 0, 0, 0 { Selectability }, Scope(\Code, &quot;UserMethods&quot;, TRUE)\Group_e5bdae37_14b2_48f2_b655_359a310ec695(Scope(\VTSDB, &quot;qdp96j{2Lr\8d-@$7((6c\4ogg.^shb-&quot;, TRUE), Scope(\VTSDB, &quot;qdp96j{2Lr\8d-@$7((6c\3)0%_--mi$&quot;, TRUE))); GUIEllipse(172, 561, 496, 237, 1, 1, 1, 1, 1 { Scaling }, 0, 0 { Movement }, 1, 0 { Visibility, Reserved }, 0, 0, 0 { Selectability }, Brush(&quot;&lt;FFFFFFFF&gt;&quot;, 0, 1), Pen(&quot;&lt;FF000000&gt;&quot;, 1, 1)); GUITransform(172, 561, 496, 237, 1, 1, 1, 1, 1 { Scaling }, 0, 0 { Movement }, 1, 0 { Visibility, Reserved }, 0, 0, 0 { Selectability }, Scope(\Code, &quot;MeterParts&quot;, TRUE)\RadialIndicator(Scope(\VTSDB, &quot;u!3dL5w3#x\s5_-s4!@^j\)0maqt5ck&amp;&quot;, TRUE), \ImageParmSet(&quot;Bitmaps\Meter Parts\Indicators\Radial\Needle2.png&quot;, &quot;&lt;FF000000&gt;&quot;, Invalid, Invalid, 0, 1, 1, 1, 0, 1, 0, 0), 0, 0, 0, 135, 0, 1, 1, 1, 1, 0, 0, 0, 0, 70, 0, &quot;&lt;FFFFFFFF&gt;&quot;)); GUITransform(172, 561, 496, 237, 1, 1, 1, 1, 1 { Scaling }, 0, 0 { Movement }, 1, 0 { Visibility, Reserved }, 0, 0, 0 { Selectability }, Scope(\Code, &quot;MeterParts&quot;, TRUE)\RadialIndicator(Scope(\VTSDB, &quot;u!3dL5w3#x\s5_-s4!@^j\)0maqt5ck&amp;&quot;, TRUE), \ImageParmSet(&quot;Bitmaps\Meter Parts\Indicators\Radial\Needle2.png&quot;, &quot;&lt;FF000000&gt;&quot;, Invalid, Invalid, 0, 1, 1, 1, 0, 1, 0, 0), 0, 0, 225, 0, 0, 1, 1, 1, 1, 0, 0, 0, -70, 0, 0, &quot;&lt;FFFFFFFF&gt;&quot;)); GUITransform(172, 561, 496, 237, 1, 1, 1, 1, 1 { Scaling }, 0, 0 { Movement }, 1, 0 { Visibility, Reserved }, 0, 0, 0 { Selectability }, Scope(\Code, &quot;MeterParts&quot;, TRUE)\RadialLegend(Invalid, 0, 135, 6, Scope(\VTSDB, &quot;MeterFont&quot;, TRUE), &quot;&lt;FF000000&gt;&quot;, 0, 0, 0, 0, 70, 1)); GUITransform(172, 561, 496, 237, 1, 1, 1, 1, 1 { Scaling }, 0, 0 { Movement }, 1, 0 { Visibility, Reserved }, 0, 0, 0 { Selectability }, Scope(\Code, &quot;MeterParts&quot;, TRUE)\RadialLegend(Invalid, 225, 0, 6, Scope(\VTSDB, &quot;MeterFont&quot;, TRUE), &quot;&lt;FF000000&gt;&quot;, 0, 0, 0, -70, 0, 1)); GUITransform(228, 504, 439, 293, 1, 1, 1, 1, 1 { Scaling }, 0, 0 { Movement }, 1, 0 { Visibility, Reserved }, 0, 0, 0 { Selectability }, Scope(\Code, &quot;MeterParts&quot;, TRUE)\SimpleRadialScale(6, 4, 0.1, 0.05, 1, 1, 225, 0, 0, 9, &quot;&lt;FF000000&gt;&quot;, &quot;&lt;FF000000&gt;&quot;)); GUITransform(228, 504, 439, 293, 1, 1, 1, 1, 1 { Scaling }, 0, 0 { Movement }, 1, 0 { Visibility, Reserved }, 0, 0, 0 { Selectability }, Scope(\Code, &quot;MeterParts&quot;, TRUE)\SimpleRadialScale(6, 4, 0.1, 0.05, 1, 1, 0, 135, 0, 9, &quot;&lt;FF000000&gt;&quot;, &quot;&lt;FF000000&gt;&quot;)); ] ````

I think you can do this with any of our analog gauges out of the box.

Each gauge will default to the scaling of the tag, for an Analog Status this is the, if defined, "Low Scale Value" and "High Scale Value", and if not, the "Scaled Process Data Min" and "Scaled Process Data Max" values. An Analog Input only has the latter properties.

Each instance of the widgets can also override these values by un-checking the "Use Tag Scaling" property and entering suitable values in the the "Minimum Value" and "Maximum Value" fields.

I think you can do this with any of our analog gauges out of the box. Each gauge will default to the scaling of the tag, for an Analog Status this is the, if defined, &quot;Low Scale Value&quot; and &quot;High Scale Value&quot;, and if not, the &quot;Scaled Process Data Min&quot; and &quot;Scaled Process Data Max&quot; values. An Analog Input only has the latter properties. Each instance of the widgets can also override these values by un-checking the &quot;Use Tag Scaling&quot; property and entering suitable values in the the &quot;Minimum Value&quot; and &quot;Maximum Value&quot; fields.

Software Developer with Trihedral

117
2
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft