Home

QCRTGraph CF Real-Time Graphics Tools for the - Quinn

image

Contents

1. Dials and Clocks 210 12 hour clock clockdata 0 new RTProcessVar Seconds defaultattrib clockdata 1 new RTProcessVar Minutes defaultattrib clockdata 2 new RTProcessVar Hours defaultattrib clock12Hour new RTComboProcessVar 12 Hour Clock defaultattrib clockl2Hour AddProcessVar clockdata 0 seconds clockl2Hour AddProcessVar clockdata 1 minutes clockl2Hour AddProcessVar clockdata 2 hours Clock Meter coordinates is going to be scaled from 0 12 All values must be converted to this range clockl2Hour SetDivisorItem 0 5 seconds 5 give seconds position on 0 12 scale clock12Hour SetDivisorItem 1 5 60 seconds 300 give minutes on 0 12 scale clock12Hour SetDivisorItem 2 60 60 seconds 3600 give hours on 0 12 scale clockl2Hour SetModuloItem 0 12 apply modulo 12 base clockl2Hour SetModuloItem 1 12 apply modulo 12 base clockl2Hour SetModuloItem 2 12 apply modulo 12 base private void InitializeClock ChartView chartVu this double startarcangle 90 double arcextent 360 double startarcscale 0 0 double endarcscale 12 0 bool arcdirection false double arcradius 0 80 double centerx 0 0 centery 0 0 Font meterFont font12 RTMeterCoordinates meterframe new RTMeterCoordinates startarcangle arcextent startarcscale endarcscale arcdirection centerx centery arcradius meterframe SetGraphBorderDiagonal 0 78 0
2. rtAutoMeterIndicatorl GraphFormat 0 rtAutoMeterIndicatorl InitStrings Format 0 Fahr rtAutoMeterIndicatorl LowAlarm AlarmLimitValue 50 rtAutoMeterIndicatorl HighAlarm AlarmLimitValue 233 rtAutoMeterIndicatorl MinIndicatorValue 0 rtAutoMeterIndicatorl MaxIndicatorValue 300 VB rtAutoMeterIndicatorl GraphFormat 0 rtAutoMeterIndicatorl InitStrings Format 0 Fahr rtAutoMeterIndicatorl LowAlarm AlarmLimitValue 50 rtAutoMeterIndicatorl HighAlarm AlarmLimitValue 233 rtAutoMeterIndicatorl MinIndicatorValue 0 rtAutoMeterIndicatorl MaxIndicatorValue 300 Miscellaneous Shape Drawing 347 Dial Indicator Class RTAutoDialIndicator System Windows Forms UserControl ChartView RTAutolIndicator RTAutoDialIndicator The RTAutoDialIndicator combines a RTMeterIndicator object with other objects needed to create a self contained meter display These other objects include a RTComboProcessVar variable meter coordinates system a meter axis and axis labels title string units string alarm indicators and panel meters used in the display of the meters numeric value tag name and alarm status Since it contains a RTComboProcessVar object it can divide a single input value into multiple values to drive multiple needles in the display RTAutoDialIndicator constructors Since the RTAutoDialIndicator is designed to be dropped on a form only a default constructor is used The indicator is cus
3. rtAutoMultiBarIndicatorl AlarmPanelMeter ChartObjEnable IfTest alarm ChartObj OBJECT ENABLE ChartObj OBJECT DISABLE rtAutoMultiBarIndicatorl UnitsPanelMeter ChartObjEnable IfTest units ChartObj OBJECT ENABLE ChartObj OBJECT DISABLE rtAutoMultiBarIndicatorl YAxisTitle ChartObjEnable IfTest units ChartObj OBJECT ENABLE ChartObj OBJECT DISABLE rtAutoMultiBarIndicatorl TagPanelMeter ChartObjEnable IfTest tags ChartObj OBJECT ENABLE hartObj OBJECT D SABLE Q rtAutoMultiBarIndicatorl MainTitle ChartObjEnable IfTest title ChartObj OBJECT ENABLE ChartObj OBJECT D SABLE 340 Miscellaneous Shape Drawing Meter Indicator Class RTAutoMeterIndicator System Windows Forms UserControl ChartView RTAutoIndicator RTAutoMeterIndicator The RTAutoMeterIndicator combines a RTMeterIndicator object with other objects needed to create a self contained meter display These other objects include a RTProcessVar variable meter coordinates system a meter axis and axis labels title string units string alarm indicators and panel meters used in the display of the meters numeric value tag name and alarm status Since it contains a single RTProcessVar object it displays a single channel of data RTAutoMeterIndicator constructors Since the RTAutoMeterIndicator is designed to be dropped on a form only a default constructor is used The indicator is customized using public properties Visual Basic Overloads
4. ChartObj RT TAG STRING panelmeter3 PanelMeterPosition ChartObj OUTSIDE PLOTAREA MAX panelmeter3 TextColor Color Black panelmeter3 StringTemplate TextFont fontl4 panelmeter3 AlarmIndicatorColorMode ChartObj RT INDICATOR COLOR NO ALARM CHANGE barplot AddPanelMeter panelmeter3 chartVu AddChartObject barplot VB Private Sub InitializeEnginelTempIndicator Dim chartVu As ChartView Me Dim pTransforml As New CartesianCoordinates 0 0 0 0 1 0 800 0 pTransforml SetGraphBorderDiagonal 0 3 0 16 0 92 0 33 Dim background As New Background pTransforml ChartObj PLOT BACKGROUND Color Gray chartVu AddChartObject background Dim attribl As New ChartAttribute Color DarkMagenta 1 Das Dim attrib Das Dim attrib Das Dim attrib Das hStyl hStyl hstyl e Solid Color DarkMagenta 2 As New ChartAttribute Color Aquamarine 1 e Solid Color Aquamarine 3 As New ChartAttribute Color DarkSalmon 1 e Solid Color DarkSalmon 4 As New ChartAttribute Color Yellow 1 hStyl Solid Color Yellow Dim attribArray As ChartAttribute attribl attrib2 attrib3 attrib4 Dim barwidth As Double 0 1 Dim barbase As Double 0 0 Dim barspace As Double 0 25 Multiple Channel Bar Indicator 159 Dim barjust As Integer ChartObj JUSTIFY MIN Dim barorient As Integer ChartObj VERT DIR Dim baraxis As New LinearAxis pTransforml
5. runnersPaceTrackbar Orientation Orientation Vertical runnersPaceTrackbar RTValue 3 MUST USE RTValue to set double value Dim formControlTrackBarl As New RTFormControlPanelMeter pTransforml runnersPaceTrackbar attribl formControlTrackBarl RTDataSource runnersPace formControlTrackBarl PanelMeterPosition ChartObj CUSTOM POSITION formControlTrackBarl SetLocation 0 0 0 ChartObj PHYS POS formControlTrackBarl FormControlSize New Dimension 1 0 1 0 Must be in same units as SetLocation Dim panelmeterattrib As New ChartAttribute Color SteelBlue 3 DashStyle Solid Color Black Dim panelmeterl As New RTNumericPanelMeter pTransforml1 runnersPace panelmeterattrib panelmeterl NumericTemplate TextFont trackbarfont panelmeterl NumericTemplate DecimalPos 1 panelmeterl PanelMeterPosition ChartObj RIGHT REFERENCED TEXT panelmeterl SetPositionReference formControlTrackBarl formControlTrackBarl AddPanelMeter panelmeterl 260 Buttons Track Bars and Other Form Control Classes chartVu AddChartObject formControlTrackBarl End Sub InitializeLeftPanelMeters Example for multiple RTControlTrackBar controls in an RTFormControlGrid The example below extracted from the PIDControlTuner example creates four RTControlTrackBar controls The trackbars are added to an RTFormControlGrid in order to position them as a logical group Note If an RTNumericPanelMeter template is applied to the RTControlTrackBar control
6. sess 358 Scrolling Graph Vertical RE E 372 20 Using QCRTGraph CF to Create Windows Applications 383 Visual Basic for Net Compact Framework ii 383 Visual C for Net Compact Framework sese 391 21 Frequently Asked Questions EE 403 EEN 403 1 Introduction Real Time Graphics Tools for the Net Compact Framework QCRTGraph CF requires Visual Studio 2005 2008 or higher The current version 2 0 of the QCRTGraph CF software is not compatible with Visual Studio 2003 or the Net Compact Framework 1 0 and 1 1 If it is an absolute requirement that you use Visual Studio 2003 or Net CF 1 0 or 2 0 you can contact Quinn Curtis by e mail at support quinn curtis com to see if we can supply you with the older Rev 1 6 version of the software There will be no enhancements or bug fixes to that revision of the software though Even though the VS 2005 can create projects that target older Net CF 1 0 platforms you must target platforms that can support Net CF 2 0 New Features found in the 2 0 version of QCRTGraph Additional Rev 2 0 features added to the QCRTGraph software include e Scrolling support for elapsed time coordinate systems e Vertical scrolling with auto scaling for numeric time date and elapsed time coordinate system e Acollection of Auto classes have been added to simplify the creation of bar indicators meters dials clocks panel meters and scrolling graphs e ARTPro
7. End Sub End Class Visual C for Net Compact Framework 391 First if this is the first Net Compact Framework program you have every created make a few practice application programs using the Visual Studio defaults Don t try to add graphics to an application until you are able to create a simple Net Compact Framework applications using the New Project File New Project application wizard e You start the New Project application wizard by selecting File New Project bringing up the New Project dialog box e From this dialog under Project types select Visual C Smart Device Windows Mobile 5 0 folder on the left and the Device Application template on the right The default Device Application targets a Net CF 2 0 device Do NOT target a Net 1 0 device by selecting the Device Application 1 0 since this software is not compatible with Net 1 0 and 1 1 e Assign a name to the application in the name box either the default DeviceApplication1 or your own pick ScrollApplication11 in the example below Select a location which in the cases of our examples is the folder C Quinn Curtis DotNet QCRTGraph Visual CSharp CF examples 392 QCRTGraph CF Tutorial New Project Project types Templates Visual C Windows Smart Device Pocket PC 2003 Smartphone 2003 Windows CE 5 0 Windows Mobile 5 0 Poct Visual Studio installed templates Device Application i Control Lib
8. Example for an RTBarIndicator Custom Segmented Bar Indicator The custom bar indicator example below extracted from the HomeAutomation example method InitializeCustomBarIndicator uses a segmented bar indicator to display the temperature It uses a special feature that allows the width of the each bar segment to be calculated as a function of the height This is done by subclassing the RTBarIndicator class and overriding the GetCustomBarWidth and GetCustomBarOffset methods In the CustomRTBarIndicator example below the width of the bar is calculated using a function based on the deviation of the current temperature from the temperatureSetpoint value Calculating the bar width as a function of the bar height only works with the 146 Single Channel Bar Indicator segmented bar subtypes If you want a solid bar make the RTBarIndicator SegmentWidth and RTBarIndicator SegmetSpacing values small and the same as in the example below pe A mm 70 50 C public class CustomRTBarIndicator RTBarIndicator double temperatureSetpoint 70 public CustomRTBarIndicator PhysicalCoordinates transform RTProcessVar datasource double barwidth double barbase ChartAttribute attrib int barjust int barorient base transform datasource barwidth barbase attrib barjust barorient public override double GetCustomBarOffset double v double offset 0 0 return offset public override double GetCustomBarWidth d
9. NO ASPECT RATIO CORRECTION FIXED X ASPECT RATIO CORRECTION FIXED Y ASPECT RATIO CORRECTION Sets the attributes for a chart object using a ChartObjAttributes ChartAttribute object inherited from GraphObj Get Set the corner radius of the rounded rectangle CornerRadius Sets the fill color for the chart object FillColor inherited from Get Set the shape control property genShape Use one of the generalized shape constants RT SHAPE RECTANGLE RT SHAPE ROUNDEDRECTANGLE RT SHAPE ELLIPSE gege Get Set the height of the shape rectangle Height Sets the line color for the chart object LineColor inherited from GraphObj Sets the line style for the chart object LineStyle inherited from 304 Miscellaneous Shape Drawing NUS p Sets the line width for the chart object Restricted to a LineWidth inherited from value of 1 for Net CF GraphObj Get Sets the current position type PositionType inherited from GraphObj Get Set the rectangle control the size and position of ShapeRect the object Get Set the width of the rectangle Width al Get Set the x value of the shape rectangle X PEE Get Set the y value of the shape rectangle Y Sets the z order of the object in the chart Every object ZOrder inherited from has a z order value Each z order value does NOT GraphObj have to be unique If z order sorting is turned on in the ChartView object objects are sorted by z order before they are dr
10. panelmeter NumericTemplate PostfixString _ 160 Multiple Channel Bar Indicator Chew tLe c panelmeter AlarmIndicatorColorMode _ ChartObj RT TEXT BACKGROUND COLOR CHANGE ON ALARM barplot AddPanelMeter panelmeter Dim panelmeter2 As New RTAlarmPanelMeter pTransforml panelmeterattrib panelmeter2 PanelMeterPosition ChartObj BELOW REFERENCED TEXT panelmeter2 TextColor brightGreen panelmeter2 AlarmTemplate TextFont font12 panelmeter2 SetPositionReference panelmeter panelmeter2 AlarmIndicatorColorMode ChartObj RT TEXT BACKGROUND COLOR CHANGE ON ALARM barplot AddPanelMeter panelmeter2 Dim panelmeter3 As New RTStringPanelMeter pTransforml _ paneltagmeterattrib ChartObj RT TAG STRING panelmeter3 PanelMeterPosition ChartObj OUTSIDE PLOTAREA MAX panelmeter3 TextColor Color Black panelmeter3 StringTemplate TextFont font14 panelmeter3 AlarmIndicatorColorMode ChartObj RT INDICATOR COLOR NO ALARM CHANGE barplot AddPanelMeter panelmeter3 chartVu AddChartObject barplot End Sub InitializeEnginelTempIndicator Example for an RTMultiBarIndicator Custom Segmented Bar Indicator The custom bar indicator example below is extracted from the RTGraphNetDemo example file DynCustomBarsControll method InitializeBar3 It uses a special feature that allows the width of the each bar segment to be calculated as a function of the height This is done by subclassing the RTBarIndicator and RTMultiB
11. panelmeter2 PanelMeterPosition ChartObj INSIDE BARBASE panelmeter2 AlarmTemplate TextFont Forml font10 panelmeter2 SetPositionReference panelmeter annunciator AddPanelMeter panelmeter2 ChartAttribute panelmetertagattrib new ChartAttribute Color SteelBlue 1 DashStyle Solid Color White RTStringPanelMeter panelmeter3 new RTStringPanelMeter pTransforml processVarl panelmetertagattrib ChartObj RT TAG STRING panelmeter3 SetPositionReference panelmeter panelmeter3 PanelMeterPosition ChartObj INSIDE BAR panelmeter3 TextColor Color Black annunciator AddPanelMeter panelmeter3 chartVu AddChartObject annunciator VB Private Sub InitializeAnnunciatorl Dim chartVu As ChartView Me Dim pTransforml As New CartesianCoordinates 0 0 0 0 1 0 1 0 pTransforml SetGraphBorderDiagonal 0 01 0 05 0 15 0 35 Dim background As New Background pTransforml ChartObj PLOT BACKGROUND Color Gray 220 Single and Multiple Channel Annunciators chartVu AddChartObject background Dim annunrect As New Rectangle2D 0 05 0 05 0 9 0 9 Dim attribl As New ChartAttribute Color DarkGray 1 DashStyle Solid Color DarkGray Dim annunciator As New RTAnnunciator pTransforml processVarl annunrect attribl Dim panelmeterattrib As New ChartAttribute Color SteelBlue 1 DashStyle Solid Color Black Dim panelmeter As New RTNumericPanelMeter pTransforml processVar2 panelmeterattrib panelmeter PanelMeterP
12. 100 RTFormControlPanelMeter timeAxisControlPanelTrackBar RTFormControlPanelMeter pTransform2 timeAxisControlTrackbar tbattrib timeAxisControlPanelTrackBar PanelMeterPosition ChartObj CUSTOM POSITION timeAxisControlPanelTrackBar SetLocation 0 0 0 timeAxisControlPanelTrackBar FormControlSize new Dimension 1 0 1 0 chartVu AddChartObject timeAxisControlPanelTrackBar VB Private timeAxisControlTrackbar As RTControlTrackBar 264 Buttons Track Bars and Other Form Control Classes Public Sub InitializeTimeAxisTrackbar Dim attribl As New ChartAttribute Color White 3 DashStyle Solid Color Coral Dim chartVu As ChartView Me Dim pTransform2 As New CartesianCoordinates 0 0 0 0 1 0 1 0 pTransform2 SetGraphBorderDiagonal 0 7 0 93 0 98 0 99 Dim tbattrib As New ChartAttribute Color LightBlue 7 DashStyle Solid Color LightBlue Dim starttime As Double origStartTime GetCalendarMsecs Dim endtime As Double origEndTime GetCalendarMsecs Dim range As Double endtime starttime timeAxisControlTrackbar New RTControlTrackBar 0 100 10 1 10 timeAxisControlTrackbar Orientation Orientation Horizontal AddHandler timeAxisControlTrackbar Click AddressOf Me timeAxisControlTrackbar Click timeAxisControlTrackbar RTValue 100 MUST USE RTValue to set double value Dim timeAxisControlPanelTrackBar As New RTFormControlPanelMeter pTransform2 timeAxisControlTrackbar tbattrib timeAxisControlPanelTr
13. 1200 1000 om wows 10103 Minute Minate rrr rrr 000 008 om om 020 CH Minata5 Second 00000 00100 00200 10103 45 Minute Misute 4 000 935 030 va 100 10103 Minule Seeche TE 04000 00100 00200 00300 00400 10103 5 SecondBecond 00000 00008 om 00014 00020 10103 There ara mora than 40 aterert tradite anne fos sogronrista for sowas ranging from 1 second to 100 yass TimeAxis 0 00 00 ElapsedTimeAxis QCChart2D CF Class Summary 61 Time Date Axes with Custom Hour Range 8 30 AM to 4 00 PM 8 00 00 16 00 00 1D 0 00 00 This class is the most complex of the axis classes It supports time scales ranging from 1 millisecond to hundreds of years Dates and times are specified using the ChartCalendar class The major and minor tick marks can fall on any time base where a time base represents seconds minutes hours days weeks months or years The scale can exclude weekends for example Friday October 20 2000 is immediately followed by Monday October 23 2000 A day can also have a custom range for example a range of 9 30 AM to 4 00 PM The chart time axis excludes time outside of this range This makes the class very useful for the inter day display of financial market information stock bonds commodities options etc across several days months or years Time The elapsed time axis is very similar to the linear axis and is subclassed from that class The main
14. 6 COPYRIGHT The SOFTWARE is protected by United States copyright law and international treaty provisions You acknowledge that no title to the intellectual property in the SOFTWARE is transferred to you You further acknowledge that title and full ownership rights to the SOFTWARE will remain the exclusive property of Quinn Curtis Inc and you will not acquire any rights to the SOFTWARE except as expressly set forth in this license You agree that any copies of the SOFTWARE will contain the same proprietary notices which appear on and in the SOFTWARE 7 EXPORT RESTRICTIONS You agree that you will not export or re export the SOFTWARE to any country person entity or end user subject to U S A export restrictions Restricted countries currently include but are not necessarily limited to Cuba Iran Iraq Libya North Korea Sudan and Syria You warrant and represent that neither the U S A Bureau of Export Administration nor any other federal agency has suspended revoked or denied your export privileges 8 NO WARRANTIES Quinn Curtis Inc expressly disclaims any warranty for the SOFTWARE THE SOFTWARE AND ANY RELATED DOCUMENTATION IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS OR IMPLIED INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OR MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT THE ENTIRE RISK ARISING OUT OF USE OR PERFORMANCE OF THE SOFTWARE REMAINS WITH YOU 9 LIMITATION OF LIABILITY
15. Com quinncurtis chart2dnet ChartPlot RTPlot RTMultiValueIndicator RTVerticalScrollFrame The RTVerticalScrollFrame is basically the same as the original RTScrollFrame except it controls scrolling along the vertical axis When you use a vertical scroll frame typically you would have the y scale setup as an elapsed time or time date based scale It can also be setup as a numeric base scale Otherwise it works much the same as the RTScrollFrame RTVerticalScrollFrame constructors Visual Basic Overloads Public Sub New _ ByVal component As ChartView _ ByVal processvar As RTProcessVar _ ByVal initialscale As PhysicalCoordinates ByVal scrollymode As Integer _ ByVal autoscalexmode As Integer _ Overloads Public Sub New _ ByVal component As ChartView _ ByVal processvar As RTProcessVar _ ByVal initialscale As PhysicalCoordinates ByVal scrollymode As Integer _ Overloads Public Sub New _ ByVal component As ChartView _ ByVal initialscale As PhysicalCoordinates ByVal scrollymode As Integer _ ByVal autoscalexmode As Integer _ Ct public RTVerticalScrollFrame ChartView component RTProcessVar processvar 234 The Scroll Frame and Single Channel Scrolling Plots PhysicalCoordinates initialscale int scrollymode int autoscalexmode public RTVerticalScrollFrame ChartView component RTProcessVar processvar PhysicalCoordinates initialscale int scrollmode public RTVerticalScrollFrame
16. Date Time scale DateTime starttime DateTime Now DateTime endtime DateTime Now endtime endtime AddSeconds 10 rtAutoScrollGraphl InitRTAutoScrollGraph starttime 0 endtime 15 rtAutoScrollGraphl InitSimpleRTPlotObject ChartObj LINE PLOT Color Blue Channel 1 rtAutoScrollGraphl InitSimpleRTPlotObject ChartObj LINE PLOT Miscellaneous Shape Drawing 369 Color Green Channel 42 rtAutoScrollGraphl InitSimpleRTPlotObject ChartObj SCATTER PLOT Color Red Channel 3 rtAutoScrollGraphl SimplePlotObj SymbolAttributes SymbolSize 8 rtAutoScrollGraphl GraphScrollFrame ScrollRescaleMargin 0 01 rtAutoScrollGraphl GraphScrollFrame ScrollScaleModeY ChartObj RT AUTOSCALE Y MINMAX rtAutoScrollGraphl InitStrings RTAutoScrollGraph Time Quarks rtAutoScrollGraphl GraphBackground FillColor Color BlanchedAlmond rtAutoScrollGraphl SubHead TextString Subhead Text rtAutoScrollGraphl SubHead ChartObjEnable ChartObj OBJECT ENABLE rtAutoScrollGraphl Footer TextString Footer text rtAutoScrollGraphl Footer ChartObjEnable ChartObj OBJECT ENABLE rtAutoScrollGraphl YAxisLab2 ChartObjEnable ChartObj OBJECT ENABLE BOTTOM HORIZONTAL GRAPH Elapsed Time scale TimeSpan startts TimeSpan FromSeconds 0 TimeSpan endts TimeSpan FromSeconds 30 rtAutoScrollGraph2 InitRTAutoScrollGraph startts 0 endts 15 rtAutoScrollGraph2 InitSimpleRTPlotObject ChartObj LINE PLOT Color Blu
17. Example for initializing RTAutoMultiBarIndicator objects The example below extracted from the AutoGraphDemos AutoMultiBarIndicators example draws four vertical and four horizontal bargraphs 338 Miscellaneous Shape Drawing Flow 493 Flow 493 100 pee 80 1 B UN B B 60 GMB Below you will find the code used to initialize the first of the bargraphs above extracted from the AutoGraphDemo AutoMultiBarIndicators C void InitializeBargraphs bool barbulb bool interioraxis bool numeric bool alarm bool units bool tags bool title rtAutoMultiBarIndicatorl InitMultiBarIndicator ChartObj VERT DIR 1 Color OrangeRed 4 rtAutoMultiBarIndicatorl MultiBarPlot BarWidth 0 1 rtAutoMultiBarIndicatorl InitColors barcolors rtAutoMultiBarIndicatorl InitStrings Flow 493 GMB bartags rtAutoMultiBarIndicatorl LowAlarm AlarmLimitValue 23 rtAutoMultiBarIndicatorl HighAlarm AlarmLimitValue 78 rtAutoMultiBarIndicatorl SetpointAlarm AlarmLimitValue 53 rtAutoMultiBarIndicatorl GraphBackground ChartObjAttributes new ChartAttribute Color LightBlue 5 DashStyle Solid Color LightBlue rtAutoMultiBarIndicatorl FaceplateBackground true rtAutoMultiBarIndicatorl BarEndBulb barbulb rtAutoMultiBarIndicatorl InteriorAxis interioraxis rtAutoMultiBarIndicatorl NumericPanelMeter ChartObjEnable numeric ChartObj OBJECT ENABLE ChartObj OBJECT DISABLE rtAutoMultiBarIndicatorl Al
18. Get the GroupVersaPlot plot object Gets or sets the height of the control Inherited from Control Get the most recent high RTAlarm object Inherited from RTAutolIndicator Gets or sets the coordinates of the upper left corner of the control relative to the upper left corner of its container Inherited from Control Get the most recent low RTAlarm object Inherited from RTAutoIndicator Get Set the tag string Inherited from RTAutoIndicator The maximum value for the indicator Inherited from RTAutoIndicator Gets or sets the size that is the lower limit that GetPreferredSize Size can specify Inherited from Control The minimum value for the indicator Inherited from RTAutoIndicator Get a reference to the RTNumericPanelMeter object Inherited from RTAutoIndicator Get an RTProcessVar object in the Inherited from RTAutoIndicator Get the plot background object Inherited from RTAutoIndicator 366 Miscellaneous Shape Drawing PlotObjectList PreferredSize ProcessVariable ProcessVariableArray ResetOnDraw ResizeMode SetpointAlarm SimplePlotObj Single ValuePlot Single ValuePlotList Size SmoothingMode SubHead Tag TagPanelMeter TagString Text TextRenderingHint UnitsPanelMeter UnitsString Visible Width Get plot object list Inherited from ChartView Get most recently created RTProcessVar Inherited from RTAuto
19. TagName TimeStamp Uniqueldentifier UnitsString Public Instance Events AlarmStateEventHandler Process Variable and Alarm Classes 97 Get Set the flag for the alarm state event enable Set to true to enable alarm checking Get Set the flag for the AlarmTransitionEventHandler delegate enable Set to true to enable the AlarmTransitionEventHandler delegate Get the process variable current value Get Set to true to enable historical data collection in the process variable dataset Get Set the default attributes for the process variable Get Set maximum allowable display value for the process variable Get Set minimum allowable display value for the process variable Get Set the process variable detailed description string Get Set set to false designates that the current value is a bad value Get Set maximum allowable value for the process variable Get Set minimum allowable value for the process variable Get the process variable previous current value Get the process variable previous time stamp value Get Set the process variable dataset Get Set the process variable short description string Get Set the process variable tag string Get the process variable time stamp value Get Set the process variable unique identifier string Get Set the process variable units string Delegate for notification each time the check of a process variable produces an 98 Process Variable and Alarm Classes alarm
20. meter indicators which includes meter Class Architecture 25 needles meter arcs and meter symbol indicators single channel annunciator indicators panel meter indicators and scrolling graph plots based on a QCChart2D CF SimplePlot chart object These objects can be positioned in a chart using one of the many chart coordinate systems available for positioning including physical coordinates PHYS POS device coordinates DEV POS plot normalized coordinates NORM PLOT POS and graph normalized coordinates NORM GRAPH POS 26 Class Architecture An annunciator can contain any combination string numeric and alarm panel meters The background color of the annunciator can change in response to an alarm event RTAnnunciator An RTAnnunciator is used to display the current values and alarm states of a single channel real time data It consists of a rectangular cell that can contain the tag name units current value and alarm status message Any of these items may be excluded If a channel is in alarm the background of the corresponding cell changes its color giving a strong visual indication that an alarm has occurred b dmm 60 m 40 m 4 20 40 JE GC g 0 204 0 3i 100 SS E n EH 0 0 20 40 60 80 100 Clockwise from top Solid bar indicator segmented bar indicator custom segmented bar indicator horizontal solid bar indicator and pointer indicator Only the green bars represent the bars and pointer represent t
21. rrr SetChartObjAttributes backattrib2 rrr ZOrder 60 rrr SetChartObjClipping ChartObj NO CLIPPING chartVu AddChartObject rrr General Shapes Class RTGenShape Com quinncurtis chart2dnetcf GraphObj RTGenShape This class is used to draw filled and unfilled rectangles rectangles with rounded corners general ellipses and aspect ratio corrected circles These shapes can be used by the programmer to add visual enhancements to graphs RTGenShape constructors Visual Basic Overloads Public Sub New ByVal transform As PhysicalCoordinates ByVal rect As BRectangle2D _ ByVal corner As Double _ ByVal shape As Integer _ ByVal postype As Integer _ Ct public RTGenShape PhysicalCoordinates transform Rectangle2D rect double corner int shape int postype Miscellaneous Shape Drawing 303 Parameters transform The coordinate system for the new RTGenShape object rect The source rectangle corner The corner radius of the rounded rectangle shape The shape of the RTGenShape object Use one of the generalized shape constants RT SHAPE RECTANGLE RT SHAPE ROUNDEDRECTANGLE RT SHAPE ELLIPSE postype Specifies what coordinate system the coordinates reference Use one of the position type constants DEV POS PHYS POS POLAR POS NORM GRAPH POS NORM PLOT POS Selected Public Instance Properties Get Set the aspect ratio correction mode for the AspectRatioCorrection RT SHAPE ELLIPSE shape
22. 0 97 0 3 ChartAttribute frameattrib new ChartAttribute Seconds Color Black 1 DashStyle Solid Color Blue 211 Dials and Clocks ChartAttribute needleattribl new ChartAttribute Color Black 1 DashStyle Solid Color Blue RTMeterNeedleIndicator meterneedlel new RTMeterNeedleIndicator meterframe clockdata 0 meterneedlel NeedleBaseWidth 1 meterneedlel SetChartObjAttributes needleattribl meterneedlel NeedleLength 0 5 chartVu AddChartObject meterneedlel Minutes ChartAttribute needleattrib2 new ChartAttribute Color Black 1 DashStyle Solid Color Blue RTMeterNeedleIndicator meterneedle2 new RTMeterNeedleIndicator meterframe clockdata 1 meterneedle2 NeedleBaseWidth 3 meterneedle2 SetChartObjAttributes needleattrib2 meterneedle2 NeedleLength 0 45 chartVu AddChartObject meterneedle2 Hours ChartAttribute needleattrib3 new ChartAttribute Color Black 1 DashStyle Solid Color Blue RTMeterNeedleIndicator meterneedle3 new RTMeterNeedleIndicator meterframe clockdata 2 meterneedle3 NeedleBaseWidth 5 meterneedle3 SetChartObjAttributes needleattrib3 meterneedle3 NeedleLength 0 3 chartVu AddChartObject meterneedle3 VB Private clockdata 2 As RTProcessVar Private clockl2Hour As RTComboProcessVar 12 hour clock clockdata 0 New RTProcessVar Seconds defaultattrib clockdata 1 New RTProcessVar Minutes defaultattrib clockdata 2
23. 120 121 122 123 124 125 126 127 129 130 131 132 133 134 135 136 137 138 139 142 143 144 145 146 147 149 150 151 152 153 156 157 158 159 161 162 164 175 177 178 180 181 182 185 186 189 192 194 196 197 198 201 202 208 210 211 212 213 214 215 216 217 219 220 221 222 223 224 225 226 227 241 245 246 249 251 252 254 255 258 259 261 263 264 265 266 268 269 295 296 301 302 303 304 305 327 328 333 338 339 ChartCalendar 53 56 61 86 89 90 95 96 245 292 354 355 359 360 362 370 371 372 373 374 375 379 380 ChartImage 87 ChartLabel 86 262 ChartObj 18 19 37 47 94 99 102 103 105 106 107 115 117 118 119 122 123 125 126 129 132 134 135 136 142 143 144 145 147 149 150 156 157 158 159 160 162 164 165 177 178 179 182 183 184 186 187 194 195 196 197 201 202 204 205 214 215 218 219 220 223 224 225 226 227 236 238 239 240 243 244 245 246 249 250 252 253 258 259 263 264 268 269 282 284 285 286 288 289 290 291 292 293 297 298 299 301 302 304 305 313 318 327 328 329 330 338 339 368 369 370 371 379 380 ChartPlot 14 18 21 24 30 39 65 66 110 115 120 123 127 130 132 137 138 139 140 141 151 152 153 154 155 189 191 198 202 217 220 229 233 237 241 ChartScale 53 54 55 ChartShape 87 ChartSymbol 87 Char
24. 21 22 24 27 29 37 48 49 93 109 110 111 115 116 120 123 127 130 132 133 151 169 189 218 261 262 295 Physical coordinates 53 54 55 57 58 115 116 120 123 124 127 130 133 137 139 146 147 151 153 161 163 189 217 221 230 233 234 237 242 261 264 265 266 282 283 287 295 299 300 302 307 308 PhysicalCoordinates 53 54 55 57 58 115 116 120 123 124 127 130 133 137 139 146 147 151 153 161 163 189 217 221 230 233 234 237 242 261 264 265 266 282 283 287 295 299 300 302 307 308 PID Control 18 47 49 274 277 278 279 Pie charts 65 80 PieChart 65 80 Plot object classes 14 18 21 24 30 39 65 66 110 115 120 123 127 130 132 137 138 139 140 141 151 152 153 154 155 189 191 198 202 217 220 229 233 237 241 Point3D 89 90 Polar axes 57 62 65 85 Polar axis labels 63 65 Polar coordinates 18 35 54 55 169 Polar grids 85 Polar line plots 77 78 Polar plot classes 65 77 78 Polar scatter plots 77 78 PolarAxes 57 62 65 85 PolarAxesLabels 63 65 PolarCoordinates 18 35 54 55 169 PolarGrid 85 PolarLinePlot 77 78 PolarPlot 65 77 78 PolarScatterPlot 77 78 Polysurface 90 Polysurface class 90 Rectangle2D 90 91 182 183 217 219 220 295 296 297 298 299 300 302 304 305 307 308 311 312 RingChart 1 80 RT3DFrame 18 47 48 182 183 295 2
25. 23 30 109 123 124 125 126 129 135 136 141 143 145 155 158 160 219 220 223 224 225 227 StringAxisLabels 19 35 63 64 184 185 StringLabel 23 86 111 120 123 Symbols 87 Text classes 48 49 85 86 180 181 Tick mark class 89 90 TickMark 89 90 Time auto scaling 56 Time axis 58 61 65 85 Time axis labels 64 65 Time coordinates 2 3 54 55 284 288 Time labels 24 86 127 128 Time Panel Meters 18 21 24 30 109 127 128 129 130 Time scale 53 54 Time Date group datsets 18 20 21 52 53 56 93 96 98 99 100 101 102 103 104 105 106 107 320 321 332 333 341 342 348 349 355 356 364 365 366 Time Date simple datasets 52 53 56 208 TimeAutoScale 56 TimeAxis 58 61 65 85 TimeAxisLabels 64 65 TimeCoordinates 2 3 54 55 284 288 TimeGroupDataset 18 20 21 52 53 56 93 96 98 99 100 101 102 103 104 105 106 107 320 321 332 333 341 342 348 349 355 356 364 365 366 TimeLabel 24 86 127 128 TimeScale 53 54 TimeSimpleDataset 52 53 56 208 ToolTips 87 88 User coordinates 54 UserControl 5 7 15 19 20 42 51 52 307 317 329 340 347 353 358 366 372 383 385 389 392 397 UserCoordinates 54 Vertical Scrolling 3 18 39 41 229 233 234 236 Visual Basic vi 9 11 94 95 96 99 100 104 115 120 123 127 130 133 137 151 169 174 179 184 192 198 202 208 217 221 23
26. 3 Miscellaneous Shape Drawing 319 colr The color of the bar The InitStrings method initialized the tag and units strings Method InitStrings VB Public Sub InitStrings _ title As String _ units As String Cit public void InitStrings string title String units Use the UpdateIndicator method to update the bar indicator with new data Method UpdateIndicator VB Public Sub UpdateIndicator _ value As Double _ updatedraw As Boolean Cit public void UpdateIndicator double value bool updatedraw Parameters value 320 Miscellaneous Shape Drawing Update the indicator channel with this value updatedraw True and the indicator is immediately updated Selected Public Instance Properties Name AlarmIndicator AlarmPanelMeter BarAttributes BarDataValue BarEndBulb BarFillColor BarLineWidth BarOrientation BarPlot BarWidth BarWidthPixels CoordinateSystem FaceplateBackground GraphBackground GraphBorder GraphFormat Height HighAlarm InteriorAxis LowAlarm Description Get a reference to the RTAlarmIndicator object Get a reference to the RTAlarmPanelMeter object Inherited from RTAutoIndicator Sets the line color for the chart object Get the numeric label template object used to place numeric values on the bars Set Get to true for a bar end bulb Sets the fill color for the chart object Sets the line width for the chart object Get Set the orientation
27. ChartObj ABOVE REFERENCED TEXT 130 Panel Meter Classes panelmeter3 SetPositionReference panelmeter panelmeter3 TextColor Color Black chartVu AddChartObject panelmeter3 Class RTElapsedTimePanelMeter Com quinncurtis chart2dnet ChartPlot RTPlot RTSingleValueIndicator RTPanelMeter RTElapsedTimePanelMeter The RTElapsedTimePanelMeter class displays the elapsed time value of the time stamp of the associated RTProcessVar object interpreting the numeric value of the time stamp in milliseconds It contains a template based on the QCChart2D ElapsedTimeLabel class that is used to specify the font and time date format information associated with the panel meter RTTimePanelMeter constructors Visual Basic Overloads Public Sub New ByVal transform As PhysicalCoordinates ByVal datasource As RTProcessVar _ ByVal attrib As ChartAttribute Overloads Public Sub New ByVal transform As PhysicalCoordinates ByVal attrib As ChartAttribute Ct public RTElapsedTimePanelMeter PhysicalCoordinates transform RIProcessVar datasource ChartAttribute attrib public RTElapsedTimePanelMeter PhysicalCoordinates transform ChartAttribute attrib Parameters transform The coordinate system for the new RTTimePanelMeter object datasource The process variable associated with the panel meter attrib Panel Meter Classes 131 The color attributes of the panel meter indicator Selected Public Instance
28. Color Black controlgrid HeadersTemplate TextFont font14Bold chartVu AddChartObject controlgrid VB Private rangeSelectorButtons As New ArrayList numColumns Buttons Track Bars and Other Form Control Classes 269 Public Sub InitializeRangeSelectorButtons Dim selectorStrings As String gt 10 100 IK IOK I0 100 IK TIOR Ida Lou TIm TIOSU VO IU IT IT 100 FOI SIP IO 100 el TIVI ide TL00 Tosi CIV le 100 Dim rowStrings As String Frequency Ohms Capacitance DC Volts AC Volts DC Amps AC Amps Dim colStrings As Stelaglt e U Tm wm a Dim rtbutton As RTControlButton Dim chartVu As ChartView Me Dim buttonfont As Font font12Bold Dim pTransforml As New CartesianCoordinates 0 0 0 0 1 0 1 0 pTransforml SetGraphBorderDiagonal 0 25 0 68 0 95 0 97 Dim attribl As New ChartAttribute Color White 3 DashStyle Solid Color SandyBrown Dim i As Integer For i 0 To selectorStrings Length 1 rtbutton New RTControlButton ChartObj RT CONTROL RADIOBUTTON SUBTYPE rtbutton ButtonUncheckedText selectorStrings i If i currentRangeSelectorIndex Then rtbutton ButtonChecked True Else rtbutton ButtonChecked False End If AddHandler rtbutton Click AddressOf Me selector button Click rtbutton ButtonFont buttonfont rangeSelectorButtons Add rtbutton Next i Dim numColumns As Integer 4 Dim numRows As In
29. Find all Scroll pplicstion3 Subfolders Find Results 1 Entire Solution C Quinn Curtis DotNet QCRTGraph Visual Basic CF examples 2005 ScrollApplication3 ScrollApplication3 My Project Asser C Quinn Curtis DotNet QCRTGraph Visual Basic CF examples 2005 ScrollApplication3 ScrollApplication3 My Project Assex ForeColor Bl controttext c tis DotN QC pk x F 5 ScrollApplication3 ion3 My Project Resor GenerateMembe True Font Tahoma 9pt Quinn C aTGraph Visual Basic CF examples 200 ScrollApplication3 Matching lines 3 Matching files 2 Total files searched 7 Location 4 4 Name Indicates the name used in code to per List El Find Results i identify the object Ready B i 235 x 263 e When you add a ChartView control to a Form it adds a reference to the DLL QCChart2DNetCF DLL that the control is in to the project and places the default instantiation code in the form s Form Designer vb module Starting with 386 QCRTGraph CF Tutorial Imports Imports Imports Imports VS 2005 Microsoft has decided to physically separate the designer generated code in a Form Designer module while keeping your user written code in a Form vb module If you can t see the Form Designer vb file in the Solution Explorer you must click in the Show All Files icon at the top of the Solution Explorer and expand the Form vb entry by clicking on the sign in front Form vb Add a reference to the QCRTGraphNetCF DLL to
30. Graphs can have an UNLIMITED number of x and y axes Axis This class 1s the abstract base class for the other axis classes It contains data and drawing routines common to all axis classes QCChart2D CF Class Summary 59 Linear Axes 100 0 00004 50 0 00002 0 0 00000 sog 991 0 02 003 0 04 005 0 00002 0 00004 100 0 4 0 2 0 0 0 2 0 4 EA Is CL Et Te ET 0 10000 20000 30000 40000 10 80 80 2800 15 29 3 40 40 2400 25 0 0 2000 0 20 40 60 80 100 0 5 10 15 The positioning of axes is very flexible Axes can have an inverted scale LinearAxis This class implements a linear axis with major and minor tick marks placed at equally spaced intervals Logarithmic Axes 1000 50000 100 400 5000 Linear X Log X Log X 10 Log Y 200 Linear Y 500 Log Y 1 0 50 0 1 0 5 0 20 40 60 80 100 0 02 0 2 2 20 200 1 10 100 1000 40 Log X 20 Linear Y 0 Q2 0406 1 gt 4 6 10 p 40 60 100 499 400600 1000 100 Time X 10 Log Y 8 01 02 9 01 02 10 01 02 Logarithmic axes can be combined with linear logarithmic and time axes 60 QCChart2D CF Class Summary LogAxis This class implements a logarithmic axis with major tick marks placed on logarithmic intervals for example 1 10 100 or 30 300 3000 The minor tick marks are placed within the major tick marks using linear intervals for example 2 3 4 5 6 7 8 9 20 30 40 50 90 An important feature of the LogAxis class is that the major and minor tick marks do not have to
31. It includes advanced features for anti reset windup error term smoothing error term reset and rate limiting of control outputs This class is used by the RTAlarmIndicator class to draw the alarm indicator symbols This adds a 3D border to the standard QCChart2D CF ChartText text object and recalculates justification parameters to take into account the thickness of the border It is used by the RTPanelMeter classes to display text 50 Class Architecture 3 QCChart2D CF for Net Class Summary This chapter is a summary of the information in the QCChart2DNetCFManual PDF file It is not meant to replace that information Refer to that manual for detailed information concerning these classes The following categories of classes form the core of the QCChart2D CF software Chart view class Data classes Scale transform classes The chart view class is a UserControl subclass that manages the graph objects placed in the graph There are data classes for simple xy and group data types There are also data classes that handle System DateTime date time data and contour data The scale transform classes handle the conversion of physical coordinate values to working coordinate values for a single dimension Coordinate transform classes The coordinate transform classes handle the conversion Attribute class Auto Scale classes Charting object classes Mouse interaction classes File and printer rendering of physical coordin
32. MultiMouseListener QCChart2D CF Class Summary 89 released The rectangle established by mouse start and stop points defines the new zoomed scale of the associated axes Zooming has many different modes Some of the combinations are One x or one y axis One x and one y axes One x and multiple y axes One y and multiple x axes Multiple x and y axes This class implements mouse controlled magnification for one or more simultaneous axes This class implements a chart magnify class based on the MouseListener class It uses two charts the source chart and the target chart The source chart displays the chart in its unmagnified state The target chart displays the chart in the magnified state The mouse positions a MagniView rectangle within the source chart and the target chart is re scaled and redrawn to match the extents of the MagniView rectangle from the source chart This class extends the MouseListener class and it can move the coordinate system of the underlying chart analogous to moving chaging the coordinates of an internet map by grabbing it with the mouse and dragging it This class is used by the ChartView class to support multiple mouse listeners at the same time Miscellaneous Utility Classes ChartCalendar CSV Dimension Point2D GroupPoint2D DoubleArray DoubleArray2D BoolArray Point3D NearestPointData TickMark 90 QCChart2D CF Class Summary Polysurface Rectangle2D ChartCalendar CSV Dim
33. NeedleMeterControll method InitializeMeter2 draws a large rectangle with rounded corners as the frame of the meter and a smaller filled rectangle at the bottom C RTRoundedRectangle2D rr new RTRoundedRectangle2D meterframel 0 25 0 01 0 45 0 46 0 01 ChartObj NORM GRAPH POS ChartAttribute backattrib new ChartAttribute Color Black 1 DashStyle Solid Color White rr SetChartObjAttributes backattrib rr SetChartObjClipping ChartObj NO CLIPPING chartVu AddChartObject rr RTRoundedRectangle2D rrr new RTRoundedRectangle2D meterframel 0 25 0 38 0 45 0 09 0 0 ChartObj NORM GRAPH POS ChartAttribute backattrib2 new ChartAttribute Color Black 1 DashStyle Solid Color Black rrr SetChartObjAttributes backattrib2 rrr ZOrder 60 make it be drawn after needle hiding needle pivot point rrr SetChartObjClipping ChartObj NO CLIPPING 302 Miscellaneous Shape Drawing chartVu AddChartObject rrr VB Dim rr As New RTRoundedRectangle2D meterframel 0 25 0 01 0 45 0 46 0 01 _ ChartObj NORM GRAPH POS Dim backattrib As New ChartAttribute Color Black 1 DashStyle Solid Color White rr SetChartObjAttributes backattrib rr SetChartObjClipping ChartObj NO CLIPPING chartVu AddChartObject rr Dim rrr As New RTRoundedRectangle2D meterframel 0 25 0 38 0 45 0 09 0 0 _ ChartObj NORM GRAPH POS Dim backattrib2 As New ChartAttribute Color Black 1 DashStyle Solid _ Color Bl ck
34. RT METER SINGLE SEGMENT ARC SUBTYPE RT METER SYMBOL ARC SUBTYPE RT METER SINGLE SYMBOL SUBTYPE Sets the line color for the chart object Sets the line style for the chart object Sets the line width for the chart object Only line widths of 1 are supported by Net CF Get Set the reference meter axis Get the number of channels in the indicator Get Set the displayable high end of the indicator range as a normalized value based on the RTMeterCoordinates and RTMeterAxis scale For example if the RTMeterAxis scale is 0 to 10 an overRangeNormalizedValue of 0 1 will allow the indicator to display off scale up to 11 0 Set Get the panel meter list of the RTPlot object Set Get the primary channel of the indicator 191 Meter Indicators Needle Arc and Symbol inherited from RTPlot Get Set the array list holding the RTProcessVar RTDataSource inherited variables for the indicator from RTSingleValueIndicator Get Set the displayable low end of the indicator range as a normalized value based on the RTMeterCoordinates UnderRangeNormalizedValue and RTMeterAxis scale For example if the RTMeterAxis scale is 0 to 10 an underRangeNormalizedValue of 0 1 will allow the indicator to display off scale down to 1 Sets the z order of the object in the chart Every object ZOrder inherited from has a z order value Each z order value does NOT have GraphObj to be unique If z order sorting is turned on in the ChartView o
35. ResetButton ClearButton ButtonUncheckedText Clear ClearButton ButtonChecked False AddHandler ClearButton Click AddressOf Me selector Button Click ClearButton ButtonFont buttonfont buttonlistl Add ClearButton Dim numColumns As Integer 1 Dim numRows As Integer 4 startStopControlGrid New RTFormControlGrid pTransforml Nothing buttonlistl numColumns numRows attribl Buttons Track Bars and Other Form Control Classes 255 startStopControlGrid CellRowMargin 0 1 startStopControlGrid CellColumnMargin 0 0 startStopControlGrid FormControlTemplate Frame3DEnable flag3DBorder chartVu AddChartObject startStopControlGrid Dim buttonlist2 As New ArrayList Dim attrib2 As New ChartAttribute Color Black 5 DashStyle Solid Color LightGreen Dim pTransform2 As New CartesianCoordinates 0 0 0 0 1 0 1 0 pTransform2 SetGraphBorderDiagonal 0 21 0 65 0 4 0 98 PrimaryLineButton ButtonUncheckedText Primary Line PrimaryLineButton ButtonChecked False AddHandler PrimaryLineButton Click AddressOf Me selector Button Click PrimaryLineButton ButtonFont buttonfont buttonlist2 Add PrimaryLineButton SecondaryLineButton ButtonUncheckedText Secondary Line SecondaryLineButton ButtonChecked False AddHandler SecondaryLineButton Click AddressOf Me selector Button Click SecondaryLineButton ButtonFont buttonfont buttonlist2 Add SecondaryLineButton Concurrent ButtonUncheckedText Concurrent Concurr
36. Return offset End Function GetCustomBarOffset Public Overrides Function GetCustomBarWidth ByVal v As Double As Double Calculate width as fraction of initial bar width Dim width As Double 1 0 Bar widest at setpoint narrowest at endpoints Clamp width to 0 05 to 1 0 range width Math Max 0 05 Me BarWidth Math Abs 0 04 v TemperatureSetpoint width Math Min 1 0 width Return width End Function GetCustomBarWidth lt summary gt Set Get local setpoint lt summary gt Public Property TemperatureSetpoint As Double Get Return temperatureSetpointD End Get Set ByVal Value As Double temperatureSetpointD Value End Set End Property End Class CustomRTBarIndicator Public Sub InitializeCustomBarIndicator barplot New CustomRTBarIndicator pTransforml currentTemperaturel _ barwidth barbase attribl barjust barorient Single Channel Bar Indicator 149 barplot IndicatorBackground New ChartAttribute Color Black 1 _ DashStyle Solid Color Black barplot SegmentSpacing 1 barplot SegmentWidth 1 barplot IndicatorSubType ChartObj RT BAR SEGMENTED SUBTYPE chartVu AddChartObject barplot End Sub InitializeCustomBarIndicator Example for an RTBarIndicator Solid Bar Indicator and Pointer Indicator Setting up the solid bar and pointer indicators are pretty much identical to the segmented bar indicator The examples below are extracted from the RTGraphNetDemo example p
37. The RTControlButton class implements on off colors and on off text for momentary toggle and radio button style buttons The RTTrackBar class adds real world scaling based on double values to the integer based TrackBar class RTControlButton and RTTrackBar objects can be group together in a grid organizing the control objects functionally and visually Net CF SP 1 0 does not support color controls later versions do A scroll frame manages constant rescaling of coordinate systems of plot objects RTSimpleSingleValuePlot and RTGroupMultiV aluePlot objects that are displayed in a scrolling graph A group of classes encapsulate the real time indicators bars meters dials clocks panel meter and scroll graphs as self contained ChartView derived classes so that they can be placed individually on forms Support classes are used to display special symbols used for alarm limits in the software special round and rectangular shapes that can be used as backdrops for groupings of chart objects and PID control QCRTGraph CF Classes The QCRTGraph classes are a super set of the QCChart2D CF charting software No attempt should be made to utilize the QCRTGraph classes without a good understanding of the QCChart2D CF classes See the QCChart2DNetCFManual PDF file for detailed information about the QCChart2D CF classes The diagram below depicts the class hierarchy of the QCRTGraph CF library without the additional QCChart2D CF classes 18
38. You will find the definition of the chartView1 variable in the form s Designer cs module In our example programs in the form s user code area Form cs we typically assign chartView1 to a local variable named chartVu and then customize the graph using the chartVu variable name You will also need to make sure that you reference System Drawing Drawing2D com quinncurtis chart2dnetcf and com quinncurtis rtgraphnetcf in the Imports section of any module that references ChartView The reference System Drawing Drawing2D is needed for the definition of the DashStyle enumerated type that is used in most of the example programs See the example program ScrollApplicationl for a simple example System System System System System System System System com qu com qu Collections Generic ComponentModel Data Drawing Drawing Drawing2D T xt Windows Forms inncurtis chart2dnetcf inncurtis rtgraphnetcf namespace ScrollApplicationl public partial class Forml Form d publ ic Forml InitializeComponent InitializeGraph private void InitializeScrollGraph 1 ChartView chartVu chartViewl QCRTGraph CF Tutorial 395 public void InitializeGraph d InitializeScrollGraph e We placed all of the chart customization code in the InitializeGraph method You can copy this part of the program from our own version of this example ScrollApplicationl Form1 cs Until this metho
39. charting package The RTSimpleSingleValuePlot class combines any of the QCChart2D CF SimplePlot classes with an RTProcessVar object and the RTGroupMultiV aluePlot class combines any of the QCChart2D CF GroupPlot classes with a collection of RTProcessVar objects The RTProcessVar class manages a historical data buffer based on the QCChart2D CF ChartDataset class Each time the current value of the RTProcessVar object is updated it is time stamped and its value appended to the internal ChartDataset The time stamp can either be explicitly supplied in the update call or it can be automatically derived from the system clock From there it can be plotted in static or scrolling plots The RTProcessVar class contains a collection of RTAlarm objects Each alarm object represents a unique alarm condition either a greater than alarm or a less than alarm based on the specified limit value The RTAlarm class also specifies alarm text strings alarm colors and the alarm hysteresis value An RTProcessVar object can hold an unlimited number of RTAlarm objects Every time an RTProcessVar object is updated with new values every alarm is checked and an alarm event is generated if the alarm conditions are met The programmer can hook into the alarm events using alarm event delegates 94 Process Variable and Alarm Classes Real Time Process Variable Class RTProcessVar ChartObj RTProcessVar Real time data is stored in RTProcessVar classes The RT
40. it has the same design considerations listed in that software These are It is based on the Net CF System Drawing API model and the System Windows Forms classes New charting objects can be added to the library without modifying the source of the base classes There are no limits regarding the number of data points in a plot the number of plots in graph the number of axes in a graph the number of coordinate systems in a graph There are no limits regarding the number of legends arbitrary text annotations bitmap images geometric shapes titles data markers cursors and grids in a graph Users can interact with charts using classes using System EventHandler delegate event driven model Design consideration specific to QCRTGraph CF are Updates of data classes are asynchronous with rendering of graphics to the screen Real Time plot objects are derived from QCChart2D CF plot objects resulting in standardized methods for setting plot object properties Any standard plot type from the QCChart2D CF software package both simple and group plot types can be implemented as scrolling graphs There are no limits on the number of process variable channels no limits on the number of alarm limits associated with a process variable no limits on the number of real time plots in a graph The update of real time objects will not interfere or overwrite other objects and will follow the z order precedence established when the graph was cr
41. or milliseconds in place of the x or y values A subclass of SimpleDataset it adds a third dimension z values to the x and y values of the simple dataset Represents group data where every x value can have one or more y values A subclass of GroupDataset it uses ChartCalendar dates a wrapper around the System DateTime value class as the x values and floating point numbers as the y values ElapsedTimeGroupDataset A subclass of GroupDataset it uses TimeSpan objects or Scale Classes ChartScale LinearScale LogScale TimeScale ElapsedTimeScale milliseconds as the x values and floating point numbers as the y values The ChartScale abstract base class defines coordinate transformation functions for a single dimension It is useful to be able to mix and match different scale transform functions for x and y dimensions of the PhysicalCoordinates class The job of a ChartScale derived object is to convert a dimension from the current physical coordinate system into the current working coordinate system 54 QCChart2D CF Class Summary LinearScale A concrete implementation of the ChartScale class It converts a linear physical coordinate system into the working coordinate system LogScale A concrete implementation of the ChartScale class It converts a logarithmic physical coordinate system into the working coordinate system TimeScale A concrete implementation of the ChartScale class converts a date time physical
42. pTransforml normrect rectattrib ChartObj NORM GRAPH POS chartVu AddChartObject frame3d Miscellaneous Shape Drawing 299 VB Dim i As Integer For i 0 To PIDProcessItems Length 1 row i 8 col i Mod 8 xl xoffset col faceplatewidthspacing yl yoffset row faceplateheightspacing x2 xl faceplatewidth y2 yl faceplateheight Dim mindisplayvalue As Double PIDProcessItems i DefaultMinimumDisplayValue Dim maxdisplayvalue As Double PIDProcessItems i DefaultMaximumDisplayValue pTransforml New CartesianCoordinates 0 0 mindisplayvalue 1 0 _ maxdisplayvalue Dim normrect As New Rectangle2D x1 yl faceplatewidth faceplateheight Dim frame3d As New RT3DFrame pTransforml normrect rectattrib _ ChartObj NORM GRAPH POS chartVu AddChartObject frame3d Next i Rounded Rectangles Class RTRoundedRectangle2D Com quinncurtis chart2dnetcf GraphObj RTRoundedRectangle2D Rounded rectangles are just that rectangles that have rounded corners RTRoundedRectangle2D constructors Visual Basic Overloads Public Sub New ByVal transform As PhysicalCoordinates ByVal r As Rectangle2D _ ByVal corner As Double _ ByVal postype As Integer _ 300 Miscellaneous Shape Drawing Ct public RTRoundedRectangle2D PhysicalCoordinates transform Rectangle2D r double corner int postype Parameters transform Places the RTRoundedRectangle2D object in the coordinate syst
43. runnersPaceTrackbar New RTControlTrackBar 0 0 15 0 0 1 1 0 1 runnersPaceTrackbar Orientation Orientation Vertical runnersPaceTrackbar RTValue 3 MUST USE RTValue to set double value Dim formControlTrackBarl As New RTFormControlPanelMeter pTransforml runnersPaceTrackbar attribl formControlTrackBarl RTDataSource runnersPace formControlTrackBarl PanelMeterPosition ChartObj CUSTOM POSITION formControlTrackBarl SetLocation 0 0 0 ChartObj PHYS POS 136 Panel Meter Classes formControlTrackBarl FormControlSize New Dimension 1 2 1 0 Dim panelmeterattrib As New ChartAttribute Color SteelBlue 2 DashStyle Solid Color Black Dim panelmeterl As New RTNumericPanelMeter pTransforml runnersPace panelmeterattrib panelmeterl NumericTemplate TextFont trackbarfont panelmeterl NumericTemplate DecimalPos 1 panelmeterl PanelMeterPosition ChartObj RIGHT REFERENCED TEXT panelmeterl SetPositionReference formControlTrackBarl formControlTrackBarl AddPanelMeter panelmeterl Dim panelmetertagattrib As New ChartAttribute Color Beige 0 DashStyle Solid Color Beige Dim panelmeter2 As New RTStringPanelMeter pTransforml runnersPace panelmetertagattrib ChartObj RT TAG STRING panelmeter2 SetPositionReference panelmeterl panelmeter2 StringTemplate TextFont trackbarTitlefont panelmeter2 PanelMeterPosition ChartObj BELOW REFERENCED TEXT panelmeter2 TextColor Color Black formControlTrackBarl AddPanelMete
44. 0 100 200 Mean Family Income 1000 The Cell plot will plot rectangles of any size color and postion CellPlot This class is a concrete implementation of the GroupPlot class and displays cell plots A cell plot is a collection of rectangular objects with independent positions widths and heights specified using the values of the associated group dataset ErrorBarPlot This class is a concrete implementation of the GroupPlot class and displays error bars Error bars are two lines positioned about a data point that signify the statistical error associated with the data point 72 QCChart2D CF Class Summary Media Schedule WSJ DSP Journal EDN PC Mag Computer Week Info Age 1 2002 4 2002 7 2002 10 2002 1 2003 Year of 2003 Floating bars are useful for creating scheduling charts FloatingBarPlot This class is a concrete implementation of the GroupPlot class and displays free floating bars in a graph The bars are free floating because each bar does not reference a fixed base value as do simple bar plots stacked bar plots and group bar plots Daily Stock Price Price NASDAQ T T T T i T T T T i T T T i T T T T i T 1 05 09 1 12 09 1 19 09 1 26 09 2 02 09 FloatingStackedBarPlot This class is a concrete implementation of the GroupPlot class and displays free floating stacked bars The bars are free floating because each bar does not reference a fixed base value as do simple bar plots stacked bar plot
45. 00 00 to 12 00 00 without an explicit calendar date associated with it Either the x or y dimension can be scaled as elapsed time Elapsed Time Scroll Application 1 0 00 40 0 00 50 0 01 00 0 01 10 0 01 20 0 01 30 Horizontal scrolling of an elapsed time chart Vertical Scrolling for Time Date Numeric and Elapsed Time Scales Introduction 3 A new class RTVerticalScrollFrame manages scrolling in the vertical direction It is compatible with the CartesianCoordinates TimeCoordinates and the new ElapsedTimeCoordinates classes Scroll Application 1 12 53 30 12 53 15 12 53 00 12 52 45 0 50 100 150 Auto scaling Time Date Scrolling in the Vertical Dimension New RTAuto Indicator Classes New classes have been added to simplify the creation of bar indicators meters dials clocks panel meters and scrolling graphs These classes encapsulate all of the elements needed to create a particular real time indicator type coordinate system axes axes 4 Introduction labels titles process variable alarms and panel meters for numeric readouts and alarm status The auto indicator classes are setup as a self contained ChartView derived objects placeable on a form and can be modified using methods and properties AUTO UR a RTAutoPanel RTAutoMeterlndicator B g A 4 E gt B i RTAutoScrollGraph Subhead Text ea PO uc 80 urmm 0 0 0 00 60 Voltage
46. 158 162 164 214 215 218 219 225 226 295 Bar graphs 11 19 20 42 43 44 317 318 322 326 329 334 337 359 372 Bar plots 11 81 Bargraphs 18 22 24 27 30 32 93 109 118 119 121 122 124 125 126 137 138 141 142 144 145 146 147 149 150 151 152 155 157 159 160 161 163 318 320 329 332 Box and Whisker 67 69 BoxWhiskerPlot 67 69 Bubble plot legend items 84 Bubble plot legends 84 85 Bubble plots 67 69 241 BubblePlot 67 69 241 BubblePlotLegend 84 85 BubblePlotLegendItem 84 Button Controls 17 19 37 38 39 247 248 249 250 252 253 256 260 264 267 268 269 285 286 289 292 Calendar utilities 53 56 61 86 89 90 95 96 245 292 354 355 359 360 362 370 371 372 373 374 375 379 380 Candlestick plots 67 70 CandlestickPlot 67 70 Cartesian coordinates 3 54 55 117 128 129 131 132 134 135 142 144 156 158 161 164 218 219 222 223 225 226 250 251 252 254 255 258 259 263 264 268 269 285 290 291 297 298 299 CartesianCoordinates 3 54 55 117 128 129 131 132 134 135 142 144 156 158 161 164 218 219 222 223 225 226 250 251 252 254 255 258 259 263 264 268 269 285 290 291 297 298 299 Cell plots 67 71 241 CellPlot 67 71 241 Chart object attributes 15 51 55 Chart titles 85 86 ChartAttribute 5 55 56 57 94 98 102 103 105 106 115 116 117 118 119
47. 18 24 30 33 40 93 229 233 237 238 239 240 243 245 246 366 RTSingleValueIndicator 18 21 24 30 35 110 111 115 120 123 127 130 132 137 138 139 140 152 153 154 189 190 191 198 202 237 262 RTStringPanelMeter 18 21 23 30 109 123 124 125 126 129 135 136 141 143 145 155 158 160 219 220 223 224 225 227 RTTextFrame 18 48 49 RTTimePanelMeter 18 21 24 30 109 127 128 129 130 RTVerticalScrollFrame 3 18 39 41 229 233 234 236 Scale classes 53 54 55 Scatter plots 11 81 84 Scrolling graph 3 18 39 41 229 233 234 236 Scrolling Graph 11 19 20 47 317 358 359 367 369 370 371 372 377 379 380 Scrolling Graphs 18 30 33 39 40 41 229 230 233 238 239 240 243 244 245 281 365 Shapes 87 Simple datasets 52 53 56 94 290 364 Simple plot objects 14 16 25 30 65 81 82 83 84 87 88 93 237 241 SimpleBarPlot 11 81 SimpleDataset 52 53 56 94 290 364 SimpleLineMarkerPlot 11 81 82 SimpleLinePlot 11 81 83 239 240 245 246 SimplePlot 14 16 25 30 65 81 82 83 84 87 88 93 237 241 SimpleScatterPlot 11 81 84 SimpleVersaPlot 1 84 366 Stacked bar plots 67 73 241 Stacked line plots 67 77 241 StackedBarPlot 67 73 241 StackedLinePlot 67 77 241 Standard legends 84 StandardLegend 84 String axis labels 19 35 63 64 184 185 String labels 23 86 111 120 123 String Panel Meters 18 21
48. 180 Dim arcextent As Double 90 Dim startarcscale As Double 0 0 Dim endarcscale As Double 32 0 Dim arcdirection As Boolean False Dim arcradius As Double 0 8 Dim centerx As Double 0 0 Dim centery As Double 0 0 Dim meterframe As New RTMeterCoordinates startarcangle arcextent Startarcscale endarcscale arcdirection centerx centery arcradius meterframe SetGraphBorderDiagonal 0 025 0 25 0 175 0 6 Dim meterneedle As New RTMeterNeedleIndicator meterframe fuel meterneedle SetChartObjAttributes attribl meterneedle NeedleLength 0 8 Add panel meters Meters Coordinates Meter Axes and Meter Axis Labels 187 chartVu AddChartObject meterneedle Dim meteraxis As New RTMeterAxis meterframe meterneedle meteraxis SetChartObjAttributes attribl meteraxis SetAxisTickDir ChartObj AXIS MIN meteraxis LineWidth 1 meteraxis LineColor Color White meteraxis SetAxisTickSpace 4 meteraxis SetAxisMinorTicksPerMajor 4 meteraxis ShowAlarms True meterneedle MeterAxis meteraxis chartVu AddChartObject meteraxis Dim meterFont As Font fontl0Bold Dim meteraxislabels As New RTMeterStringAxisLabels meteraxis meteraxislabels SetTextFont meterFont meteraxislabels SetAxisLabelsDir meteraxis GetAxisTickDir Dim labelstrings As String E 1 2 E meteraxislabels OverlapLabelMode ChartObj OVERLAP LABEL DRAW meteraxislabels AxisLabelsEnds ChartObj LABEL MAX meteraxislabels
49. 225 ChartView chartVu this CartesianCoordinates pTransforml new CartesianCoordinates 0 0 0 0 1 0 1 0 pTransforml SetGraphBorderDiagonal 0 175 005 0 45 0 475 Background background new Background pTransforml ChartObj PLOT BACKGROUND Color Gray a hartVu AddChartObject background ChartAttribute attribl new ChartAttribute Color Bisque DashStyle Solid Color Bisque ChartAttribute attrib2 new ChartAttribute Color Bisque DashStyle Solid Color Bisque ChartAttribute attrib3 new ChartAttribute Color Bisque DashStyle Solid Color Bisque ChartAttribute attrib4 new ChartAttribute Color Bisque DashStyle Solid Color Bisque ChartAttribute attribArray attribl attrib2 attrib3 attrib4 int numrows 2 int numcols 2 RTMultiValueAnnunciator annunciator new RTMultiValueAnnunciator pTransforml processVarArray numcols numrows attribArray ChartAttribute panelmeterattrib new ChartAttribute Color SteelBlue 1 DashStyle Solid Color Black RTNumericPanelMeter panelmeter new RTNumericPanelMeter pTransforml processVar2 panelmeterattrib panelmeter PanelMeterPosition ChartObj CENTERED BAR panelmeter NumericTemplate TextFont Forml fontl4Numeric panelmeter NumericTemplate PostfixString char 176 E annunciator AddPanelMeter panelmeter RTAlarmPanelMeter panelmeter2 new RTAlarmPanelMeter pTransforml processVarl panelmeterat
50. 40 0 00 00 0 00 10 0 00 20 0 00 30 Elapsed Time Channel 1 Channel 2 Channel 3 Footer text Combine the new RTAuto classes together on a single form Process Variable Data Table Integrated data grids for viewing process variable historical data The new RTProcessVarViewer class will display RTProcessVar historical data using a simple grid or table format The viewer is derived from our QCChart2D DatasetViewer class Horizontal and vertical scrolling options are supported Numeric and time date based formats are also supported Row and column headers can be customized Scroll Application 1 Apa i iwal eal ms ele Introduction 5 View data in a table using the RTProcessVarViewer Differences between this and the previous 1 6 version Starting with Visual Studio 2005 the Net Compact Framework 2 0 supports the UserControl class In the 1 6 version of the software the ChartView control was derived from the Net CF Control class and this has been changed to UserControl in order to make the Net CF version of QCRTGraph and QCChart2D source compatible with the Net version Since the ChartView control is now derived from UserControl and because of improvements made in the Net CF design mode you can now drop and drag the ChartView control onto a Net CF form Also starting with Windows Net CF 2 0 line drawing supports line thicknesses greater than one and line styles solid and dashed W
51. AddPanelMeter panelmeter chartVu AddChartObject meterneedle Symbol Meter Indicators Class RTMeterSymbolIndicator Com quinncurtis chart2dnetcf ChartPlot RTPlot RTSingleValueIndicator RTMeterIndicator RTMeterSymbolIndicator This RTMeterSymbolIndicator class displays the current RTProcessVar value as a symbol moving around in the meter arc Symbols include all of the QCChart2D CF scatter plot symbols SQUARE TRIANGLE DIAMOND CROSS PLUS STAR LINE HBAR VBAR BAR3D and CIRCLE RTMeterSymbolIndicator constructor Visual Basic Overloads Public Sub New ByVal frame As RTMeterCoordinates ByVal datasource As RTProcessVar _ ByVal symbolnum As Integer ByVal symbolsize As Double _ ByVal attrib As ChartAttribute Overloads Public Sub New _ ByVal frame As RTMeterCoordinates ByVal datasource As RTProcessVar _ C public RTMeterSymbolIndicator RTMeterCoordinates frame RTProcessVar datasource int symbolnum double symbolsize ChartAttribute attrib public RTMeterSymbolIndicator RTMeterCoordinates frame RTProcessVar datasource 203 Meter Indicators Needle Arc and Symbol Parameters frame The RTMeterCoordinates object defining the meter properties for the indicator datasource The process variable associated with the indicator symbolnum Specifies what symbol to use in the indicator Use one of the scatter plot symbol constants NOSYMBOL SQUARE TRIANGL
52. ChartView component PhysicalCoordinates initialscale int scrollymode int autoscalexmode Parameters component This ChartView component the scroll frame is placed in processvar The source process variable initialscale A coordinate system that serves as the initial scale for the scroll frame scrollymode Specifies y axis auto scale mode of the scroll frame Use one of the x axis scroll frame constants RT NO AUTOSCALE X no auto scale for the x axis use in non scrolling graphs RT AUTOSCALE Y CURRENT SCALE auto scale based on current scale use in non scrolling graphs RT AUTOSCALE Y MIN autoscale x axis minimum only use in non scrolling graphs RT AUTOSCALE Y MAX autoscale x axis maximum only use in non scrolling graphs RT AUTOSCALE Y MINMAX autoscale x axis minimum and maximum use in non scrolling graphs RT FIXEDEXTENT MOVINGSTART AUTOSCROLL autoscale the x axis for a fixed range with moving maximum and minimum values use in scrolling graphs RT MAXEXTENT FIXEDSTART AUTOSCROLL autoscale the x axis with the start of the x axis fixed and the end of the x axis moving use in scrolling graphs RT FIXEDNUMPOINT AUTOSCROLL autoscale the x axis for a fixed number of points with moving maximum and minimum values use in scrolling graphs autoscalexmode The Scroll Frame and Single Channel Scrolling Plots 235 Specifies x axis auto scale mode of the scroll frame Use one of the y axis scrol
53. Dim needleattribl As New ChartAttribute Color Black 1 DashStyle Solid Color Blue Dim meterneedlel As New RTMeterNeedleIndicator meterframe clockdata 0 meterneedlel NeedleBaseWidth 1 meterneedlel SetChartObjAttributes needleattribl meterneedlel NeedleLength 0 5 chartVu AddChartObject meterneedlel Minutes Dim needleattrib2 As New ChartAttribute Color Black 1 DashStyle Solid Color Blue Dim meterneedle2 As New RTMeterNeedleIndicator meterframe clockdata 1 meterneedle2 NeedleBaseWidth 3 213 Dials and Clocks meterneedle2 SetChartObjAttributes needleattrib2 meterneedle2 NeedleLength 0 45 chartVu AddChartObject meterneedle2 Hours Dim needleattrib3 As New ChartAttribute Color Black 1 DashStyle Solid Color Blue Dim meterneedle3 As New RTMeterNeedleIndicator meterframe clockdata 2 meterneedle3 NeedleBaseWidth 5 meterneedle3 SetChartObjAttributes needleattrib3 meterneedle3 NeedleLength 0 3 chartVu AddChartObject meterneedle3 End Sub InitializeClock Examples for using RTComboProcessVar in an altimeter application The example extracted from the example program RTGraphNetDemo file DialControll methods InitializeGraph and InitializeDial1 show the important aspects of using an RTComboProcessVar object to supply data for the two meter needle indicators used as the hands of a clock C dialComboProcessVarl new RTComboProcessVar Altimeter processVarl DefaultAtt
54. False buttonlist Add ResetAll Dim numColumns As Integer 3 Dim numRows As Integer 1 Dim pTransforml As New CartesianCoordinates 0 0 0 0 1 0 1 0 pTransforml SetGraphBorderDiagonal 0 73 0 94 0 99 0 99 Dim controlgrid As New RTFormControlGrid pTransforml Nothing buttonlist numColumns numRows attribl controlgrid CellRowMargin 0 0 controlgrid CellColumnMargin 0 0 controlgrid FormControlTemplate Frame3DEnable True chartVu AddChartObject controlgrid End Sub InitializeStartStopButtons Example for momentary and radio buttons 252 Buttons Track Bars and Other Form Control Classes The example below extracted from the FetalMonitor example creates four RTControlButton buttons two are momentary buttons and two are radio buttons The buttons are added to an RTFormControlGrid in order to position them as a logical group RTControlButton StartButton new RTControlButton ChartObj RT CONTROL RADIOBUTTON SUBTYPE RTControlButton StopButton new RTControlButton ChartObj RT CONTROL RADIOBUTTON SUBTYPE RTControlButton ResetButton new RTControlButton ChartObj RT CONTROL MOMENTARYBUTTON SUBTYPE RTControlButton ClearButton new RTControlButton ChartObj RT CONTROL MOMENTARYBUTTON SUBTYPE public void InitializeStartStopButtons Font buttonfont font12Bold ChartView chartVu this CartesianCoordinates pTransforml w CartesianCoordinates 0
55. Get the color of the needle pivot PivotColor Set to true to draw the needle pivot PivotDrawFlag Set Get in device coordinates the radius of the pivot point PivotRadius of the needle analogous to the bearing or axle supporting the meter needle A complete listing of RTMeterNeedleIndicator properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory Meter Indicators Needle Arc and Symbol 200 Examples for needle meter indicators The examples below are program segments that give the important aspects of configuration a needle meter indicator for the image above it Extracted from the example program RTGraphNetDemo file NeedleMeterControll method InitializeMeter2 C RTMeterNeedleIndicator meterneedle new RTMeterNeedleIndicator meterframel processVar2 meterneedle SetChartObjAttributes attribl meterneedle NeedleLength 0 7 meterneedle ZOrder 55 Add panel meters chartVu AddChartObject meterneedle VB Dim meterneedle As New RTMeterNeedleIndicator meterframel processVar2 meterneedle SetChartObjAttributes attribl meterneedle NeedleLength 0 7 meterneedle ZOrder 55 Add panel meters chartVu AddChartObject meterneedle Extracted from the example program RTGraphNetDemo file ArrowMeterControll cs method InitializeMeter8 201 Meter Indicators Needle Arc and Symbol Warp Full Reverse Stop C RTMeterNeedle
56. HIGH ALARM SYMBOL RT BOTTOM LOW ALARM SYMBOL RT BOTTOM SETPOINT SYMBOL RT BOTTOM HIGH ALARM SYMBOL Set Get the primary channel of the indicator Get Set the array list holding the RTProcessVar variables for the indicator Get Set the corner radius used to draw the segment rounded rectangles Get Set the segments spacing for the RT BAR SEGMENTED SUBTYPE and RT BAR SINGLE SEGMENT SUBTYPE bar indicator sub types Multiple Channel Bar Indicator 155 Set Get the segment value round mode Specifies that the current process value is rounded up in calculating SegmentValueRoundMode how many segments to display in RT BAR SEGMENTED SUBTYPE and RT BAR SINGLE SEGMENT SUBTYPE modes Use one of the constants RT FLOOR VALUE RT CEILING VALUE Get Set the thickness of segments for the SegmentWidth RT BAR SEGMENTED SUBTYPE and RT BAR SINGLE SEGMENT SUBTYPE bar indicator sub types If the plot supports it this method will turn on off the ShowDatapointValue display of data values next to the associated data point inherited from ChartPlot Set Get the plot objects step mode Use one of the line StepMode inherited plot step constants NO STEP STEP START from ChartPlot STEP END or STEP NO RISE LINE Sets the z order of the object in the chart Every object ZOrder inherited from has a z order value Each z order value does NOT have GraphObj to be unique If z order sorting is turned on in the ChartView object objects are
57. Heat Distribution of a Plasma Torch Degrees C 1000 0 1200 0 1400 0 1600 0 1800 0 1800 0 i 73 ie 2000 0 NN Ms j o 2100 0 KN zl Za N 2200 0 m ER 2400 0 2600 0 2900 0 3000 0 The contour plot routines work with either an even grid or a random shown grid ContourPlot This class is a concrete implementation of the ChartPlot class and displays a contour plot using either lines or regions filled with color Group Plot Classes QCChart2D CF Class Summary 67 GroupPlot ArrowPlot BoxWhiskerPlot BubblePlot CandlestickPlot CellPlot ErrorBarPlot FloatingBarPlot FloatingStackedBarPlot GroupBarPlot GroupVersaPlot HistogramPlot LineGapPlot MultiLinePlot OHLCPlot StackedBarPlot StackedLinePlot GroupVeraPlot Group plots use data organized as arrays of x and y values where there is one or more y for every x Group plot types include multi line plots stacked line plots stacked bar plots group bar plots error bar plots floating bar plots open high low close plots candlestick plots arrow plots histogram plots cell plots and bubble plots GroupPlot This class is an abstract base class for all group plot classes 68 QCChart2D CF Class Summary Flow Analysis Stealth Project Meters The size position and direction of every arrow in an arrow plot is under program control ArrowPlot This class is a concrete implementation of the GroupPlot class and it displays a collection of arrow
58. IN NO EVENT SHALL QUINN CURTIS INC OR ITS SUPPLIERS BE LIABLE TO YOU FOR ANY CONSEQUENTIAL SPECIAL INCIDENTAL OR INDIRECT DAMAGES OF ANY KIND ARISING OUT OF THE DELIVERY PERFORMANCE OR USE OF THE SUCH DAMAGES IN ANY EVENT QUINN CURTIS S LIABILITY FOR ANY CLAIM WHETHER IN CONTRACT TORT OR ANY OTHER THEORY OF LIABILITY WILL NOT EXCEED THE GREATER OF U S 1 00 OR LICENSE FEE PAID BY YOU 10 U S GOVERNMENT RESTRICTED RIGHTS The SOFTWARE is provided with RESTRICTED RIGHTS Use duplication or disclosure by the Government is subject to restrictions as set forth in subparagraph c 1 11 of The Rights in Technical Data and Computer SOFTWARE clause of DFARS 252 227 7013 or subparagraphs c 1 and 2 of the Commercial Computer SOFTWARE Restricted Rights at 48 CFR 52 227 19 as applicable Manufacturer is Quinn Curtis Inc 18 Hearthstone Dr Medfield MA 02052 USA 11 MISCELLANEOUS If you acquired the SOFTWARE in the United States this EULA is governed by the laws of the state of Massachusetts If you acquired the SOFTWARE outside of the United States then local laws may apply Should you have any questions concerning this EULA or if you desire to contact Quinn Curtis Inc for any reason please contact Quinn Curtis Inc by mail at Quinn Curtis Inc 18 Hearthstone Dr Medfield MA 02052 USA or by telephone at 508 359 6639 or by electronic mail at support Quinn Curtis com iv 1 Introduction Real Time Graphics Too
59. InvertColors Me rtAutoClockIndicatorl InitStrings Boston EST Me rtAutoClockIndicator2 GraphFormat 1 Me rtAutoClockIndicator2 GraphBackground FillColor Color White Me rtAutoClockIndicator2 PlotAttrib FillColor Color Blue Me rtAutoclockIndicator2 InitStrings Pittsburgh TEST Miscellaneous Shape Drawing 353 Me rtAutoClockIndicator3 GraphFormat 2 Me rtAutoClockIndicator3 PlotAttrib FillColor Color Green Me rtAutoClockIndicator3 InitStrings Ft Myers EST Me rtAutoDialIndicatorl GraphFormat 0 Me rtAutoDialIndicatorl GraphBackground FillColor Color White Me rtAutoDialIndicatorl InvertColors Me rtAutoDialIndicatorl InitStrings Altimeter Feet Me rtAutoDialIndicator2 GraphFormat 1 Me rtAutoDialIndicator2 GraphBackground FillColor Color White Me rtAutoDialIndicator2 InitStrings Odometer Miles Me rtAutoDialIndicator3 GraphFormat 2 Me rtAutoDialIndicator3 InitStrings Electric Meter KW Hr End Sub Clock Indicator Class RTAutoClockIndicator System Windows Forms UserControl ChartView RTAutoIndicator RTAutoClockIndicator The RTAutoClockIndicator combines a RTMeterIndicator object with other objects needed to create a self contained meter display These other objects include a RTComboProcessVar variable meter coordinates system a meter axis and axis labels title string units string alarm indicators and panel meters used in the display of the met
60. Name Description AlarmList Get the ArrayList holding all of the RTAlarm objects AlarmPanelMeter Get a reference to the RTAlarmPanelMeter object DefaultA larmFont Get Set the font used for the subhead title DefaultAxisLabelsFont Get Set the default font used for the axes labels and axes titles Get Set the default font used for the numeric values labeling the indicator Set Get the default font used in the chart This is a string specifiying the name of the font DefaultDataValueFont DefaultFontString DefaultMainTitleFont Get Set the font used for the main title DefaultTagFont Get Set the font used for the main title DefaultUnitsFont Get Set the font used for the chart footer DialInterior Get dialInterior RTGenShape object FaceplateBackground Set to true to show 3D faceplate GraphBackground Get the graph background object GraphBorder Get the default graph border for the chart 356 Miscellaneous Shape Drawing GraphFormat Height HighAlarm LowAlarm MainTitle MaximumSize MaxIndicatorValue MinimumSize MinIndicatorValue NumericPanelMeter PlotAttrib PlotBackground PreferredSize ProcessVariable RenderingMode ResizeMode TagPanelMeter UnitsPanelMeter UnitsString Visible Width Get Set any an indicator format is supported Gets or sets the height of the control Inherited from Control Get the most recent high RTAlarm object Get the most recent low RTAlarm obj
61. Needle Arc and Symbol The process variable associated with the meter indicator needlelength Specifies length of the needle in normalized plot coordinates needleoverhang Specifies the overhang of the back end of the needle indicator specified in needle radius normalized coordinates needlewidth The color attributes of the meter indicator attrib The color attributes of the meter indicator Selected Public Instance Properties Set Get the meter indicator subtype Use one of the meter IndicatorSubtype needle indicator subtype constants inherited from RT METER NEEDLE SIMPLE SUBTYPE RTMeterIndicator RT METER NEEDLE PIEWEDGE SUBTYPE RT METER NEEDLE ARROW SUBTYPE Set Get the width of the base end of the needle for the NeedleBaseWidth RT METER NEEDLE SIMPLE SUBTYPE needle type in device coordinates Set Get the head length multiplier for the RT METER NEEDLE ARROW SUBTYPE needle type in device coordinates Set Get the head width multiplier for the RT METER NEEDLE ARROW SUBTYPE needle NeedleHeadWidthMultiplier type in device coordinates i Set Get the length of the needle in normalized plot NeedleHeadLengthMultiplier NeedleLength coordinates length Set Get the overhang of the back end of the needle NeedleOverhang indicator specified as a fraction of the needle length Set Get Specifies the arc width of the needle for the PieWedgeDegrees RT METER NEEDLE PIEWEDGE SUBTYPE needle type in degrees coordinates Set
62. Other options allow the y scale to be constantly rescaled to Class Architecture 41 reflect the current dynamic range of the y values in the scroll frame Scroll Application 1 0 00 30 0 00 20 0 00 10 0 00 00 100 110 120 130 An example of a vertical elapsed time scroll frame RTVerticalScrollFrame The RTScrollFrame has the limitation that it can only manage horizontal scrolling The RTVerticalScrollFrame is much the same as RTScrollFrame only it manages scrolling in the vertical direction The RTVerticalScrollFrame vertically scrolls data with a numeric time date or elapsed time time stamp Auto Indicator Classes Com quinncurtis chart2dnet ChartView RTAutoIndicator 42 Class Architecture RTAutoBarIndicator RTAutoMultiBarIndicator RTAutoMeterIndicator RTAutoDialIndicator RTAutoClockIndicator RTAutoPanelMeterInicator The ChartView class is the base class for the self contained auto indicator classes Each real time indicator is placed in its own ChartView derived window along with all other objects typically associated the indicator axes labels process variables alarms titles etc Since ChartView is derived from UserControl you can place as many auto indicator classes on a form as you want Class Architecture 43 Il D o Horiz 1 EE 01 emm The RTAutoBarIndicator has many different format options for self contained single channel bar indicators RTAutoBarInd
63. Properties Set Get the ElapsedTimeLabel template for the panel meter time date value The text properties associated with the panel meter ElapsedTimeTemplate are set using this property In addition the time or calendar format of the time date value is also set here A complete listing of RTElapsedTimePanelMeter properties is found in the QCRTGraphNetCompiledHelpFile chm documentation file located in the doc subdirectory Example for RTElpasedTimePanelMeter The panel meter below extracted from the Treadmill example method InitializeStopWatchTimePanelMeter adds an RTElapsedTimePanelMeter as an independent panel meter at the bottom of the display In this example the plot area of the coordinate system is set for the position of the RTElapsedTimePanelMeter using pTransform1 SetGraphBorderDiagonal It is positioned inside the plot area using the INSIDE INDICATOR position constant A string panel meter places a title above the time panel meter Current Time ChartView chartVu this CartesianCoordinates pTransforml new CartesianCoordinates 0 0 0 0 1 0 1 0 pTransforml SetGraphBorderDiagonal 0 53 85 0 72 0 96 ChartAttribute panelmeterattrib new ChartAttribute Color SteelBlue 3 DashStyle Solid Color Black RTElapsedTimePanelMeter panelmeter 132 Panel Meter Classes new RTElapsedTimePanelMeter pTransforml stopWatch panelmeterattrib panelmeter PanelMeterPosition ChartObj INSIDE INDICATOR p
64. RTComboProcessVar The RTComboProcessVar class has an internal collection of RTProcessVar objects The current value assigned to the RTComboProcessVar object is simultaneously converted to current values for each of the RTProcessVar objects in the collection For each RTProcessVar object the conversion is defined by a divisor and a modulo N value Each RTProcssVar object will have unique combination of divisors and modulo N values as defining characteristics For i 0 to processVarList Count 1 Dials and Clocks 208 processVarList i CurrentValue comboProcessVar CurrentValue divisor i modvalue i where comboProcessVar The main RTComboProcessVar object that is updated by the application program processVarList The collection of RTProcessVar objects internal to the RTComboProcessVar These items are updated automatically by the master RTComboProcessVar whenever an update is made to the master class Note that the divisor operation takes place first followed by the modulo operation RTComboProcessVar constructors Visual Basic Overloads Public Sub New ByVal dataset As TimeSimpleDataset ByVal defaultattribute As ChartAttribute Overloads Public Sub New ByVal tagname As String _ ByVal defaultattribute As ChartAttribute Ct public RTComboProcessVar TimeSimpleDataset dataset ChartAttribute defaultattribute ME Cf public RTComboProcessVar string tagname ChartAttri
65. RTGroupMultiValuePlot plot class uses a template based on the QCChart2D CF GroupPlot class to create a real time plot that displays a collection of RTProcessVar objects as a group plot in a scrolling graph Class Architecture 33 Frequency Ohms Capacitance DC Volts AC Volts VAL 9A pi a nat Jo st pei fot IE Uo su tal be Fe Te RO VS ee GT er ae 535471543 Latha eit The RTFormControlGrid class organizes RTFormControl objects functionally and visually RTFormControlGrid The RTFormControlGrid plot class organizes a group of RTFormControl objects buttons and track bars primarily though others will also work in a grid format 11 52 15 11 52 30 11 52 45 11 53 00 This RTScrollFrame combines an RTGroupMultiValuePlot the open high low close plot with two RTSimpleSingleValuePlot plot RTScrollFrame The RTScrollFrame plot manages scrolling and auto scaling for the RTSimpleSingleValuePlot and RTGroupMultiV aluePlot objects The RTScrollFrame class is discussed in more detail a couple of sections down 34 Class Architecture Alarm Indicator Classes RTAlarmIndicator RTMultiAlarmIndicator The alarm indicator classes are used to indicate alarms limits in displays that use a Cartesian XY coordinate system The alarm indicators can have one of three forms pointer style symbols horizontal or vertical lines or horizontal or vertical filled areas These alarm indicator classes are not used in mete
66. SetAxisLabelsStrings labelstrings 3 meteraxislabels LineColor Color White chartVu AddChartObject meteraxislabels 9 Meter Indicators Needle Arc and Symbol RTMeterIndicator RTMeterArcIndicator RTMeterNeedleIndicator RTMeterSymbolIndicator Familiar examples of analog meter indicators are voltmeters car speedometers pressure gauges compasses and analog clock faces Three meter indicator types are supported arc symbol and needle meters An unlimited number of meter indicators can be added to a given meter object RTPanelMeter objects can be attached to an RTMeterIndicator object for the display of RTProcessVar numeric alarm and string data in addition to the indicator graphical display Meter scaling meter axes meter axis labels and alarm objects and handle by the meter coordinate system meter axis and meter axis labels classes described in the preceding chapter Base Class for Meter Indicators Class RTMeterIndicator Com quinncurtis chart2dnetcf ChartPlot RTPlot RTSingleValueIndicator RTMeterIndicator The RTMeterIndicator class is the abstract base class for all meter indicators Since it is abstract it does not have a constructor that you can use It does have properties common to all meter indicator types and these are listed here Selected Public Instance Properties Get Set whether the color of the indicator objects changes on an alarm Use one of the constants AlarmIndicatorColorMode RT INDICATOR COLOR NO
67. TimeSpan _ maxx As Double maxy As TimeSpan _ Initialize x scale to a linear scale and the y scale to the scale type specified by the parameter Use millisecond values for miny and maxy Public Sub InitRTAutoScrollGraph _ minx As Double _ miny As Double _ maxx As Double _ 374 Miscellaneous Shape Drawing maxy As Double _ Scaletype As Integer Cit Initialize the x scale a linear scale and the y scale to a Date Time scale using ChartCalendar objects public void InitRTAutoScrollGraph double minx ChartCalendar miny double maxx ChartCalendar maxy Initialize the x scale to a linear scale and the y scale to a Date Time scale using DateTime objects public void InitRTAutoScrollGraph double minx DateTime miny double maxx DateTime maxy Initialize the x scale to a linear scale and the y scale to a linear scale public void InitRTAutoScrollGraph double minx double miny double maxx double maxy Initialize the x scale to a linear scale and the y scale to an elapsed time using TimeSpan objects public void InitRTAutoScrollGraph double minx TimeSpan miny double maxx TimeSpan maxy Miscellaneous Shape Drawing 375 Initialize x scale to a linear scale and the y scale to the scale type specified by the parameter Use millisecond values for miny and maxy public void InitRTAutoScrollGraph double minx double miny double maxx double maxy int scaletype Parameters minx The
68. a bar indicator the panel meter is placed on the outside edge of the plotting area maximum Text justification depends on the bar orientation Vertical Bars JUSTIFY CENTER JUSTIFY MIN Horizontal Bars JUSTIFY MIN JUSTIFY CENTER Used when the panel meter is attached to a bar indicator Places the panel meter on the inside edge of the bar indicator If the object is not a bar indicator the panel meter is placed on the inside edge of the plotting area maximum Text justification depends on the bar orientation Vertical Bars JUSTIFY CENTER JUSTIFY MAX Horizontal Bars JUSTIFY MAX JUSTIFY CENTER Used when the panel meter is attached to a bar indicator Places the panel meter on the inside edge of the bar base of the indicator If the object is not a bar indicator the panel meter is placed on the inside edge of the plotting area minimum Text justification depends on the bar orientation Vertical Bars JUSTIFY CENTER JUSTIFY MIN Horizontal Bars JUSTIFY MIN JUSTIFY CENTER Used when the panel meter is attached to a bar indicator Places the panel meter on the outside edge of the bar base of the indicator If the object is not a bar indicator the panel meter is placed on the outside edge of the plotting area maximum Text justification depends on the bar orientation Vertical Bars JUSTIFY CENTER JUSTIFY MAX Horizontal Bars JUSTIFY MAX JUSTIFY CENTER Same as INSIDE BAR Same as OUTSIDE BAR Used when it is desire
69. a minor tick mark Get Set the number of minor tick marks per major tick mark Get Set the direction of a tick mark Use one of the tick direction constants AXIS MIN AXIS CENTER AXIS MAX Get Set the starting point for positioning tick marks in physical coordinates Set Get to true draws the axis tick marks Get Set the minor tick mark spacing Sets the attributes for a chart object using a ChartAttribute object Get Set the inner arc of the axis in normalized radius coordinates 176 Meters Coordinates Meter Axes and Meter Axis Labels MajorTickLine Width MeterAxisLabels MeterFrame MeterIndicator MinorTickLineWidth OuterAlarmArcNormalized ShowAlarms ZOrder inherited from GraphObj Get Set the major tick line width Only line widths of 1 are supported by Net CF Get Set the RTMeterAxisLabels object if any associated with this object Get Set the RTMeterCoordinates coordinate system associated with this object Get Set the RTMeterIndicator object if any associated with this object Get Set the minor tick line width Only line widths of 1 are supported by Net CF Get Set the outer arc of the axis in normalized radius coordinates Get Set true to show the alarm arcs Sets the z order of the object in the chart Every object has a z order value Each z order value does NOT have to be unique If z order sorting is turned on in the ChartView object objects are sorted by z order b
70. and descriptive text for that symbol The StandardLegend class uses objects of this type as legend items This class is the legend item class for bubble plots Each legend item manages a circle and descriptive text specifying the value of a bubble of this size The BubblePlotLegend class uses objects of this type as legend Items This class is a concrete implementation of the Legend class and it is the legend class for all plot objects except for bubble plots The legend item objects display in a row or column format Each legend item contains a symbol and a descriptive string The symbol normally associates the legend item to a particular plot object and the descriptive string describes what the plot object represents BubblePlotLegend Grid Classes Grid PolarGrid AntennaGrid QCChart2D CF Class Summary 85 This class is a concrete implementation of the Legend class and it is a legend class used exclusively with bubble plots The legend item objects display as offset concentric circles with descriptive text giving the key for the value associated with a bubble of this size Grid lines are perpendicular to an axis extending the major and or minor tick marks of the axis across the width or height of the plot area of the chart Grid PolarGrid AntennaGrid Chart Text Classes ChartText ChartTitle This class defines the grid lines associated with an axis Grid lines are perpendicular to an axis extending the major and
71. axis This prevents rapid changes of the y scale for the first few samples scrollFrame MinSamplesForAutoScale 400 scrollFrame ScrollRescaleMargin 0 05 chartVu AddChartObject scrollFrame VB scrollFrame New RTVerticalScrollFrame Me currentTemperaturel pTransforml ChartObj RT FIXEDEXTENT MOVINGSTART AUTOSCROLL ScrollFrame AddProcessVar currentTemperature2 scrollFrame ScrollScaleModeX ChartObj RT AUTOSCALE X MINMAX Allow 400 samples to accumlate before autoscaling y axis This prevents rapid changes of the y scale for the first few samples ScrollFrame MinSamplesForAutoScale 400 scrollFrame ScrollRescaleMargin 0 05 chartVu AddChartObject scrollFrame The Scroll Frame and Single Channel Scrolling Plots 237 Single Channel Scrolling Graphs Class RTSimpleSingleValuePlot Com quinncurtis chart2dnetcf ChartPlot RTPlot RTSingleValueIndicator RTSimpleSingleValuePlot The RTSimpleSingleValuePlot plot class uses a template based on the QCChart2D CF SimplePlot class to create a real time plot that displays RTProcessVar current and historical real time data in a scrolling line scrolling bar or scrolling scatter plot format Any plot object derived from the QCChart2D CF SimplePlot can be plotted as a scrolling graph RTSimpleSingleValuePlot constructors Visual Basic Overloads Public Sub New ByVal transform As PhysicalCoordinates ByVal plottemplate As SimplePlot _ ByVal datasource A
72. difference is the major and minor tick mark spacing calculated by the CalcAutoAxis method takes into account the base 60 of seconds per minute and minutes per hour and the base 24 of hours per day It is a continuous linear scale 62 QCChart2D CF Class Summary Polar Axes 4 polar axis consists of the x and y axis for magnitude and the outer circle for the angle PolarAxes This class has three separate axes two linear and one circular The two linear axes scaled for the magnitude of the polar scale form a cross with the center of both axes at the origin 0 0 The third axis is a circle centered on the origin with a radius equal to the magnitude of the polar scale This circular axis represents 360 degrees or 2 Pi radians of the polar scale and the tick marks that circle this axis are spaced at equal degree intervals 270 AntennaAxes Axis Label Classes AxisLabels NumericAxisLabels StringAxisLabels PolarAxesLabels AntennaAxesLabels QCChart2D CF Class Summary 63 180 This class has two axes one linear y axis and one circular axis The linear axis is scaled for the desired range of radius values This can extend from minus values to plus values The second axis is a circle centered on the origin with a radius equal to the range of the radius scale This circular axis represents 360 degrees of the antenna scale and the tick marks that circle this axis are spaced at equal degree intervals 64 QCChart2D CF Cla
73. ee hee 220 12 The Scroll Frame and Single Channel Scrolling Plots 229 Scroll PEAS RT 229 Single Channel Scrolling G aplig iis atte t reat gg e 237 13 Multi Channel Scrolling Plots ime cce t T E id Cr a ER ve epe dest 241 Multi Channel Scrolling Craps eu odere tects lola ilo 241 14 Buttons Track Bars and Other Form Control Classes 247 Control Buttons cu sto e Ese see ed lusti epa bt nen eee 248 Control ATACKIBALG 0 ETE EUN 256 Form Control Panel Meter oil aaa 260 Form Control Ord io ctetu e a ns Gea en ad aves lido epis 264 TS PID Conto li RR RA RR te eme Me toe re eee etat ass 271 Implementation gs rt lla lee lella ansi 273 PID COnttG DEE 274 16 Zooming Reale Kreeser ee 281 Simple Zooming of a single channel scroll frame esses 282 Super Zooming of multiple physical coordinate systems sss 287 Limiting the Zoom geen eeeh 292 17 Miscellaneous Shape pg eer sioni 295 3D Borders and Background Frames sess 295 Ereegnes 299 General Shapes becca elle 302 18 Process Vatiable Vi Wer ics Lam p bp pate tea reg add ate inp au de Rte dati n 307 19 Anite Indicator Classes ion e er ira 317 Single Channel Bar EE 317 Multi Channel Eege ee ee 329 Meter Indicatori ssaa lia te e dedi ove et qe de dete e ar 340 vi Dial Indicator zeiten EE pt ated a AE 347 Glocke INCI ator EE 353 Scrolling Graph Horizontal Indicator
74. explosion of a ring segment with respect to the origin of the ring QCChart2D CF Class Summary 81 Simple Plot Classes SimplePlot SimpleBarPlot SimpleLineMarkerPlot SimpleLinePlot SimpleScatterPlot SimpleVeraPlot Simple plots use data organized as a simple array of xy points where there is one y for every x Simple plot types include line plots scatter plots bar graphs and line marker plots SimplePlot This class is an abstract base class for all simple plot classes Production of Green Bars is Up 1999 2000 2001 2002 2003 2004 2005 2006 Bar plots can have the values of the bars displayed above or inside each bar SimpleBarPlot This class is a concrete implementation of the SimplePlot class and displays data in a bar format Individual bars the maximum value of which corresponds to the y values of the dataset are justified with respect to the x values 82 QCChart2D CF Class Summary SimpleLineMarkerPlot This class is a concrete implementation of the SimplePlot class and it displays simple datasets in a line plot format where scatter plot symbols highlight individual data points QCChart2D CF Class Summary 83 Profits are Expected to Rise 1998 1999 2000 2001 2002 2003 2004 2005 2006 Graphs can have background colors legends titles and data tooltips SimpleLinePlot This class is a concrete implementation of the SimplePlot class it displays simple datasets in a line plot format Adjacent data
75. in format 5 Formats 6 and 6 use 180 degree arcs 90 to 90 clockwise with a tag string above numeric panel meter to to the left and alarm status panel meter below the needle The difference between the two formats is the meter ticks point inward in format 6 and outward in format 77 Miscellaneous Shape Drawing 345 Format 9 Formats 8 and 9 use 180 degree arcs 90 to 90 clockwise with a tag string above numeric panel meter to to the right and alarm status panel meter below the needle The difference between the two formats is the meter ticks point inward in format 8 and outward in format 79 Formats 10 and 1 use 360 degree arcs 90 to 90 clockwise Format 10 places the tag string above and the numeric and alarm panel meters below the meter arc Format 11 places the tag string above and the numeric and alarm panel meters to the right of the meter arc Example for initializing RTAutoMeterIndicator objects The example below extracted from the AutoGraphDemos AutoMeterIndicators example draws each of the 12 different meter formats 346 Miscellaneous Shape Drawing Format 3 Format 5 v Tag string v Numeric readout v Alarm readout v Units string Below you will find the code used to initialize the first of the meters above extracted from the AutoGraphDemos AutoMeterIndicator example program C
76. in physical units attribs An array of the color attributes of the bar indicator barjust The justification of bars Use one of the bar justification constants JUSTIFY MIN JUSTIFY CENTER JUSTIFY MAX barorient The orientation of the bar indicator HORIZ DIR or VERT DIR Selected Public Instance Properties Get Set whether the color of the indicator objects changes on an alarm Use one of the constants AlarmIndicatorColorMode RT INDICATOR COLOR NO ALARM CHANGE inherited from RT INDICATOR COLOR CHANGE ON ALARM RTSingleValueIndicator Bar plots that support the display of data point values have the option of displaying the data point s numeric BarDatapointLabelPosition values above the bar below the bar or centered in the inherited from ChartPlot bar Use one of the data point label position constants INSIDE BAR OUTSIDE BAR or CENTERED BAR Set Get the justification of bars in bar graph plot objects BarJust inherited from Use one of the bar justification constants ChartPlot JUSTIFY MIN JUSTIFY CENTER or JUSTIFY MAX Set Get the bar offset from its fixed x or y value in BarOffset physical units Set Get the orientation HORIZ DIR or VERT DIR BarOrient inherited for bar plots from ChartPlot BarSpacing inherited from RTPlot BarWidth inherited from ChartPlot ChartObjAttributes inherited from GraphObj ChartObjClipping inherited from GraphObj ChartObjComponent inherited from G
77. is a collection of rectangular objects with independent widths and heights specified using the values of the associated group dataset The histogram bars share a common base value QCChart2D CF Class Summary 75 Sales vs Cost Gap Sales Profits 1998 1999 2000 2001 2002 The Line Gap chart is useful for emphasizing the difference between two lines LineGapPlot This class is a concrete implementation of the GroupPlot class A line gap chart consists of two lines plots where a contrasting color fills the area between the two lines highlighting the difference Characteristic Curves for Bipolar Transistor 50 Sea Geet b I b 350uA u 40 Region b 300uA 30 I b 250uA I b 200uA mA 20 I ee Le PS SES E tee at 1 100uA 10 E bebe H I b 50uA 0 0 5 10 15 20 Collector Emitter Voltage The Multi inePlot will plot a multiple y vectors vs a single x vector 76 QCChart2D CF Class Summary MultiLinePlot This class is a concrete implementation of the GroupPlot class and displays group data in multi line format A group dataset with four groups will display four separate line plots The y values for each line of the line plot represent the y values for each group of the group dataset Each line plot share the same x values of the group dataset Daily Stock Price Scroll week NASDAQ 4 11 05 4 18 05 4 25 05 5 02 05 5 09 05 The classic sto
78. new ChartAttribute Color Green 1 DashStyle Solid SimpleLinePlot lineplot2 new SimpleLinePlot pTransform2 null attrib2 lineplot2 SetFastClipMode ChartObj FASTCLIP X rtPlot2 new RTSimpleSingleValuePlot pTransform2 lineplot2 NASDAQChannel chartVu AddChartObject rtPlot2 ChartAttribute attrib3 new ChartAttribute Color Blue 1 DashStyle Solid SimpleLinePlot lineplot3 new SimpleLinePlot pTransform2 null attrib3 lineplot3 SetFastClipMode ChartObj FASTCLIP X rtPlot3 new RTSimpleSingleValuePlot pTransforml lineplot3 movingAverageStock chartVu AddChartObject rtPlot3 VB scrollFramel New RTScrollFrame Me stockOpenl pTransforml ChartObj RT FIXEDEXTENT MOVINGSTART AUTOSCROLL scrollFramel ScrollScaleModeY ChartObj RT AUTOSCALE Y MINMAX Need to add this ProcessVar s to have auto scale work for all values of OHLC plot scrollFramel AddProcessVar stockHigh1 scrollFramel AddProcessVar stockLowl ScrollFramel AddProcessVar stockClosel scrollFramel ScrollRescaleMargin 0 05 chartVu AddChartObject scrollFramel ScrollFrame2 New RTScrollFrame Me NASDAQChannel pTransform2 ChartObj RT FIXEDEXTENT MOVINGSTART AUTOSCROLL scrollFrame2 ScrollScaleModeY ChartObj RT AUTOSCALE Y MINMAX scrollFrame2 ScrollRescaleMargin 0 05 chartVu AddChartObject scrollFrame2 Dim attribl As New ChartAttribute Color Yellow 1 DashStyle Solid Dim ohlcplotl As New OHLCPlot pTransforml N
79. of the chart Get a reference to the RTBarIndicator object Set Get the bar width Set Get to the pixel width of the bar in the bar plot Get the coordinate system object for the indicator Inherited from RTAutoIndicator Set to true to show 3D faceplate Inherited from RTAutoIndicator Get the graph background object Inherited from RTAutolIndicator Get the default graph border for the chart Inherited from RTAutoIndicator Get Set any an indicator format is supported Inherited from RTAutoIndicator Gets or sets the height of the control Inherited from Control Get the most recent high RTAlarm object Inherited from RTAutoIndicator Set Get to true and an interior axis is drawn Get the most recent low RTAlarm object Inherited from RTAutoIndicator MainTitle MaxIndicatorValue MinimumSize MinIndicatorValue NumericPanelMeter PlotAttrib PlotBackground PreferredSize ProcessVariable RenderingMode ResizeMode SetpointAlarm TagPanelMeter TagString UnitsPanelMeter UnitsString Visible Width XAxis XAxis2 XAxisLab XAxisTitle XGrid Miscellaneous Shape Drawing 321 Get Set the tag string Inherited from RTAutoIndicator The maximum value for the indicator Inherited from RTAutolIndicator Gets or sets the size that is the lower limit that GetPreferredSize Size can specify Inherited from Control The minimum value for the indicat
80. or radial to the tick mark parallel METER LABEL RADIAL 1 METER LABEL RADIAL 2 The axis label strings are set using the SetAxisLabelString method Sets the string array used to hold user defined SetAxisLabelsStrings inherited axis label strings Setting the string array does from StringAxisLabels not automatically turn on the use of string labels Use enableAxisLabelsStrings to enable axis strings Meters Coordinates Meter Axes and Meter Axis Labels 185 A complete listing of RTMeterStringAxisLabels properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory Example for string meter axis labels The example below extracted from the AutoInstrumentPanel example method InitializeFuel creates a meter coordinate system that starts at the arc angle of 180 degrees and has an arc extent of 90 degrees The meter scale extends from 0 0 to 32 0 in the counterclockwise direction The meter axis is labeled at the major tick marks with the strings E 1 2 F C ChartView chartVu this ChartAttribute attribl new ChartAttribute Color Black 1 DashStyle Solid Color Blue double startarcangle 180 double arcextent 90 double startarcscale 0 0 double endarcscale 32 0 bool arcdirection false double arcradius 0 8 double centerx 0 0 centery 0 0 RTMeterCoordinates meterframe new RTMeterCoordinates startarcangle arcexten
81. or minor tick marks of the axis across the width or height of the plot area of the chart This class works in conjunction with the LinearAxis LogAxis and TimeAxis classes This class defines the grid lines associated with a polar axis A polar chart grid consists of two sets of lines The first set is a group of concentric circles centered on the origin and passing through the major and or minor tick marks of the polar magnitude horizontal and vertical axes The second set is a group of radial lines starting at the origin and extending to the outermost edge of the polar plot circle passing through the major and minor tick marks of the polar angle circular axis This class works in conjunction with the PolarAxes class Analogous to the PolarGrid this class draws radial and circular grid lines for an Antenna chart 86 QCChart2D CF Class Summary AxisTitle ChartLabel NumericLabel TimeLabel StringLabel ElapsedTimeLabel The chart text classes draw one or more strings in the chart window Different classes support different numeric formats including floating point numbers date time values and multi line text strings International formats for floating point numbers and date time values are also supported ChartText ChartTitle AxisTitle ChartLabel NumericLabel TimeLabel ElapsedTimeLabel StringLabel This class draws a string in the current chart window It is the base class for the ChartTitle AxisTitle
82. or sets the distance in pixels between the left edge of the control and the left edge of its container s client area Inherited from Control Gets or sets the coordinates of the upper left corner of the control relative to the upper left corner of its container 310 Process Variable Viewer NumCols NumericFormat NumRows ParentChartView ParentTransform PreferredSize ResizeMode Right RowHeaderAttribute RowHeaderFont RowHeads SmoothingMode SourceDataset StartCol StartRow SyncChart TableGreenBarFlag TableStartPosX TableStartPosY TableStopPosX TableStopPosY TextRenderingHint Title Top TransformList Inherited from Control Inherited from DataGridBase Inherited from DataGridBase Inherited from DataGridBase Inherited from DataGridBase Inherited from DataGridBase Inherited from ChartView Inherited from ChartView Gets the distance in pixels between the right edge of the control and the left edge of its container s client area Inherited from Control Inherited from DataGridBase Inherited from DatasetViewer Inherited from DataGridBase Inherited from ChartView Inherited from DatasetViewer Inherited from DataGridBase Inherited from DataGridBase Inherited from DatasetViewer Inherited from DataGridBase Inherited from DataGridBase Inherited from DataGridBase Inherited from DataGridBase Inherited from DataGridBase Inherited from ChartView
83. order to use the font in Visual Studio Net programs you should copy this file to the Windows Fonts subdirectory of the Windows CE device Once that is done it can be used like any other TrueType font All of our example programs assume that the font has been copied to the Windows Fonts The example below creates an instance of the Digial SF font Font fontl2Numeric new Font Digital SF 12 FontStyle Regular The font can be downloaded from the link http www webfontlist com pages station asp ID 10643 amp x Fonts if you want to download your own copy If you create an application that uses this font you have to plan on how to install it on the target computer 110 Panel Meter Classes Panel Meters Class RTPanelMeter Com quinncurtis chart2dnetcf ChartPlot RTPlot RTSingleValueIndicator RTPanelMeter The RTPanelMeter is an abstract class for the other panel meter classes While it cannot be instantiated it does contain properties and methods common to all panel meters A summary of these properties is listed below Selected Public Instance Properties AlarmIndicatorColorMode inherited from RTSingleValueIndicator ContrastTextAlarmColor inherited from RTPanelMeter CurrentProcessValue inherited from RTSingleValueIndicator Frame3DEnable inherited from RTPanelMeter PanelMeterNudge inherited from RTPanelMeter PanelMeterPosition inherited from RTPanelMeter Get Set whether the c
84. panel meter below extracted from the HybridCar example method InitializeMotorVariablesGraph adds an RTStringPanelMeter above the motor variables multi bar indicator It is used to display the process variable tag name as the title for each bar in the multi value indicator Note The RTStringPanelMeter only needs to be added once to the RTMultiBarIndicator It automatically picks up on the tag name for each RTProcessVar object referenced by the RTMultiBarIndicator RPM RI Current RES 80 80 80 RTBarIndicator barplot new RTBarIndicator pTransforml batteryCharge barwidth barbase attribi barjust barorient ChartAttribute panelmeterattrib new ChartAttribute Color SteelBlue 0 DashStyle Solid Color Black ChartAttribute paneltagmeterattrib new ChartAttribute Color SteelBlue 0 DashStyle Solid Color White RTNumericPanelMeter panelmeter new RTNumericPanelMeter pTransforml panelmeterattrib panelmeter PanelMeterPosition ChartObj OUTSIDE PLOTAREA MIN panelmeter TextColor Color SpringGreen panelmeter NumericTemplate TextFont fontl6Numeric panelmeter NumericTemplate DecimalPos 0 panelmeter AlarmIndicatorColorMode ChartObj RT TEXT BACKGROUND COLOR CHANGE ON ALARM panelmeter PanelMeterNudge new Point2D 0 2 barplot AddPanelMeter panelmeter 126 Panel Meter Classes RTStringPanelMeter panelmeter3 new RTStringPanelMeter pTransforml paneltagmeterattrib ChartObj RT TAG STRING p
85. points are connected using a straight or a step line QC Line Bar Scatter Pie Dynamic Financial Axes Mouse Polar Contour Theoretical vs Experimental Data 100 A Quinn Curtis j aa 60 Work 40 20 0 1 10 20 30 40 50 MBAS 1000 employees E Energy Companies Software Companies Predicted Scatter plots usually display some form of sampled data 84 QCChart2D CF Class Summary SimpleScatterPlot SimpleVersaPlot Legend Classes LegendItem BubblePlotLegendItem Legend StandardLegend BubblePlotLegend This class is a concrete implementation of the SimplePlot class and it displays simple datasets in a scatter plot format where each data point is represented using a symbol The SimpleVersaPlot is a plot type that can be any of the four simple plot types LINE MARKER PLOT LINE PLOT BAR PLOT SCATTER PLOT It is used when you want to be able to change from one plot type to another without deleting the instance of the old plot object and creating an instance of the new Legends provide a key for interpreting the various plot objects in a graph It organizes a collection of legend items one for each plot objects in the graph and displays them in a rectangular frame Legend LegendItem BubblePlotLegendItem StandardLegend This class is the abstract base class for chart legends This class is the legend item class for all plot objects except for bubble plots Each legend item manages one symbol
86. scrolling mode for the x coordinate Use one of the x axis scroll frame constants RT NO AUTOSCALE X RT AUTOSCALE X CURRENT SCALE RT AUTOSCALE X MIN RT AUTOSCALE X MAX RT AUTOSCALE X MINMAX RT FIXEDEXTENT MOVINGSTART AUTOSCROLL RT MAXEXTENT FIXEDSTART AUTOSCROLL RT FIXEDNUMPOINT AUTOSCROLL Get Set the scrolling mode for the y coordinate Use one of the y axis scroll frame constants RT NO AUTOSCALE Y RT AUTOSCALE Y MIN RT AUTOSCALE Y MAX RT AUTOSCALE Y MINMAX Get Set the time stamp mode for the time values in the process variables Use one of the time stamp mode constants RT NOT MONOTONIC X MODE not monotonic means that the x values do not have to increase with increasing time A real time xy plot that plots x values against y values might have this characteristic RT MONOTONIC X MODE The default value Monotonic means that the x values always increase with increasing time If the scroll frame routines know that the x values will never backtrack it speeds up the search algorithm for minimum and maximum x values to use in auto scaling the x axis The Scroll Frame and Single Channel Scrolling Plots 233 A complete listing of RTScrollFrame properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory See the examples for the RTSimpleSingleValuePlot and RTGroupMultiValuePlot for example of the use of the RTScrollFrame class Class RTVerticalScrollFrame
87. sorted by z order before they are drawn A complete listing of RTMultiBarIndicator properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory Example for an RTMultiBarIndicator Segmented Bar Indicator The multi bar indicator example below extracted from the Dynamometer example method InitializeEnginel TempIndicator creates the 4 bar segmented bar temperature indicator in the left upper section of the graph It demonstrates how the plot area is defined for the multi bar indicator how to create axes and axis labels An RTAlarmIndicator is also created to display the alarm limit symbols to the right of the bar indicator The image below also includes an RTStringPanelMeter for the Cyl tag an RTNumericPanelMeter for the numeric readout below each bar indicator and an RTAlarmPanelMeter below that See the Dynamometer example program for the complete program listing that creates all of these objects 156 Multiple Channel Bar Indicator C private void InitializeEnginelTempIndicator ChartView chartVu this CartesianCoordinates pTransforml new CartesianCoordinates 0 0 0 0 1 0 800 0 pIransforml SetorsphBorderDiagonal 0 3 16 0 92 0 33 7 Background background new Background pTransforml ChartObj PLOT BACKGROUND Color Gray chartVu AddChartObject background ChartAttribute attribl new ChartAttribute Color DarkMagenta 1 DashStyle Solid Colo
88. starting x value miny The starting y value as a DateTime ChartCalendar double or TimeSpan value depending on which of the overloads is used maxx The ending x value maxy The ending y value as a DateTime ChartCalendar double or TimeSpan value depending on which of the overloads is used The InitStrings method initialized the title and units strings Method InitStrings VB public void InitStrings i string title string units Cit public void InitStrings string title string units 376 Miscellaneous Shape Drawing Parameters title The title string units The units string Add a channel a plot object to the scrolling graph using the AddRTPlotObject Method AddRTPlotObject VB Public Sub AddRTPlotObject _ plottype As Integer _ colr As Color _ tag As String Cit public void AddRTPlotObject int plottype Color colr string tag Parameters plottype Specifies the simple plot type LINE MARKER PLOT LINE PLOT BAR PLOT SCATTER PLOT colr The primary color of the plot object tag The tag name associated with the plot object Use the UpdateIndicator method to update the scrolling graph with new data Method UpdateIndicator VB Public Sub UpdateIndicator _ Miscellaneous Shape Drawing 377 values As Double _ updatedraw As Boolean Public Sub UpdateIndicator value As Double _ updatedraw As Boolean CH public void UpdateIndicator double val
89. that is used to specify the font and numeric format information associated with the panel meter RTNumericPanelMeter constructors Visual Basic Overloads Public Sub New ByVal transform As PhysicalCoordinates ByVal datasource As RTProcessVar _ ByVal attrib As ChartAttribute Overloads Public Sub New ByVal transform As PhysicalCoordinates ByVal attrib As ChartAttribute Ct public RTNumericPanelMeter 116 Panel Meter Classes PhysicalCoordinates transform RTProcessVar datasource ChartAttribute attrib public RTNumericPanelMeter PhysicalCoordinates transform ChartAttribute attrib Parameters transform The coordinate system for the new RTNumericPanelMeter object datasource The process variable associated with the panel meter attrib The color attributes of the panel meter indicator Selected Public Instance Properties Set Get the NumericLabel template for the panel meter numeric NumericTemplate value The text properties associated with the panel meter are set using this property In addition the format of the numeric value and the number of digits to the right of the decimal point is also set here A complete listing of RTNumericPanelMeter properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory Example The panel meter below extracted from the Treadmill example method InitializeRightPanelMeters is an independent p
90. the current alarm state or an alarm transition from one alarm state to another The RTAlarmEventArgs class is used to pass alarm data to the event handler Panel Meter Classes com quinncurtis chart2dnetcf ChartPlot RTPlot RTSingleValueIndicator RTPanelMeter RTNumericPanelMeter RTAlarmPanelMeter RTStringPanelMeter RTTimePanelMeter RTElapsedTimePanelMeter RTFormControlPanelMeter The RTPanelMeter derived classes are special cases of the single value indicator classes that are used throughout the software to display real time data in a text format Panel meters are available for numeric values string values time date values and alarm values All of the panel meter classes have a great many options for controlling the text font color size border and background of the panel meter rectangle RTPanelMeter objects are used in two ways First they can be standalone and once attached to an RTProcessVar object they can be added to a ChartView as any other QCChart2D CF 22 Class Architecture GraphObj derived class Second they can be attached to most of the single channel and multiple channel indicators such as RTBarIndicator RTMultiBarIndicator RTMeterIndicator and RTAnnunciator objects where they provide text output in addition to the indicators graphical output RTPanelMeter The abstract base class for the panel meter types Pace mph Numeric panel meters can be the primary display method for real time data or they can be
91. the summation of error terms if the current PID output level is outside a user specified range of high and low output values This limiting of the summation term is commonly referred to as anti reset windup Implementation Real Time Graphics Tools for Windows can maintain an unlimited number of control loops simultaneously the only limit being memory and CPU power A PID control object the terms PID controller and PID object are used interchangeably in this documentation is created and configured using the RTPID class The RTCalcPID function calculates the PID algorithm s output It should be called at equal time intervals PID algorithm constants can be tuned by adjusting corresponding property values A typical problem occurs when a PID object is switched from manual to automatic mode or when a PID constant is changed the output value can change very quickly possibly damaging the control equipment The Quinn Curtis implementation of the PID algorithm uses the bumpless transfer technique to prevent this problem The algorithm also uses anti reset windup technique 274 PID Control PID Control Class RTPIDControl RTPIDControl constructors Visual Basic Overloads Public Sub New ByVal ptype As Integer ByVal setpnt As Double _ ByVal steadstat As Double ByVal prop As Double ByVal integ As Double ByVal deriv As Double _ ByVal lowclmp As Double ByVal highclmp As Double ByVal rateclmp As Double _ ByVal sampleper As Do
92. the y scale to be constantly rescaled to reflect the current dynamic range of the y values in the scroll frame The long term goal is that as computers get faster and Net more efficient you will never need to update the display faster than 30 60 times a second since this will result smooth scrolling even if the underlying data is updated 10 000 times a second Computers are not there yet running Net at least other languages are much faster and the scrolling may appear slow but in the long run the algorithm should prove an efficient technique throughout the rest of the decade RTScrollFrame constructors Visual Basic Overloads Public Sub New ByVal component As ChartView _ ByVal processvar As RIProcessVar _ ByVal initialscale As PhysicalCoordinates ByVal scrollxmode As Integer _ ByVal autoscaleymode As Integer _ Overloads Public Sub New ByVal component As ChartView _ ByVal processvar As RIProcessVar _ ByVal initialscale As PhysicalCoordinates ByVal scrollmode As Integer Overloads Public Sub New ByVal component As ChartView _ ByVal initialscale As PhysicalCoordinates ByVal scrollxmode As Integer _ ByVal autoscaleymode As Integer C public RTScrollFrame ChartView component RTProcessVar processvar PhysicalCoordinates initialscale int scrollxmode int autoscaleymode E public RTScrollFrame ChartView component RTProcessVar processvar PhysicalCoordinates initialscale int sc
93. x or y direction using the SetZoomXEnable and SetZoomYEnable methods Set the rounding mode associated with rescale operations using the SetZoomXRoundMode and SetZoomYRoundMode methods Call the ChartZoom PopZoomStack method at any time and the chart scale reverts to the minimum and maximum values of the previous zoom operation Repeated calls to the PopZoomStack method return the chart scale is to its original condition after which the PopZoomStack method has no effect 288 Zooming Super zoom example Adapted from the RTStockDisplay example In this example a new class derives from the ChartZoom class and the MousePressed event overridden The event invokes the PopZoomStack method Otherwise the default operation of the ChartZoom class controls everything else 28 0 1960 27 5 1950 27 0 1940 26 5 1930 11 52 15 11 52 30 11 52 45 11 53 00 C private class ZoomWithStack ChartZoom public ZoomWithStack ChartView component TimeCoordinates transforms bool brescale base component transforms brescale public override void OnMouseDown MouseEventArgs mouseevent if mouseevent Button amp MouseButtons Right 0 this PopZoomStack else base OnMouseDown mouseevent ZoomWithStack zoomObj TimeCoordinates timecoordsarray pTransforml pTransform2 zoomObj new ZoomWithStack chartVu timecoordsarray true zoomObj SetButtonMask MouseButtons Left zoomObj SetZzoomYEnable true
94. zoomObj SetZzoomXEnable true zoomObj SetZzoomXRoundMode ChartObj AUTOAXES FAR zoomObj SetzoomYRoundMode ChartObj AUTOAXES FAR zoomObj SetEnable false Zooming 289 zoomObj SetZzoomStackEnable true chartVu SetCurrentMouseListener zoomObj private void zoomOn Button Click object sender System EventArgs e timerl Enabled false Change to display of all collected data scrollFramel ScrollScaleModeX ChartObj RT AUTOSCALE X MINMAX Look at updatecounter number of points which is all of them scrollFramel MaxDisplayHistory updatecounter Render graph based on new scale Change to display of all collected data ScrollFrame2 ScrollScaleModeX ChartObj RT AUTOSCALE X MINMAX Look at updatecounter number of points which is all of them scrollFrame2 MaxDisplayHistory updatecounter Render graph based on new scale Update first to display all historical information then disable to allow for zooming this UpdateDraw scrollFrame2 ChartObjEnable ChartObj OBJECT DISABLE ScrollFramel ChartObjEnable ChartObj OBJECT DISABLE Turn on zooming zoomObj SetkEnable true private void zoomRestore Button Click object sender System EventArgs e RTControlButton button RTControlButton sender Turn off zooming zoomObj SetEnable false Re establish scroll mode ScrollFramel ScrollScaleModeX ChartObj RT FIXEDEXTENT MOVINGSTART AUTOSCROLL scrollFramel ChartObjEnab
95. 0 0 0 1 0 1 0 prransforml SetGraphBorderDiagonal 0 01 65 0 2 0 98 ChartAttribute attribl new ChartAttribute Color Black 5 DashStyle Solid Color LightBlue ArrayList buttonlistl new ArrayList StartButton ButtonUncheckedText Start StartButton ButtonChecked true StartButton Click new System EventHandler this selector Button Click StartButton ButtonFont buttonfont buttonlistl Add StartButton Buttons Track Bars and Other Form Control Classes 253 StopButton ButtonUncheckedText Stop StopButton ButtonChecked false StopButton Click new System EventHandler this selector Button Click StopButton ButtonFont buttonfont buttonlistl Add StopButton ResetButton ButtonUncheckedText Reset ResetButton ButtonChecked false ResetButton Click new System EventHandler this selector Button Click ResetButton ButtonFont buttonfont buttonlistl Add ResetButton ClearButton ButtonUncheckedText Clear ClearButton ButtonChecked false ClearButton Click new System EventHandler this selector Button Click ClearButton ButtonFont buttonfont buttonlistl Add ClearButton int numColumns 1 int numRows 4 startStopControlGrid new RTFormControlGrid pTransforml null buttonlistl1 numColumns numRows attribl startStopControlGrid CellRowMargin 0 1 startStopControlGrid CellColumnMargin 0 0 startStopControlGrid FormControlTemplate Fr
96. 0 233 237 242 248 256 261 264 2774 282 285 287 290 293 295 299 302 312 318 329 340 347 353 359 372 383 384 Visual C vi 11 391 Working coordinates 54 55 WorkingCoordinates 54 55 World coordinates 54 55 WorldCoordinates 54 55 Zoom vi 2 292 Zooming 2 88 281 282 283 285 287 288 290 292
97. 0 degrees The meter scale extends from 0 0 to 100 0 in the counterclockwise direction C double startarcangle 225 double arcextent 270 double startarcscale 0 0 double endarcscale 100 0 bool arcdirection false double arcradius 0 6 double centerx 0 0 centery 0 2 Font meterFont font12 RTMeterCoordinates meterframel new RTMeterCoordinates startarcangle arcextent startarcscale endarcscale arcdirection centerx centery arcradius VB Fahrenheight scale Dim startarcangle As Double 225 Dim arcextent As Double 270 Dim startarcscale As Doubles 0 0 Dim endarcscale As Double 100 0 Dim arcdirection As Boolean False Dim arcradius As Double 0 6 Dim centerx As Double 0 0 Il o N Dim centery As Double Dim meterFont As Font font12 Dim meterframel As New RTMeterCoordinates startarcangle arcextent startarcscale endarcscale arcdirection centerx centery arcradius Meters Coordinates Meter Axes and Meter Axis Labels 173 The example below extracted from the RTGraphNetDemo example file ArrowMeterControll method InitializeMeter4 creates a meter coordinate system that starts at the arc angle of 90 degrees and has an arc extent of 180 degrees The meter scale extends from 0 0 to 100 0 in the counterclockwise direction 60 Bo 100 C double startarcangle 90 double arcextent 180 double startarcscale 0 0 double endarcscale 100 0 bool
98. 100 GMB Panel meters to the left and right of the bar for the tag name numeric value and alarm status The scale units displays horizontally under the scale Turn the BarEndBulb property on and the bar indicator area shrinks horizontally in order to fit in the bulb without overlap Miscellaneous Shape Drawing 325 Horiz 1 Horiz 1 100 yu Panel meters to the left and right of the bar for the numeric value and and alarm status A panel meter at the top for the tag name The scale units displays horizontally under the scale Turn the BarEndBulb property on and the bar indicator area shrinks horizontally in order to fit in the bulb without overlap Horiz 2 Horiz 2 MEI Horiz 2 Horiz 2 eum Panel meter right of the bar for the alarm status with the numeric panel meter placed in the middle of the bar indicator area A panel meter at the top for the tag name The scale units displays horizontally under the scale Turn the BarEndBulb property on and the bar indicator area shrinks horizontally in order to fit in the 326 Miscellaneous Shape Drawing Horiz Horiz 3 Horiz Horiz 3 opge Simliar to GraphFormat 1 except for the treatment of the bar end bulb Panel meters to the left and right of the bar for the numeric value and and alarm status A panel meter at the top for the tag name The scale units displays horizontally under the scale Turn the BarEndBulb property on and
99. 11 Microsoft Visual Studio EIS File Edit View Project Build Debug Data Format Tools Window Community Help sl ES MO A Ga e z EL b Debug Any CPU M ScrollApplication3 D c BEA RO dei Windows Mobile 5 0 Pocket PC Emulat S5 Z 4 Sy _ d Eas Alma a3 iS 0 00 SE Er e o ei E Start Page X Solution Explorer Scrollap I X ce inputrarer ES EE S A Label 4 fa e E ES amp A LinkLabel O M od Solution 5croll pplication11 1 proj P B Pal ScrollApplication11 ListBox Ea My Project say evict EE Formi vb MainMenu J MessageQueue E MonthCalendar E Notification 2 NumericUpDown 5 OpenFileDialog Panel Al PictureBox E ProgressBar RadioButton SaveFileDialog 7 SerialPort ch Splitter ke StatusBar CA TabControl abi TextBox Timer zT Properties e HN com quinncurtis chart2dnetcF ChartView d m ie ToolBar d ChartYiew1 com quinncurtis chart2 T TrackBar 2 31 E Z 7 TreeView SG Name ChartView1 VScrollBar Anchor Top Left ag WebBrowser AutoScroll False SE Chartview AutoScrollMargir 0 0 E Common Device Controls S AutoValidate EnablePreventFo Ne Pointer mainMenut BackColor E control PES BackgroundDrav False BorderStyle None v CheckBox d ContextMenu none Find Results 1 Dock None 345 zx i DoubleBufferEn False Enabled True
100. 2 new ChartAttribute Color Black 1 DashStyle Solid Color Blue RTMeterNeedleIndicator meterneedle2 new RTMeterNeedleIndicator meterframe bigProcessVarArray 1 meterneedle2 NeedleBaseWidth 3 meterneedle2 SetChartObjAttributes needleattrib2 meterneedle2 NeedleLength 0 35 chartVu AddChartObject meterneedle2 215 Dials and Clocks VB dialComboProcessVarl New RTComboProcessVar Altimeter processVarl DefaultAttribute dialComboProcessVarl AddProcessVar bigProcessVarArray 0 dialComboProcessVarl AddProcessVar bigProcessVarArray 1 dialComboProcessVarl SetDivisorItem 0 1 dialComboProcessVarl SetDivisorItem 1 10 dialComboProcessVarl SetModuloItem 0 100 dialComboProcessVarl SetModuloItem 1 100 Private Sub InitializeDiall Dim chartVu As ChartView Me Dim startarcangle As Double 90 Dim arcextent As Double 360 Dim startarcscale As Double 0 0 Dim endarcscale As Double 100 0 Dim arcdirection As Boolean False Dim arcradius As Double 0 9 Dim centerx As Double 0 0 Dim centery As Double 0 0 Dim meterFont As Font Forml font12 Dim meterframe As New RTMeterCoordinates startarcangle arcextent startarcscale endarcscale arcdirection centerx centery arcradius meterframe SetGraphBorderDiagonal 0 0 0 0 0 25 0 45 Dim gbackground As New Background meterframe ChartObj GRAPH BACKGROUND Color White chartVu AddChartObject gbackground Dim frameattrib
101. 2 155 157 159 160 161 163 329 332 RTMultiValueAnnunciator 18 30 31 93 217 220 221 222 223 224 225 226 RTMultiValueIndicator 18 30 35 37 39 151 217 220 229 233 241 264 267 RTNumericPanelMeter 18 21 22 30 109 115 116 117 118 119 121 122 125 126 134 136 141 143 145 155 157 159 201 219 220 225 226 257 258 259 260 321 333 342 349 356 365 RTPanelMeter 16 18 21 22 24 27 29 37 48 49 93 109 110 111 115 116 120 123 127 130 132 133 151 169 189 218 261 262 295 RTPIDControl 18 47 49 274 277 278 279 RTPlot 18 21 24 30 39 110 111 115 120 123 127 130 132 137 138 140 151 153 154 189 410 Index 190 191 198 202 217 220 229 233 237 241 262 266 RTProcessVar 4 11 14 16 18 20 21 22 23 24 277 28 29 30 31 32 36 40 93 94 95 96 98 99 100 102 103 104 105 106 107 109 111 115 116 118 120 123 124 125 127 130 133 137 140 146 147 151 152 154 161 163 164 174 189 191 192 198 202 207 208 209 210 211 217 218 221 222 224 226 227 229 230 233 234 237 241 242 245 246 261 262 265 267 277 279 281 307 308 309 311 318 321 329 333 340 342 349 356 359 365 366 372 RTRoundedRectangle2D 18 295 299 300 301 302 RTScrollFrame 18 30 33 39 40 41 229 230 233 238 239 240 243 244 245 281 365 RTSimpleSingleValuePlot 11 14 17
102. 4 Multiple Channel Bar Indicator Dim offset As Double Me BarWidth 2 GetCustomBarWidth v 2 Return offset End Function GetCustomBarOffset Public Overrides Function GetCustomBarWidth ByVal v As Double As Double Dim width As Double 0 5 width 0 01 v 100 v 100 Me BarWidth Return width End Function GetCustomBarWidth End Class CustomRTMultiBarIndicator Private Sub InitializeBar3 Dim processVarArray As RTProcessVar _ processVarl processVar2 processVar3 processVar4 Dim chartVu As ChartView Me Dim pTransforml As New CartesianCoordinates 0 0 0 0 1 0 100 0 pTransforml SetGraphBorderDiagonal 0 05 0 475 0 5 0 65 Dim background As New Background pTransforml ChartObj PLOT BACKGROUND Color White chartVu AddChartObject background Dim attribl As New ChartAttribute Color Green i DashStyle Solid Color BlanchedAlmond Dim attrib2 As New ChartAttribute Color Green P DashStyle Solid Color Aquamarine Dim attrib3 As New ChartAttribute Color Green DashStyle Solid Color DarkSalmon Dim attrib4 As New ChartAttribute Color Green DashStyle Solid Color Moccasin Dim attribArray As ChartAttribute attribl attrib2 attrib3 attrib4 Dim barwidth As Double 0 2 Dim barbase As Double 0 0 Il o Dim barspace As Double e SET Dim barjust As Integer ChartObj JUSTIFY MIN Dim barorient As Integer ChartObj VERT DIR Dim baraxis As New LinearAxis
103. 96 297 298 299 RT XE TimeGroupDataset XE Time Date group datsets Alarm 18 20 21 93 96 98 99 100 101 102 103 104 105 106 107 320 321 332 333 341 342 348 349 355 356 364 365 366 RTAlarmEventArgs 18 20 21 93 102 103 104 105 106 107 RTAlarmIndicator 18 34 35 49 141 143 144 155 320 331 RTAlarmPanelMeter 18 21 23 30 109 120 121 122 123 141 143 145 155 157 160 219 220 225 227 320 331 341 348 355 364 RTAnnunciator 18 22 24 26 109 217 218 219 220 RTAutoBarIndicator 11 19 20 42 43 317 318 322 326 329 334 359 372 RTAutoClockIndicator 11 19 20 42 46 317 353 356 357 RTAutoDialIndicator 11 19 20 42 46 317 347 350 352 RTAutoMeterIndicator 11 19 20 42 45 317 340 343 345 353 RTAutoMultiBarIndicator 11 19 20 42 44 317 329 337 RTAutoPanelMeterIndicator 11 19 20 317 RTAutoScrollGraph 11 19 20 47 317 358 359 367 369 370 371 372 377 379 380 RTBarIndicator 18 22 24 27 93 109 118 119 121 122 125 126 137 138 141 142 144 145 146 147 149 150 160 163 318 320 332 Index 409 RTComboProcessVar vi 18 207 208 209 210 211 213 215 347 350 351 353 RTControlButton 17 19 37 38 39 247 248 249 250 252 253 256 260 264 267 268 269 285 286 289 292 RTControlTrackBar 19 37 38 134 135 247 256 257 258 259 260 262 263 264 RTDatasetTruncat
104. ALARM CHANGE inherited from RT INDICATOR COLOR CHANGE ON ALARM RTSingleValueIndicator Sets the attributes for a chart object using a ChartObjAttributes ChartAttribute object inherited from GraphObj Enables Disables the chart object A chart object is ChartObjEnable drawn only if it is enabled A chart object is enabled by inherited from GraphObj default Sets the reference to the PhysicalCoordinates object ChartObjScale inherited that the chart object is placed in from GraphObj CurrentProcessValue inherited from RTSingleValueIndicator FillColor inherited from GraphObj IndicatorBackground IndicatorBackgroundEnable IndicatorSubtype LineColor inherited from GraphObj LineStyle inherited from GraphObj LineWidth inherited from GraphObj MeterAxis NumChannels inherited from RTPlot OverRangeNormalizedValue PanelMeterList inherited from RTPlot PrimaryChannel Meter Indicators Needle Arc and Symbol 190 Get the current process value of the primary channel Sets the fill color for the chart object Get Set the background attribute of the meter indicator Set to true to enable the display of the meter indicator background Set Get the meter indicator subtype Use one of the meter indicator subtype constants RT METER NEEDLE SIMPLE SUBTYPE RT METER NEEDLE PIEWEDGE SUBTYPE RT METER NEEDLE ARROW SUBTYPE RT METER ARC BAND SUBTYPE RT METER SEGMENTED ARC SUBTYPE
105. ARYBUTTON SUBTYPE RTControlButton ResetAll new RTControlButton ChartObj RT CONTROL MOMENTARYBUTTON SUBTYPE RTControlButton StartControl new RTControlButton ChartObj RT CONTROL TOGGLEBUTTON SUBTYPE public void InitializeStartStopButtons ChartAttribute attribl new ChartAttribute Color Black 3 DashStyle Solid Color Coral Font buttonfont font9Bold ChartView chartVu this ArrayList buttonlist new ArrayList StartControl ButtonUncheckedText Start StartControl ButtonCheckedText Stop StartControl Click 250 Buttons Track Bars and Other Form Control Classes new System EventHandler this controlOn Button Click StartControl ButtonFont buttonfont StartControl ButtonChecked false buttonlist Add StartControl ResetErrorTerm ButtonUncheckedText Reset Error ResetErrorTerm Click new System EventHandler this resetErrorTerm Button Click ResetErrorTerm ButtonFont buttonfont ResetErrorTerm ButtonChecked false buttonlist Add ResetErrorTerm ResetAll ButtonUncheckedText Reset All ResetAll Click new System EventHandler resetAll Button Click ResetAll ButtonFont buttonfont ResetAll ButtonChecked false buttonlist Add ResetAll int numColumns 3 int numRows 1 CartesianCoordinates pTransforml new CartesianCoordinates 0 0 0 0 1 0 1 0 pTransforml SetGraphBorderDiagonal 0 73 94 0 99 0 99 RTFormControlGrid controlgri
106. AXIS MIN meteraxisl LineWidth 1 meteraxisl LineColor Color Black meteraxisl SetAxisTickSpace 5 meteraxisl SetAxisMinorTicksPerMajor 4 meteraxisl ShowAlarms False meterneedle MeterAxis meteraxisl chartVu AddChartObject meteraxis1 Dim meteraxislabelsl As New RTMeterAxisLabels meteraxisl meteraxislabelsl SetTextFont meterFont meteraxislabelsl SetAxisLabelsDir meteraxisl GetAxisTickDir meteraxislabelsl OverlapLabelMode ChartObj OVERLAP LABEL DRAW chartVu AddChartObject meteraxislabels1 String Meter Axis Labels Class RTMeterStringAxisLabels Com quinncurtis chart2dnetcf StringAxis Labels RTMeterStringAxisLabels 184 Meters Coordinates Meter Axes and Meter Axis Labels This class labels the major tick marks of the RTMeterAxis class using user defined strings RTMeterStringAxisLabels constructor Visual Basic Overloads Public Sub New ByVal baseaxis As RTMeterAxis Ct public RTMeterStringAxisLabels RTMeterAxis baseaxis Parameters baseaxis The RTMeterAxis object associated with the labels Parameters baseaxis The RTMeterAxis object associated with the labels Selected Public Instance Properties The properties of the RTMeterStringAxisLabels class are pretty much the same as the RTMeterA xisLabels class with these exceptions MeterLabelTextOrient Get Set if the text is horizontal METER LABEL HORIZONTAL at right angles to the tick mark METER LABEL PERPENDICULAR
107. As New ChartAttribute Color Black 1 DashStyle Solid Color Blue Dim needleattribl As New ChartAttribute Color Black 1 DashStyle Solid Color Blue Dim meterneedlel As New RTMeterNeedleIndicator meterframe bigProcessVarArray 0 meterneedlel NeedleBaseWidth 5 meterneedlel SetChartObjAttributes needleattribl meterneedlel NeedleLength 0 55 chartVu AddChartObject meterneedlel Dim needleattrib2 As New ChartAttribute Color Black 1 DashStyle Solid Color Blue Dim meterneedle2 As New RTMeterNeedleIndicator meterframe bigProcessVarArray 1 meterneedle2 NeedleBaseWidth 3 meterneedle2 SetChartObjAttributes needleattrib2 meterneedle2 NeedleLength 0 35 chartVu AddChartObject meterneedle2 End Sub InitializeDiall Dials and Clocks 216 11 Single and Multiple Channel Annunciators RTAnnunciator RTMultiValueAnnunciator An annunciator is used to display the current values and alarm states of real time data Each channel of data corresponds to a rectangular cell where each cell can contain the tag name units current value and alarm status message Any of these items may be excluded If a channel is in alarm the background of the corresponding cell changes its color giving a strong visual indication that an alarm has occurred Single Channel Annunciator Class RTAnnunciator Com quinncurtis chart2dnetcf ChartPlot RTPlot RTMultiValueIndicator RTAnnunciator An RTAnnunciator is used to display t
108. BAR SEGMENTED SUBTYPE RT BAR SINGLE SEGMENT SUBTYPE RT POINTER SUBTYPE Set Get number of digits to the right of the decimal point in the PlotLabelTemplate property Set Get the numeric format of the PlotLabelTemplate property 154 Multiple Channel Bar Indicator LabelTemplateNumericForma t inherited from ChartPlot LineColor inherited from GraphObj LineStyle inherited from GraphObj LineWidth inherited from GraphObj NumChannels inherited from RTPlot PlotLabelTemplate inherited from ChartPlot PointerSymbolNum PrimaryChannel inherited from RTPlot RTDataSource inherited from RTSingleValueIndicator SegmentCornerRadius SegmentSpacing Sets the line color for the chart object Sets the line style for the chart object Sets the line width for the chart object Only line widths of 1 are supported by Net CF Get the number of channels in the indicator Set Get the plot objects data point template If the plot supports it this PlotLabelTemplate object is used as a template to size color and format the data point numeric values Set Get the symbol used for the pointer symbol indicator subtype RT POINTER SUBTYPE Use one of the constants RT NO SYMBOL RT LEFT LOW ALARM SYMBOL RT LEFT SET POINT SYMBOL RT LEFT HIGH ALARM SYMBOL RT RIGHT LOW ALARM SYMBOL RT RIGHT SETPOINT SYMBOL RT RIGHT HIGH ALARM SYMBOL RT TOP LOW ALARM SYMBOL RT TOP SETPOINT SYMBOL RT TOP
109. C ChartView chartVu this ChartAttribute attribl new ChartAttribute Color Black 1 DashStyle Solid Color Blue double startarcangle 225 double arcextent 270 double startarcscale 0 0 double endarcscale 100 0 bool arcdirection false double arcradius 0 6 double centerx 0 0 centery 0 2 Font meterFont font12 RTMeterCoordinates meterframel new RTMeterCoordinates startarcangle arcextent startarcscale endarcscale arcdirection centerx centery arcradius Rectangle2D normrect new Rectangle2D 0 67 0 05 0 32 0 53 RT3DFrame frame3d new RT3DFrame meterframel normrect facePlateAttrib ChartObj NORM GRAPH POS chartVu AddChartObject frame3d meterframel SetGraphBorderDiagonal 0 67 0 05 0 99 0 58 182 Meters Coordinates Meter Axes and Meter Axis Labels RTMeterNeedleIndicator meterneedle new RTMeterNeedleIndicator meterframel humidity Add panel meters chartVu AddChartObject meterneedle RTMeterAxis meteraxisl new RTMeterAxis meterframel meterneedle meteraxisl SetChartObjAttributes attribl meteraxisl SetAxisTickDir ChartObj AXIS MIN meteraxisl LineWidth 1 meteraxisl LineColor Color Black meteraxisl SetAxisTickSpace 5 meteraxisl SetAxisMinorTicksPerMajor 4 meteraxisl ShowAlarms false meterneedle MeterAxis meteraxisl chartVu AddChartObject meteraxisl RTMeterAxisLabels meteraxislabelsl new RTMeterAxisLabels meter
110. ChartObj Y AXIS chartVu AddChartObject baraxis Dim baraxis2 As New LinearAxis pTransforml ChartObj Y AXIS baraxis2 SetAxisIntercept pTransforml GetStopX baraxis2 SetAxisTickDir ChartObj AXIS MAX chartVu AddChartObject baraxis2 Dim barAxisLab As New NumericAxisLabels baraxis barAxisLab TextFont fontl4 chartVu AddChartObject barAxisLab This uses an RTMultiProcessVar EngineCylindersl to initialize the indicator Dim barplot As New RTMultiBarIndicator pTransforml EngineCylindersl barwidth barspace barbase attribArray barjust barorient barplot SegmentSpacing 50 barplot SegmentWidth 30 barplot IndicatorBackground New _ ChartAttribute Color Black 1 DashStyle Solid Color Black barplot SegmentValueRoundMode ChartObj RT CEILING VALUE barplot SegmentCornerRadius 0 barplot IndicatorSubType ChartObj RT BAR SEGMENTED SUBTYPE Dim baralarms As New RTMultiAlarmIndicator baraxis barplot chartVu AddChartObject baralarms Dim panelmeterattrib As New ChartAttribute Color SteelBlue 1l DashStyle Soligd Color Black Dim paneltagmeterattrib As New ChartAttribute Color SteelBlue 1 DashStyle Solid Color White Dim panelmeter As New RTNumericPanelMeter pTransforml panelmeterattrib panelmeter PanelMeterPosition ChartObj OUTSIDE PLOTAREA MIN panelmeter TextColor brightGreen panelmeter NumericTemplate TextFont font1l5Numeric panelmeter NumericTemplate DecimalPos 0
111. ChartView ChartViewl Sub InitializeScrollGraph QCRTGraph CF Tutorial 387 Public Sub InitializeGraph InitializeScrollGraph End Sub InitializeGraph End Class e We placed all of the chart customization code in the InitializeGraph method You can copy this part of the program from our own version of this example ScrollApplicationl Form1 vb Until this method is called the ScrollApplicationl appears as an empty shell We call this method from the Form Load event You can easily add the Form Load event to your program by double clicking on the Form in design mode e You should be able to compile the project without error Run the project and the graph should be visible on the output device either an actual Windows Mobile device or an emulator The emulator can take 60 seconds or more to start the program and display the default form Adding a ChartView control at runtime The ChartView class can also be instantiated at runtime without placing it on a form at design time You can use the default ChartView constructor or one of the special constructors that simplify adding an instance of the control to a form at runtime See the list of ChartView constructors in Chapter 5 of the QCChart2D manual In general you pass the ChartView constructor a parent object Form Panel or TabbedControl and a positioning rectangle that defines the position and size of the ChartView object In order to add a ChartView control at runtime the C
112. Class Architecture Namespace com quinncurtis rtgraphnetcf System EventArgs RTAlarmEventArgs RTGroupDatasetTruncateArgs RTDatasetTruncateArgs Com quinncurtis chart2dnetcf ChartObj RTAlarm RTAlarmIndicator RTMultiAlarmIndicator RTProcessVar RTComboProcess Var RTPIDControl RTRoundedRectangle2D RTSymbol RTTextFrame RTGenShape RT3DFrame Com quinncurtis chart2dnetcf ChartPlot RTPlot RTSingleValueIndicator RTPanelMeter RTNumericPanelMeter RTAlarmPanelMeter RTStringPanelMeter RTTimePanelMeter RTElapsedTimePanelMeter RTFormControlPanelMeter RTAnnunciator RTBarlIndicator RTMeterIndicator RTMeterArcIndicator RTMeterNeedleIndicator RTMeterSymbolIndicator RTSimpleSingleValuePlot RTMultiValueIndicator RTMultiValueAnnunciator RTMultiBarIndicator RTGroupMultiValuePlot RTFormControlGrid RTScrollFrame RTVerticalScrollFrame Com quinncurtis chart2dnetcf PolarCoordinates RTMeterCoordinates Com quinncurtis chart2dnetcf LinearAxis Class Architecture 19 RTMeterAxis Com quinncurtis chart2dnetcf NumericAxisLabels RTMeterAxisLabels Com quinncurtis chart2dnetcf StringA xisLabels RTMeterStringAxisLabels System Windows Forms Button RTControlButton System Windows Forms TrackBar RTControlTrackBar Com quinncurtis chart2dnetcf ChartObj RTFormControl System Windows Forms UserControl ChartView RTAutoIndicator RTAutoBarIndicator RTAutoMultiBarIndicator RTAutoMeterIndicator RTAutoClockIndicator RTAutoDialIndicator RTAutoScroll
113. Color Bisque 1 Color Bisque Das Das Das Das hStyle Solid hStyle Solid hStyle Solid hStyle Solid Dim attribArray As ChartAttribute attribl attrib2 attrib3 attrib4 Dim numrows As Integer 2 Dim numcols As Integer 2 Dim annunciator As New RTMultiValueAnnunciator pTransforml processVarArray numcols numrows attribArray Dim panelmeterattrib As New ChartAttribute Color SteelBlue 1 DashStyle Solid Color Black Dim panelmeter As New RTNumericPanelMeter pTransforml panelmeterattrib panelmeter PanelMeterPosition ChartObj CENTERED BAR processVar2 panelmeter NumericTemplate TextFont Forml fontl4Numeric panelmeter NumericTemplate PostfixString ChrW 176 annunciator AddPanelMeter panelmeter pu Single and Multiple Channel Annunciators 227 Dim panelmeter2 As New RTAlarmPanelMeter pTransforml processVarl _ panelmeterattrib panelmeter2 PanelMeterPosition ChartObj BELOW REFERENCED TEXT panelmeter2 AlarmTemplate TextFont Forml font10 panelmeter2 SetPositionReference panelmeter annunciator AddPanelMeter panelmeter2 Dim panelmetertagattrib As New ChartAttribute Color SteelBlue 1 _ DashStyle Solid Color White Dim panelmeter3 As New RTStringPanelMeter pTransforml processVarl panelmetertagattrib ChartObj RT TAG STRING panelmeter3 SetPositionReference panelmeter panelmeter3 StringTemplate TextFont Forml font10 panelmete
114. CylinderTempl 1 ScrollFramel AddProcessVar EngineCylinderTempl 2 ScrollFramel AddProcessVar EngineCylinderTempl 3 scrollFramel ScrollScaleModeY ChartObj RT AUTOSCALE Y MINMAX scrollFramel ScrollRescaleMargin 0 05 chartVu AddChartObject scrollFramel Dim i As Integer For i 0 To 3 Dim lineplot As New SimpleLinePlot pTransforml Nothing attribarray i lineplot SetFastClipMode ChartObj FASTCLIP X rtLinePlotArrayl i New RTSimpleSingleValuePlot pTransforml lineplot EngineCylinderTempl i chartVu AddChartObject rtLinePlotArrayl i Next i 13 Multi Channel Scrolling Plots RTGroupMultiValuePlot The RTGroupMultiValuePlot class can be used to plot multi channel scrolling plot data It uses the QCChart2D CF GroupPlot class as a template to define the attributes of the multi channel plot It is not the only technique since the previous chapter had an example that plotted multiple line plots using the RTSimpleSingleValue plot class If you need to plot multiple channel data and each channel is a different plot type 1 e one channel is a line plot the next channel is a bar plot and the third channel is a scatter plot you must use the technique that uses RTSimpleSingleValue objects There are two basic types of QCChart2D CF GroupPlot objects The first type is a multi channel plot Plot objects of this type include QCChart2D CF MultiLinePlot QCChart2D CF StackedLinePlot QCChart2D CF GroupBarPlot QCChart2
115. D CF StackedBarPlot These objects are characterized as having unique ChartAttribute objects defining the colors and fill characteristic of each channel The second type is the multi variable plot These are objects that require two or more y values to characterize the plot at a given instance in time These include the QCChart2D CF HistogramPlot QCChart2D CF BubblePlot QCChart2D CF FloatingBarPlot QCChart2D CF CellPlot and QCChart2D CF OHLCPlot classes Usually one instance of one of these multi variable objects is characterized by a single ChartAttribute similar to the QChart2D SimplePlot objects Both types of QCChart2D CF GroupPlot objects can be used in scrolling graphs Multi Channel Scrolling Graphs Class RTGroupMultiValuePlot Com quinncurtis chart2dnetcf ChartPlot RTPlot RTMultiValueIndicator RTGroupMultiValuePlot The RTGroupMultiV aluePlot plot class uses a template based on the QCChart2D CF GroupPlot class to create a real time plot that displays a collection of RTProcessVar objects as a group plot in a scrolling graph format 242 Multi Channel Scrolling Plots RTGroupMultiValuePlot constructors Visual Basic Overloads Public Sub New ByVal transform As PhysicalCoordinates ByVal plottemplate As GroupPlot _ ByVal datasource As RTProcessVar Cf public RTGroupMultiValuePlot PhysicalCoordinates transform GroupPlot plottemplate RTProcessVar datasource Parameters transform The coordinat
116. Dim numericfont As Font font38Numeric Dim trackbarTitlefont As Font font12Bold Dim chartVu As ChartView Me Dim pTransforml As New CartesianCoordinates 0 0 numericfont 0 0 La METSCumlative panelmeterattrib ChartObj CUSTOM POSITION ChartObj NORM GRAPH POS O 140 118 Panel Meter Classes pTransforml SetGraphBorderDiagonal 0 0 0 0 1 0 1 0 Dim attribl As New ChartAttribute Color LightBlue 2 _ DashStyle Solid Color LightBlue Dim panelmeterattrib As New ChartAttribute Color SteelBlue 2 _ DashStyle Solid Color Black Dim panelmeterl As New RTNumericPanelMeter pTransforml _ METSCumlative panelmeterattrib panelmeterl NumericTemplate TextFont numericfont panelmeterl NumericTemplate DecimalPos 0 panelmeterl PanelMeterPosition ChartObj CUSTOM POSITION panelmeterl SetLocation 0 81 0 3 ChartObj NORM GRAPH POS chartVu AddChartObject panelmeter1 End Sub InitializeRightPanelMeters Example of RTNumericPanelMeter used with an RTBarIndicator The panel meter below extracted from the HybridCar example method InitializeBattery ChargeGraph is an RTNumericPanelMeter attached to a RTBarIndicator bar plot object The position of the panel meter is OUTSIDE PLOTAREA MIN which places underneath the dynamic bar The size of the panel meter is determined by two things the font size which in this case is 14 and the number of digits used in the display Note Unlike the previous example th
117. E DIAMOND CROSS PLUS STAR LINE HBAR VBAR BAR3D CIRCLE symbolsize The size of the symbol in points attrib The color attributes of the indicator Selected Public Instance Properties IndicatorSubtype inherited from Set Get the meter indicator subtype Use one of the RTMeterIndicator meter symbol indicator subtype constants RT METER SYMBOL ARC SUBTYPE RT METER SINGLE SYMBOL SUBTYPE Get Set that the current process value is rounded up SegmentValueRoundMode in calculating how many symbols to display in RT METER SYMBOL ARC SUBTYPE RT METER SINGLE SYMBOL SUBTYPE modes Use one of the constants RT FLOOR VALUE RT CEILING VALUE Set Get the symbol used as the indicator symbol SymbolNum Use one of the scatter plot symbol constants NOSYMBOL SQUARE TRIANGLE DIAMOND CROSS PLUS STAR LINE HBAR VBAR BAR3D CIRCLE Set Get the radial position of the symbol indicator SymbolPosPercent Set Get the size of the symbol indicator in points SymbolSize Get Set the space in degrees between adjacent SymbolSpacing symbols A complete listing of RTMeterSymbolIndicator properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory Meter Indicators Needle Arc and Symbol 204 In the single symbol indicator subtype RTMeterSymbolIndicator IndicatorSubType RT METER SINGLE SYMBOL SUBTYPE only the last symbol is on The symbols up to but not including th
118. Enable True Dim panelmeterattrib As New ChartAttribute Color SteelBlue i DashStyle Solid Color Black Add panel meters Meter Indicators Needle Arc and Symbol 198 chartVu AddChartObject meterarcindicator Needle Meter Indicator RTMeterNeedleIndicator Com quinncurtis chart2dnetcf ChartPlot RTPlot RTSingleValueIndicator RTMeterIndicator RTMeterNeedleIndicator This RTMeterNeedleIndicator class displays the current RTProcessVar value as a needle Subtypes of the RTMeterNeedleIndicator are simple needles pie wedge shaped needles the fat end of the pie wedge is at the radius center and arrow needles RTMeterNeedleIndicator Constructor Visual Basic Overloads Public Sub New ByVal frame As RTMeterCoordinates ByVal datasource As RTProcessVar _ ByVal needlelength As Double _ ByVal needleoverhang As Double ByVal needlewidth As Double _ ByVal attrib As ChartAttribute Overloads Public Sub New ByVal frame As RTMeterCoordinates ByVal datasource As RTProcessVar _ Ct public RTMeterNeedleIndicator RTMeterCoordinates frame RTProcessVar datasource double needlelength double needleoverhang double needlewidth ChartAttribute attrib public RTMeterNeedleIndicator RTMeterCoordinates frame RTProcessVar datasource Parameters frame The RTMeterCoordinates object defining the meter coordinate system datasource 199 Meter Indicators
119. Graph RTAutoPanelMeterIndicator QCRTGraph Classes System Windows Forms UserControl ChartView RTAutoIndicator RTAutoBarIndicator RTAutoMultiBarIndicator RTAutoMeterIndicator RTAutoClockIndicator RTAutoDialIndicator RTAutoScrollGraph RTAutoPanelMeterIndicator 20 Class Architecture The ChartView class found in the QCChart2D CF library is the starting point of the QCRTGraph library same as in the QCChart2D CF library The ChartView class derives from the Net System Windows Forms Control class where the Control class is the base class for the Net CF collection of standard components such as menus buttons check boxes etc The ChartView class manages a collection of chart objects in a chart and automatically updates the chart objects when the underlying window processes a paint event Since the ChartView class is a subclass of the Control class it acts as a container for other Net CF components too The ChartView class is the base class for the self contained auto indicator classes Each real time indicator is placed in its own ChartView derived window along with all other objects typically associated the indicator axes labels process variables alarms titles etc Since ChartView is derived from UserControl you can place as many auto indicator classes on a form as you want RTAutoIndicator Abstract base class for the other auto indicator classes RTAutoBarIndicator Bar indicator class displaying a single bar RTAutoMul
120. ID output value LastPID Value Set Get low clamping value for output LowClamp Set Get exponential smoothing constant MvFilter Set Get new error value NewError Set Get previous error value OldError Set Get proportional constant value ProportionalConstant Set Get rate first derivative of output clamping value for RateClamp output Set Get time between adjacent updatese SamplePeriod Set Get setpoint value SetPoint Set Get steady state output position SteadyState Set Get sum of all previous errors SumError Selected Public Instance Methods This method performs a PID loop calculation RTCalcPID This method resets all of the error terms for RTResetErrorTerms the PID calculations This method updates the intermediate values UpdatePIDIntermediateParameters in the PID calculation PID Control 277 A complete listing of RTPIDControl properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory The output of the PID equation calculated using the RTCalcPID method is in the same units as the measured variable If the measured variable is temperature with a potential range of 0 300 then the output of the PID equation will also be temperature in the same range though it can have even wider swings than the measured variable The output of the PID equation is expected to drive some sort of control device either an actuator heater pressure control v
121. INDICATOR COLOR NO ALARM CHANGE chartVu AddChartObject panelmeter ChartAttribute panelmetertagattrib new ChartAttribute Color Beige 0 DashStyle Solid Color Beige RTStringPanelMeter panelmeter3 new RTStringPanelMeter pTransforml timeOfDay panelmetertagattrib ChartObj RT TAG STRING panelmeter3 StringTemplate TextFont font14 panelmeter3 PanelMeterPosition ChartObj ABOVE REFERENCED TEXT panelmeter3 SetPositionReference panelmeter panelmeter3 TextColor Color Black chartVu AddChartObject panelmeter3 VB Dim chartVu As ChartView Me Dim pTransforml As New CartesianCoordinates 0 0 0 0 1 0 1 0 pTransforml SetGraphBorderDiagonal 0 285 0 95 0 535 1 0 Dim panelmeterattrib As New ChartAttribute Color SteelBlue 2 DashStyle Solid Color Black Dim panelmeter As New RTTimePanelMeter pTransforml timeOfDay panelmeterattrib panelmeter PanelMeterPosition ChartObj INSIDE PLOTAREA MIN panelmeter TimeTemplate TextFont font24Numeric panelmeter TimeTemplate TimeFormat ChartObj TIMEDATEFORMAT 24HMS panelmeter AlarmIndicatorColorMode ChartObj RT INDICATOR COLOR NO ALARM CHANGE chartVu AddChartObject panelmeter Dim panelmetertagattrib As New ChartAttribute Color Beige O0 DashStyle Solid Color Beige Dim panelmeter3 As New RTStringPanelMeter pTransforml timeOfDay panelmetertagattrib ChartObj RT TAG STRING panelmeter3 StringTemplate TextFont fontl4 panelmeter3 PanelMeterPosition
122. Indicator meterneedle new RTMeterNeedleIndicator meterframe processVarl meterneedle IndicatorSubtype ChartObj RT METER NEEDLE ARROW SUBTYPE meterneedle SetChartObjAttributes attribl meterneedle NeedleLength 0 38 ChartAttribute panelmeterattrib new ChartAttribute Color SteelBlue 1 DashStyle Solid Color Black RTNumericPanelMeter panelmeter new RTNumericPanelMeter meterframe processVarl panelmeterattrib panelmeter PanelMeterPosition ChartObj RADIUS LEFT panelmeter NumericTemplate XJust ChartObj JUSTIFY MIN panelmeter NumericTemplate YJust ChartObj JUSTIFY CENTER panelmeter NumericTemplate TextFont Forml font18Numeric meterneedle AddPanelMeter panelmeter chartVu AddChartObject meterneedle VB Dim meterneedle As New RTMeterNeedleIndicator meterframe processVarl meterneedle IndicatorSubtype ChartObj RT METER NEEDLE ARROW SUBTYPE meterneedle SetChartObjAttributes attribl meterneedle NeedleLength 0 38 Dim panelmeterattrib As New ChartAttribute Color SteelBlue 1 DashStyle Solid Color Black Dim panelmeter As New RTNumericPanelMeter meterframe processVarl panelmeterattrib Meter Indicators Needle Arc and Symbol 202 panelmeter PanelMeterPosition ChartObj RADIUS LEFT panelmeter NumericTemplate XJust ChartObj JUSTIFY MIN panelmeter NumericTemplate YJust ChartObj JUSTIFY CENTER panelmeter NumericTemplate TextFont Forml fonti8Numeric meterneedle
123. Inherited from DataGridBase Gets or sets the distance in pixels between the top edge of the control and the top edge of its container s client area Inherited from Control Inherited from DataGridBase UseStripedGridBackground Inherited from DataGridBase VerticalScroll Visible Gets the characteristics associated with the vertical scroll bar Inherited from ScrollableControl Gets or sets a value indicating whether the control is displayed Inherited from Control Process Variable Viewer 311 Gets or sets a value indicating whether the vertical scroll bar VScroll is visible Inherited from ScrollableControl VScrollBarl Inherited from DataGridBase Gets or sets the width of the control Width Inherited from Control Simple RTProcessVarViewer example extracted from the example program ProcessVarDataTables ScrollApplicationUserControll cs Scroll Application 1 See seu ses si Super iur Tempi we nr ser al wes A VarViewer displaving two RTProcessVar objects C Rectangle2D posrect new Rectangle2D 0 05 0 6 0 87 0 29 int rows 3 columns 6 startindex 0 Because the constructor is called the RTProcessVarViewer is automatically added to the chartVu Controls object list rtProcessVarViewerl new RTProcessVarViewer chartVu pTransforml posrect currentTemperaturel rows columns startindex If the default constructor is used the RTProcessVarViewer obje
124. MENTED ARC SUBTYPE RT METER SINGLE SEGMENT ARC SUBTYPE modes Use one of the constants RT FLOOR VALUE RT CEILING VALUE Set Get the value of the arc segment width in degrees SegmentWidth A complete listing of RTMeterArcIndicator properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory In the single segment arc indicator subtype RTMeterArcIndicator IndicatorSub Type METER SINGLE SEGMENT ARC SUBTYPE only the last segment is on The segments up to but not including the final segment are turned off Examples for arc meter indicators The examples below are program segments that give the important aspects of configuration an arc meter indicator for the image above it Extracted from the example program RTGraphNetDemo file ArcMeterControll method InitializeMeter1 C Meter Indicators Needle Arc and Symbol 194 RTMeterArcIndicator meterarcindicator new RTMeterArcIndicator meterframe processVarl meterarcindicator SetChartObjAttributes attribl meterarcindicator IndicatorSubtype ChartObj RT METER ARC BAND SUBTYPE meterarcindicator InnerValueArcNormalized 0 65 meterarcindicator OuterValueArcNormalized 0 85 meterarcindicator IndicatorBackgroundEnable true meterarcindicator IndicatorBackground new ChartAttribute Color Black 1 DashStyle Solid Color FromArgb 60 60 60 Add panel meters to meter needle chartVu AddCha
125. Meter panelmeter Panel Meter Classes 123 Dim panelmeter2 As New RTAlarmPanelMeter pTransforml panelmeterattrib panelmeter2 PanelMeterPosition ChartObj BELOW REFERENCED TEXT panelmeter2 TextColor Color SpringGreen panelmeter2 AlarmTemplate TextFont fontl4 panelmeter2 SetPositionReference panelmeter panelmeter2 AlarmIndicatorColorMode ChartObj RT TEXT BACKGROUND COLOR CHANGE ON ALARM barplot AddPanelMeter panelmeter2 String Panel Meter Class RTStringPanelMeter Com quinncurtis chart2dnetcf ChartPlot RTPlot RTSingleValueIndicator RTPanelMeter RTStringPanelMeter The RTStringPanelMeter class displays a string either an arbitrary string or a string based on string data in the associated RTProcessVar object It is usually used to display a channels tag string and units string but it can also be used to display longer descriptive strings It contains a template based on the QCChart2D CF StringLabel class that is used to specify the font and string format information associated with the panel RTStringPanelMeter constructors Visual Basic Overloads Public Sub New ByVal ByVal ByVal ByVal transform As PhysicalCoordinates datasource As RTProcessVar _ attrib As ChartAttribute stringtype As Integer Overloads Public Sub New ByVal ByVal ByVal transform As PhysicalCoordinates attrib As ChartAttribute stringtype As Integer _ Overloads Public Sub New ByVal ByVa
126. New RTProcessVar Hours defaultattrib clock12Hour New RTComboProcessVar 12 Hour Clock defaultattrib clockl2Hour AddProcessVar clockdata 0 seconds Dials and Clocks 212 clockl2Hour AddProcessVar clockdata 1 minutes clockl2Hour AddProcessVar clockdata 2 hours Clock Meter coordinates is going to be scaled from 0 12 All values must be converted to this range clock12Hour SetDivisorItem 0 5 seconds 5 give seconds position on 0 12 scale clock12Hour SetDivisorItem 1 5 60 seconds 300 give minutes on 0 12 scale clock12Hour SetDivisorItem 2 60 60 seconds 3600 give hours on 0 12 scale clockl2Hour SetModuloItem 0 12 apply modulo 12 base clockl2Hour SetModuloItem 1 12 apply modulo 12 base clockl2Hour SetModuloItem 2 12 apply modulo 12 base Private Sub InitializeClock Dim chartVu As ChartView Me Dim startarcangle As Double 90 Dim arcextent As Double 360 Dim startarcscale As Double 0 0 Dim endarcscale As Double 12 0 Dim arcdirection As Boolean False Dim arcradius As Double 0 8 Dim centerx As Double 0 0 Dim centery As Double 0 0 Dim meterFont As Font font12 Dim meterframe As New RTMeterCoordinates startarcangle arcextent startarcscale endarcscale arcdirection centerx centery arcradius meterframe SetGraphBorderDiagonal 0 78 0 0 0 97 0 3 Dim frameattrib As New ChartAttribute Color Black 1 DashStyle Solid Color Blue Seconds
127. Obj RT INDICATOR COLOR NO ALARM CHANGE Panel Meter Classes 127 barplot AddPanelMeter panelmeter3 chartVu AddChartObject barplot Time Date Panel Meter Class RTTimePanelMeter Com quinncurtis chart2dnetcf ChartPlot RTPlot RTSingleValueIndicator RTPanelMeter RTTimePanelMeter The RTTimePanelMeter class displays the time date value of the time stamp of the associated RTProcessVar object It contains a template based on the QCChart2D CF TimeLabel class that is used to specify the font and time date format information associated with the panel meter RTTimePanelMeter constructors Visual Basic Overloads Public Sub New ByVal transform As PhysicalCoordinates ByVal datasource As RTProcessVar _ ByVal attrib As ChartAttribute Overloads Public Sub New ByVal transform As PhysicalCoordinates ByVal attrib As ChartAttribute Ct public RTTimePanelMeter PhysicalCoordinates transform RTProcessVar datasource ChartAttribute attrib LE public RTTimePanelMeter PhysicalCoordinates transform ChartAttribute attrib Parameters transform The coordinate system for the new RTTimePanelMeter object datasource 128 Panel Meter Classes The process variable associated with the panel meter attrib The color attributes of the panel meter indicator Selected Public Instance Properties Set Get the TimeLabel template for the panel meter time date value TimeTemplate The text properties ass
128. PHYS POS formControlTrackBarl FormControlSize new Dimension 1 2 1 0 ChartAttribute panelmeterattrib new ChartAttribute Color SteelBlue 2 DashStyle Solid Color Black RTNumericPanelMeter panelmeterl new RTNumericPanelMeter pTransforml runnersPace panelmeterattrib Panel Meter Classes 135 panelmeterl NumericTemplate TextFont trackbarfont panelmeterl NumericTemplate DecimalPos 1 panelmeterl PanelMeterPosition ChartObj RIGHT REFERENCED TEXT panelmeterl SetPositionReference formControlTrackBarl formControlTrackBarl AddPanelMeter panelmeterl ChartAttribute panelmetertagattrib new ChartAttribute Color Beige 0 DashStyle Solid Color Beige RTStringPanelMeter panelmeter2 new RTStringPanelMeter pTransforml runnersPace panelmetertagattrib ChartObj RT TAG STRING panelmeter2 SetPositionReference panelmeterl panelmeter2 StringTemplate TextFont trackbarTitlefont panelmeter2 PanelMeterPosition ChartObj BELOW REFERENCED TEXT panelmeter2 TextColor Color Black formControlTrackBarl AddPanelMeter panelmeter2 chartVu AddChartObject formControlTrackBarl VB Dim trackbarfont As Font font38Numeric Dim trackbarTitlefont As Font font12Bold Dim chartVu As ChartView Me Dim pTransforml As New CartesianCoordinates 0 0 0 0 1 0 1 0 pTransforml SetGraphBorderDiagonal 0 01 0 12 0 06 0 3 Dim attribl As New ChartAttribute Color LightBlue 2 DashStyle Solid Color LightBlue
129. PanelMeter RTAlarmPanelMeter RTStringPanelMeter RTTimePanelMeter RTElapsedTimePanelMeter RTFormControlPanelMeter The RTPanelMeter derived classes are special cases of the single value indicator classes that are used throughout the software to display real time data in a text format Panel meters are available for numeric values string values time date values and alarm values All of the panel meter classes have a great many options for controlling the text font color size border and background of the panel meter rectangle RTPanelMeter objects are used in two ways First they can be standalone and once attached to an RTProcessVar object they can be added to a ChartView as any other QCChart2D CF GraphObj derived class Second they can be attached to most of the single channel and multiple channel indicators such as RTBarIndicator RTMultiBarIndicator RTMeterIndicator and RTAnnunciator objects where they provide text output in addition to the indicators graphical output Digital SF Font In our example programs the panel meters often use a simple 7 segment display font It gives the displays an anachronistic look typical of older dedicated instruments This font is not part of the Microsoft Net installation but it is included with our software It is a public domain font that has the family name Digital SF with a space between Digital and SF It resides in the Digital TTF file found in the Quinn Curtis lib subdirectory In
130. ProcessVar class is designed to represent a single process variable complete with limit values an unlimited number of high and low alarms historical data storage and descriptive strings for use in displays It has two main constructors RTProcessVar constructors Visual Basic Overloads Public Sub New _ ByVal tagname As String _ ByVal defaultattribute As ChartAttribute Overloads Public Sub New _ ByVal dataset As SimpleDataset ByVal defaultattribute As ChartAttribute C public RTProcessVar string tagname ChartAttribute defaultattribute public RTProcessVar SimpleDataset dataset ChartAttribute defaultattribute Parameters tagname A string representing the tag name of the process variable dataset A dataset that will be used to hold historical values for the process variable If no tag name is supplied in the constructor the tag name for the process variable will be taken from the ChartDataset DataName property of the dataset defaultattribute Specifies the default attributes for the process variable Process Variable and Alarm Classes 95 Once created the RTProcessVar object is updated using the SetCurrentV alue method The method has several overloads Visual Basic Overridable Overloads Public Sub SetCurrentValue ByVal gv As ChartCalendar ByVal pv As Double Overridable Overloads Public Sub SetCurrentValue _ ByVal dt As DateTime ByVal pv As Double Overridable O
131. Public Sub New C public RTAutoMeterIndicator The InitStrings method is used to initialize the meters tag and units strings Method InitStrings VB Public Sub InitStrings title As String _ units As String Cit public void InitStrings string title string units Miscellaneous Shape Drawing 341 Parameters title The title or tag string units The units string Use the UpdateIndicator method to update the meter indicator with new data Method UpdatelIndicator VB Public Sub UpdateIndicator _ value As Double _ updatedraw As Boolean Cit public void UpdateIndicator double value bool updatedraw Parameters value Update the indicator channel with this value updatedraw True and the indicator is immediately updated Selected Public Instance Properties Name Description AlarmList Get the ArrayList holding all of the RTAlarm objects AlarmPanelMeter Get a reference to the RTAlarmPanelMeter object DefaultAlarmFont Get Set the font used for the subhead title DefaultAxisLabelsFont Get Set the default font used for the axes labels and axes titles DefaultDataValueFont Get Set the default font used for the numeric values labeling the 342 Miscellaneous Shape Drawing DefaultFontString DefaultMainTitleFont DefaultTagFont DefaultUnitsFont FaceplateBackground GraphBackground GraphBorder GraphFormat Height HighAlarm LowAlarm MainTitle MaximumSize Ma
132. QCRTGraph CF Real Time Graphics Tools for the Net Compact Framework 800 0 Ges ben 400 380 Dynamometer Test Stand 4000 2000 0 2 20 10 2 20 20 2 20 30 EN w NH ES OFF Zopyright Quinn Curtis Inc 2004 Contact Information Company Web Site http www quinn curtis com Electronic mail General Information info quinn curtis com Sales sales quinn curtis com Technical Support Forum http www quinn curtis com ForumFrame htm http www quinn curtis com ForumFrame htm Revision Date 6 1 2009 Rev 2 0 QCRTGraph CF Documentation and Software Copyright Quinn Curtis Inc 2009 Quinn Curtis Inc Tools for Aer Compact Framework END USER LICENSE AGREEMENT IMPORTANT READ CAREFULLY This Software End User License Agreement EULA is a legal agreement between you either an individual or a single entity and Quinn Curtis Inc for the Quinn Curtis Inc SOFTWARE identified above which includes all Quinn Curtis Inc Net Compact Framework software on any media and related documentation on any media By installing copying or otherwise using the SOFTWARE you agree to be bound by the terms of this EULA If you do not agree to the terms of this EULA do not install or use the SOFTWARE If the SOFTWARE was mailed to you return the media envelope UNOPENED along with the rest of the package to the location where you obtained it within 30 days from purchase 1 The SOFTWARE is licensed not so
133. R drawing and one that does not use PInvoke They are named QCChart2DNetCF_XOR DLL uses PInvoke and support XOR drawing mode and QCChart2DNetCF NOXOR DLL does not use PInvoke and does not support XOR drawing mode The DLL you wish to use must copied and renamed to QCChart2DNetCF DLL and placed in the Quinn Curtis DotNet lib folder The default QCChart2DNetCF DLL file is a copy of QCChart2DNetCF NOXOR DLL 8 Introduction QCRTGraph CF Dependencies The QCRTGraph CF class library is a self contained It uses only standard classes that ship with the Microsoft Net API The software uses the major Net namespaces listed below System Windows Forms Namespace The System Windows Forms namespace contains classes for creating Net Forms Controls and Dialog boxes System Drawing Namespace The System Drawing namespace provides access to GDI basic graphics functionality The more advanced functionality found in the System Drawing Drawing2D System Drawing Imaging and System Drawing Text namespaces is NOT available System Drawing Color Class Provides a class to define colors in terms of their individual RGB Red Green Blue components System Drawing Font Class Defines a particular format for text including font face size and style attributes System IO Namespace The IO namespace contains types that allow synchronous and asynchronous reading and writing on data streams and files System Collections Namespace The System Collect
134. SteelBlue 0 DashStyle Solid Color Black ChartAttribute paneltagmeterattrib new ChartAttribute Color SteelBlue 0 DashStyle Solid Color White RTNumericPanelMeter panelmeter new RTNumericPanelMeter pTransforml panelmeterattrib panelmeter PanelMeterPosition ChartObj OUTSIDE PLOTAREA MIN panelmeter TextColor Color SpringGreen panelmeter NumericTemplate TextFont fontl6Numeric panelmeter NumericTemplate DecimalPos 0 panelmeter AlarmIndicatorColorMode ChartObj RT TEXT BACKGROUND COLOR CHANGE ON ALARM panelmeter PanelMeterNudge new Point2D 0 2 barplot AddPanelMeter panelmeter RTAlarmPanelMeter panelmeter2 new RTAlarmPanelMeter pTransforml panelmeterattrib panelmeter2 PanelMeterPosition ChartObj BELOW REFERENCED TEXT panelmeter2 TextColor Color SpringGreen panelmeter2 AlarmTemplate TextFont font14 panelmeter2 SetPositionReference panelmeter panelmeter2 AlarmIndicatorColorMode ChartObj RT TEXT BACKGROUND COLOR CHANGE ON ALARM barplot AddPanelMeter panelmeter2 RTStringPanelMeter panelmeter3 new RTStringPanelMeter pTransforml paneltagmeterattrib ChartObj RT TAG STRING panelmeter3 PanelMeterPosition ChartObj OUTSIDE PLOTAREA MAX panelmeter3 TextColor Color Black panelmeter3 StringTemplate TextFont font14 panelmeter3 PanelMeterNudge new Point2D 0 4 panelmeter3 AlarmIndicatorColorMode ChartObj RT INDICATOR COLOR NO ALARM CHANGE barplo
135. Vertical runnersPaceTrackbar RTValue 3 MUST USE RTValue to set double value RTFormControlPanelMeter formControlTrackBarl new RTFormControlPanelMeter pTransforml runnersPaceTrackbar attribl formControlTrackBarl RTDataSource runnersPace formControlTrackBarl PanelMeterPosition ChartObj CUSTOM POSITION formControlTrackBarl SetLocation 0 0 0 ChartObj PHYS POS formControlTrackBarl FormControlSize new Dimension 1 0 1 0 ChartAttribute panelmeterattrib new ChartAttribute Color SteelBlue 3 DashStyle Solid Color Black RTNumericPanelMeter panelmeterl new RTNumericPanelMeter pTransforml runnersPace panelmeterattrib panelmeterl NumericTemplate TextFont trackbarfont panelmeterl NumericTemplate DecimalPos 1 panelmeterl PanelMeterPosition ChartObj RIGHT REFERENCED TEXT panelmeterl SetPositionReference formControlTrackBarl formControlTrackBarl AddPanelMeter panelmeterl Buttons Track Bars and Other Form Control Classes 259 chartVu AddChartObject formControlTrackBarl VB Public Sub InitializeLeftPanelMeters Dim trackbarfont As Font font64Numeric Dim trackbarTitlefont As Font fontl2Bold Dim chartVu As ChartView Me Dim pTransforml As New CartesianCoordinates 0 0 0 0 1 0 1 0 pTransforml SetGraphBorderDiagonal 0 01 0 12 0 06 0 3 Dim attribl As New ChartAttribute Color LightBlue 7 DashStyle Solid Color LightBlue runnersPaceTrackbar New RTControlTrackBar 0 0 15 0 0 1 1 0 1
136. _ ByVal tickspermajor As Integer _ C public RTMeterAxis RTMeterCoordinates frame RTMeterIndicator graphplot public RTMeterAxis RTMeterCoordinates frame RTMeterIndicator graphplot double tickspace int tickspermajor Parameters Meters Coordinates Meter Axes and Meter Axis Labels 175 frame The RTMeterCoordinates object defining the meter properties for the meter axis graphplot The RTMeterIndicator object associated with the meter axis tickspace Specifies the spacing between minor tick marks in degrees tickspermajor Specifies the number of minor tick marks per major tick mark Selected Public Instance Properties AxisLabels inherited from Axis AxisLineEnable inherited from Axis AxisMajorTickLength inherited from Axis AxisMax inherited from Axis AxisMin inherited from Axis AxisMinorTickLength inherited from Axis AxisMinorTicksPerMajor inherited from Axis AxisTickDir inherited from Axis AxisTickOrigin inherited from Axis AxisTicksEnable inherited from Axis AxisTickSpace inherited from LinearAxis ChartObjAttributes inherited from GraphObj InnerAlarmArcNormalized Get Set the axis labels object associated with this axis Set Get to true draws the axis line connecting the tick marks Get Set length of a major tick mark Get Set the axis maximum value Get Set the axis minimum value Get Set length of
137. ack Single Channel Bar Indicator 145 Dim paneltagmeterattrib As New ChartAttribute Color SteelBlue 0 _ DashStyle Solid Color White Dim panelmeter As New RTNumericPanelMeter pTransforml panelmeterattrib panelmeter PanelMeterPosition ChartObj OUTSIDE PLOTAREA MIN panelmeter TextColor Color SpringGreen panelmeter NumericTemplate TextFont fontl6Numeric panelmeter NumericTemplate DecimalPos 0 panelmeter AlarmIndicatorColorMode _ ChartObj RT TEXT BACKGROUND COLOR CHANGE ON ALARM panelmeter PanelMeterNudge New Point2D 0 2 barplot AddPanelMeter panelmeter Dim panelmeter2 As New RTAlarmPanelMeter pTransforml panelmeterattrib panelmeter2 PanelMeterPosition ChartObj BELOW REFERENCED TEXT panelmeter2 TextColor Color SpringGreen panelmeter2 AlarmTemplate TextFont font14 panelmeter2 SetPositionReference panelmeter panelmeter2 AlarmIndicatorColorMode _ ChartObj RT TEXT BACKGROUND COLOR CHANGE ON ALARM barplot AddPanelMeter panelmeter2 Dim panelmeter3 As New RTStringPanelMeter pTransforml _ paneltagmeterattrib ChartObj RT TAG STRING panelmeter3 PanelMeterPosition ChartObj OUTSIDE PLOTAREA MAX panelmeter3 TextColor Color Black panelmeter3 StringTemplate TextFont fontl4 panelmeter3 PanelMeterNudge New Point2D 0 4 panelmeter3 AlarmIndicatorColorMode ChartObj RT INDICATOR COLOR NO ALARM CHANGE barplot AddPanelMeter panelmeter3 chartVu AddChartObject barplot
138. ackBar PanelMeterPosition ChartObj CUSTOM POSITION timeAxisControlPanelTrackBar SetLocation 0 0 0 timeAxisControlPanelTrackBar FormControlSize New Dimension 1 0 1 0 chartVu AddChartObject timeAxisControlPanelTrackBar End Sub InitializeTimeAxisTrackbar Form Control Grid The RTFormControlGrid organizes a collection of Form Control objects functionally and visually in a grid format An RTControlButton must be added to an RTFormControlGrid before the radio button processes of the RTControlButton will work Class RTFormControlGrid RTMultiValueIndicator RTFormControlGrid RTFormControlGrid constructors Visual Basic Overloads Public Sub New ByVal transform As PhysicalCoordinates Buttons Track Bars and Other Form Control Classes 265 ByVal datasource As RTProcessVar ByVal formcontrolarray As ArrayList ByVal numcols As Integer ByVal numrows As Integer _ ByVal colheads As String ByVal rowheads As String _ ByVal attrib As ChartAttribute Overloads Public Sub New _ ByVal transform As PhysicalCoordinates ByVal datasource As RTProcessVar ByVal formcontrolarray As ArrayList ByVal numcols As Integer ByVal numrows As Integer _ ByVal attrib As ChartAttribute Overloads Public Sub New _ ByVal transform As PhysicalCoordinates ByVal datasource As RTProcessVar ByVal formcontrolarray As ArrayList ByVal attrib As ChartAttribute C public RTFormControlGri
139. ake sure that you reference com quinncurtis chart2dnetcf com quinncurtis rtgraphnetcf and System Drawing Drawing2D in the using section of any module that references ChartView ChartView constructor example extracted from the example program ScrollApplication2 Form1 The graph is created from the form s constructor though it can be created at a later time or during the form load event using System using System Collections Generic using System ComponentModel using System Data using System Drawing Drawing2D using System Drawing using System Text using System Windows Forms using com quinncurtis chart2dnetcf using com quinncurtis rtgraphnetcf namespace ScrollApplication2 public partial class Forml Form d ChartView chartViewl null public Form InitializeComponent InstantiateChartView if chartViewl null InitializeGraph QCRTGraph CF Tutorial 397 public void InstantiateChartView Allow room for a menu in the form Rectangle graphRect new Rectangle 1 1 this ClientRectangle Width 2 this ClientRectangle Height 2 Instantiate chart control chartViewl new ChartView graphRect this private void InitializeScrollGraph ChartView chartVu chartViewl public void InitializeGraph InitializeScrollGraph Adding a UserControl derived from ChartView at runtime You can derive your own chart class from ChartView and use that c
140. als that describe how to get started with the QCRT Graph CF graphics software are found in Chapter 18 Using OCRTGraph CF to Create Windows Applications 6 Introduction QCRTGraph CF Background A large subcategory of the charting software market is concerned with the continuous or on demand update of real time data in a scrolling chart gauge bar graph meter annunciator or text format Software that creates graphs of this type should make the creation and update of real time graphs as simple and as fast as possible The original QCChart2D CF charting product was designed to allow for the fast creation and update of custom charts using a large number of auto scale auto axes and auto labeling routines A good application for the QCChart2D CF software is the on demand creation and display of historical stock market data where the data source time frame and scale are defined by user inputs This is the type of charting application that you will find on Yahoo MSN and every brokerage firm web site A related application would involve the second by second update of real time stock market data as it streams from a real time data source The software that is used for the display of historical data is seldom used to display real time data because its data structures are not designed for incremental updates and its rendering routines are not fast enough to convert the data to a chart within the allowable display update interval The QCRTGraph CF softwa
141. alve or dc servomotor which has completely different units than the control output It is up to the control engineer to calculate the transfer function usually a basic mx b equation to the control output so that it matches the input range of the control device whether it be 0 10V 4 20mA or some other input range This is completely dependent on the application and resolving this final stage transfer function is entirely up to a control engineer and not part of this software Example for RTPIDControl The example below is extracted from the PIDControlTuner example The code really needs to be studied in the context of the complete program so study that example program instead of the abbreviated code below 800 600 400 200 Automatic Manual as reser eset al 16 14 30 16 15 00 C A TPIDCOnNtrol1 PIDControlLoops new RTPIDControl 8 RTProcessVar ProportionalControl new RTProcessVar 8 RTProcessVar IntegralControl new RTProcessVar 8 RTProcessVar DerivativeControl new RTProcessVar 8 RTProcessVar ControlSetpoints new RTProcessVar 8 RTProcessVar ControlTrackBarOutputs new RTProcessVar 8 RTProcessVar ControlOutputs new RTProcessVar 8 278 PID Control for int 1 0 i Bs 144 d Note derivative value is saled down by 100x PIDControlLoops i new RTPIDControl ControlSetpoints i CurrentValue pidSteadyState ProportionalControl i CurrentValue Int
142. ame3DEnable flag3DBorder chartVu AddChartObject startStopControlGrid VB Private Private Private Private StartButton As New RTControlButton ChartObj RT CONTROL RADIOBUTTON SUBTYPE StopButton As New RTControlButton ChartObj RT CONTROL RADIOBUTTON SUBTYPE ResetButton As New RTControlButton ChartObj RT CONTROL MOMENTARYBUTTON SUBTYPE ClearButton As New RTControlButton ChartObj RT CONTROL MOMENTARYBUTTON SUBTYPE 254 Buttons Track Bars and Other Form Control Classes Public Sub InitializeStartStopButtons Dim buttonfont As Font font12Bold Dim chartVu As ChartView Me Dim pTransforml As New CartesianCoordinates 0 0 0 0 1 0 1 0 pTransforml SetGraphBorderDiagonal 0 01 0 65 0 2 0 98 Dim attribl As New ChartAttribute Color Black 5 DashStyle Solid Color LightBlue Dim buttonlistl As New ArrayList StartButton ButtonUncheckedText Start StartButton ButtonChecked True AddHandler StartButton Click AddressOf Me selector Button Click StartButton ButtonFont buttonfont buttonlistl Add StartButton StopButton ButtonUncheckedText Stop StopButton ButtonChecked False AddHandler StopButton Click AddressOf Me selector Button Click StopButton ButtonFont buttonfont buttonlistl Add StopButton ResetButton ButtonUncheckedText Reset ResetButton ButtonChecked False AddHandler ResetButton Click AddressOf Me selector Button Click ResetButton ButtonFont buttonfont buttonlistl Add
143. an FromMilliseconds etimemsecs rtAutoScrollGraph2 UpdateScrollGraph etimespan currentValues true VB Public Sub InitializeGraph Dim starttime As DateTime DateTime Now Dim endtime As DateTime DateTime Now endtime rtAutoScroll rtAutoScroll rtAutoScroll rtAutoScroll rtAutoScroll rtAutoScroll rtAutoScroll rtAutoScroll rtAutoScroll rtAutoScroll rtAutoScroll rtAutoScroll rtAutoScroll rtAutoScroll rtAutoScroll rthAutoScroll rtAutoScroll Grap Grap Grap Grap Grap Grap Grap Grap Grap Grap Grap Grap Grap Grap Grap Grap Grap endtime AddSeconds 10 InitRTAutoScrollGraph starttime 0 endtime 15 InitSimpleRTPlotObject ChartObj LINE PLOT Color Blue Channel 1 InitSimpleRTPlotObject ChartObj LINE PLOT Color Green Channel 2 InitSimpleRTPlotObject ChartObj SCATTER PLOT Color Red Channel 3 SimplePlotObj SymbolAttributes SymbolSize 8 GraphScrollFrame ScrollRescaleMargin 0 01 GraphScrollFrame ScrollScaleModeY ChartObj RT AUTOSCALE Y MINMAX 1InitStrings RTAutoScrollGraph Time Ouarks GraphBackground FillColor Color BlanchedAlmond SubHead TextString Time Date Scrolling SubHead ChartObjEnable ChartObj OBJECT ENABLE Footer TextString Footer text Footer ChartObjEnable ChartObj OBJECT ENABLE YAxisLab2 ChartObjEnable ChartObj OBJECT ENABLE LowAlarm AlarmLimitValue 4 HighAlarm AlarmLimitValue 12 SetpointAlarm AlarmLi
144. and ChartLabel classes The ChartText class also creates independent text objects Other classes that display text also use it internally This class displays a text string as the title or footer of the chart This class displays a text string as the title for an axis The axis title position is outside of the axis label area Axis titles for y axes are are NOT rotated 90 degrees This class is the abstract base class of labels that require special formatting This class is a concrete implementation of the ChartLabel class and it displays formatted numeric values This class is a concrete implementation of the ChartLabel class and it displays formatted ChartCalendar dates This class is a concrete implementation of the ChartLabel class and it displays numeric values formatted as elapsed time strings 12 32 21 This class is a concrete implementation of the ChartLabel class that formats string values for use as axis labels Miscellaneous Chart Classes Marker ChartImage ChartShape ChartSymbol QCChart2D CF Class Summary 87 Various classes are used to position and draw objects that can be used as standalone objects in a graph or as elements of other plot objects Marker ChartImage ChartShape ChartSymbol This class displays one of five marker types in a graph The marker is used to create data cursors or to mark data points This class encapsulates a System Drawing Image class defining a rectangle in chart c
145. and other panel meters RTFormControlPanelMeter constructors Visual Basic Overloads Public Sub New _ ByVal transform As PhysicalCoordinates ByVal datasource As RTProcessVar _ ByVal formcontrol As Control ByVal attrib As ChartAttribute Overloads Public Sub New ByVal transform As PhysicalCoordinates ByVal formcontrol As Control _ ByVal attrib As ChartAttribute C public RTFormControlPanelMeter PhysicalCoordinates transform RTProcessVar datasource Control formeontroi ChartAttribute attrib public RTFormControlPanelMeter PhysicalCoordinates transform Control formcontrol ChartAttribute attrib Parameters transform The coordinate system for the new RTFormControlPanelMeter object formcontrol A reference to the Form Control assigned to this panel meter datasource The process variable associated with the control attrib The color attributes of the panel meter indicator Selected Instance Properties Set Get to the size mode for the Control Use one of the Control size ControlSizeMode mode constants RT ORIG CONTROL SIZE RT MIN CONTROL SIZE RT INDICATORRECT CONTROL SIZE 134 Panel Meter Classes A complete listing of RTFormControlPanelMeter properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory Example for RTControlTrackbar in an RTFormControlPanelMeter The panel meter below extra
146. anel meter that displays the METSCumlative process variable The positioning is accomplished using the RTPanelMeter SetLocation method which in this case places the panel meter using normalized graph coordinates The size of the panel meter is determined by two things the font size which in this case is 64 and the number of digits used in the display In order to keep the panel meter box from constantly changing size if the number of digits changes the panel meter box is sized to accommodate the range of values specified by the RTProcessVar DefaultMinimumDisplay Value and RTProcessVar DefaultMaximumDisplayValue C public void InitializeRightPanelMeters Font numericfont font38Numeric Font trackbarTitlefont font12Bold ChartView chartVu this CartesianCoordinates pTransforml new CartesianCoordinates 0 0 0 0 1 0 1 pTransforml SetGraphBorderDiagonal 0 0 0 0 1 0 ChartAttribute attribl new ChartAttribute Color LightBlue ChartAttribute panelmeterattrib Panel Meter Classes 117 2 DashStyle Solid Color LightBlue new ChartAttribute Color SteelBlue 2 DashStyle Solid Color Black RTNumericPanelMeter panelmeterl new RTNumericPanelMeter pTransforml panelmeterl NumericTemplate TextFont panelmeterl NumericTemplate DecimalPos 0 panelmeterl PanelMeterPosition panelmeterl SetLocation 0 81 0 3 chartVu AddChartObject panelmeterl VB Public Sub InitializeRightPanelMeters
147. anelMeter classes are described in the preceding section Solar Panel WE 120 100 BO 60 10 27 00 10 29 00 10 31 00 Any number of RTSimpleSingleValuePlot objects can be added to a scrolling graph RTSimpleSingleValuePlot The RTSimpleSingleValuePlot plot class uses a template based on the QCChart2D CF SimplePlot class to create a real time plot that displays RTProcessVar current and historical real time data in a scrolling line scrolling bar or scrolling scatter plot format Multiple Value Indicators Com quinncurtis chart2dnetcf ChartPlot RTPlot RTMultiValueIndicator RTMultiValueAnnunciator RTMultiBarlIndicator RTGroupMultiValuePlot RTFormControlGrid RTScrollFrame Display objects derived from the RTMultiValueIndicator class are attached to a collection of RTProcessVar objects This includes multi channel bar indicators which includes solid segmented custom and pointer bar indicators multi channel annunciator indicators and scrolling graph plots based on a QCChart2D CF GroupPlot chart object Class Architecture 31 These objects can be positioned in a chart using one of the many chart coordinate systems available for positioning including physical coordinates PHYS POS device coordinates DEV POS plot normalized coordinates NORM PLOT POS and graph normalized coordinates NORM GRAPH POS The only limit to the number of annunciator cells you can have in an RTMultiValueAnnunciat
148. anelmeter TimeTemplate TextFont font32Numeric panelmeter TimeTemplate TimeFormat ChartObj TIMEDATEFORMAT 24HMS panelmeter TimeTemplate DecimalPos 0 panelmeter AlarmIndicatorColorMode ChartObj RT INDICATOR COLOR NO ALARM CHANGE chartVu AddChartObject panelmeter VB Dim chartVu As ChartView Me Dim pTransforml As New CartesianCoordinates 0 0R 0 0R 1 0R 1 0R pTransforml SetGraphBorderDiagonal 0 53 0 85 0 72 0 96 Dim panelmeterattrib As New ChartAttribute Color SteelBlue 3 DashStyle Solid Color Black Dim panelmeter As New RTElapsedTimePanelMeter pTransforml1 stopWatch panelmeterattrib panelmeter PanelMeterPosition ChartObj INSIDE INDICATOR panelmeter TimeTemplate TextFont font32Numeric panelmeter TimeTemplate TimeFormat ChartObj TIMEDATEFORMAT 24HMS panelmeter TimeTemplate DecimalPos 0 panelmeter AlarmIndicatorColorMode ChartObj RT INDICATOR COLOR NO ALARM CHANGE chartVu AddChartObject panelmeter Form Control Panel Meter Class RTFormControlPanelMeter Com quinncurtis chart2dnetcf ChartPlot RTPlot RTSingleValueIndicator RTPanelMeter RTFormControlPanelMeter The RTFormControlPanelMeter encapsulates an RTFormControl object buttons and track bars primarily though others will also work in a panel meter format This allows it Panel Meter Classes 133 to use the RTPanelMeter positioning constants to position the form controls with respect to indicators plot areas text
149. anelmeter3 PanelMeterPosition ChartObj OUTSIDE PLOTAREA MAX panelmeter3 TextColor Color Black panelmeter3 StringTemplate TextFont font14 panelmeter3 PanelMeterNudge new Point2D 0 4 panelmeter3 AlarmIndicatorColorMode ChartObj RT INDICATOR COLOR NO ALARM CHANGE barplot AddPanelMeter panelmeter3 chartVu AddChartObject barplot VB Dim barplot As New RTBarIndicator pTransforml batteryCharge barwidth barbase attribl barjust barorient Dim panelmeterattrib As New ChartAttribute Color SteelBlue 0 DashStyle Solid Color Black Dim paneltagmeterattrib As New ChartAttribute Color SteelBlue 0 DashStyle Solid Color White Dim panelmeter As New RTNumericPanelMeter pTransforml panelmeterattrib panelmeter PanelMeterPosition ChartObj OUTSIDE PLOTAREA MIN panelmeter TextColor Color SpringGreen panelmeter NumericTemplate TextFont fontl6Numeric panelmeter NumericTemplate DecimalPos 0 panelmeter AlarmIndicatorColorMode _ ChartObj RT TEXT BACKGROUND COLOR CHANGE ON ALARM panelmeter PanelMeterNudge New Point2D 0 2 barplot AddPanelMeter panelmeter Dim panelmeter3 As New RTStringPanelMeter pTransforml paneltagmeterattrib ChartObj RT TAG STRING panelmeter3 PanelMeterPosition ChartObj OUTSIDE PLOTAREA MAX panelmeter3 TextColor Color Black panelmeter3 StringTemplate TextFont fontl4 panelmeter3 PanelMeterNudge New Point2D 0 4 panelmeter3 AlarmIndicatorColorMode Chart
150. angle You must place a check to see if the zoom object is active before the timer based call of the ChartView UpdateDraw method to make sure that you are not in the middle of a zoom operation Extracted from the RTStockDisplay example program if zoomObj ZoomObjActive this UpdateDraw ChartZoom constructor The constructor below creates a zoom object for a single chart coordinate system Visual Basic Overloads Public Sub New ByVal component As ChartView _ ByVal transform As PhysicalCoordinates ByVal brescale As Boolean Zooming 283 Ct public ChartZoom ChartView component PhysicalCoordinates transform bool brescale component A reference to the ChartView object that the chart is placed in transform The PhysicalCoordinates object associated with the scale being zoomed brescale True designates that the scale should be re scaled once the final zoom rectangle is ascertained Enable the zoom object after creation using the ChartZoom SetEnable true method Retrieve the physical coordinates of the zoom rectangle using the ChartZoom GetZoomMin and GetZoomMax methods Restrict zooming in the x or y direction using the SetZoomXEnable and SetZoomY Enable methods Set the rounding mode associated with rescale operations using the SetZoomXRoundMode and SetZoomYRoundMode methods Call the ChartZoom PopZoomStack method at any time and the chart scale reverts to the minimum and maximum values of the pr
151. annunciatorl Length i attrib new ChartAttribute Color DarkRed 1 DashStyle Solid Color DarkRed attribArray i attrib Single and Multiple Channel Annunciators 223 int numrows 1 int numcols 8 RTMultiValueAnnunciator annunciator new RTMultiValueAnnunciator pTransforml annunciatorl numcols numrows attribArray annunciator CellColumnMargin 0 01 annunciator CellRowMargin 0 01 ChartAttribute panelmetertagattrib new ChartAttribute Color SteelBlue 1 DashStyle Solid Color White RTStringPanelMeter panelmeter new RTStringPanelMeter pTransforml annunciatorl 0 panelmetertagattrib ChartObj RT TAG STRING panelmeter StringTemplate TextFont font10Bold panelmeter PanelMeterPosition ChartObj INSIDE BAR panelmeter Frame3DEnable false panelmeter TextColor Color White panelmeter StringTemplate TextBgMode false panelmeter AlarmIndicatorColorMode ChartObj RT INDICATOR COLOR NO ALARM CHANGE annunciator AddPanelMeter panelmeter chartVu AddChartObject annunciator VB Private Sub InitializeAnnunciator Dim chartVu As ChartView Me Dim pTransforml As New CartesianCoordinates 0 0 0 0 1 0 1 0 pTransforml SetGraphBorderDiagonal 0 03 0 13 0 715 0 21 Dim attrib As ChartAttribute Dim attribArray annunciatorl Length As ChartAttribute Dim i As Integer For i 0 To annunciatorl Length 1 attrib New ChartAttribute Color DarkRed 1 DashStyle Solid Co
152. ar EngineCylinderTemp2 3 scrollFrame2 ScrollScaleModeY ChartObj RT AUTOSCALE Y MINMAX scrollFrame2 ScrollRescaleMargin 0 05 MultiLinePlot multilineplot new MultiLinePlot pTransforml null attribarray multilineplot SetFastClipMode ChartObj FASTCLIP X rtMultiLinePlot new RTGroupMultiValuePlot pTransforml multilineplot EngineCylinderTemp2 chartVu AddChartObject rtMultiLinePlot chartVu AddChartObject scrollFrame2 VB ScrollFrame2 New RTScrollFrame Me EngineCylinderTemp2 0 pTransforml ChartObj RT FIXEDEXTENT MOVINGSTART AUTOSCROLL scrollFrame2 AddProcessVar EngineCylinderTemp2 1 scrollFrame2 AddProcessVar EngineCylinderTemp2 2 ScrollFrame2 AddProcessVar EngineCylinderTemp2 3 scrollFrame2 ScrollScaleModeY ChartObj RT AUTOSCALE Y MINMAX scrollFrame2 ScrollRescaleMargin 0 05 chartVu AddChartObject scrollFrame2 244 Multi Channel Scrolling Plots Dim multilineplot As New MultiLinePlot pTransforml Nothing attribarray multilineplot SetFastClipMode ChartObj FASTCLIP X rtMultiLinePlot New RTGroupMultiValuePlot pTransforml multilineplot _ EngineCylinderTemp2 chartVu AddChartObject rtMultiLinePlot chartVu AddChartObject scrollFrame2 Example for multi scale multi axis scrolling graph combining stock open high low close plots with line plots The example below extracted from the RTStockDisplay example method InitializeScrollGraph creates a multi
153. ar Minimum property except allows floating point numbers Specifies the floating point small change value RTSmallChange for the track bar Equivalent to the TrackBar SmallChange property except allows floating point numbers Specifies the floating point tick frequency RTTickFrequency value for the track bar Equivalent to the TrackBar TickFrequency property except allows floating point numbers Specifies the double value of the RTValue RTControlTrackBar slider A complete listing of RTControlTrackBar properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory Example for single RTControlTrackBar combined with an RTNumericPanelMeter 258 Buttons Track Bars and Other Form Control Classes The example below extracted from the Treadmill example creates a single RTControlTrackBar and positions a large numeric readout of the trackbar value next to it Pace mph C public void InitializeLeftPanelMeters Font trackbarfont font64Numeric Font trackbarTitlefont font12Bold ChartView chartVu this CartesianCoordinates pTransforml new CartesianCoordinates 0 0 0 0 1 0 1 0 pTIransforml SetGraphBorderDiagonal 0 01 12 0 06 0 3 ChartAttribute attribl new ChartAttribute Color LightBlue 7 DashStyle Solid Color LightBlue runnersPaceTrackbar new RTContrelTrackBar 0 0 15 0 0 1 1 0 1 runnersPaceTrackbar Orientation Orientation
154. arIndicator classes and overriding the GetCustomBarWidth and GetCustomBarOffset methods In the example below the width and offset of the bar is calculated using a function based on the height value Calculating the bar width as a function of the bar height only works with the segmented bar subtypes If you want a solid bar with custom widths make the RTBarIndicator SegmentWidth and RTBarIndicator SegmetSpacing values equal and small Multiple Channel Bar Indicator 161 C public class CustomRTMultiBarIndicator RTMultiBarIndicator public CustomRTMultiBarIndicator PhysicalCoordinates transform RTProcessVar datasource double barwidth double barspacing double barbase ChartAttribute attribs int barjust int barorient base transform datasource barwidth barspacing barbase attribs barjust barorient 1 public override double GetCustomBarOffset double v This centers the bar segments double offset this BarWidth 2 GetCustomBarWidth v 2 return offset public override double GetCustomBarWidth double v double width 0 5 width 0 01 v 100 v 100 this BarWidth return width private void InitializeBar3 RTProcessVar processVarArray processVarl processVar2 processVar3 processVar4 ChartView chartVu this CartesianCoordinates pTransforml new CartesianCoordinates 0 0 0 0 1 0 100 0 pTransforml SetGraphBorderDiagonal 0 05 475 0 5 0 65 162 Multipl
155. arc in plot area normalized coordinates Get Set Specifies y position of the center ArcCenterY of the meter arc in plot area normalized coordinates Get Set the direction of the arcExtent The ArcDirectionPositive default arcDirectionPositive value of false meter arc starts at startArcAngle and extends in a negative clockwise direction with an extent arcExtent Change to true to have the meter arc extend in a positive counter clockwise direction Specifies the extent of the meter arc in ArcExtent degrees The default meter arc starts at startArcAngle and extends in a negative clockwise direction with an extent arcExtent Get Set radius of the meter arc in plot area ArcRadius normalized coordinates Get Set the scaling value associated with EndArcScale the ending position of the meter arc Get Set Specifies the starting arc angle StartArcAngle position of the meter arc in degrees Get Set the scaling value associated with StartArcScale the startArcAngle position of the meter arc A complete listing of RTMeterCoordinates properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory Examples for meter coordinate system The example below extracted from the WeatherStation example method InitializeHumidity creates a meter coordinate system that starts at the arc angle of 225 172 Meters Coordinates Meter Axes and Meter Axis Labels degrees and has an arc extent of 27
156. arcdirection false double arcradius 0 6 double centerx 0 25 centery 0 0 Font meterFont Forml font12 RTMeterCoordinates meterframe new RTMeterCoordinates startarcangle arcextent startarcscale endarcscale arcdirection centerx centery arcradius VB Dim startarcangle As Double 90 Dim arcextent As Double 180 Dim startarcscale As Double 0 0 Dim endarcscale As Double 100 0 Dim arcdirection As Boolean False Dim arcradius As Double 0 6 Dim centerx As Double 0 25 Dim centery As Double 0 0 Dim meterFont As Font Forml font12 174 Meters Coordinates Meter Axes and Meter Axis Labels Dim meterframe As New RTMeterCoordinates startarcangle arcextent _ startarcscale endarcscale arcdirection Meter Axis RTMeterAxis Com quinncurtis chart2dnetcf LinearA xis RTMeter Axis centerx centery arcradius A meter axis extends for the extent of the meter arc and is centered on the origin Major and minor tick marks are placed at evenly spaced intervals perpendicular to the meter arc The meter axis also draws meter alarm arcs using the alarm information in the associated RTProcessVar object RTMeterAxis Constructors Visual Basic Overloads Public Sub New _ ByVal frame As RTMeterCoordinates ByVal graphplot As RTMeterIndicator Overloads Public Sub New _ ByVal frame As RTMeterCoordinates ByVal graphplot As RTMeterIndicator ByVal tickspace As Double
157. arm indicators and panel meters used in the display of the bar graphs numeric value tag name and alarm status Since it contains an array of RTProcessVar objects it can display one or more channels of data RTAutoMultiBarIndicator constructors Since the RTAutoMultiBarIndicator is designed to be dropped on a form only a default constructor is used The indicator is customized using public properties Visual Basic Overloads Public Sub New C public RTAutoMultiBarIndicator A couple of methods are used to initialize the multi bar graph after instantiation InitMultiBarIndicator and InitStrings The InitMultiBarIndicator method initialized the orientation of the bars the format of multi bar graph the princible bar color and the number of bars If you want each bar to have a different color call the InitColors Color clrs method passing in one color for each bar Method InitMultiBarIndicator VB Public Sub InitMultiBarIndicator _ orientation As Integer _ bargraphformat As Integer _ colr As Color _ 330 Miscellaneous Shape Drawing num As Integer Cit public void InitMultiBarIndicator int orientation int bargraphformat Color colr int num Parameters orientation Specifies the orientation of the chart ChartObj VERT DIR or ChartObj HORIZ DIR bargraphformat Specifies the bar graph format colr The color of the bars num The number of bars in the mult bargraph The InitStrings method in
158. armMessage Low Heart Rate lowheartratealarm AlarmSymbolColor Color Blue Process Variable and Alarm Classes 107 lowheartratealarm AlarmTextColor Color Blue Dim highheartratealarm As New RTAlarm ChartObj RT ALARM GREATERTHAN 160 highheartratealarm AlarmMessage High Heart Rate highheartratealarm AlarmSymbolColor Color Red highheartratealarm AlarmTextColor Color Red heartRate New RTProcessVar Heart Rate defaultattrib heartRate MinimumValue 0 heartRate MaximumValue 300 heartRate DefaultMinimumDisplayValue 0 heartRate DefaultMaximumDisplayValue 200 heartRate AddAlarm lowheartratealarm heartRate AddAlarm highheartratealarm These two lines enable alarm transition event handling heartRate AlarmTransitionEventEnable True AddHandler heartRate AlarmTransitionEventHandler AddressOf Me heartRate HighAlarm heartRate SetCurrentValue heartRateValue heartRate SetCurrentValue heartRateValue Private Sub heartRate HighAlarm ByVal sender As Object ByVal e As RTAlarmEventArgs Dim buttons As MessageBoxButtons MessageBoxButtons YesNo Dim result As DialogResult Displays the MessageBox result MessageBox Show Me Emergency Heartrate Shutdown Emergency buttons MessageBoxIcon Question _ MessageBoxDefaultButton Buttonl MessageBoxOptions RightAlign If result DialogResult Yes Then Application Exit End If End Sub heartRate HighAlarm 5 Panel Meter Classes RTNumeric
159. armPanelMeter ChartObjEnable Miscellaneous Shape Drawing 339 alarm ChartObj OBJECT ENABLE ChartObj OBJECT DISABLE rtAutoMultiBarIndicatorl UnitsPanelMeter ChartObjEnable units ChartObj OBJECT ENABLE ChartObj OBJECT DISABLE rtAutoMultiBarIndicatorl YAxisTitle ChartObjEnable units ChartObj OBJECT ENABLE ChartObj OBJECT DISABLE rtAutoMultiBarIndicatorl TagPanelMeter ChartObjEnable tags ChartObj OBJECT ENABLE ChartObj OBJECT DISABLE rtAutoMultiBarIndicatorl MainTitle ChartObjEnable title ChartObj OBJECT ENABLE ChartObj OBJECT DISABLE VB rtAutoMultiBarIndicatorl InitMultiBarIndicator ChartObj VERT DIR 1 Color OrangeRed 4 rtAutoMultiBarIndicatorl MultiBarPlot BarWidth 0 1 rtAutoMultiBarIndicatorl InitColors barcolors rtAutoMultiBarIndicatorl InitStrings Flow 493 GMB bartags rtAutoMultiBarIndicatorl LowAlarm AlarmLimitValue 23 rtAutoMultiBarIndicatorl HighAlarm AlarmLimitValue 78 rAutoMultiBarIndicatorl SetpointAlarm AlarmLimitValue 53 rtAutoMultiBarIndicatorl GraphBackground ChartObjAttributes New ChartAttribute Color LightBlue 5 DashStyle Solid Color LightBlue rtAutoMultiBarIndicatorl FaceplateBackground True rtAutoMultiBarIndicatorl BarEndBulb barbulb tAutoMultiBarIndicatorl InteriorAxis interioraxis rtAutoMultiBarIndicatorl NumericPanelMeter ChartObjEnable IfTest numeric ChartObj OBJECT ENABLE ChartObj OBJECT DISABLE
160. artVu AddChartObject meteraxis Dim meterFont As Font fontl4Bold Dim meteraxislabels As New RTMeterAxisLabels meteraxis meteraxislabels SetTextFont meterFont meteraxislabels LineColor Color White meteraxislabels SetAxisLabelsDir meteraxis GetAxisTickDir meteraxislabels OverlapLabelMode ChartObj OVERLAP LABEL DRAW chartVu AddChartObject meteraxislabels Meters Coordinates Meter Axes and Meter Axis Labels 179 Numeric Meter Axis Labels Class RTMeterAxisLabels Com quinncurtis chart2dnetcf NumericA xisLabels RTMeterAxisLabels This class labels the major tick marks of the RTMeterAxis class The class supports many predefined and user definable formats including numeric exponent percentage business and currency formats RTMeterAxisLabels constructor Visual Basic Overloads Public Sub New ByVal baseaxis As RTMeterAxis Cf public RTMeterAxisLabels RTMeterAxis baseaxis Parameters baseaxis The RTMeterAxis object associated with the labels Selected Public Instance Properties Set Get the number of digits to the right of AxisLabelsDecimalPos inherited the decimal point for numeric axis labels from NumericAxisLabels Set Get the justification of the axis labels AxisLabelsDir inherited from with respect to the axis tick marks Use one AxisLabels of the tick direction constants AXIS MIN AXIS MAX Set Get whether there should be labels for the AxisLabelsEnds inherited from axis m
161. asses 78 QCChart2D CF Class Summary Polar Line and Scatter Plots The polar line charts use true polar not linear interpolation between data points PolarLinePlot This class is a concrete implementation of the PolarPlot class and displays data in a simple line plot format The lines drawn between adjacent data points use polar coordinate interpolation PolarScatterPlot This class is a concrete implementation of the PolarPlot class and displays data in a simple scatter plot format Antenna Plot Classes AntennaPlot AntennaLinePlot AntennaScatterPlot AntennaLineMarkerPlot GraphObj AntennaAnnotation Antenna plots that use data organized as arrays of x and y values where an x value represents the radial value of a point in antenna coordinates and the y value represents the angle in degrees of a point in antenna coordinates Antenna plot types include line plots scatter plots line marker plots and an annotation class AntennaPlot This class is an abstract base class for the polar plot classes AntennaLinePlot AntennaScatter Plot AntennaLineMarkerPlot AntennaAnnotation Pie Chart Classes QCChart2D CF Class Summary 79 Antenna Plot Antenna A Antenna B New 180 Click on the button to re initialize with new data AntennaLineMarkerPlot This class is a concrete implementation of the AntennaPlot class and displays data in a simple line plot format The lines drawn between adjacent data points
162. asses shin ella 93 Real Time Process Variable srusio eiria isolate kit o Fato o ecole ea aaa 94 Real Time tee ee on uua b a du EIC ERE add odd 99 Real Time Alarms Event Handling ieu ere reet erret Ue etes cerea n 103 5 Panel Meter NEE 109 Digital SF e E 109 Panel Meters sete buste sinte apa EI Ea a iare E EEEE RERA las MA Htc amd 110 INuimenc Korner 115 Alarm Panel Meteren ed oa eras deii leta a eA d asta N 120 String Panel M ter ee delos Et dod 123 Time Date Panel Meter Ede eoe Lan nei i 127 Form Control Panel Meter 132 6 Smsle Channel Bar Indicatori uil ilari ala 137 LEE 137 7 Multiple Channel Bar Indicator ode seuss poat oer Seir e pause eat 151 Multiple Channel Bar Indicatot 4e ce E ee ced a dp A al 151 8 Meters Coordinates Meter Axes and Meter Axis LabelSs n 169 Meter E EE 169 Meter AXIS Mac CR EE 174 Numeric Meter Axis Ta DES EE 179 Sting Meter Axis Eabels iii uices ccr isst td aea ba re da e vot n 184 9 Meter Indicators Needle Arc and Symbol iii 189 Base Class for Meter Indicators EE 189 Afe Met r idioti dille ione 191 Needle Meter Indicator ii etel eee telae acli 198 Symbol Meter IidicatolSu o Gear enarrare ivi EE 202 UA MR EE Ee ct PLE 207 Converting Dial and Clock Data using RTComboProcessVar 207 11 Single and Multiple Channel Annunciators eere 217 Single Channel AnnungbitOf aiar sate e ec 217 Multi Channel Annunciators
163. at is common to all controls is that in the intial release of Net CF the background color of all controls was gray and could not be changed The HScrollBar VScrollBar and the TrackBar controls have the fault that they work only with an integer range of values The Button controls are momentary and require extra programming in order to use them as toggle buttons or radio buttons The Radio Button class requires that they be explicitly be added to a Group control which because of z order rendering problems does not work well on our ChartView drawing platform We created subclassed versions of the TrackBar control and the Button control Our version of the TrackBar control is RTControlTrackBar and adds floating point scaling for the track bar endpoints increments current value and tick mark frequency Our version of the Button control is RTControlButton and adds superior On Off button text and color control and supports momentary toggle and radio button styles No matter what Form Control is used either ours or the original Net Form controls it can be used in conjunction with the RTFormControl RTFormControlPanelMeter and RTFormControlGrid classes Important Note Button and Trackbar Colors Early versions of the Net CF do not support colors for the Trackbar and Button controls they are always gray This includes the Windows CE Emulator that ships with Visual Studio Net 2003 Newer versions of the Net runtime system are available
164. ate values to working coordinate values for a parametric 2D coordinate system The attribute class encapsulates the most common attributes line color fill color line style line thickness etc for a chart object The coordinate transform classes use the auto scale classes to establish the minimum and maximum values used to scale a 2D coordinate system The axis classes also use the auto scale classes to establish proper tick mark spacing values The chart object classes includes all objects placeable in a chart That includes axes axes labels plot objects line plots bar graphs scatter plots etc grids titles backgrounds images and arbitrary shapes These classes directly and indirectly System EventHandler delegates that trap mouse events and permit the user to create and move data cursors move plot objects display tooltips and select data points in all types of graphs Not supported under Net Compact Framework 52 QCChart2D CF Class Summary Miscellaneous utility classes Other classes use these for data storage file I O and data processing A summary of each category appears in the following section Chart Window Classes System Windows Forms UserControl ChartView The starting point of a chart is the ChartView class The ChartView class derives from the Net System Windows Forms UserControl class where the Userontrol class is the base class for the Net collection of standard components such as menus
165. ates frame RTProcessVar datasource Parameters frame The RTMeterCoordinates object defining the meter properties for the indicator datasource The process variable associated with the indicator innerarc The inner radius value in radius normalized units 0 0 1 0 outerarc The inner radius value in radius normalized units 0 0 1 0 attrib The color attributes of the indicator Selected Public Instance Properties IndicatorSubtype Set Get the meter indicator subtype Use one of the arc inherited from meter indicator subtype constants RTMeterIndicator RT METER ARC BAND SUBTYPE RT METER SEGMENTED ARC SUBTYPE RT METER SINGLE SEGMENT ARC SUBTYPE Set Get the inner arc cap style Use one of the InnerArcCapStyle constants RT METER ARC RADIUS CAP RT METER ARC WEDGE WIDTH CAP RT METER ARC FLAT CAP Set Get the value of the inner arc radius in normalized radius coordinates 193 Meter Indicators Needle Arc and Symbol InnerValueArcNormalized Set Get the outer arc cap style Use one of the OuterArcCapStyle constants RT METER ARC RADIUS CAP RT METER ARC WEDGE WIDTH CAP RT METER ARC FLAT CAP Set Get the value of the outer arc radius in normalized radius coordinates OuterValueArcNormalized Set Get the spacing of the arc segments in degrees SegmentSpacing Set Get how the current process value is rounded up in calculating how many segments to display in SegmentValueRoundMode RT METER SEG
166. ation of axis properties for tick mark spacing and axis labels e Zooming of time coordinates with smooth transitions between major scale changes years gt months gt weeks gt days gt hours gt minutes gt seconds e Zooming of time coordinates that use a 5 day week and a non 24 hour day e Simultaneous zooming of an unlimited number of x and y coordinate systems and axes Super zooming e The user can recover previous zoom levels using a zoom stack e User definable zoom limits prevent numeric under and overflows The QCRTGraph CF software was designed to allow zooming of real time data while the data is being collected Real time data values are updated using the RTProcessVar class asynchronous to the update of the screen The current graphics display can be historical data from the same RTProcessVar object or it can be based on an entirely different RTProcessVar object It is therefore possible to zoom back to the beginning of an RTProcessVar objects historical buffer without affecting current data collection At any time the graph returns to a view that includes the most current information When you want to zoom or pan backwards into the historical buffer of the RTProcessVar object first you must disable the RTScrollFrame updates Since the RTScrollFrame will attempt to always graph the most recent data values you don t want it interfering with a zoom or a pan which explicitly does NOT want the most recent values displayed Di
167. ation of real time displays Each class encapsulates a collection of objects need to build a complete real time indicator object bar indicators meters dials clocks and scrolling graphs Since each indicator class is considered a UserControl by Net it can be added to the Visual Studio Toolbox where it can be selected and dropped on a form There are seven self containted auto indicator classes single channel bar indicator multi channel bar indicator meters dials clocks panel meter and scrolling graphs The ChartView class is the base class for the auto indicator classes Each indicator is placed in its own ChartView derived window along with all other objects typically associated the indicator axes labels process variables alarms titles etc Since ChartView is derived from UserControl you can place as many auto indicator classes on a form as you want You can instantiate the auto indicator classes in your program or you can add them to the Visual Studio component tool box where they will be accessible to drop onto a Windows Form object Add the auto indicator classes to the toolbox by displaying a form in design mode right clicking in the Toolbox window and selecting Choose Items from the drop down menu Select Browse the browse to the Quinn Curtis DotNetMib folder and select the QCRTGraphNet DLL file Once the DLL is selected you should see all of the auto indicator components listed in the Toolbox Single Channel Bar Indicato
168. awn A complete listing of RTGenShape properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory Example for drawing RTGenShape objects The example below extracted from the AutoInstrumentPanel example file AutoInstrumentPanelControll method InitializeClock draws a circle around the borders of the clock C ChartAttribute attrib2 new ChartAttribute Color Gray 1 DashStyle Solid Color White Rectangle2D shaperect new Rectangle2D 0 78 0 025 0 19 0 25 RTGenShape genshape new RTGenShape meterframe shaperect 0 0 ChartObj RT SHAPE ELLIPSE ChartObj NORM GRAPH POS genshape SetChartObjAttributes attrib2 chartVu AddChartObject genshape VB Miscellaneous Shape Drawing 305 Dim attrib2 As New ChartAttribute Color Gray 5 DashStyle Solid Color White Dim shaperect As New Rectangle2D 0 8 0 025 0 19 0 25 Dim genshape As New RTGenShape meterframe shaperect 0 0 ChartObj RT SHAPE ELLIPSE ChartObj NORM GRAPH POS genshape SetChartObjAttributes attrib2 chartVu AddChartObject genshape 306 Miscellaneous Shape Drawing 18 Process Variable Viewer RTProcessVarViewer The RTProcessVarViewer class extends the QCChart2D DatasetViewer class so that it can display the historical datasets stored in the RTProcessVar objects The RTProcessVarViewer can be updated in real time and synchronized to the chart so that scrolling of the RTProcessVarVi
169. axisl meteraxislabelsl SetTextFont meterFont meteraxislabelsl SetAxisLabelsDir meteraxis1 GetAxisTickDir meteraxislabelsl OverlapLabelMode ChartObj OVERLAP LABEL DRAW chartVu AddChartObject meteraxislabels1 VB Dim chartVu As ChartView Me Dim attribl As New ChartAttribute Color Black 1 DashStyle Solid Color Blue Fahrenheight scale Dim startarcangle As Double 225 Dim arcextent As Double 270 Dim startarcscale As Double 0 0 Dim endarcscale As Double 100 0 Dim arcdirection As Boolean False Dim arcradius As Double 0 6 Dim centerx As Double 0 0 Dim centery As Double 0 2 Dim meterFont As Font font12 Dim meterframel As New RTMeterCoordinates startarcangle arcextent startarcscale endarcscale arcdirection centerx centery arcradius Meters Coordinates Meter Axes and Meter Axis Labels 183 Dim normrect As New Rectangle2D 0 67 0 05 0 32 0 53 Dim frame3d As New RT3DFrame meterframel normrect facePlateAttrib ChartObj NORM GRAPH POS chartVu AddChartObject frame3d meterframel SetGraphBorderDiagonal 0 67 0 05 0 99 0 58 Dim meterneedle As New RTMeterNeedleIndicator meterframel humidity meterneedle SetChartObjAttributes attribl meterneedle NeedleLength 0 6 Add panel meters chartVu AddChartObject meterneedle Dim meteraxisl As New RTMeterAxis meterframel meterneedle meteraxisl SetChartObjAttributes attribl meteraxisl SetAxisTickDir ChartObj
170. ber of points which is all of them fetalHeartECGScrollFrame MaxDisplayHistory updatecounter Render graph based on new scale showing all past data points this UpdateDraw Now disable scroll frame fetalHeartECGScrollFrame ChartObjEnable ChartObj OBJECT DISABLE Turn on zooming zoomObj SetEnable true Zooming 285 private void zoomRestore Button Click object sender System EventArgs e RTControlButton button RTControlButton sender Turn off zooming zoomObj SetEnable false Restore original y scale values fetalHeartECGScrollFrame ChartObjScale ScaleStartY 1 0 fetalHeartECGScrollFrame ChartObjScale ScaleStopY 4 0 Re establish scroll mode fetalHeartECGScrollFrame ScrollScaleModeX ChartObj RT FIXEDEXTENT MOVINGSTART AUTOSCROLL fetalHeartECGScrollFrame ChartObjEnable ChartObj OBJECT ENABLE Render graph this UpdateDraw timerl Enabled true Visual Basic Private Class ZoomWithStack Inherits ChartZoom Public Sub New ByVal component As ChartView ByVal transform As CartesianCoordinates ByVal brescale As Boolean MyBase New component transform brescale End Sub New Public Overrides Sub OnMouseDown ByVal mouseevent As MouseEventArgs If mouseevent Button And MouseButtons Right lt gt 0 Then Me PopZoomStack Else MyBase OnMouseDown mouseevent End If End Sub OnMouseDown End Class ZoomWithStack Dim zoomObj As New Z
171. bject objects are sorted by z order before they are drawn A complete listing of RTMeterIndicator properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory Arc Meter Indicator RTMeterArcIndicator Com quinncurtis chart2dnetcf ChartPlot RTPlot RTSingleValueIndicator RTMeterIndicator RTMeterArcIndicator This RTMeterArcIndicator class displays the current RTProcessVar value as an arc Segmented meter arcs are one of the RTMeterArcIndicator subtypes Varying the thickness of the arc the segment width and segment spacing and the segment end caps will produce a wide variety of meter indicators One of the advantages of the meter arc indicator is that it can be hollow in the center allowing for the placement of a numeric panel meter as a digital readout in the center of the meter RTMeterArcIndicator constructor Meter Indicators Needle Arc and Symbol 192 Visual Basic Overloads Public Sub New ByVal frame As RTMeterCoordinates ByVal datasource As RTProcessVar _ ByVal innerarc As Double _ ByVal outerarc As Double _ ByVal attrib As ChartAttribute Overloads Public Sub New ByVal frame As RTMeterCoordinates ByVal datasource As RTProcessVar _ Cf public RTMeterArcIndicator RTMeterCoordinates frame RTProcessVar datasource double innerarc double outerarc ChartAttribute attrib public RTMeterArcIndicator RTMeterCoordin
172. bout panel meters is getting them positioned where you want There are over 30 positioning constants that can be used to position panel meters with respect to graph objects the plot area and graph area of the associated graph In addition to the positioning constants you can explicitly place the panel meter anywhere that you want in a graph using the CUSTOM POSITION position constant in conjunction with the RTPanelMeter SetLocation method The table below summarizes the panel meter positioning constants used in the software Positioning Constants CUSTOM POSITION Custom position specified using the RTPanelMeter SetLocation method Position can be set using the DEV POS PHYS POS NORM GRAPH POS NORM PLOT POS coordinate systems Set the justification of the panel meter box using the StringLabel or NumericLabel template of the specific panel meter class CENTERED BAR Used when the panel meter is attached to a bar indicator Centers the panel meter inside the bar indicator If the object is not a bar indicator the panel meter is centered inside the plotting area Text justification is set to JUSTIFY CENTER JUSTIFY CENTER 112 Panel Meter Classes OUTSIDE BAR INSIDE BAR INSIDE BARBASE OUTSIDE BARBASE INSIDE INDICATOR OUTSIDE INDICATOR BELOW REFERENCED TEXT ABOVE REFERENCED TEXT Used when the panel meter is attached to a bar indicator Places the panel meter on the outside edge of the bar indicator If the object is not
173. bute defaultattribute Parameters dataset A dataset that will be used to store historical values defaultattribute Specifies the default attribute for this process variable tagname 209 Dials and Clocks The string representing the tag name of the process variable Selected Public Instance Properties Get the RTProcessVar item at the specified index Item in the process variable list Selected Public Instance Methods Adds a new process variable to the process AddProcessVar variable list Clears the process variable list ResetProcess VarsList Overloaded Updates the current value and the SetCurrentValue dataset of the underlying RTProcessVar It also updates the process variable list with the calculated process values Sets the divisor factor at the specified index SetDivisorltem Sets the modulo factor at the specified index SetModuloltem A complete listing of RTComboProcessVar properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory Examples for using RTComboProcessVar in a clock application The example extracted from the example program AutoInstrumentPanel methods InitializeGraph and InitializeClock show the important aspects of using an RTComboProcessVar object to supply data for the three meter needle indicators used as the hands of a clock C RTProcessVar clockdata new RTProcessVar 3 RTComboProcessVar clockl2Hour
174. buttons check boxes etc The ChartView class manages a collection of chart objects in a chart and automatically updates the chart objects when the underlying window processes a paint event Since the ChartView class is a subclass of the UserControl class it acts as a container for other Net CF components too Data Classes ChartDataset SimpleDataset TimeSimpleDataset ElapsedTimeSimpleDataset ContourDataset GroupDataset TimeGroupDataset ElapsedTimeGroupDataset The dataset classes organize the numeric data associated with a plotting object There are two major types of data supported by the ChartDataset class The first is simple xy data where for every x value there is one y value The second data type is group data where every x value can have one or more y values ChartDataset The abstract base class for the other dataset classes It contains data common to all of the dataset classes such as the x value array the number of x values the dataset name and the dataset type SimpleDataset TimeSimpleDataset QCChart2D CF Class Summary 53 Represents simple xy data where for every x value there is one y value A subclass of SimpleDataset it uses ChartCalendar dates a wrapper around the System DateTime value class as the x values and floating point numbers as the y values ElapsedTimeSimpleDataset A subclass of SimpleDataset it is initialized with ContourDataset GroupDataset TimeGroupDataset TimeSpan objects
175. center of the clock and a digial readout of the time below the center of the clock A tag name is displayed above the clock face Example for initializing RTAutoClockIndicator objects The example below extracted from the AutoGraphDemos AutoDialsAndClockIndicators example the different clock formats 358 Miscellaneous Shape Drawing C public void InitializeGraph Me He Me Me rtAutoClockInd rtAutoClockInd rtAutoClockInd rtAutoClockInd this rtAutoCl this rtAutoCl thzs rtAutocl this rtAutocl this rtAutoCl this rtaAutocl this rtAutocl this rtAutocl VB rtAutoClockInd rtAutoClockInd rtAutoClockInd rtAutoClockInd ockIndicatorl GraphFormat 0 ockIndicatorl GraphBackground FillColor Color White ockIndicatorl InvertColors ockindicatorl InitStrings Boston EST ockIndicator2 GraphFormat 1 ockIndicator2 GraphBackground FillColor Color White ockIndicator2 PlotAttrib FillColor Color Blue ockindicator2 InmitStrimgs Pittsburgh EST icatori icatorl icatorl Oa8tOrTI icator2 icatorz KE weno igater 2 GraphFormat 0 GraphBackground FillColor Color White InvertColors InitStrings Boston EST j GraphFormat 1 GraphBackground FillColor Color White PlotAttrib FillColor Color Blue InitStrings Pittsb rgh EST Scrolling Graph Horizontal Indicator Class RTAutoScr
176. cessVarViewer class for the grid like display of process variable historical data in a table The QCRTGraph software is built on top of the QCChart2D software Revision 2 0 has added many new features to QCChart2D New features include e Five new plot types BoxWiskerPlot FloatingStackedBarPlot RingChart SimpleVersaPlot and GroupVersaPlot e Elapsed time scaling to compliment the time date scaling Includes a set of classes specifically for elapsed time charts ElapsedTimeLabel ElapsedTimeAutoScale ElapsedTimeA xis ElapsedTimeA xisLabels ElapsedTimeCoordinates ElapsedTimeScale ElapsedTimeSimpleDataset and ElapsedTimeGroupDataset e Vertical axis scaling for time date and elapsed time e A DatasetViewer class for the grid like display of dataset information in a table e A MagniView class a new way to zoom data 2 Introduction e A CoordinateMove class used to pan the coordinate system left right up down e Zoom stack processing is now internal to the ChartZoom class Refer to the QCChart2D manual for information specific to these new features Elapsed Time Scrolling The TimeCoordinates class proved less than optimal for the display simple elapsed time scales The software now supports elapsed time scales with the addition of ElapsedTimeCoordinates ElapsedTimeScale ElapsedTimeAutoScale ElapsedTimeAxis ElapasedTimeLabel and ElapsedTimeAxisLabels classes For example you can now have a scale with a 12 hour range of 00
177. channel scrolling graph the combines an open high low close plots with line plots using two different scales Real Time Stock Display 28 0 27 5 27 0 26 5 11 52 15 11 52 30 11 52 45 11 53 00 C scrollFramel new RTScrollFrame this stockOpenl pTransforml ChartObj RT FIXEDEXTENT MOVINGSTART AUTOSCROLL scrollFramel ScrollScaleModeY ChartObj RT AUTOSCALE Y MINMAX Need to add this ProcessVar s to have auto scale work for all values of OHLC plot ScrollFramel AddProcessVar stockHighl scrollFramel AddProcessVar stockLow1 scrollFramel AddProcessVar stockClosel ScrollFramel ScrollRescaleMargin 0 05 chartVu AddChartObject scrollFramel scrollFrame2 new RTScrollFrame this NASDAQChannel pTransform2 ChartObj RT FIXEDEXTENT MOVINGSTART AUTOSCROLL scrollFrame2 ScrollScaleModeY ChartObj RT AUTOSCALE Y MINMAX scrollFrame2 ScrollRescaleMargin 0 05 chartVu AddChartObject scrollFrame2 Multi Channel Scrolling Plots 245 ChartAttribute attribl new ChartAttribute Color Yellow 1 DashStyle Solid OHLCPlot ohlcplotl new OHLCPlot pTransforml null ChartCalendar GetCalendarWidthValue ChartObj SECOND 1 25 attribl ohlcplotl SetFastClipMode ChartObj FASTCLIP X RTProcessVar stockvars stockOpenl stockHighl stockLowl stockClosel rtPlotl new RTGroupMultiValuePlot pTransforml ohlcplotl stockvars chartVu AddChartObject rtPlotl ChartAttribute attrib2
178. ck price chart combines a open high low close plot line plot and bar plot Press and hold left mouse button over a stock value to get details for that date OHLCPlot This class is a concrete implementation of the GroupPlot class and displays stock market data in an open high low close format common in financial technical analysis Every item of the plot is a vertical line representing High and Low values with two small horizontal flags one left and one right extending from the vertical High Low line and representing the Open and Close values QCChart2D CF Class Summary 77 Cumulative Plot of Noise vs Time from 7 Sources 2000 1500 1000 Amp 500 0 5 10 15 20 Time The Stacked Line Plot will plot the cumulative sum of multiple y vectors vs a single x vector StackedLinePlot This class is a concrete implementation of the GroupPlot class and displays data in a stacked line format In a stacked line plot each group is stacked on top of one another each group line a cumulative sum of the related group items before it Polar Plot Classes PolarPlot PolarLinePlot PolarScatterPlot Polar plots that use data organized as arrays of x and y values where an x value represents the magnitude of a point in polar coordinates and the y value represents the angle in radians of a point in polar coordinates Polar plot types include line plots and scatter plots PolarPlot This class is an abstract base class for the polar plot cl
179. class Most of the graph objects have a property of this class that controls the color line thickness and fill attributes of the object 56 QCChart2D CF Class Summary ChartAttribute This class consolidates the common line and fill attributes associated with a GraphObj object into a single class Auto Scaling Classes AutoScale LinearAutoScale LogAutoScale TimeAutoScale ElapsedTimeAutoScale Usually programmers do not know in advance the scale for a chart Normally the program needs to analyze the current data for minimum and maximum values and create a chart scale based on those values Auto scaling and the creation of appropriate axes with endpoints at even values and well rounded major and minor tick mark spacing is quite complicated The AutoScale classes provide tools that make automatic generation of charts easier AutoScale This class is the abstract base class for the auto scale classes LinearAutoScale This class is a concrete implementation of the AutoScale class It calculates scaling values based on the numeric values in SimpleDataset and GroupDataset objects Linear scales and axes use it for auto scale calculations LogAutoScale This class is a concrete implementation of the AutoScale class It calculates scaling values based on the numeric values in SimpleDataset and GroupDataset objects Logarithmic scales and axes use it for auto scale calculations TimeAutoScale This class is a concrete implementation of th
180. coordinate system into the working coordinate system ElapsedTimeScale A concrete implementation of the ChartScale class converts an elapsed time coordinate system into the working coordinate system Coordinate Transform Classes UserCoordinates WorldCoordinates WorkingCoordinates PhysicalCoordinates CartesianCoordinates ElapsedTimeCoordinates PolarCoordinates AntennaCoordinates TimeCoordinates The coordinate transform classes maintain a 2D coordinate system Many different coordinate systems are used to position and draw objects in a graph Examples of some of the coordinate systems include the device coordinates of the current window normalized coordinates for the current window and plotting area and scaled physical coordinates of the plotting area UserCoordinates This class manages the interface to the System Drawing classes and contains routines for drawing lines rectangles and text using Net device coordinates WorldCoordinates This class derives from the UserCoordinates class and maps a device independent world coordinate system on top of the Net device coordinate system WorkingCoordinates PhysicalCoordinates CartesianCoordinates TimeCoordinates ElapsedTimeCoordinates PolarCoordinates AntennaCoordinates Attribute Class ChartAttribute QCChart2D CF Class Summary 55 This class derives from the WorldCoordinates class and extends the physical coordinate system of the plot area the area typicall
181. creating a custom version of the class This class extends the MouseListener class and it can select chart objects and move them Moveable chart objects include axes axes labels titles legends arbitrary text shapes and images Use the MoveData class to move objects derived from SimplePlot This class extends the MouseListener class providing additional methods that selectively determine what graphical objects intersect the mouse cursor This class combines the MouseListener class and Marker class Press a mouse button and the selected data cursor horizontal and or vertical line cross hairs or a small box appears at the point of the mouse cursor The data cursor tracks the mouse motion as long as the mouse button is pressed Release the button and the data cursor disappears This makes it easier to line up the mouse position with the tick marks of an axis This class selects and moves individual data points of an object derived from the SimplePlot class A data tooltip is a popup box that displays the value of a data point in a chart The data value can consist of the x value the y value x and y values group values and open high low close values for a given point in a chart This class implements mouse controlled zooming for one or more simultaneous axes The user starts zooming by holding down a mouse button with the mouse cursor in the plot area of a graph The mouse is dragged and then MagniView MoveCoordinates
182. ct from RTPanelMeter pure PositionType inherited from GraphObj pepe PrimaryChannel inherited from RTPlot ines RTDataSource inherited for the indicator from RTSingleValueIndicator A complete listing of RTFormControlPanelMeter properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory Example for RTControlPanelMeter encapsulation an RTControlTrackBar Buttons Track Bars and Other Form Control Classes 263 The example below extracted from the Polygraph example creates an RTControlPanelMeter using an RTControlTrackBar C RTControlTrackBar timeAxisControlTrackbar public void InitializeTimeAxisTrackbar ChartAttribute attribl new ChartAttribute Color White 3 DashStyle Solid Color Coral ChartView chartVu this CartesianCoordinates pTransform2 new CartesianCoordinates 0 0 0 0 1 0 1 0 pTransform2 SetGraphBorderDiagonal 0 7 0 93 0 98 0 99 ChartAttribute tbattrib new ChartAttribute Color LightBlue 7 DashStyle Solid Color LightBlue double starttime origStartTime GetCalendarMsecs double endtime origEndTime GetCalendarMsecs double range endtime starttime timeAxisControlTrackbar new RTControlTrackBar 0 100 10 1 10 timeAxisControlTrackbar Orientation Orientation Horizontal timeAxisControlTrackbar Click new System EventHandler this timeAxisControlTrackbar Click timeAxisControlTrackbar RTValue
183. ct must be explicitly added to the ChartView Controls object rtProcessVarViewerl new RTProcessVarViewer rtProcessVarViewerl InitRTProcessVarViewer chartVu pTransforml posrect currentTemperaturel rows columns startindex td this Controls Add rtProcessVarViewerl rtProcessVarViewerl UseStripedGridBackground true rtProcessVarViewerl GridCellFont font10 rtProcessVarViewerl AddProcessVar currentTemperature2 312 Process Variable Viewer Set custom decimal precision for each row rtProcessVarViewerl SetFormatDecimalPos 0 0 rtProcessVarViewerl SetFormatDecimalPos 1 1 rtProcessVarViewerl SetFormatDecimalPos 2 2 Visual Basic Dim posrect As Rectangle2D New Rectangle2D 0 05 0 6 0 87 0 29 Dim rows As Integer 3 Dim columns As Integer 6 Dim startindex As Integer 0 Because the constructor is called the RTProcessVarViewer is automatically added to the chartVu Controls object list rtProcessVarViewerl New RTProcessVarViewer chartVu pTransforml posrect currentTemperaturel rows columns startindex If the default constructor is used the RTProcessVarViewer object must be explicitly added to the ChartView Controls object rtProcessVarViewerl new RTProcessVarViewer rtProcessVarViewerl InitRTProcessVarViewer chartVu pTransforml posrect currentTemperaturel rows columns startindex this Controls Add rtProcessVarViewerl rtProcessVarViewerl UseStripedGridBackgr
184. cted from the Treadmill example method InitializeLeftPanelMeters adds an RTFormControlPanelMeter as an independent panel meter at the left of the display In this example the plot area of the coordinate system is set for the position of the RTFormPanelMeter using pTransform1 SetGraphBorderDiagonal It is positioned inside the plot area using the CUSTOM POSITION position constant The lower left cornet of the form control is placed at the 0 0 0 0 position of the plot area in PHYS POS coordinates The size of the form control is set to the size of the plot area width 1 0 height 1 0 in PHYS POS coordinates C Font trackbarfont font38Numeric Font trackbarTitlefont font12Bold ChartView chartVu this CartesianCoordinates pTransforml new CartesianCoordinates 0 0 0 0 1 0 1 0 pIransforml SetGraphBorderDiagonal 0 01 12 0 06 0 3 ChartAttribute attribl new ChartAttribute Color LightBlue 2 DashStyle Solid Color LightBlue runnersPaceTrackbar new RTControlTrackBar 0 0 15 0 0 1 1 0 1 runnersPaceTrackbar Orientation Orientation Vertical runnersPaceTrackbar RTValue 3 MUST USE RTValue to set double value RTFormControlPanelMeter formControlTrackBarl new RTFormControlPanelMeter pTransforml runnersPaceTrackbar attribl formControlTrackBarl RTDataSource runnersPace formControlTrackBarl PanelMeterPosition ChartObj CUSTOM POSITION formControlTrackBarl SetLocation 0 0 0 ChartObj
185. d ew RTFormControlGrid pTransforml null buttonlist numColumns numRows attribl controlgrid CellRowMargin 0 0 controlgrid CellColumnMargin 0 00 controlgrid FormControlTemplate Frame3DEnable true chartVu AddChartObject controlgrid VB Private ResetErrorTerm As New RTControlButton ChartObj RT CONTROL MOMENTARYBUTTON SUBTYPE Private ResetAll As New RTControlButton ChartObj RT CONTROL MOMENTARYBUTTON SUBTYPE Private StartControl As New RTControlButton ChartObj RT CONTROL TOGGLEBUTTON SUBTYPE Public Sub InitializeStartStopButtons Buttons Track Bars and Other Form Control Classes 251 Dim attribl As New ChartAttribute Color Black 3 DashStyle Solid Color Coral Dim buttonfont As Font font9Bold Dim chartVu As ChartView Me Dim buttonlist As New ArrayList StartControl ButtonUncheckedText Start StartControl ButtonCheckedText Stop AddHandler StartControl Click AddressOf Me controlOn Button Click StartControl ButtonFont buttonfont StartControl ButtonChecked False buttonlist Add StartControl ResetErrorTerm ButtonUncheckedText Reset Error AddHandler ResetErrorTerm Click AddressOf Me resetErrorTerm Button Click ResetErrorTerm ButtonFont buttonfont ResetErrorTerm ButtonChecked False buttonlist Add ResetErrorTerm ResetAll ButtonUncheckedText Reset All AddHandler ResetAll Click AddressOf Me resetAll Button Click ResetAll ButtonFont buttonfont ResetAll ButtonChecked
186. d PhysicalCoordinates transform RTProcessVar datasource ArrayList formcontrolarray int numcols int numrows string colheads string rowheads ChartAttribute attrib public RTFormControlGrid PhysicalCoordinates transform RTProcessVar datasource ArrayList formcontrolarray int numcols int numrows ChartAttribute attrib public RTFormControlGrid PhysicalCoordinates transform RTProcessVar datasource ArrayList formcontrolarray ChartAttribute attrib Parameters transform The coordinate system for the new RTFormControlGrid object datasource An array of the process variables associated with the control grid objects formcontrolarray An array of the Controls assigned to the control grid numcols 266 Buttons Track Bars and Other Form Control Classes The number of columns in the control grid numrows The number of rows in the control grid colheads An array of string that is used as the column heads for the control grid rowheads An array of string that is used as the row heads for the control grid attrib A single attribute object that applies to all control grid objects Selected Public Instance Properties Get Set the extra space between columns of the grid CellColumnMargin specified in normalized NORM PLOT POS coordinates Get Set the extra space between rows of the grid CellRowMargin specified in normalized NORM PLOT POS coordinates ChartObjAttributes inheri
187. d True rtAutoBarIndicatorl BarEndBulb barbulb rtAutoBarIndicatorl InteriorAxis interioraxis rtAutoBarIndicatorl NumericPanelMeter ChartObjEnable IfTest numeric ChartObj OBJECT ENABLE ChartObj OBJECT DISABLE 0 rtAutoBarIndicatorl NumericPanelMeter NumericTemplate DecimalPos rtAutoBarIndicatorl AlarmPanelMeter ChartObjEnable IfTest alarm ChartObj OBJECT ENABLE ChartObj OBJECT DISABLE rtAutoBarIndicatorl UnitsPanelMeter ChartObjEnable hartObj OBJECT ENABLE ChartObj OBJECT DISABLE Q LE rtAutoBarIndicatorl YAxisTitle ChartObjEnable hartObj OBJECT ENABLE ChartObj OBJECT DISAB CH rtAuto G BarIndicatorl TagPanelMeter ChartObjEnable hartObj OBJECT ENABLE ChartObj OBJECT DISABLE I IfTest units IfTest units fTest title 0s R SEGMENTED SUBTYPE ChartObj RT BAR SOLID SUBTYPE Miscellaneous Shape Drawing 329 rtAutoBarIndicatorl BarPlot IndicatorSubType IfTest segmented ChartObj RT BAR SEGMENTED SUBTYPE ChartObj RT BAR SOLID SUBTYPE Multi Channel Bar Indicator Class RTAutoMultiBarIndicator System Windows Forms UserControl ChartView RTAutoIndicator RTAutoBarIndicator RTAutoMultiBarIndicator The RTAutoMultiBarIndicator combines a RTMultiBarIndicator object with other objects needed to create a self contained multi bargraph display These other objects include an array of RTProcessVar variables axes axis labels title string units string al
188. d is called the ScrollApplicationl appears as an empty shell We call this method from the forms constructor though it called at a later time or during the form load event e You should be able to compile the project without error Run the project and the graph should be visible on the output device either an actual Windows Mobile device or an emulator The emulator can take 60 seconds or more to start the program and display the default form Adding a ChartView control at runtime The ChartView class can also be instantiated at runtime without placing it on a form at design time You can use the default ChartView constructor or one of the special constructors that simplify adding an instance of the control to a form at runtime See the list of ChartView constructors in Chapter 5 of the QCChart2D manual In general you pass the ChartView constructor a parent object Form Panel or TabbedControl and a positioning rectangle that defines the position and size of the ChartView object In order to add a ChartView control at runtime the ChartView control does NOT need to be added to the Visual Studio Toolbox You will need to add the QCChart2DNetCF DLL and QCRTGraphNetCF DLL files to the project by right 396 QCRTGraph CF Tutorial clicking project name in the Solution Explorer and selecting Add Reference Browse to the QCChart2DNetCF DLL and QCRTGraphNetCF DLL files in the Quinn Curtis DotNet lib folder and select both You will also need to m
189. d that the panel meter be positioned next to another object Places the panel meter below the reference object Specify the position reference object using the PanelMeter SetPositionReference method Text justification is set to JUSTIFY CENTER JUSTIFY MAX Used when it is desired that the panel meter be positioned next to another object Places the panel meter above the reference object Specify the position reference object using the PanelMeter SetPositionReference method Text justification RIGHT REFERENCED TEXT LEFT REFERENCED TEXT BELOW CENTERED PLOTAREA ABOVE CENTERED PLOTAREA LEFT CENTERED PLOTAREA RIGHT CENTERED PLOTAREA GRAPHAREA TOP GRAPHAREA BOTTOM RADIUS BOTTOM RADIUS TOP RADIUS LEFT Panel Meter Classes 113 is set to JUSTIFY CENTER JUSTIFY MIN Used when it is desired that the panel meter be positioned next to another object Places the panel meter to the right of the reference object Specify the position reference object using the PanelMeter SetPositionReference method Text justification is set to JUSTIFY MIN JUSTIFY CENTER Used when it is desired that the panel meter be positioned next to another object Places the panel meter to the left of the reference object Specify the position reference object using the PanelMeter SetPositionReference method Text justification is set to JUSTIFY MAX JUSTIFY CENTER Positions the panel meter centered below the plot area Text justificatio
190. doubles linear y scale public void InitRTAutoScrollGraph double minx double miny double maxx double maxy Initialize x scale to an elapsed time scale using TimeSpan objects linear y scale public void InitRTAutoScrollGraph TimeSpan minx double miny TimeSpan maxx double maxy Initialize x scale to the scale type specified by the parameter scaltype linear y scale Use millisecond values for minx and maxx public void InitRTAutoScrollGraph double minx double miny double maxx double maxy int scaletype Parameters minx 362 Miscellaneous Shape Drawing The starting x value as a DateTime ChartCalendar double or TimeSpan value depending on which of the overloads is used miny The starting y value maxx The ending x value as a DateTime ChartCalendar double or TimeSpan value depending on which of the overloads is used maxy The ending y value The InitStrings method initialized the title and units strings Method InitStrings VB public void InitStrings string title String units Cit public void InitStrings string title String units Parameters title The title string units The units string Add a channel a plot object to the scrolling graph using the AddRTPlotObject Method AddRTPlotObject VB Public Sub AddRTPlotObject _ plottype As Integer _ cole As Color _ tag As String Miscellaneous Shape Drawing 363 Cit public void AddRTPlotObject int
191. e lowheartratealarm AlarmTextColor Color Blue 106 Process Variable and Alarm Classes RTAlarm highheartratealarm new RTAlarm ChartObj RT ALARM GREATERTHAN 160 highheartratealarm AlarmMessage High Heart Rate highheartratealarm AlarmSymbolColor Color Red highheartratealarm AlarmTextColor Color Red double heartRateValue 0 0 heartRate new RTProcessVar Heart Rate defaultattrib heartRate MinimumValue 0 heartRate MaximumValue 300 heartRate DefaultMinimumDisplayValue 0 heartRate DefaultMaximumDisplayValue 200 heartRate AddAlarm lowheartratealarm heartRate AddAlarm highheartratealarm These two lines enable alarm transition event handling heartRate AlarmTransitionEventEnable true heartRate AlarmTransitionEventHandler new RTAlarmEventDelegate this heartRate HighAlarm heartRate SetCurrentValue heartRateValue private void heartRate HighAlarm object sender RTAlarmEventArgs e MessageBoxButtons buttons MessageBoxButtons YesNo DialogResult result result MessageBox Show this Emergency Heartrate Shutdown Emergency buttons MessageBoxIcon Question MessageBoxDefaultButton Buttonl MessageBoxOptions RightAlign if result DialogResult Yes Application Exit VB Dim defaultattrib As New ChartAttribute Color Green 1 0 DashStyle Solid Color Green Dim lowheartratealarm As New RTAlarm ChartObj RT ALARM LOWERTHAN 30 lowheartratealarm Al
192. e Channel 1 rtAutoScrollGraph2 InitSimpleRTPlotObject ChartObj LINE PLOT Color Green Channel 2 rtAutoScrollGraph2 InitSimpleRTPlotObject ChartObj SCATTER PLOT Color Red Channel 3 rtAutoScrollGraph2 SimplePlotObj SymbolAttributes SymbolSize 8 rtAutoScrollGraph2 GraphScrollFrame ScrollRescaleMargin 0 01 rtAutoScrollGraph2 GraphScrollFrame ScrollScaleModeY ChartObj RT AUTOSCALE Y MINMAX rtAutoScrollGraph2 InitStrings RTAutoScrollGraph Time Ouarks rtAutoScrollGraph2 GraphBackground FillColor Color BlanchedAlmond rtAutoScrollGraph2 SubHead TextString Subhead Text rtAutoScrollGraph2 SubHead ChartObjEnable ChartObj OBJECT ENABLE rtAutoScrollGraph2 Footer TextString Footer text rtAutoScrollGraph2 Footer ChartObjEnable ChartObj OBJECT ENABLE rtAutoScrollGraph2 YAxisLab2 ChartObjEnable ChartObj OBJECT ENABLE The update of scroll graphs takes place in the timer event handler 370 Miscellaneous Shape Drawing private void timerl Tick object sender EventArgs e ChartCalendar timestamp new ChartCalendar for ine x currentValues i 0 i lt currentValues Length i 0 5 ChartSupport GetRandomDouble rtAutoScrollGraphl UpdateScrollGraph timestamp currentValues true get elapsed time in milliseconds double etimemsecs TimeSpan etimespan timestamp GetCalendarMsecs startCalendar GetCalendarMsecs TimeSp
193. e they run too slow for a practical Net CF application Limit displays to a couple of graphs not the 10 or 20 some of our examples use e Brushes only support simple color i e no gradients or textures e Only simple RGB colors are supported with no alpha blending no transparency e No generalized geometry support for arbitrary shapes because Net Compact Framework lacks a Matrix class and a GraphicsPath class Introduction 7 e No 2D coordinate transformation classes for rotating text and arbitrary geometric shapes Text cannot be rotated not even 90 degrees for vertical text No printer and image output support Images imported into a program cannot be rotated Early versions of Net CF do not support background colors for button and trackbar components e In general none of the advanced features found in the System Drawing2D library are available to the Net Compact Framework programmer The QCRTGraph CF software derives from our original QCRTGraph for Net software The original software makes extensive use of the advanced graphics features found in the workstation version of Net In order to port the QCRTGraph software to the Net Compact Framework compromises had to be made because of the limitations listed above In some cases work arounds were devised to overcome these limitations When compared to the original QCRTGraph for Net software the QCRTGraph CF software has the following limitations e While the Brush class only s
194. e AutoScale class It calculates scaling values based on the ChartCalendar values in TimeSimpleDataset and TimeGroupDataset objects Date time scales and axes use it for auto scale calculations ElapsedTimeAutoScale This class is a concrete implementation of the AutoScale class It calculates scaling values based on the numeric QCChart2D CF Class Summary 57 values in ElapsedTimeSimpleDataset and ElapsedTimeGroupDataset objects The elapsed time classes use it for auto scale calculations Chart Object Classes Chart objects are graph objects that can be rendered in the current graph window This is in comparison to other classes that are purely calculation classes such as the coordinate conversion classes All chart objects have certain information in common This includes instances of ChartAttribute and PhysicalCoordinates classes The ChartAttribute class contains basic color and line style information for the object while the PhysicalCoordinates maintains the coordinate system used by object The majority of classes in the library derive from the GraphObj class each class a specific charting object such as an axis an axis label a simple plot or a group plot Add GraphObj derived objects axes plots labels title etc to a graph using the ChartView AddChartObject method GraphObj This class is the abstract base class for all drawable graph objects It contains information common to all chart objects This class includes references
195. e Channel Bar Indicator Background background new Background pTransforml ChartObj PLOT BACKGROUND Color White chartVu AddChartObject background ChartAttribute attribl new ChartAttribute Color Green DashStyle Solid Color BlanchedAlmond ChartAttribute attrib2 new ChartAttribute Color Green DashStyle Solid Color Aquamarine ChartAttribute attrib3 new ChartAttribute Color Green DashStyle Solid Color DarkSalmon ChartAttribute attrib4 new ChartAttribute Color Green DashStyle Solid Color Moccasin ChartAttrib te lattribArraw attribl attrib ttrib3 attrib double barwidth 0 20 barbase 0 0 barspace 0 25 int barjust ChartObj JUSTIFY MIN int barorient ChartObj VERT DIR LinearAxis baraxis new LinearAxis pTransforml ChartObj Y AXIS baraxis CalcAutoAxis chartVu AddChartObject baraxis LinearAxis baraxis2 new LinearAxis pTransforml ChartObj Y AXIS baraxis2 CalcAutoAxis baraxis2 SetAxisIntercept pTransforml GetStopX baraxis2 SetAxisTickDir ChartObj AXIS MAX chartVu AddChartObject baraxis2 NumericAxisLabels barAxisLab new NumericAxisLabels baraxis chartVu AddChartObject barAxisLab CustomRTMultiBarIndicator barplot new CustomRTMultiBarIndicator pTransforml processVarArray barwidth barspace barbase attribArray barjust barorient barplot SegmentSpacing 20 barplot SegmentWidth 15 Multi
196. e final symbol are turned off Examples for symbol meter indicators The examples below are program segments that give the important aspects of configuration a needle meter indicator for the image above it The top meter indicator extracted from the example program RTGraphNetDemo file SymbolMeterControll method InitializeMeter2 C RTMeterSymbolIndicator metersymbolindicator new RTMeterSymbolIndicator meterframe processVar2 metersymbolindicator SetChartObjAttributes attrib1 metersymbolindicator IndicatorSubtype ChartObj RT METER SYMBOL ARC SUBTYPE metersymbolindicator SymbolSpacing 10 metersymbolindicator SymbolNum ChartObj SQUARE metersymbolindicator IndicatorBackgroundEnable true metersymbolindicator SymbolSize 12 metersymbolindicator SymbolPosPercent 0 9 Add panel meters chartVu AddChartObject metersymbolindicator VB Dim metersymbolindicator As New RTMeterSymbolIndicator meterframe _ processVar2 205 Meter Indicators Needle Arc and Symbol metersymbolindicator SetChartObjAttributes attribl metersymbolindicator IndicatorSubtype ChartObj RT METER SYMBOL ARC SUBTYPE metersymbolindicator SymbolSpacing 10 metersymbolindicator SymbolNum ChartObj SQUARE metersymbolindicator IndicatorBackgroundEnable True metersymbolindicator SymbolSize 12 metersymbolindicator SymbolPosPercent 0 9 Add panel meters chartVu AddChartObject met
197. e for a single RTProcessVar object Any of these items may be excluded If a channel is in alarm the background of the corresponding cell changes its color giving a strong visual indication that an alarm has occurred RTMultiValueAnnunciator constructors Visual Basic Overloads Public Sub New _ ByVal transform As PhysicalCoordinates ByVal datasource As RTProcessVar ByVal numcols As Integer _ ByVal numrows As Integer _ ByVal attribs As ChartAttribute C public RTMultiValueAnnunciator PhysicalCoordinates transform RTProcessVar datasource int numcols int numrows ChartAttribute attribs Parameters transform The coordinate system for the new RTMultiValueAnnunciator object datasource An array of RTProcessVar objects one for each annunciator cell numcols The number of columns in the annunciator display numrows The number of rows in the annunciator display attribs An array of the color attributes one for each annunciator cell Public Instance Properties Get Set the extra space between columns of the CellColumnMargin annunciator specified in normalized NORM PLOT POS coordinates Get Set the extra space between rows of the CellRowMargin annunciator specified in normalized NORM PLOT POS coordinates 222 Single and Multiple Channel Annunciators Get the number of rows in the annunciator NumberColumns Get the number of rows in the annunciator NumberR
198. e have enabled this feature in the ChartAttribute class so your Net CF charts can now have thick lines and lines styles solid and dashed In the original 1 6 version of the software the QCChart2DNetCF library defined a DashStyle enumeration to make up for the one included with Net 1 0 but not Net CF 1 0 Since Net CF 2 0 now includes a DashStyle enumeration we have removed the one in the QCChart2DNetCF library and use the System Drawing Drawing2D enumeration of DashStyle exclusively So any modules that reference DashStyle must include a reference to System Drawing Drawing2D in the using C or Imports VB section of the program We have eliminated the QCLicense license file from the software and with it the need to purchase additional Redistributable Licenses Once you purchase the software you the developer can create application programs that use this software and redistribute the programs and our libraries royalty free As a development tool 1 e using this software in conjunction with a compiler the software is still governed by a single user license and cannot be shared by multiple individuals unless additional copies or a site license have been purchased We have discontinued support for programming Net CF applications using Visual Studio 2003 and no projects for VS 2003 have been included with the software The current version of the software has been tested to be compatible with VS 2005 and VS 2008 Tutorials Tutori
199. e new RTFormControlPanelMeter object datasource The process variable associated with the control formcontrol A reference to the Control assigned to this panel meter attrib The color attributes of the panel meter Selected Public Instance Properties Sets the attributes for a chart object using a ChartObjAttributes inherited ChartAttribute object from GraphObj Sets the reference to the PhysicalCoordinates object that ChartObjScale inherited the chart object is placed in 262 Buttons Track Bars and Other Form Control Classes from GraphObj Set Get to the size mode for the Control Use one of the ControlSizeMode Control size mode constants RT_ORIG CONTROL SIZE RT MIN CONTROL SIZE RT INDICATORRECT CONTROL SIZE Get the size of the form control in device units FormControlSize See Frame3DEnable inherited from RTPanelMeter Mete IndicatorRect inherited from RTPanelMeter Set Get the xy values of the panelMeterNudge property It PanelMeterNudge inherited moves the relative position using window device from RTPanelMeter coordinates of the text relative to the specified location of the text PanelMeterPosition inherited position table in the RTPanelMeter chapter from RTPanelMeter Set Get the panel meter bounding rectangle inherited from RTPanelMeter Get a ChartLabel object representing the panel meters inherited from RTPanelMeter PositionReference inherited reference for this RTPanelMeter obje
200. e one of the y axis scroll frame constants constants RT NO AUTOSCALE Y no auto scale for the y axis RT AUTOSCALE Y MIN autoscale y axis minimum only RT AUTOSCALE Y MAX autoscale y axis maximum only RT AUTOSCALE Y MINMAX autoscale y axis minimum and maximum Selected Public Instance Properties Get Set the auto scale round mode for the x coordinate AutoScaleRoundXMode Use one of the AUTOAXES round mode constants AUTOAXES EXACT AUTOAXES NEAR AUTOAXES FAR 232 The Scroll Frame and Single Channel Scrolling Plots AutoScaleRoundY Mode EndOfPlotLineMarker MaxDisplayHistory MinSamplesForAutoScale ScrollRescaleMargin ScrollScaleModeX ScrollScaleModeY TimeStampMode Get Set the auto scale mode for the y coordinate Use one of the AUTOAXES round mode constants AUTOAXES EXACT AUTOAXES NEAR AUTOAXES FAR Get Set The end of plot marker type Use one of the Marker marker type constants MARKER NULL MARKER VLINE MARKER HLINE MARKER HVLINE Get Set the maximum number of points displayed Get Set the minimum number of samples that need to be in the dataset before an auto scale operation is carried out This prevents the first datapoints from generating an arbitrarily small range Get Set the scroll rescale margin When the limits of the scale needs to be increased the ScrollRescaleMargin current range of the x axis is added to the upper and lower limits of the current scale Get Set the
201. e panel meter is not added to the ChartView chartVu above instead it is added to the RTBarIndicator barplot below The panel meter will assume the values of the RTProcessVar used by the bar plot C RTBarIndicator barplot new RTBarIndicator pTransforml batteryCharge barwidth barbase Panel Meter Classes 119 attribl barjust barorient ChartAttribute panelmeterattrib new ChartAttribute Color SteelBlue 0 DashStyle Solid Color Black ChartAttribute paneltagmeterattrib new ChartAttribute Color SteelBlue 0 DashStyle Solid Color White RTNumericPanelMeter panelmeter new RTNumericPanelMeter pTransforml panelmeterattrib panelmeter PanelMeterPosition ChartObj OUTSIDE PLOTAREA MIN panelmeter TextColor Color SpringGreen panelmeter NumericTemplate TextFont fontl6Numeric panelmeter NumericTemplate DecimalPos 0 panelmeter AlarmIndicatorColorMode ChartObj RT TEXT BACKGROUND COLOR CHANGE ON ALARM panelmeter PanelMeterNudge new Point2D 0 2 barplot AddPanelMeter panelmeter VB Dim barplot As New RTBarIndicator pTransforml batteryCharge barwidth barbase attribl barjust barorient Dim panelmeterattrib As New ChartAttribute Color SteelBlue 0 DashStyle Solid Color Black Dim paneltagmeterattrib As New ChartAttribute Color SteelBlue 0 DashStyle Solid Color White Dim panelmeter As New RTNumericPanelMeter pTransforml panelmeterattrib panelmeter PanelMeterPositi
202. e system for the new RTGroupMultiPlot object plottemplate A template defining the group plot object datasource An array of RTProcessVar objects one for each group in the group plot template Selected Public Instance Properties Get Set The end of plot marker type Use one of the EndOfPlotLineMarker Marker marker type constants MARKER NULL MARKER VLINE MARKER HLINE MARKER HVLINE Get Set the group number that is used for the end of MarkerGroupNumber plot line marker Get Set the group plot template PlotTemplate A complete listing of RTGroupMultiValuePlot properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory Example for a multi channel scrolling line plot The example below extracted from the Dynamometer example file DynamometerControll method InitializeEngine2ScrollGraph creates a multi channel scrolling graph Multi Channel Scrolling Plots 243 Note You do not have to use an RTGroupMultiValuePlot to plot multi channel data in a scrolling graph You can just use multiple RTSimpleSingleV aluePlot objects as in the InitializeEnginelScrollGraph method S SS S 18 57 40 18 57 50 18 58 00 C scrollFrame2 new RTScrollFrame this EngineCylinderTemp2 0 pTransforml ChartObj RT FIXEDEXTENT MOVINGSTART AUTOSCROLL ScrollFrame2 AddProcessVar EngineCylinderTemp2 1 ScrollFrame2 AddProcessVar EngineCylinderTemp2 2 ScrollFrame2 AddProcessV
203. eArgs 18 RTElapsedTimePanelMeter 18 21 24 109 130 131 132 RTFormControl 19 24 33 37 38 39 132 247 RTFormControlGrid 18 30 33 37 38 39 93 247 248 249 250 251 252 253 254 255 260 264 265 267 268 269 RTFormControlPanelMeter 18 21 24 37 38 109 132 133 134 135 247 258 259 260 261 262 263 264 RTGenShape 18 47 49 295 302 303 304 305 349 355 RTGroupDatasetTruncateArgs 18 RTGroupMultiValuePlot 11 14 17 18 30 32 33 40 93 229 233 239 241 242 243 244 245 246 359 372 RTMeterArcIndicator 18 24 28 189 191 192 193 194 195 196 197 207 RTMeterAxis 19 34 35 36 37 169 174 176 177 178 179 180 182 183 184 186 187 190 191 207 RTMeterAxisLabels 19 35 36 169 176 179 181 182 183 184 207 RTMeterCoordinates 18 35 169 170 171 172 173 174 175 176 177 178 182 183 186 187 190 191 192 198 202 203 207 210 212 214 215 RTMeterIndicator 18 22 24 27 93 109 174 175 176 189 191 192 198 199 202 203 207 340 347 353 RTMeterNeedleIndicator 18 24 29 177 178 182 183 186 187 189 198 199 200 201 207 211 212 213 214 215 216 RTMeterStringAxisLabels 19 35 37 169 184 185 186 187 207 RTMeterSymbolIndicator 18 24 29 189 202 203 204 205 207 RTMultiAlarmIndicator 18 34 35 157 159 332 RTMultiBarIndicator 18 22 30 32 93 109 124 125 151 15
204. eV aluePlot class Chapter 13 describes the RTGroupMultiValuePlot class and the implementation of scrolling plots based on the QCChart2D CF GroupPlot Chapter 14 describes custom control classes buttons and track bars Chapter 15 describes the PID control class Chapter 16 describes tricks and techniques for zooming of real time data Chapter 17 describes miscellaneous classes for drawing shapes and creating rectangular and circular backdrops for graphs and controls Chapter 18 describes the RTProcessVarViewer class a data table used to display historical data collected by the RTProcessVar class Chapter 19 describes the new RTAutoIndicator classes RTAutoBarlIndicator RTAutoMultiBarIndicator RTAutoMeterIndicator RTAutoClockIndicator RTAutoDialIndicator RTAutoScrollGraph RTAutoPanelMeterIndicator These classes simplify the creation of bar indicators meters dials clocks panel meters and scrolling graphs Chapter 20 is a tutorial that describes how to use QCRTGraph CF to create Windows applications using Visual Studio Net Visual C and Visual Basic Chapter 21 is a collection of Frequently Asked Questions about Real Time Graphics Tools for Net 2 Class Architecture of the QCRTGraph CF Class Library Major Design Considerations This chapter presents an overview of the QCRTGraph CF class architecture It discusses the major design considerations of the architecture Based on the QCChart2D CF charting architecture
205. eated 14 Class Architecture The chapter also summarizes the classes in the QCRTGraph CF library There are five primary features of the overall architecture of the QCRTGraph CF classes These features address major shortcomings in existing charting software for use with both Net and other computer languages QCRTGraph CF uses the standard Net CF window architecture Real Time graphs are placed in a ChartView window that derives from the System Windows Forms Control class Position one or more ChartView objects in Net container windows using the standard container layout managers Mix static QCChart2D CF and real time charts with other components in the same container The QCRTGraph CF software uses a new real time update and rendering paradigm which represents a shift in the way Quinn Curtis has always done real time updates in past In the past graphs were always updated incrementally as new data arrived This is no longer the case Instead rendering is no longer incremental When a graph is rendered the entire graph is redrawn using the most current data A special process variable class RTProcessVar is used to store new data as it is acquired In the case of graphs that require a historical display of information such as scrolling graphs the process variable class also manages a ChartDataset object that holds historical information Updating the process variable with new data values does NOT trigger a screen update Because the scree
206. econds value sweeps through 60 Our ChartCalendar default constructor new ChartCalendar is initialized correctly with the current time of day using our own technique that works around the DateTime Now bug Internally the QCChart2DCF and QCRTGraphCF software does not call the DateTime Now method Alarms are added to an RTProcessVar object using the RTProcessVar AddAlarm or RTProcessVar AddCloneAlarm methods The AddCloneAlarm method clones the passed in alarm object so that the same RTAlarmObject can be used to initialize multiple RTProcessVar objects without a conflict occurring Visual Basic Public Sub AddAlarm _ ByVal alarmobj As RTAlarm _ Public AddCloneAlarm ByVal alarmobj As RTAlarm As RTAlarm C public void AddAlarm RTAlarm alarmobj E public RTAlarm AddCloneAlarm RTAlarm alarmobj Parameters alarmobj A reference to the RTAlarm object that is to be added to the process variables alarm list Configure the RTAlarm object and then add it to the RTProcessVar object The most commonly used RTProcessVar properties are Selected Public Instance Properties AlarmStateEventEnable AlarmTransitionEventEnable CurrentValue DatasetEnableUpdate DefaultAttribute DefaultMaximumDisplayV alue DefaultMinimumDisplay Value DetailedDescription GoodValue MaximumValue MinimumV alue PrevCurrentValue PrevTimeStamp ProcessVarDataset ShortDescription
207. ect Get Set the tag string Gets or sets the size that is the upper limit that GetPreferredSize Size can specify Inherited from Control The maximum value for the indicator Gets or sets the size that is the lower limit that GetPreferredSize Size can specify Inherited from Control The minimum value for the indicator Get a reference to the RTNumericPanelMeter object Get an RTProcessVar object in the Get the plot background object Inherited from ChartView Get most recently created RTProcessVar Inherited from ChartView Inherited from ChartView Get a reference to the tag panel meter object Get a reference to the units string panel meter object Get Set the units string Gets or sets a value indicating whether the control is displayed Inherited from Control Gets or sets the width of the control Inherited from Control A complete listing of RTAutoClockIndicator properties is found in the QCRTGraphNetCompiledHelpFile chm documentation file located in the doc subdirectory There are two different clock formats Use the GraphFormat property 0 1 to set the format Below you will find a brief description of the differences between the formats Miscellaneous Shape Drawing 357 Format 0 displays a three hand hours minutes seconds clock A tag name is displayed above the clock face Format 1 displays a three hand hours minutes seconds clock The date is displayed above the
208. ect Proper EAS Output File Fold CSIDL_PROGRAM Policy File Project File ScrollApplication1 1 c4 Target Device Windows Mobile 5 0 H Framework Version The Version of the MET Compact Framework this project targets Ready e When you add a ChartView control to a Form it adds a reference to the DLL QCChart2DNetCF DLL that the control is in to the project and places the default instantiation code in the form s Form Designer cs module Starting with VS 2005 Microsoft has decided to physically separate the designer generated code in a Form Designer module while keeping your user written code in a Form cs module If you can t see the Form Designer cs file in the Solution Explorer you must click in the Show All Files icon at the top of the Solution Explorer and expand the Form cs entry by clicking on the sign in front Form cs e Adda reference to the QCRTGraphNetCF DLL to the project Right click on the project name ScrollApplication11 in the Solution Explorer and select Add Reference Browse to the Quinn Curtis DotNet Lib folder and add the QCRTGraphNetCF DLL to the project 394 QCRTGraph CF Tutorial using using using using using using using using using using The default name used for the first instance of the ChartView control added to a program is chartViewl The variable chartViewl becomes global to the entire Form class You will see a reference to chartViewl in all of our example programs
209. ect to the containing plot area 36 Class Architecture RPM x 1000 4 40 60 20 Pai 0 100 A meter axis can have any number of alarm arcs A meter can have multiple axes representing multiple scales RTMeter Axis A meter axis extends for the extent of the meter arc and is centered on the origin Major and minor tick marks are placed at evenly spaced intervals perpendicular to the meter arc The meter axis also draws meter alarm arcs using the alarm information in the associated RTProcessVar object 100 150 50 4 60 200 20 50 O 100 A useful feature of multiple meter scales is the ability to display both Fahrenheit and Centigrade scales at the same time RTMeterAxisLabels This class labels the major tick marks of the RTMeterAxis class The class supports many predefined and user definable formats including numeric exponent percentage business and currency formats Class Architecture 37 Meter tick mark strings can inside or outside of the meter arc RTMeterStringAxisLabels This class labels the major tick marks of the RTMeterAxis class using user defined strings Form Control Classes System Windows Forms Button RTControlButton System Windows Forms TrackBar RTControlTrackBar Com quinncurtis chart2dnetcf ChartObj RTFormControl RTPanelMeter RTFormControlPanelMeter RTMultiValueIndicator RTFormControlGrid Real time displays often require user interface features such as buttons and track bars The Visua
210. efore they are drawn A complete listing of RTMeterAxis properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory Example for meter axis The example below extracted from the AutoInstrumentPanel example method InitializeTach creates a meter coordinate system that starts at the arc angle of 135 degrees and has an arc extent of 230 degrees The meter scale extends from 0 0 to 8 0 in the counterclockwise direction The axis uses a tick mark spacing of 0 2 and a major tick mark interval of 5 RPM x 1000 4 Meters Coordinates Meter Axes and Meter Axis Labels 177 C ChartView chartVu this ChartAttribute attribl new ChartAttribute Color Black 1 DashStyle Solid Color Blue double startarcangle 135 double arcextent 230 double startarcscale 0 0 double endarcscale 8 0 bool arcdirection false double arcradius 0 75 double centerx 0 0 centery 0 0 RTMeterCoordinates meterframe new RTMeterCoordinates startarcangle arcextent startarcscale endarcscale arcdirection centerx centery arcradius meterframe SetGraphBorderDiagonal 0 45 0 2 0 75 0 9 RTMeterNeedleIndicator meterneedle new RTMeterNeedleIndicator meterframe tach Add panel meters chartVu AddChartObject meterneedle RTMeterAxis meteraxis new RTMeterAxis meterframe meterneedle meteraxis SetChartObjAttributes attribl meteraxis SetAxisTic
211. egralControl i CurrentValue DerivativeControl i CurrentValue 100 0 sampleper 60 0 filterConstant void CalculatePIDValues double rMeas 0 0 double rSetpoint 0 0 double rOutput 0 0 for int i 0r 1 lt Br i simulate measurement rOutput ControlOutputs i CurrentValue rMeas ProcessModel i rOutput PIDProcessItems i SetCurrentValue rMeas if autoModeEnable i rSetpoint ControlSetpoints i CurrentValue rOutput PIDControlLoops i RTCalcPID rMeas ControlOutputs i SetCurrentValue rOutput outputControlTrackBar RTValue rSetpoint ControlOutputs currentTuningChannel CurrentValue VB VB Arrays are sized from 0 Upper limit Private PIDProcessItems 7 As RTProcessVar Private ProportionalControl 7 As RTProcessVar Private IntegralControl 7 As RTProcessVar Private DerivativeControl 7 As RTProcessVar Private ControlSetpoints 7 As RTProcessVar Private ControlTrackBarOutputs 7 As RTProcessVar Private ControlOutputs 7 As RTProcessVar Private PIDControlLoops 7 As RTPIDControl Dim i As Integer For i 0 To numChannels 1 Note derivative value is saled down by 100x PIDControlLoops i New RTPIDControl ControlSetpoints i CurrentValue 280 Moving Chart Objects and Data Points pidSteadyState ProportionalControl i CurrentValue IntegralControl i CurrentValue DerivativeControl i CurrentValue 100 0 sampleper 60 0 filterCon
212. em defined by transform The size and position of the rectangle corner The radius of the rectangle corners postype The coordinate system the rectangle is defined in Use one of the coordinate system constants DEV POS PHYS POS NORM GRAPH POS NORM PLOT POS Selected Public Instance Properties Get Set the corner radius of the rounded CornerRadius rectangle FillColor inherited from GraphObj Height LineColor inherited from GraphObj Sets the line style for the chart object LineStyle inherited from GraphObj Sets the line width for the chart object LineWidth inherited from Only line widths of 1 are supported by GraphObj Net CF Get Sets the current position type PositionType inherited from GraphObj Get Set the width of the rectangle Width Get Set the x value of the rectangle X Get Set the y value of the rectangle Sets the z order of the object in the chart ZOrder inherited from GraphObj Every object has a z order value Each z order value does NOT have to be unique If Miscellaneous Shape Drawing 301 Z order sorting is turned on in the ChartView object objects are sorted by z order before they are drawn A complete listing of RTRoundedRectangle2D properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory Example for drawing RTRoundedRectangle2D objects The example below extracted from the RTGraphNetDemo example file
213. endarcscale bool arcdirection double x double y double arcradius public RTMeterCoordinates double startarcangle double arcextent double startarcscale double endarcscale bool arcdirection double arcradius Parameters startarcangle Specifies the starting arc angle position of the meter arc in degrees arcextent Specifies the extent of the meter arc in degrees The default meter arc starts at startArcAngle and extends in a negative clockwise direction with an extent arcExtent startarcscale Specifies the scaling value associated with the startArcAngle position of the meter arc endarcscale Specifies the scaling value associated with the ending position of the meter arc arcdirection Specifies the direction of the arcextent The default arcDirectionPositive value of false meter arc starts at startArcAngle and extends in a negative clockwise direction with an extent arcExtent Change to true to have the meter arc extend in a positive counter clockwise direction Specifies x position of the center of the meter arc in plot area normalized coordinates Specifies y position of the center of the meter arc in plot area normalized coordinates arcradius Meters Coordinates Meter Axes and Meter Axis Labels 171 Specifies radius of the meter arc in plot area normalized coordinates Selected Public Instance Properties Get Set Specifies x position of the center ArcCenterX of the meter
214. ension Point2D GroupPoint2D DoubleArray DoubleArray2D BoolArray Point3D NearestPointData TickMark Polysurface This class contains utility routines used to process ChartCalendar date objects This is a utility class for reading and writing CSV Comma Separated Values files This is a utility class for handling dimension height and width information using doubles rather than the integers used by the Size class This class encapsulates an xy pair of values as doubles more useful in this software than the Net Point and PointF classes This class encapsulates an x value and an array of y values representing the x and y values of one column of a group data set This class is used as an alternative to the standard Net Array class adding routines for resizing of the array and the insertion and deletion of double based data elements This class is used as an alternative to the standard Net 2D Array class adding routines for resizing of the array and the insertion and deletion of double based data elements This class is used as an alternative to the standard Net Array class adding routines for resizing of the array and the insertion and deletion of bool based data elements This class encapsulates an xyz set of double values used to specify 3D data values This is a utility class for returning data that results from nearest point calculations The axis classes use this class to organize the l
215. ent barplot IndicatorSubType ChartObj RT BAR SOLID SUBTYPE For Pointer indicator Dim attribl As New ChartAttribute Color Black 1 DashStyle Solid Color Green Dim barwidth As Double 1 0 Dim barbase As Double 0 0 Dim barjust As Integer ChartObj JUSTIFY MIN Dim barorient As Integer ChartObj VERT DIR attribl SymbolSize 22 Dim barplot As New RTBarIndicator pTransforml processVarl _ barwidth barbase attribl barjust barorient barplot IndicatorSubType ChartObj RT POINTER SUBTYPE 7 Multiple Channel Bar Indicator RTMultiBarIndicator An RTMultiBarIndicator is used to display the current value of a collection of RTProcessVar objects using a group of bars changing size The bars are always fixed at the specified base value Bars can change their size either in vertical or horizontal direction Sub types within the RTMultiBarIndicator class support segmented bars custom segmented bars with variable width segments and pointer bar indicators Multiple Channel Bar Indicator Class RTMultiBarIndicator Com quinncurtis chart2dnetcf ChartPlot RTPlot RTMultiValueIndicator RTMultiBarlIndicator The multi bar indicator displays a collection of RTProcessVar objects that are related or at the very least comparable when bar graphed against one another using the same physical coordinate system It is usually combined with axes and axis labels though this is not required Since the bar indicator does not include axes o
216. ent ButtonChecked False AddHandler Concurrent Click AddressOf Me selector Button Click Concurrent ButtonFont buttonfont buttonlist2 Add Concurrent numColumns 1 numRows 4 Dim controlgrid2 As New RTFormControlGrid pTransform2 Nothing buttonlist2 numColumns numRows attrib2 controlgrid2 CellRowMargin 0 1 controlgrid2 CellColumnMargin 0 0 controlgrid2 FormControlTemplate Frame3DEnable flag3DBorder chartVu AddChartObject controlgrid2 End Sub InitializeStartStopButtons 256 Buttons Track Bars and Other Form Control Classes Control TrackBars Class RTControlTrackBar System Windows Forms TrackBar RTControlTrackBar The RTControlTrackBar class is subclassed from the Net TrackBar class Our version of the TrackBar control adds floating point scaling for the track bar endpoints increments current value and tick mark frequency RTControlButton constructor Visual Basic Overloads Public Sub New ByVal minvalue As Double _ ByVal maxvalue As Double _ ByVal largechange As Double _ ByVal smallchange As Double _ ByVal tickfrequency As Double Overloads Public Sub New ByVal minvalue As Double _ ByVal maxvalue As Double Cf public RTControlTrackBar double minvalue double maxvalue double largechange double smallchange double tickfrequency public RTControlTrackBar double minvalue double maxvalue Parameters minvalue Specifies the
217. erRadius 0 barplot IndicatorSubType ChartObj RT BAR SEGMENTED SUBTYPE RTMultiAlarmIndicator baralarms new RTMultiAlarmIndicator baraxis barplot chartVu AddChartObject baralarms ChartAttribute panelmeterattrib indicator new ChartAttribute Color SteelBlue 1 DashStyle Solid Color Black ChartAttribute paneltagmeterattrib new ChartAttribute Color SteelBlue 1 DashStyle Solid Color White RTNumericPanelMeter panelmeter new RTNumericPanelMeter pTransforml panelmeterattrib panelmeter PanelMeterPosition ChartObj OUTSIDE PLOTAREA MIN panelmeter TextColor brightGreen panelmeter NumericTemplate TextFont fontl5Numeric panelmeter NumericTemplate DecimalPos 0 panelmeter NumericTemplate PostfixString char 176 C panelmeter AlarmIndicatorColorMode ChartObj RT TEXT BACKGROUND COLOR CHANGE ON ALARM barplot AddPanelMeter panelmeter RTAlarmPanelMeter panelmeter2 new RTAlarmPanelMeter pTransforml panelmeterattrib panelmeter2 PanelMeterPosition ChartObj BELOW REFERENCED TEXT 158 Multiple Channel Bar Indicator panelmeter2 TextColor brightGreen panelmeter2 AlarmTemplate TextFont font12 panelmeter2 SetPositionReference panelmeter panelmeter2 AlarmIndicatorColorMode ChartObj RT TEXT BACKGROUND COLOR CHANGE ON ALARM barplot AddPanelMeter panelmeter2 RTStringPanelMeter panelmeter3 new RTStringPanelMeter pTransforml paneltagmeterattrib
218. ers numeric value tag name and alarm status Since it contains a RTComboProcessVar object it can divide a single input value time in this case into multiple values hours minutes seconds to drive multiple needles in the display RTAutoClockIndicator constructors Since the RTAutoClockIndicator is designed to be dropped on a form only a default constructor is used The indicator is customized using public properties Visual Basic Overloads Public Sub New C4 public RTAutoMeterIndicator 354 Miscellaneous Shape Drawing The InitStrings method is used to initialize the clock tag and units strings Method InitStrings VB Public Sub InitStrings title As String _ units As String Cit public void InitStrings String title string units Parameters title The title or tag string units The units string Use the UpdateClock method to update the clock indicator with a new time value Method UpdatelIndicator VB Public Sub UpdateClock time As DateTime _ updatedraw As Boolean Public Sub UpdateClock _ time As ChartCalendar updatedraw As Boolean Miscellaneous Shape Drawing 355 Ci public void UpdateClock DateTime time bool updatedraw public void UpdateClock ChartCalendar time bool updatedraw Parameters value Update the clock with this time value updatedraw True and the indicator is immediately updated Selected Public Instance Properties
219. ersymbolindicator The bottom meter indicator extracted from the example program RTGraphNetDemo file SymbolMeterControl1 cs method InitializeMeter3 C RTMeterSymbolIndicator metersymbolindicator new RTMeterSymbolIndicator meterframe processVar2 metersymbolindicator SetChartObjAttributes attribl metersymbolindicator IndicatorSubtype ChartObj RT METER SYMBOL ARC SUBTYPE metersymbolindicator SymbolSpacing 10 metersymbolindicator SymbolNum ChartObj CIRCLE metersymbolindicator IndicatorBackgroundEnable true metersymbolindicator SymbolSize 12 metersymbolindicator SymbolPosPercent 0 9 Add panel meters chartVu AddChartObject metersymbolindicator VB Dim metersymbolindicator As New RTMeterSymbollIndicator meterframe processVar2 metersymbolindicator SetChartObjAttributes attribl metersymbolindicator IndicatorSubtype ChartObj RT METER SYMBOL ARC SUBTYPE metersymbolindicator SymbolSpacing 10 metersymbolindicator SymbolNum ChartObj CIRCLE metersymbolindicator IndicatorBackgroundEnable True metersymbolindicator SymbolSize 12 metersymbolindicator SymbolPosPercent 0 9 Meter Indicators Needle Arc and Symbol 206 Add panel meters chartVu AddChartObject metersymbolindicator 10 Dials and Clocks RTComboProcessVar RTMeterNeedleIndicator Clocks and dials use the same meter components as described in the previous chapter RTMeterCoordinates RTMe
220. es solid segmented custom and pointer bar indicators meter indicators which includes meter needles meter arcs and meter symbol indicators single channel annunciator indicators panel meter indicators and scrolling graph plots based on a QCChart2D CF SimplePlot chart object A multiple value indicator is a real time display object that is attached to a group of RTProcessVar objects This includes multiple channel bar indicators which includes solid segmented custom and pointer bar indicators multiple channel annunciator indicators panel meter indicators organized in a grid and scrolling graph plots based on a QCChart2D CF GroupPlot chart object Alarm indicators are used to display alarm lines symbols and fill areas for the RTProcessVar objects associated with the single value and multiple value indicator classes The RTPanelMeter derived classes are special cases of the single value indicator classes that are used throughout the software to display real time data in a text format Panel meters are available for numeric values string values time date values and alarm values Meter Axis Classes Form Control Classes Scroll Frame Auto Indicator Classes Miscellaneous Classes Class Architecture 17 Meter indicators needed new classes to support the drawing of meter axes meter axis labels and meter alarm objects The Net CF Button and TrackBar objects have been subclassed and enhanced for use in instrument panels
221. etCompiledHelpFile chm documentation file located in the doc subdirectory There are 8 different bar graph formats four horizontal and four vertical Use the GraphFormat property 0 3 to set the format Below you will find a brief description of the differences between the formats 100 0 Panel meters above and below the bar for the tag name numeric value and alarm status The scale units displayed vertically on the left Turn the BarEndBulb property on and the numeric and alarm status panel meters will sit on top of the bar end bulb 5 Miscellaneous Shape Drawing 323 The tag panel meter on top with the numeric value and alarm status panel meters to the right The scale units displayed vertically on the left Turn on the BarEndBulb property and the bar indicator will shrink vertically in order fit the bulb in the indicator window Similar to GraphFormat 0 except that if the BarEndBulb property is turned on the numeric and alarm status panel meters do not sit on top of the bar 324 Miscellaneous Shape Drawing GMB Panel meters above and below the bar for the tag name numeric value and alarm status The scale units are displayed under the tag name Turn the BarEndBulb property on and the numeric and alarm status panel meters will sit on top of the bar end bulb The default width of this format is wider than GraphFormat 0 20 40 60 80 100 GMB a 0 20 40 60 80
222. evious Zoom operation Repeated calls to the PopZoomStack method return the chart scale is to its original condition after which the PopZoomStack method has no effect Simple zoom example Extracted from the FetalMonitor example In this example a new class derives from the ChartZoom class and the MousePressed event overridden The event invokes the PopZoomStack method Otherwise the default operation of the ChartZoom class controls everything else C private class ZoomWithStack ChartZoom 284 Zooming public ZoomWithStack ChartView component TimeCoordinates transforms brescale base component transforms brescale public override void OnMouseDown MouseEventArgs mouseevent if mouseevent Button amp MouseButtons Right 0 this PopZoomStack else base OnMouseDown mouseevent ZoomWithStack zoomObj zoomObj new ZoomWithStack chartVu pTransforml true zoomObj SetButtonMask MouseButtons Left zoomObj SetZzoomYEnable true zoomObj SetZzoomXEnable true zoomObj SetZoomXRoundMode ChartObj AUTOAXES FAR zoomObj SetZoomYRoundMode ChartObj AUTOAXES FAR zoomObj SetEnable false chartVu SetCurrentMouseListener zoomObj private void zoomOn Button Click object sender System EventArgs e timerl Enabled false Change to display of all collected data bool fetalHeartECGScrollFrame ScrollScaleModeX ChartObj RT AUTOSCALE X MINMAX Look at updatecounter num
223. ewer can scroll the chart Class RTProcessVarViewer ChartView DatasetViewer RTProcessVarViewer The RTProcessVarViewer is a ChartView derived object and as such is an independent UserControl object Use it to view one or more RTProcessVar objects in a real time display Since it is usually not possible or practical to display the entire dataset the RTProcessVarViewer windows a rectangular section of the dataset for display Scroll bars are used to scroll the rows and columns of the dataset The RTProcessVarViewer constructor defines the size position source matrix the number of rows and columns of the RTProcessVarViewer grid and the starting position of the RTProcessVarViewer scrollbar RTProcessVarViewer constructor Public Sub New _ chartvu As ChartView _ transform As PhysicalCoordinates _ posrect As Rectangle2D _ pv As RTProcessVar _ rows As Integer _ cols As Integer _ start As Integer _ 308 Process Variable Viewer CH public RTProcessVarViewer ChartView chartvu PhysicalCoordinates transform Rectangle2D posrect RTProcessVar pv int rows int cols int start chartvu The ChartView object the DatasetViewer is placed in transform The coordinate system the DatasetViewer is placed in posrect A positioning rectangle using normalized chart coordinates for the dataset viewer use null if not used pv The initial process variable rows Number of rows to display cols Number of columns to d
224. f the example programs use these shapes either directly or indirectly as the 3D border element of the RTPanelMeter class The chapter discusses how to explicitly add these objects to your program 3D Borders and Background Frames Class RT3DFrame Com quinncurtis chart2dnetcf GraphObj RT3DFrame This class is used to draw 3D borders and provide the background for many of the other graph objects most noticeably the RTPanelMeter classes It can also be used directly in your program to provide 3D frames the visually group objects together in a faceplate format RT3DFrame constructors Visual Basic Overloads Public Sub New ByVal transform As PhysicalCoordinates ByVal rect As Rectangle2D _ ByVal attrib As ChartAttribute ByVal postype As Integer _ Ct public RT3DFrame PhysicalCoordinates transform Rectangle2D rect ChartAttribute attrib int postype Parameters transform 296 Miscellaneous Shape Drawing Places the RT3DFrame object in the coordinate system defined by transform rect Specifies the position and size of the frame attrib Specifies the attributes line and fill color for the frame postype Specifies the positioning coordinate system Selected Public Instance Properties Returns the bounding box for the chart object Not BoundingBox inherited from all chart objects have bounding boxes Be sure and check for null Sets the attributes for a chart object using a ChartObjAttribute
225. fall on decade boundaries A logarithmic axis must have a positive range exclusive of 0 0 and the tick marks can represent any logarithmic scale Date Axes Yea Quart errre rrr vas 1000 wes 2000 am men 2000 2001 2009 aen eschter Sueteuhierg T T 1000 1999 2000 200 200 aen 100 ae zeen mem wun Month Mea MisattvDay 7 Day Week TT T T 90102 100102 10102 og 10109 110102 120102 10103 Month ay f Day ween mea sr Day Week riri rrrryrrrrrrrrrrrrrrrrrrrrr rrrn 10103 20103 3003 40103 WAOS VIZOS VAOS 2009 Waaay 5 Day was Oret Hour rr qa 10602 11203 19000 120742 10103 10203 10303 10 403 There are more than 40 diferent li mediate axes types appropriate for scales ranging from 1 secondio 100 years Date Axes QuatedMonth UE IR ER RER Lo LELE D D DR DR em o en o o4 E o o oa ou 2001 2002 2003 Month Reg E D bi IS ELE USURA Jam feb Mar Apr May Jun Zei Aug Sep Ost Now Des Jan feb Mar Age May Jun Jul Aup Sep 2003 2004 Day O Day Wes w T F D T w T F D T w T F M T w m amano 12002 Day O Day Week f T T T T T T T T T T T T T Wed Thu Fi Sat Sun Mon Tue Wed Thu fu at Sun Mon Tue Wed Thu 10503 11203 There are more than 40 derer i madizte axes types appropriate for scales ranging from 1 second to 100 years Date Axes Day Heur 8 HousHeut a CO ICH 0205 10203 10403 000 200 CH 000 200 10003 IRALAAAZI LAGARAZI LARAZZAZ LARZARAZIZAL 4 houmos 400 s
226. floating point minimum value for the track bar Equivalent to the TrackBar Minimum property except allows floating point numbers maxvalue Specifies the floating point maximum value for the track bar Equivalent to the TrackBar Maximum property except allows floating point numbers Buttons Track Bars and Other Form Control Classes 257 largechange Specifies the floating point large change value for the track bar Equivalent to the TrackBar LargeChange property except allows floating point numbers smallchange Specifies the floating point small change value for the track bar Equivalent to the TrackBar SmallChange property except allows floating point numbers tickfrequency Specifies the floating point tick frequency value for the track bar Equivalent to the TrackBar TickFrequency property except allows floating point numbers Selected Public Instance Properties Gets or sets a value indicating the horizontal or RTOrientation vertical orientation Orientation Horizontal or Orientation Vertical of the track bar Specifies the floating point large change value RTLargeChange for the track bar Equivalent to the TrackBar LargeChange property except allows floating point numbers Specifies the floating point maximum value for RTMaximum the track bar Equivalent to the TrackBar Maximum property except allows floating point numbers Specifies the floating point minimum value for RTMinimum the track bar Equivalent to the TrackB
227. frame constants RT NO AUTOSCALE Y RT AUTOSCALE Y CURRENT SCALE RT AUTOSCALE Y MIN RT AUTOSCALE Y MAX RT AUTOSCALE Y MINMAX RT FIXEDEXTENT MOVINGSTART AUTOSCROLL RT MAXEXTENT FIXEDSTART AUTOSCROLL RT FIXEDNUMPOINT AUTOSCROLL Get Set the time stamp mode for the time values in the process variables Use one of the time stamp mode constants RT NOT MONOTONIC Y MODE not monotonic 236 The Scroll Frame and Single Channel Scrolling Plots means that the x values do not have to increase with increasing time A real time xy plot that plots x values against y values might have this characteristic RT MONOTONIC Y MODE The default value Monotonic means that the x values always increase with increasing time If the scroll frame routines know that the x values will never backtrack it speeds up the search algorithm for minimum and maximum x values to use in auto scaling the x axis A complete listing of RTVerticalScrollFrame properties is found in the QCRTGraphNetCompiledHelpFile chm documentation file located in the doc subdirectory See the example VerticalScrolling for example of the use of the RTVerticalScrollFrame class C scrollFrame New RTVerticalScrollFrame Me currentTemperaturel pTransforml ChartObj RT_FIXEDEXTENT MOVINGSTART AUTOSCROLL scrollFrame AddProcessVar currentTemperature2 scrollFrame ScrollScaleModeX ChartObj RT AUTOSCALE X MINMAX Allow 400 samples to accumlate before autoscaling y
228. hartView control does NOT need to be added to the Visual Studio Toolbox You will need to add the QCChart2DNetCF DLL and QCRTGraphNetCF DLL files to the project by right clicking project name in the Solution Explorer and selecting Add Reference Browse to the QCChart2DNetCF DLL and QCRTGraphNetCF DLL files in the Quinn Curtis DotNetVib folder and select both You will also need to make sure that you reference com quinncurtis chart2dnetcf com quinncurtis rtgraphnetcf and 388 QCRTGraph CF Tutorial System Drawing Drawing2D in Imports section of any module that references ChartView ChartView constructor example extracted from the example program ScrollApplication2 Form1 In VB there is no default constructor to invoke the chart initialization For that reason the chart creation code is placed in the Form Load event Imports System Drawing Imports System Drawing Drawing2D Imports com quinncurtis chart2dnetcf Imports com quinncurtis rtgraphnetcf Public Class Forml Dim ChartViewl As ChartView Nothing Private Sub Forml Load ByVal sender As System Object ByVal e As System EventArgs Handles MyBase Load InstantiateChartView If ChartViewl IsNot Nothing Then InitializeGraph End If End Sub Public Sub InstantiateChartView Allow room for a menu in the form Dim graphRect As Rectangle New Rectangle 1 1 Me ClientRectangle Width 2 Me ClientRectangle Height 2 Instantiate chart control ChartViewl New C
229. hartView constructor example extracted from the example program ScrollApplication3 390 QCRTGraph CF Tutorial In VB there is no default constructor to invoke the chart initialization For that reason the chart creation code is placed in the Form Load event Extracted from file UserControll vb Imports System Drawing Imports System Drawing Drawing2D Imports com quinncurtis chart2dnetcf Imports com quinncurtis rtgraphnetcf Public Class UserControll Change the inheritance of the control in the UserControll Designer vb file Inherits ChartView Private Sub InitializeScrollGraph Dim chartVu As ChartView Me End Sub InitializeScrollGraph Public Sub InitializeGraph InitializeScrollGraph End Sub InitializeGraph End Class Extracted from file Form1 vb Public Class Forml Dim ChartViewl As UserControll Nothing QCRTGraph CF Tutorial Public Sub InstantiateChartView Allow room for a menu in the form Dim graphRect As Rectangle New Rectangle 1 1 Me ClientRectangle Width 2 Me ClientRectangle Height 2 Instantiate chart control and add it to the form ChartViewl New UserControll ChartViewl Location graphRect Location ChartViewl Size graphRect Size ChartViewl PreferredSize graphRect Size Me Controls Add ChartViewl End Sub Private Sub Forml Load ByVal sender As System Object ByVal e As System EventArgs Handles MyBase Load InstantiateChartView ChartViewl InitializeGraph
230. hartView graphRect Me End Sub Private Sub InitializeScrollGraph QCRTGraph CF Tutorial 389 Dim chartVu As ChartView ChartViewl End Sub InitializeScrollGraph Public Sub InitializeGraph InitializeScrollGraph End Sub InitializeGraph End Class Adding a UserControl derived from ChartView at runtime You can derive your own chart class from ChartView and use that control instead of the base ChartView class Right click on the project in the Solution Explorer and select Add User Control Choose the UserControl template This will add a basic template for a user defined UserControll to your project Go to the UserControl1 Designer vb file and change the inheritance from UserControl to ChartView You can then customize the UserControll class to produce a specific chart See the UserControll vb code in the ScrollApplication3 example program In order to add a ChartView control at runtime the ChartView control does NOT need to be added to the Visual Studio Toolbox You will need to add the QCChart2DNetCF DLL and QCRTGraphNetCF DLL files to the project by right clicking project name in the Solution Explorer and selecting Add Reference Browse to the QCChart2DNetCF DLL and QCRTGraphNetCF DLL files in the Quinn Curtis DotNetMib folder and select both You will also need to make sure that you reference com quinncurtis chart2dnetcf and com quinncurtis rtgraphnetcf in Imports section of any module that references ChartView C
231. he bar indicators Other items also shown include axes axis labels panel meters and alarm indicators RTBarIndicator Class Architecture 27 An RTBarIndicator is used to display the current value of an RTProcessVar using a bar changing its size One end of each bar is always fixed at the specified base value Bars can change their size either in vertical or horizontal direction Sub types within the RTBarIndicator class support segmented bars custom segmented bars with variable width segments and pointer bar indicators There are an infinite number of meter designs possible using a variety of meter arc ranges meter scales meter axes and meter indicator types RTMeterIndicator The RTMeterIndicator class is the abstract base class for all meter indicators Familiar examples of analog meters are voltmeters car speedometers pressure gauges compasses and analog clock faces Three meter types are supported arc symbol and needle meters An unlimited number of meter indicators can be added to a given meter object RTPanelMeter objects can be attached to an 28 Class Architecture RTMeterIndicator object for the display of RTProcessVar numeric alarm and string data in addition to the indicator graphical display Meter scaling meter axes meter axis labels and alarm objects and handle by other classes Only the blue meter arc is the arc indicator The other elements of the meter include meter axes meter axis labels and pane
232. he current tick mark spacing A test can be performed in the software to not display labels to overlap Set Get the color of the background rectangle under the text if the textBgMode is true Set Get the text background color mode Set Get if the text bounding box is drawn in the text box color Set Get the text bounding box color Set Get the font of the text Set Get the xy values of the textNudge property It moves the relative position using window device coordinates of the text relative to the specified location of the text Set Get the rotation of the text in the normal viewing plane Sets the z order of the object in the chart Every object has a z order value Each z order value does NOT have to be unique If z order sorting is turned on in the ChartView object objects are sorted by z order before they are drawn Meters Coordinates Meter Axes and Meter Axis Labels 181 A complete listing of RTMeterAxisLabels properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory Example for meter axis labels The example below extracted from the WeatherStation example method InitializeHumidity creates a meter coordinate system that starts at the arc angle of 225 degrees and has an arc extent of 270 degrees The meter scale extends from 0 0 to 100 0 in the counterclockwise direction The axis uses a tick mark spacing of 5 0 and a major tick mark interval of 4
233. he current values and alarm states of a single channel real time data RTAnnunciator constructor Visual Basic Overloads Public Sub New ByVal transform As PhysicalCoordinates ByVal datasource As RTProcessVar _ ByVal annunpos As Rectangle2D ByVal attrib As ChartAttribute Ct public RTAnnunciator PhysicalCoordinates transform RTProcessVar datasource Rectangle2D annunpos ChartAttribute attrib Parameters transform The coordinate system for the new RTAnnunciator object datasource The process variable associated with the annunciator annunpos 218 Single and Multiple Channel Annunciators The position and size of the annunciator attrib The color attributes of the annunciator The annunciator resides in coordinate system scaled for physical coordinates of 0 0 0 0 1 0 1 0 The annunciator rectangle size and position is defined using the RTAnnunciator AnnunciatorRect property The default annunciator consists of a simple rectangle that changes color in response to the alarm state of the RTProcessVar object attached to the annunciator The annunciator can be customized with tag names numeric readouts and alarm messages by adding RTPanelMeter objects to the RTAnnunciator object See the examples below Public Instance Properties Get Set the annunciator rectangle AnnunciatorRect A complete listing of RTAnnuciator properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentati
234. he scroll graph coordinate system to be re scaled to reflect the current data values The RTSimpleSingleValue object in the ChartView list redraws the line plot in the new re scaled coordinate system Solar Panel T LI CL 120 100 60 60 22 02 00 22 04 00 22 06 00 C scrollFrame new RTScrollFrame this currentTemperaturel pTransforml ChartObj RT FIXEDEXTENT MOVINGSTART AUTOSCROLL scrollFrame ScrollScaleModeY ChartObj RT NO AUTOSCALE Y ScrollFrame ScrollRescaleMargin 0 05 chartVu AddChartObject scrollFrame The Scroll Frame and Single Channel Scrolling Plots 239 SimpleLinePlot lineplot new SimpleLinePlot pTransforml null attribl lineplot SetFastClipMode ChartObj FASTCLIP X RTSimpleSingleValuePlot solarPanelLinePlot new RTSimpleSingleValuePlot pTransforml lineplot currentTemperaturel chartVu AddChartObject solarPanelLinePlot VB scrollFrame New RTScrollFrame Me currentTemperaturel pTransforml _ ChartObj RT FIXEDEXTENT MOVINGSTART AUTOSCROLL scrollFrame ScrollScaleModeY ChartObj RT NO AUTOSCALE Y scrollFrame ScrollRescaleMargin 0 05 chartVu AddChartObject scrollFrame Dim lineplot As New SimpleLinePlot pTransforml Nothing attribl lineplot SetFastClipMode ChartObj FASTCLIP X Dim solarPanelLinePlot As New RTSimpleSingleValuePlot pTransforml lineplot currentTemperaturel chartVu AddChartObject solarPanelLinePlot Example for a multi channel scrolling line
235. ial Copy Bear in mind that the 30 Day Trial version of the SOFTWARE becomes invalid 30 days after downloaded from our web site or one of our sponsor s web sites If you wish to redistribute the 30 day trial version of the SOFTWARE you should arrange to have it redistributed directly from our web site If you are using SOFTWARE on an evaluation basis you may make copies of the evaluation SOFTWARE as you wish give exact copies of the original evaluation SOFTWARE to anyone and distribute the evaluation SOFTWARE in its unmodified form via electronic means Internet BBS s Shareware distribution libraries CD ROMS etc You may not charge any fee for the copy or use of the evaluation SOFTWARE itself You must not represent in any way that you are selling the SOFTWARE Itself You must distribute a copy of this EULA with any copy of the SOFTWARE and anyone to whom you distribute the SOFTWARE is subject to this EULA C Redistributable License The standard Developer License permits the programmer to deploy and or distribute applications that use the Quinn Curtis SOFTWARE royalty free We cannot allow developers to use this SOFTWARE to create a graphics toolkit a library or any type of graphics component that will be used in combination with a program development environment for resale to other developers If you utilize the SOFTWARE in an application program or in a web site deployment should we ask you must supply Quinn Curtis Inc with the name
236. ic Sub InitRTAutoScrollGraph _ minx As ChartCalendar miny As Double _ maxx As ChartCalendar maxy As Double Initialize x scale to a Date Time scale using DateTime objects linear y scale Public Sub InitRTAutoScrollGraph _ minx As DateTime _ miny As Double _ 360 Miscellaneous Shape Drawing maxx As DateTime _ maxy As Double Initialize x scale to a linear scale using doubles linear y scale Public Sub InitRTAutoScrollGraph _ minx As Double _ miny As Double _ maxx As Double _ maxy As Double _ Initialize x scale to an elapsed time scale using TimeSpan objects linear y scale Public Sub InitRTAutoScrollGraph _ minx As TimeSpan _ miny As Double _ maxx As TimeSpan _ maxy As Double Initialize x scale to the scale type specified by the parameter scaltype linear y scale Use millisecond values for minx and maxx Public Sub InitRTAutoScrollGraph _ minx As Double _ miny As Double _ maxx As Double _ maxy As Double _ scaletype AS Integer _ CH Initialize x scale to a Date Time scale using ChartCalendar objects linear y scale public void InitRTAutoScrollGraph ChartCalendar minx double miny ChartCalendar maxx double maxy Miscellaneous Shape Drawing 361 Initialize x scale to a Date Time scale using DateTime objects linear y scale public void InitRTAutoScrollGraph DateTime minx double miny DateTime maxx double maxy Initialize x scale to a linear scale using
237. icator An RTAutoBarIndicator is a self contained control derived from the ChartView user control It is used to display the current value of a single channel of real time data and includes as options a numeric readout alarm status readout title units alarm indicators and a bar end bulb The indicator can be horizontal or vertical with four different format options for each 44 Class Architecture Flow 493 Quintini uam Flow 493 Og ee 0 20 40 60 80 100 GMB The RTAutoMultiBarIndicator displays multiple channels of real time data in a single chart RTAutoMultiBarIndicator An RTAutoMultiBarIndicator is a self contained control derived from the ChartView user control It is used to display the current values of multiple channels of real time data and includes as options numeric readouts alarm status readouts channel names title units alarm indicators and bar end bulbs The indicator can be horizontal or vertical with two format options for each Class Architecture 45 The RTAutoMeterIndicator has many different format options for self contained single channel meter indicators RTAutoMeterIndicator An RTAutoMeterIndicator is a self contained control derived from the ChartView user control It is used to display the current value of a single channel of real time data and includes as options a numeric readout alarm status readout title units and alarm arcs There are t
238. ill color for the chart object Sets the line color for the chart object Sets the line width for the chart object Set Get the bar width Get Set the charts Legend object Get Set the chart object type Inherited from RTAutoIndicator Get the SimpleDataset object that holds the data used to plot the scroll graph Get the coordinate system object for the indicator Inherited from RTAutoIndicator Get dataset object list Get the data tooltip object for the chart Set Get the default font used in the chart This is a string specifiying the name of the font DefaultLegendFont DefaultSubHeadFont DefaultToolTipFont DrawEnable FaceplateBackground GraphBackground GraphBorder GraphFormat GraphScrollFrame GroupPlotObj Height HighAlarm Location LowAlarm MainTitle MaxIndicatorValue MinimumSize MinIndicatorValue NumericPanelMeter PlotAttrib PlotBackground Miscellaneous Shape Drawing 365 Get Set the font used for the legend Get Set the font used for the sub head Set Get the default font object used for the tooltip Inherited from ChartView Set to true to show 3D faceplate Inherited from RTAutoIndicator Get the graph background object Inherited from RTAutoIndicator Get the default graph border for the chart Inherited from RTAutoIndicator Get Set any an indicator format is supported Inherited from RTAutoIndicator Get the graphs RTScrollFrame
239. in some emulators It seems that Net CF 1 0 SP2 does support button and trackbar colors The QCRTGraph software sets button and trackbar colors using the standard Net CF background color properties of those controls If your target device is running Net CF 1 0 SP2 or greater you should see the controls in color otherwise the controls will be gray 248 Buttons Track Bars and Other Form Control Classes Control Buttons Class RTControlButton System Windows Forms Button RTControlButton The RTControlButton class is subclassed from the Net Button class It combines the features of a toggle button and momentary closure button A toggle button acts more like a check box when it 1s pressed it toggles its state to checked or unchecked A momentary button is more like a regular Net button when the button is pressed it is only in the checked state while pressed otherwise it returns to the unchecked state When an RTControlButton is added to an RTFormControlGrid it can also act as a radio button where all radio buttons in an RTFormControlGrid are mutually exclusive The RTControlButton also adds unique color and text properties for the button in both the checked and unchecked state RTControlButton constructor Visual Basic Overloads Public Sub New ByVal buttontype As Integer _ Ct public RTControlButton int buttontype Parameters buttontype The button type of the new button User on of the button subtype co
240. inates system Text justification is JUSTIFY CENTER JUSTIFY MAX Used when the panel meter is attached to a meter indicator Places the panel meter at the top centered on the inside edge of the radius of the MeterCoordinates system Text justification is JUSTIFY CENTER JUSTIFY CENTER A particularly useful property is RTPanelMeter PanelMeterNudge After you get the panel meter positioned approximately where you want you may find that it just a couple of pixels too close to some other object whether it be an indicator axis or text object Panel Meter Classes 115 You can nudge the panel meter in any direction with respect to its calculated position The PanelMeterNudge property uses device or pixel coordinates C RTNumericPanelMeter panelmeter new RTNumericPanelMeter pTransforml panelmeterattrib panelmeter PanelMeterPosition ChartObj OUTSIDE PLOTAREA MIN panelmeter PanelMeterNudge new Point2D 0 4 VB Dim panelmeter As New RTNumericPanelMeter pTransforml panelmeterattrib panelmeter PanelMeterPosition ChartObj OUTSIDE PLOTAREA MIN panelmeter PanelMeterNudge New Point2D 0 4 Numeric Panel Meter Class RTNumericPanelMeter Com quinncurtis chart2dnetcf ChartPlot RTPlot RTSingleValueIndicator RTPanelMeter RTNumericPanelMeter The RTNumericPanelMeter class displays the floating point numeric value of an RTProcessVar object It contains a template based on the QCChart2D CF NumericLabel class
241. inding graph objects 87 88 FindObj 87 88 Floating bar plots 67 72 241 FloatingBarPlot 67 72 241 Form Control Panel Meters 18 21 24 37 38 109 132 133 134 135 247 258 259 260 261 262 263 264 Graph object class 22 47 48 56 57 78 109 139 140 141 153 154 155 175 176 180 181 189 190 191 261 262 266 282 295 296 299 300 302 303 304 GraphObj 22 47 48 56 57 78 109 139 140 141 153 154 155 175 176 180 181 189 190 191 261 262 266 282 295 296 299 300 302 303 304 Grid vi 85 264 Grids vi 85 264 Group bar plots 67 73 241 Group datasets 52 53 56 Group plot classes 11 14 16 30 32 65 67 68 69 70 71 72 73 74 75 76 77 93 241 242 GroupBarPlot 67 73 241 GroupDataset 52 53 56 GroupPlot 11 14 16 30 32 65 67 68 69 70 71 72 73 74 75 76 77 93 241 242 GroupVersaPlot 1 67 73 365 Histogram plots 67 74 241 HistogramPlot 67 74 241 Image objects 87 Legend 84 85 364 Legend classes 84 85 364 Legend items 84 Legendltem 84 Line gap plots 67 75 Line marker plots 11 81 82 Line plots 11 81 83 239 240 245 246 Linear auto scaling 56 Linear axis 18 35 57 59 64 85 142 144 156 159 162 164 174 175 Linear scale 53 54 LinearAutoScale 56 LinearAxis 18 35 57 59 64 85 142 144 156 159 162 164 174 175 LinearScale 53 54 LineGapPlot 67 75 Log
242. ing using System Drawing Drawing2D using System Data using System Text using System Windows Forms using com quinncurtis chart2dnetcf using com quinncurtis rtgraphnetcf namespace ScrollApplication3 public partial class UserControll ChartView private System Windows Forms Timer timerl private System Windows Forms Timer timer2 public UserControll InitializeComponent InitializeGraph private void InitializeScrollGraph ChartView chartVu this public void InitializeGraph InitielizeScrollGraph Extracted from file Form1 cs using using using using using using using System System Collections Generic System ComponentModel System Data System Drawing System Text System Windows Forms namespace ScrollApplication3 public partial class Forml Form UserControll chartViewl null public Forml InitializeComponent QCRTGraph CF Tutorial 399 400 QCRTGraph CF Tutorial Allow room for a menu in the form Rectangle graphRect new Rectangle 1 1 this ClientRectangle Width 2 this ClientRectangle Height 2 Instantiate chart control and add it to the form chartViewl new UserControll chartViewl Location graphRect Location Q hartViewl Size graphRect Size Q hartViewl PreferredSize graphRect Size ct his Controls Add chartViewl Q hartViewl InitializeGraph 21 Frequently Asked Que
243. ingle Channel Bar Indicator 2000 El 5000 4000 3000 C ChartView chartVu this CartesianCoordinates pTransforml new CartesianCoordinates 0 0 engineRPM DefaultMinimumDisplayValue 1 0 engineRPM DefaultMaximumDisplayValue pTransforml SetGraphBorderDiagonal 0 75 0 1 0 81 0 325 ChartAttribute attribl new ChartAttribute Color Green 0 DashStyle Solid Color Green double barwidth 1 0 barbase 0 0 int barjust ChartObj JUSTIFY MIN int barorient ChartObj VERT DIR LinearAxis baraxis new LinearAxis pTransforml ChartObj Y AXIS baraxis AxisTickDir ChartObj AXIS MIN baraxis AxisIntercept 1 4 baraxis AxisTickSpace 100 baraxis AxisMinorTicksPerMajor 10 baraxis ChartObjEnable ChartObj OBJECT ENABLE NODRAW chartVu AddChartObject baraxis RTBarIndicator barplot new RTBarIndicator pTransforml engineRPM barwidth barbase attribl barjust barorient barplot SegmentSpacing 600 barplot SegmentWidth 420 barplot IndicatorBackground Single Channel Bar Indicator 143 new ChartAttribute Color Black 0 DashStyle Solid Color Black barplot SegmentValueRoundMode ChartObj RT CEILING VALUE barplot SegmentCornerRadius 0 barplot IndicatorSubType ChartObj RT BAR SEGMENTED SUBTYPE RTAlarmIndicator baralarms new RTAlarmIndicator baraxis barplot chartVu AddChartObject baralarms ChartAttribute panelmeterattrib new ChartAttribute Color
244. inimum LABEL MIN maximum AxisLabels LABEL MAX or tick mark starting point LABEL ORIGIN The value of these constants can be OR d together The value of LABEL MIN LABEL MAX LABEL ORIGIN is LABEL ALL Set Get the numeric format for the axis AxisLabelsFormat inherited from labels AxisLabels 180 Meters Coordinates Meter Axes and Meter Axis Labels AxisLabelsTickOffsetX inherited from AxisLabels AxisLabelsTickOffsetY inherited from AxisLabels ChartObjAttributes inherited from GraphObj MeterAxis OverlapLabelMode inherited from AxisLabels TextBgColor inherited from ChartText TextBgMode inherited from ChartText TextBoxColor inherited from ChartText TextBoxMode inherited from ChartText TextFont inherited from ChartText TextNudge inherited from ChartText TextRotation inherited from ChartText ZOrder inherited from GraphObj Set Get the x offset in window device coordinates of the label offset from the endpoint of the associated tick mark Set Get the y offset in window device coordinates of the label offset from the endpoint of the associated tick mark Sets the attributes for a chart object using a ChartAttribute object Get Set the RTMeterAxis associated with this object It is possible that axis labels overlap if the window that the axes are placed in is to small the major tick marks are to close together or in the case of time axis labels to large for t
245. int alarmtype double alarmlimitvalue public RTAlarm RTProcessVar processvar int alarmtype double alarmlimitvalue public RTAlarm RTProcessVar processvar int alarmtype double alarmlimitvalue String normalmessage String alarmmessage public RTAlarm RTProcessVar processvar int alarmtype double alarmlimitvalue string normalmessage string alarmmessage double hysteresisvalue Parameters processvar Specifies the process variable that the alarm is for When you add an RTAlarm object to an RTProcessVar object this field will be overwritten with a reference to the RTProcessVar object that was added to alarmtype Specifies the alarm type RT ALARM NONE RT ALARM LOWERTHAN or RT ALARM GREATERTHAN alarmlimitvalue Specifies the alarm limit value normalmessage Process Variable and Alarm Classes 101 Specifies the message displayed when there is no alarm alarmmessage Specifies the alarm message hysteresisvalue Specifies the hysteresis value of the alarm This is used to prevent alarms from toggling between states due to noise in the system when the process variable is very close to an alarm threshold After an alarm has been triggered the process variable must cross the alarm threshold in the opposite direction by the hysteresis value before it falls out of alarm For example if an RT ALARM GREATERTHAN alarm threshold is 70 then the process value will always go into ala
246. ints The most common examples of simple plots are line plots bar graphs scatter plots and line marker plots Group plots graph data organized as multiple y values for each x value The most common examples of group plots are stacked bar graphs open high low close plots candlestick plots floating stacked bar plots and box and whisker plots Polar charts plot data organized as a simple set of data points where each data point represents a polar magnitude and angle pair rather than xy Cartesian coordinate values The most common example of polar 66 QCChart2D CF Class Summary charts is the display of complex numbers a bi and it is used in many engineering disciplines Antenna charts plot data organized as a simple set of data points where each data point represents a radius value and angle pair rather than xy Cartesian coordinate values The most common example of antenna charts is the display of antenna performance and specification graphs The contour plot type displays the iso lines or contours of a 3D surface using either lines or regions of solid color The last plot object category is the pie chart were a pie wedge represents each data value The size of the pie wedge is proportional to the fraction data value sum of all data values ChartPlot This class is the abstract base class for chart plot objects It contains a reference to a ChartDataset derived class containing the data associated with the plot Contour Plot of the
247. ions namespace contains interfaces and classes that define various collections of objects such as lists queues bit arrays hash tables and dictionaries 30 Day Trial Subscription and Redistribution OEM Versions of Real Time Graphics Tools for Net Introduction 9 The QCRTGraph CF class library uses the following directory structure Drive Quinn Curtis Root directory RedistributableLicense contains the redistributable license that you must use when redistributing applications that use this library installed only if a redistributable license has been purchased DotNet Quinn Curtis Net based products directory Docs Quinn Curtis Net related documentation directory QCRTGraphNetCFCompiledHelpFile chm the QCRTGraph CF compiled help file QCRTGraphNetCFManual pdf PDF file of the QCRTGraph CF Programming Manual Lib Quinn Curtis Net related compiled libraries and components directory QCRTGraph Language specific code directory Visual CSharp C specific directory CF QCRTGraphClassLib contains the source code to the QCRTGraphNetCF dll library Not Available at this time CF Examples C examples directory Annunciators AutoGraphDemos AutoInstrumentPanel BarApplicationl Dynamometer ElapsedTimeScrollApplicationl FetalMonitor HomeAutomation HybridCar MeterApplicationl MiniScope PIDControlTuner Polygraph ProcessMonitoring ProcessVarDataTables RTGraphNetDemo RTStockDisplay RTXY Disp
248. is value is approximately 1 0e 9 Another way to set the minimum allowable range is to specify explicit values for the x and y range using the ChartZoom SetZoomRangeLimits method Specify the minimum allowable zoom range for a time axis in milliseconds for example ChartZoom SetZoomRangeLimits new Dimension 1000 0 01 sets the minimum zoom range for the time axis to 1 second and for the y axis to 0 01 The utility method ChartCalendar GetCalendarWidthV alue is useful for calculating the milliseconds for any time base and any number of units The code below sets a minimum zoom range of 45 minutes C double minZoomTimeRange ChartCalendar GetCalendarWidthValue ChartObj MINUTE 45 Zooming 293 double minZoomYRange 0 01 Dimension zoomLimits new Dimension minZoomTimeRange minZoomYRange zoomObj SetZzoomRangeLimits zoomLimits Visual Basic Dim minZoomTimeRange As double _ ChartObj GetCalendarWidthValue ChartObj MINUTE 45 Dim minZoomYRange As Double 0 01 Dim zoomLimits As Dimension New Dimension minZoomTimeRange minZoomYRange zoomObj SetZzoomRangeLimits zoomLimits 17 Miscellaneous Shape Drawing Com quinncurtis chart2dnetcf GraphObj RT3DFrame Com quinncurtis chart2dnetcf GraphObj RTRoundedRectangle2D Com quinncurtis chart2dnetcf GraphObj RTGenShape Often the look and feel of a real time display is greatly enhanced with the addition of a few simple circular and rectangular drawing shapes All o
249. isplay start Starting column of the dataset viewer Set unique fonts for the column headers row headers and grid cells using the ColumnHeaderFont RowHearderFont and GridCellFont properties Turn on the edit feature of the grid cells using the EnableEdit property Turn on the striped background color of the grid cells using the UseStripedGridBackground property Foreground and background attributes of the column headers row headers and grid cells can be set using the ColumnHeaderAttribute RowHeaderAttribute GridAttribute and AltGridAttribute properties You can add multiple RTProcessVar objects toa RTProcessVarViewer using the RTProcessVarViewer AddProcessVar method When adding additional process variables it only adds the y values of the dataset It is assumed the x values of the datasets are the same otherwise the columns would lose synchronization The row header string for the first grid row the x values is picked up from the first dataset s XString property If that is null X Values is displayed for numeric x values and Time for time based x values Subsequent row header strings for the y values are picked up from the main title string of each associated dataset In the case of group Process Variable Viewer 309 datasets with multiple y values for each x value row header strings are picked up from the datasets GroupStrings property which stores one string for each group in the dataset You can change the defau
250. itialized the title tags and units strings Method InitStrings VB Public Sub InitStrings _ title As String units As String tags As Stringi Cit public void InitStrings string title string units string tags Miscellaneous Shape Drawing 331 Parameters title The title or tag string units The units string tags An array of the tag strings Use the UpdateIndicator method to update the bar indicator with new data Method UpdatelIndicator VB Public Sub UpdateIndicator _ values As Double _ updatedraw As Boolean Cit public void UpdateIndicator double values bool updatedraw Parameters value An array of new values one for each channel of the indicator updatedraw True and the indicator is immediately updated Selected Public Instance Properties Name Description AlarmIndicator Get a reference to the RTAlarmIndicator object Get a reference to the RTAlarmPanelMeter object Inherited from RTAutoIndicator AlarmPanelMeter 332 Miscellaneous Shape Drawing BarAttributes BarDataValue BarEndBulb BarFillColor BarLineWidth BarOrientation BarPlot BarWidth BarWidthPixels CoordinateSystem FaceplateBackground GraphBackground GraphBorder GraphFormat Height HighAlarm InteriorAxis LowAlarm MainTitle MaxIndicatorValue MinimumSize MinIndicatorValue MultiAlarmIndicator MultiBarPlot Sets the line color for the chart ob
251. ject Get the numeric label template object used to place numeric values on the bars Set Get to true for a bar end bulb Sets the fill color for the chart object Sets the line width for the chart object Get Set the orientation of the chart Get a reference to the RTBarlIndicator object Set Get the bar width Set Get to the pixel width of the bar in the bar plot Get the coordinate system object for the indicator Inherited from RTAutoIndicator Set to true to show 3D faceplate Inherited from RTAutoIndicator Get the graph background object Inherited from RTAutoIndicator Get the default graph border for the chart Inherited from RTAutoIndicator Get Set any an indicator format is supported Inherited from RTAutoIndicator Gets or sets the height of the control Inherited from Control Get the most recent high RTAlarm object Inherited from RTAutoIndicator Set Get to true and an interior axis is drawn Get the most recent low RTAlarm object Inherited from RTAutoIndicator Get Set the tag string Inherited from RTAutoIndicator The maximum value for the indicator Inherited from RTAutoIndicator Gets or sets the size that is the lower limit that GetPreferredSize Size can specify Inherited from Control The minimum value for the indicator Inherited from RTAutoIndicator Get a reference to the RTMultiAlarmIndicator object Get a reference to the RTMultiBarIndica
252. ject Get Set the units string Gets or sets a value indicating whether the control is displayed Inherited from Control Gets or sets the width of the control Inherited from Control Miscellaneous Shape Drawing 343 A complete listing of RTAutoMeterIndicator properties is found in the QCRTGraphNetCompiledHelpFile chm documentation file located in the doc subdirectory There are 12 different meter formats four horizontal and four vertical Use the GraphFormat property 0 11 to set the format Below you will find a brief description of the differences between the formats Formats 0 and 1 use 270 degree arcs 235 to 45 clockwise with a tag string above and numeric panel meter and alarm status panel meter below the needle The difference between the two formats is the meter ticks point inward in format 0 and outward in format 1 Formats 2 and 3 use 180 degree arcs 180 to 0 clockwise with a tag string above and numeric panel meter and alarm status panel meter below the needle The difference between the two formats is the meter ticks point inward in format 2 and outward in format 3 344 Miscellaneous Shape Drawing Format 4 Formats 4 and 5 use 180 degree arcs 180 to 0 counter clockwise with a tag string above and numeric panel meter and alarm status panel meter below the needle The difference between the two formats is the meter ticks point inward in format 4 and outward
253. kDir ChartObj AXIS MIN meteraxis LineWidth 1 meteraxis LineColor Color White meteraxis SetAxisTickSpace 0 2 meteraxis SetAxisMinorTicksPerMajor 5 meteraxis ShowAlarms true meterneedle MeterAxis meteraxis chartVu AddChartObject meteraxis VB Dim chartVu As ChartView Me Dim attribl As New ChartAttribute Color Black 1 DashStyle Solid Color Blue Dim startarcangle As Double 135 178 Meters Coordinates Meter Axes and Meter Axis Labels Dim arcextent As Double 230 I e 5 Dim startarcscale As Double Dim endarcscale As Double 8 0 Dim arcdirection As Boolean False Dim arcradius As Double 0 75 Dim centerx As Double 0 0 Dim centery As Double 0 0 Dim meterframe As New RTMeterCoordinates startarcangle arcextent startarcscale endarcscale arcdirection centerx centery arcradius meterframe SetGraphBorderDiagonal 0 45 0 2 0 75 0 9 Dim meterneedle As New RTMeterNeedleIndicator meterframe tach meterneedle SetChartObjAttributes attribl meterneedle NeedleLength 0 75 Add panel meters chartVu AddChartObject meterneedle Dim meteraxis As New RTMeterAxis meterframe meterneedle meteraxis SetChartObjAttributes attrib1l meteraxis SetAxisTickDir ChartObj AXIS MIN meteraxis LineWidth 1 meteraxis LineColor Color White meteraxis SetAxisTickSpace 0 2 meteraxis SetAxisMinorTicksPerMajor 5 meteraxis ShowAlarms True meterneedle MeterAxis meteraxis ch
254. ks You will need these links to download updates to the software Chapter Summary The remaining chapters of this book discuss how to program using the QCRTGraph CF class library Chapter 2 presents the overall class architecture of the QCRTGraph CF software and summarizes all of the classes found in the software Chapter 3 summarizes the important QCChart2D CF classes that you must be familiar with in order to use the QCRTGraph CF software Chapter 4 describes the process variable and alarm classes that hold QCRTGraph CF data Chapter 5 describes the panel meter classes numeric alarm string and time date panel meters Chapter 6 describes the single channel bar indicator classes including segmented custom and pointer bar subtypes Introduction 11 Chapter 7 describes the multi channel bar indicator classes including segmented custom and pointer bar subtypes Chapters 8 describe the meter setup classes meter coordinates meter axes and meter axis labels Chapter 9 describes the meter indicator classes including classes for meter needles arc segmented arc and symbol indicators Chapter 10 how the meter indicator classes are used to create dials and clocks Chapter 11 describes the annunciator classes Chapter 12 describes the scroll frame class and the implementation of scrolling plots based on the QCChart2D CF SimpleLinePlot SimpleBarPlot SimpleScatterPlot and SimpleLineMarkerPlot classes using the RTSimpleSingl
255. ks of the LinearAxis and LogAxis classes using user defined strings TimeAxisLabels ElapsedTimeAxisLabels PolarAxesLabels AntennaAxesLabels Chart Plot Classes ChartPlot ContourPlot GroupPlot PieChart PolarPlot AntennaPlot SimplePlot QCChart2D CF Class Summary 65 This class labels the major tick marks of the associated TimeAxis object The class supports many time 23 59 59 and date 5 17 2001 formats It is also possible to define custom date time formats This class labels the major tick marks of the associated ElapsedTimeAxis object The class supports HH MM SS and MM SS formats with decimal seconds out to 0 00001 i e 12 22 43 01234 It also supports a cumulative hour format 101 51 22 and a couple of day formats 4 5 51 22 4D 5 51 22 This class labels the major tick marks of the associated PolarAxes object The x axis is labeled from 0 0 to the polar scale magnitude and the circular axis is labeled counter clockwise from 0 to 360 degrees starting at 3 00 This class labels the major tick marks of the associated AntennaAxes object The y axis is labeled from the radius minimum to the radius maximum The circular axis is labeled clockwise from 0 to 360 degrees starting at 12 00 Plot objects are objects that display data organized in a ChartDataset class There are six main categories simple group polar antenna contour and pie plots Simple plots graph data organized as a simple set of xy data po
256. l ByVal transform As PhysicalCoordinates datasource As RTProcessVar _ attrib As ChartAttribute 124 Panel Meter Classes Ct public RTStringPanelMeter PhysicalCoordinates transform RTProcessVar datasource ChartAttribute attrib int stringtype public RTStringPanelMeter PhysicalCoordinates transform ChartAttribute attrib int stringtype public RTStringPanelMeter PhysicalCoordinates transform RTProcessVar datasource ChartAttribute attrib Parameters transform The coordinate system for the new RTStringPanelMeter object datasource The process variable associated with the panel meter attrib The color attributes of the panel meter indicator stringtype Specifies what string to display whether it is one of the process variable strings or a custom string Use one of the Panel Meter string constants RT CUSTOM STRING RT TAG STRING RT UNITS STRING Specify a custom string and use the StringTemplate TextString property to set the string Selected Public Instance Properties Get Set the string template defining the panel meter string StringTemplate format The text properties associated with the panel meter are set using this property A complete listing of RTStringPanelMeter properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory Example for RTStringPanelMeter used with RTMultiBarIndicator Panel Meter Classes 125 The
257. l frame constants constants RT NO AUTOSCALE X no auto scale for the y axis RT AUTOSCALE X MIN autoscale y axis minimum only RT AUTOSCALE X MAX autoscale y axis maximum only RT AUTOSCALE X MINMAX autoscale y axis minimum and maximum Selected Public Instance Properties AutoScaleRoundXMode AutoScaleRoundY Mode MaxDisplayHistory MinSamplesForAutoScale ScrollRescaleMargin ScrollScaleModeX ScrollScaleModeY TimeStampMode Get Set the auto scale round mode for the x coordinate Use one of the AUTOAXES round mode constants AUTOAXES EXACT AUTOAXES NEAR AUTOAXES FAR Get Set the auto scale mode for the y coordinate Use one of the AUTOAXES round mode constants AUTOAXES EXACT AUTOAXES NEAR AUTOAXES FAR Get Set the maximum number of points displayed Get Set the minimum number of samples that need to be in the dataset before an auto scale operation is carried out This prevents the first datapoints from generating an arbitrarily small range Get Set the scroll rescale margin When the limits of the scale needs to be increased the ScrollRescaleMargin current range of the x axis is added to the upper and lower limits of the current scale Get Set the scrolling mode for the x coordinate Use one of the x axis scroll frame constants RT NO AUTOSCALE X RT AUTOSCALE X MIN RT AUTOSCALE X MAX RT AUTOSCALE X MINMAX Get Set the scrolling mode for the y coordinate Use one of the y axis scroll
258. l Studio Net platform includes a large number of useful controls The TrackBar HScrollBar VScrollBar Button and PictureBox controls are examples of what we refer collectively as Form Controls Sometime though the Net Form controls have maddening shortcomings The HScrollBar VScrollBar and the TrackBar controls have the fault that they work only with an integer range of values The Button controls are momentary and require extra programming in order to use them as toggle buttons or radio buttons The Radio Button class requires that they be explicitly be added to a Group control which because of z order rendering problems does not work well on our ChartView drawing platform We created subclassed versions of the TrackBar control and the Button control Our version of the TrackBar control is RTControlTrackBar and adds floating point scaling for the track bar endpoints increments current value and tick mark frequency Our version of the Button control is RTControlButton adds superior On Off button text and color control and supports momentary toggle and radio button styles 38 Class Architecture No matter what Form Control is used either ours or the original Net Form controls it can be used in conjunction with the RTFormControl RTFormControlPanelMeter and RTFormControlGrid classes The RTControlButton type supports momentary toggle and radio button styles RTControlButton Derived from the Net Form Control Button class it adds supe
259. l meters for the numeric tag and alarm displays RTMeterArcIndicator This RTMeterArcIndicator class displays the current RTProcessVar value as an arc Segmented meter arcs are one of the RTMeterArcIndicator subtypes Class Architecture 29 Warp Full Cruise Slow Reverse Stop Only the blue meter needles are the meter needle indicators The other elements of the meter include meter axes meter axis labels and panel meters for the numeric tag and alarm displays RTMeterNeedleIndicator This RTMeterNeedleIndicator class displays the current RTProcessVar value as a needle Subtypes of the RTMeterNeedleIndicator are simple needles pie wedge shaped needles and arrow needles Meter symbols can be any of 10 different shapes the symbols can have any size and the spacing between the symbols can have any value RTMeterSymbolIndicator This RTMeterSymbolIndicator class displays the current RTProcessVar value as a symbol moving around in the meter arc Symbols include all of the QCChart2D CF scatter plot symbols SQUARE TRIANGLE DIAMOND CROSS PLUS STAR LINE HBAR VBAR BAR3D CIRCLE RTPanelMeter The abstract base class for the panel meter types Panel meters based objects can be added to 30 Class Architecture RTSingleValueIndicator and RTMultiValueIndicator objects to enhance the graphics display with numeric alarm and string information The RTNumericPanelMeter RTAlarmPanelMeter RTStringPanelMeter and RTTimeP
260. lIndicator Get the ArrayList holding all of the RTProcessVar objects Set Get True the ChartView object list is cleared with each redraw Inherited from RTAutolIndicator Inherited from ChartView Get the most recent setpoint RTAlarm object Inherited from RTAutolIndicator Get the SimpleVersaPlot plot object Get the most recent RTSingleValuePlot object Get the ArrayList holding all of the RTSimpleSingleValuePlot objects Gets or sets the height and width of the control Inherited from Control Inherited from ChartView Get the sub head object for the chart Gets or sets the object that contains data about the control Inherited from Control Get a reference to the tag panel meter object Inherited from RTAutoIndicator Get Set the tag string Inherited from RTAutoIndicator Inherited from UserControl Inherited from ChartView Get a reference to the units string panel meter object Inherited from RTAutoIndicator Get Set the units string Inherited from RTAutoIndicator Gets or sets a value indicating whether the control is displayed Inherited from Control Gets or sets the width of the control Inherited from Control Miscellaneous Shape Drawing 367 XAxis Get the x axis object XAxis2 Get the second x axis object XAxisLab Get the x axis labels object XAxisLab2 Get the second x axis labels object XAxisTitle Get the x axis title object XGrid Get the x axis g
261. lay ScrollApplicationl ScrollApplication2 ScrollApplication3 Treadmill VerticalScrolling WeatherStation Visual Basic VB specific code CF Examples VB examples Annunciators AutoGraphDemos AutoInstrumentPanel BarApplicationl Dynamometer ElapsedTimeScrollApplicationl FetalMonitor HomeAutomation HybridCar MeterApplicationl MiniScope PIDControlTuner Polygraph ProcessMonitoring 10 Introduction ProcessVarDataTables RTGraphNetDemo RTStockDisplay RTXY Display ScrollApplicationl ScrollApplication2 ScrollApplication3 Treadmill VerticalScrolling WeatherStation There are three licenses associated with the QCRTGraph CF class library the 30 day trial license the standard developers license and the redistributable version Each version has different characteristics that are summarized below 30 Day Trial Version The trial version of QCRTGraph CF is downloaded in a file named Trial QCRTGraphCFR 15x The 30 day trial version stops working 30 days after the initial download The trial version includes a version message in the upper left corner of the graph window that cannot be removed Developer Version The developer version of QCRTGraph CF is downloaded in a file named something like NETCFRTGREDR1x5x684x1 zip zip It will NOT time out as some of our other subscription based software does You can download updates to the software from two years from the time of the original purchases Save your original download lin
262. ld 2 GRANT OF LICENSE A Developer License After you have purchased the license for SOFTWARE and have received the file containing the licensed copy you are licensed to copy the SOFTWARE only into the memory of the number of computers corresponding to the number of licenses purchased The primary user of the computer on which each licensed copy of the SOFTWARE is installed may make a second copy for his or her exclusive use on a portable computer Under no other circumstances may the SOFTWARE be operated at the same time on more than the number of computers for which you have paid a separate license fee You may not duplicate the SOFTWARE in whole or in part except that you may make one copy of the SOFTWARE for backup or archival purposes You may terminate this license at any time by destroying the original and all copies of the SOFTWARE in whatever form B 30 Day Trial License You may download and use the SOFTWARE without charge on an evaluation basis for thirty 30 days from the day that you DOWNLOAD the trial version of the SOFTWARE The termination date of the trial SOFTWARE is embedded in the downloaded SOFTWARE and cannot be changed You must pay the license fee for a Developer License of the SOFTWARE to continue to use the SOFTWARE after the thirty 30 days If you continue to use the SOFTWARE after the thirty 30 days without paying the license fee you will be using the SOFTWARE on an unlicensed basis Redistribution of 30 Day Tr
263. le ChartObj OBJECT ENABLE Re establish scroll mode ScrollFrame2 ScrollScaleModeX ChartObj RT FIXEDEXTENT MOVINGSTART AUTOSCROLL scrollFrame2 ChartObjEnable ChartObj OBJECT ENABLE Render graph this UpdateDraw 290 Zooming timerl Enabled true Visual Basic Private Class ZoomWithStack End Dim Dim Dim Dim Dim Dim Inherits ChartZoom Public Sub New ByVal component As ChartView ByVal transforms As CartesianCoordinates ByVal n As Integer ByVal brescale As Boolean MyBase New component transforms brescale End Sub New Public Overrides Sub OnMouseDown ByVal mouseevent As MouseEventArgs If mouseevent Button And MouseButtons Right 0 Then Me PopZoomStack Else MyBase OnMouseDown mouseevent End If End Sub OnMouseDown Class ZoomWithStack Datasetl As New SimpleDataset First xl yl Dataset2 As New SimpleDataset Second xl y2 Dataset3 As New SimpleDataset Third x1 y3 Dataset4 As New SimpleDataset Fourth xl y4 Dataset5 As New SimpleDataset Fifth xl y5 pTransforml As New CartesianCoordinates ChartObj LINEAR SCALE ChartObj LINEAR SCALE pTransforml AutoScale Datasetl ChartObj AUTOAXES FAR ChartObj AUTOAXES FAR Dim pTransform2 As New CartesianCoordinates ChartObj LINEAR SCALE ChartObj LINEAR SCALE pTransform2 AutoScale Dataset2 ChartObj AUTOAXES FAR ChartObj AUTOAXES FAR Dim pTransform3 As New CartesianCoordinates Cha
264. les timerl Tick Dim timestamp As New ChartCalendar For i As Integer 0 To currentValues Length 1 currentValues i 0 5 ChartSupport GetRandomDouble Next rtAutoScrollGraphl UpdateScrollGraph timestamp currentValues True get elapsed time in milliseconds Dim etimemsecs As Double timestamp GetCalendarMsecs startCalendar GetCalendarMsecs Dim etimespan As TimeSpan TimeSpan FromMilliseconds etimemsecs rtAutoScrollGraph2 UpdateScrollGraph etimespan currentValues True End Sub 372 Miscellaneous Shape Drawing Scrolling Graph Vertical Indicator Class RTAutoVerticalScrollGraph System Windows Forms UserControl ChartView RTAutoIndicator RTAutoBarIndicator RTAutoVerticalScrollGraph The RTAutoVerticalScrollGraph is a ChartView derived object that encapsulates all of the chart elements needed to draw a scrolling graph including an array of RTProcessVar objects a coordinate system axes axes labels RTSingleValuePlot RTGroupMultiValuePlot RTAlarmSymbol alarm symbols legend title subhead footer and units strings The RTAutoVerticalScrollGraph support vertical horizontal scrolling Use the RTAutoScrollGraph for horizontal scrolling There are three types of scrolling y scales you can use in a scrolling chart a date time scale an elapsed time scale or a numeric scale Use the appropriate InitR TAutoScroll overload to select which one is most applicable to your data RTAutoVerticalScrollGraph constr
265. lor DarkRed attribArray i attrib Next i Il Dim numrows As Integer Il oo Dim numcols As Integer 224 Single and Multiple Channel Annunciators Dim annunciator As New RTMultiValueAnnunciator pTransforml annunciatorl _ numcols numrows attribArray annunciator CellColumnMargin 0 01 annunciator CellRowMargin 0 01 Dim panelmetertagattrib As New ChartAttribute Color SteelBlue 1 _ DashStyle Solid Color White Dim panelmeter As New RTStringPanelMeter pTransforml annunciatorl 0 _ panelmetertagattrib ChartObj RT TAG STRING panelmeter StringTemplate TextFont font10Bold panelmeter PanelMeterPosition ChartObj INSIDE BAR panelmeter Frame3DEnable False panelmeter TextColor Color White panelmeter StringTemplate TextBgMode False panelmeter AlarmIndicatorColorMode ChartObj RT INDICATOR COLOR NO ALARM CHANGE annunciator AddPanelMeter panelmeter chartVu AddChartObject annunciator End Sub InitializeAnnunciator Example for a simple multi channel annunciator The example below extracted from the RTGraphNetDemo example file AnnunciatorControll method InitializeAnnunciator2 creates a multi channel annunciator that shows the tag name current value and alarm state of the associated RTProcessVar object C private void InitializeAnnunciator2 RTProcessVar processVarArray processVarl processVar2 processVar3 processVar4 Single and Multiple Channel Annunciators
266. lowheartratealarm As New RTAlarm ChartObj RT ALARM LOWERTHAN 30 lowheartratealarm AlarmMessage Low Heart Rate lowheartratealarm AlarmSymbolColor Color Blue lowheartratealarm AlarmTextColor Color Blue Dim highheartratealarm As New RTAlarm ChartObj RT ALARM GREATERTHAN 160 highheartratealarm AlarmMessage High Heart Rate highheartratealarm AlarmSymbolColor Color Red highheartratealarm AlarmTextColor Color Red heartRate New RTProcessVar Heart Rate defaultattrib heartRate MinimumValue 0 heartRate MaximumValue 300 heartRate DefaultMinimumDisplayValue 0 heartRate DefaultMaximumDisplayValue 200 heartRate AddAlarm lowheartratealarm heartRate AddAlarm highheartratealarm heartRate AlarmTransitionEventEnable True AddHandler heartRate AlarmTransitionEventHandler AddressOf Me heartRate HighAlarm heartRate SetCurrentValue heartRateValue heartRateValue 60 0 runnersPaceValue 10 0 treadmillElevationValue 3 0 heartRate SetCurrentValue heartRateValue Real Time Alarms Event Handling Class RTAlarmEventArgs ChartObj RTAlarmEventArgs The RTProcessVar class can throw an alarm event based on either the current alarm state or an alarm transition from one alarm state to another The RTAlarmEventArgs class is used to pass alarm data to the event handler If you want the alarm event to be called only on the initial transition from the no alarm state to the alarm state set the 104 Pr
267. ls for the Net Compact Framcwork 1 QCRTGraph CF requires Visual Studio 2005 2008 or higher sess 1 New Features found in the 2 0 version of QCRTGraph esse 1 Differences between this and the previous 1 6 Version ii 5 Ree E EE 5 OCR T Graph CF Backetound nes etre etd de kcu vaste rai 6 Limitation of the Net API Compact Framework AT 6 OCR T Graph CF DependenctIes euet oi honed ee eet ttai egere tierce 8 30 Day Trial Subscription and Redistribution OEM Versions of Real Time Graphics OOS BOT Net Ow 8 Chapter SUmpmaty i5 oret die poro xe EES 10 2 Class Architecture of the QCRTGraph CF Class Library sess 13 Major Design Considerations EE 13 QCRTGraph CF Class Summary nde geed Eden de 15 Namespace com quinncurtis rtgraphnetcf esee 18 OCR POraph Glasses sive ella 19 Process Variable and Alarms Classes lira 20 Panel Meter EE 21 Single V alte EE 24 Multiple Eer ee 30 Alarm Indicator EE 34 Meter Axis EE 35 Form Control EE 37 Scroll Erame EE 39 Auto Indicatepe ee ge 41 Miscellaneous CIa 888 ois caotica 47 3 QCChart2D CF Tor Net Class Summary sine lai 51 Chart Eege 52 Data EE 52 Scale ee E delie EEE E A o a E a 53 Coordinate Transform Classes Glare asi leale 54 Auto scaling CIaSSess ee ee 56 Chart Object Classes iu dioe orte cor dein aad on e Ert e veces aoe 57 Mouse Interact Om Classes ege 87 Miscellaneous Utility EE 89 4 Process Variable and Alarm Cl
268. lt orientation of the RTProcessVarViewer by calling a version of the RTProcessVarViewer constructor that has an orientation property as the last parameter See the ProcessVarTables VerticalScrollApplicationUserControll cs for an example Selected Public Instance Properties AltGridAttribute AutoRedrawTable ColumnHeaderA ttribute ColumnHeaderFont ColumnHeads DataArray Dock DoubleBufferEnable DrawEnable GridAttribute GridCellFont Height HorizontalGroupPlot HorizontalScroll HScroll HScrollBarl Left Location Inherited from DataGridBase Set to true and the table will redraw using the current data associated with the update of th RTProcessVar Inherited from DataGridBase Inherited from DatasetViewer Inherited from DataGridBase Inherited from DatasetViewer Gets or sets which control borders are docked to its parent control and determines how a control is resized with its parent Inherited from Control Inherited from ChartView Inherited from ChartView Inherited from DataGridBase Inherited from Dataset Viewer Gets or sets the height of the control Inherited from Control Inherited from DatasetViewer Gets the characteristics associated with the horizontal scroll bar Inherited from ScrollableControl Gets or sets a value indicating whether the horizontal scroll bar is visible Inherited from ScrollableControl Inherited from DataGridBase Gets
269. lue 8 End Sub The update of scroll graphs takes place in the timer event handler Private Sub timerl Tick ByVal sender As Object ByVal e As EventArgs Handles timerl Tick Dim timestamp As New ChartCalendar For i As Integer 0 To currentValues Length 1 currentValues i 0 5 ChartSupport GetRandomDouble Next Miscellaneous Shape Drawing 381 count 1 rtAutoVerticalScrollGraphl UpdateScrollGraph count currentValues True End Sub 20 Using QCRTGraph CF to Create Windows Applications The primary view class of the QCRTGraph CF library is the ChartView class The ChartView class is derived from the Net System Windows Forms UserControl class It has the properties and methods of the underlying UserControl class The example programs for the QCRTGraph CF library are found in the following directories C Quinn Curtis DotNet QCRTGraph Visual CSharp CF examples C Quinn Curtis DotNet QCRTGraph Visual Basic CF examples Follow the following steps in order to incorporate the QCRTGraph CF classes into your program This is not the only way to add charts to an application In general any technique that works with UserControl derived classes will work We found the technique described below this to be the most flexible ES Form Scroll Application 1 142300 1429 15 142330 142345 ScrollApplication1 ScrollApplication2 and ScrollApplication3 all produce this scrolling graph Visual Basic for Net Compact F
270. mitValue 8 Miscellaneous Shape Drawing 371 Dim startts As TimeSpan TimeSpan FromSeconds 0 Dim endts As TimeSpan TimeSpan FromSeconds 30 rtAutoScrollGraph2 InitRTAutoScrollGraph startts 0 endts 15 rtAutoScrollGraph2 InitSimpleRTPlotObject ChartObj LINE PLOT Color Blue Channel 1 rtAutoScrollGraph2 InitSimpleRTPlotObject ChartObj LINE PLOT Color Green Channel 2 rtAutoScrollGraph2 InitSimpleRTPlotObject ChartObj SCATTER PLOT Color Red Channel 3 rtAutoScrollGraph2 SimplePlotObj SymbolAttributes SymbolSize 8 rtAutoScrollGraph2 GraphScrollFrame ScrollRescaleMargin 0 01 rtAutoScrollGraph2 GraphScrollFrame ScrollScaleModeY ChartObj RT AUTOSCALE Y MINMAX rtAutoScrollGraph2 InitStrings RTAutoScrollGraph Time Quarks rtAutoScrollGraph2 GraphBackground FillColor Color BlanchedAlmond rtAutoScrollGraph2 SubHead TextString Elapsed Time Scrolling rtAutoScrollGraph2 SubHead ChartObjEnable ChartObj OBJECT ENABLE rtAutoScrollGraph2 Footer TextString Footer text rtAutoScrollGraph2 Footer ChartObjEnable ChartObj OBJECT ENABLE rtAutoScrollGraph2 YAxisLab2 ChartObjEnable ChartObj OBJECT ENABLE rtAutoScrollGraph2 LowAlarm AlarmLimitValue 4 rtAutoScrollGraph2 HighAlarm AlarmLimitValue 12 rtAutoScrollGraph2 SetpointAlarm AlarmLimitValue 8 End Sub The update of scroll graphs takes place in the timer event handler Private Sub timerl Tick ByVal sender As Object ByVal e As EventArgs Hand
271. mumSize MaxIndicatorValue MinimumSize MinIndicatorValue NumericPanelMeter PlotAttrib PlotBackground PreferredSize ProcessVariable RenderingMode ResizeMode TagPanelMeter UnitsPanelMeter UnitsString Visible Get Set the default font used for the numeric values labeling the indicator Set Get the default font used in the chart This is a string specifiying the name of the font Get Set the font used for the main title Get Set the font used for the main title Get Set the font used for the chart footer Get dialInterior RTGenShape object Set to true to show 3D faceplate Get the graph background object Get the default graph border for the chart Get Set any an indicator format is supported Gets or sets the height of the control Inherited from Control Get the most recent high RTAlarm object Get the most recent low RTAlarm object Get Set the tag string Gets or sets the size that is the upper limit that GetPreferredSize Size can specify Inherited from Control The maximum value for the indicator Gets or sets the size that is the lower limit that GetPreferredSize Size can specify Inherited from Control The minimum value for the indicator Get a reference to the RTNumericPanelMeter object Get an RTProcessVar object in the Get the plot background object Inherited from ChartView Get most recently created RTProcessVar Inherited from ChartView Inherited from ChartVie
272. n is set to JUSTIFY CENTER JUSTIFY MAX Positions the panel meter centered above the plot area Text justification 1s set to JUSTIFY CENTER JUSTIFY MIN Positions the panel meter centered to the left of the plot area Text justification is set to JUSTIFY MAX JUSTIFY CENTER Positions the panel meter centered to the right of the plot area Text justification is set to JUSTIFY MIN JUSTIFY CENTER Positions the panel meter centered at the top edge of the graph area Text justification is set to JUSTIFY CENTER JUSTIFY MAX Positions the panel meter centered at the bottom edge of the graph area Text justification is set to JUSTIFY CENTER JUSTIFY MIN Used when the panel meter is attached to a meter indicator Places the panel meter at the bottom at the radius of the MeterCoordinates system You can set the text justification however you want Used when the panel meter is attached to a meter indicator Places the panel meter at the top at the radius of the MeterCoordinates system You can set the text justification however you want Used when the panel meter is attached to a meter indicator Places the panel meter on the left at the radius of the 114 Panel Meter Classes RADIUS RIGHT RADIUS CENTER OUTSIDE RADIUS BOTTOM INSIDE RADIUS BOTTOM CENTER RADIUS BOTTOM OUTSIDE RADIUS TOP INSIDE RADIUS TOP CENTER RADIUS TOP MeterCoordinates system You can set the text justification however yo
273. n update is not event driven from the update of the data the process variable can be updated hundreds or even thousands of times faster than the screen The graph should be rendered to the screen using a timer or some other event at a frame rate of 1 10 seconds update or slower The rendered graphs will always reflect the most current data and in the case of scrolling graphs or other graphs that display time persistent data will always display all data within the current scale limits As processor speeds improve and Net CF because faster the screen updates will get proportionally faster Since all real time plot objects are derived from the QCChart2D CF ChartPlot class the methods and properties of that class are available to set commonly used attributes such as the real time plot object scale line and fill colors Many new real time classes have been added to the software implementing display objects that render process variable data in a variety of graph and text formats These include single and multiple bar indicator classes meter axis and meter indicator classes panel meter classes and annunciator classes Rather than create a whole new set of classes that reproduce all of the SimplePlot and GroupPlot classes of the QCChart2D CF library two special classes RTSimpleSingleValuePlot and RTGroupMultiValuePlot are used to interface the QCChart2D CF plot objects to the process variable data classes That way any QCChart2D CF SimplePl
274. ndEnable True Add panel meters chartVu AddChartObject meterarcindicator Extracted from the example program RTGraphNetDemo file SegmentedArcMeterControll method InitializeMeter1 Meter Indicators Needle Arc and Symbol 196 RTMeterArcIndicator meterarcindicator new RTMeterArcIndicator meterframe processVarl meterarcindicator SetChartObjAttributes attribl meterarcindicator IndicatorSubtype ChartObj RT METER SEGMENTED ARC SUBTYPE meterarcindicator SegmentValueRoundMode ChartObj RT CEILING VALUE meterarcindicator SegmentWidth 7 meterarcindicator SegmentSpacing 10 meterarcindicator InnerValueArcNormalized 0 35 meterarcindicator OuterValueArcNormalized 0 85 meterarcindicator IndicatorBackgroundEnable true meterarcindicator IndicatorBackground new ChartAttribute Color Black 1 DashStyle Solid Color FromArgb 60 60 60 Add panel meters to meter needle chartVu AddChartObject meterarcindicator VB Dim meterarcindicator As New RTMeterArcIndicator meterframe processVarl meterarcindicator SetChartObjAttributes attribl meterarcindicator IndicatorSubtype ChartObj RT METER SEGMENTED ARC SUBTYPE meterarcindicator SegmentValueRoundMode ChartObj RT CEILING VALUE meterarcindicator SegmentWidth 7 meterarcindicator SegmentSpacing 10 I e meterarcindicator InnerValueArcNormalized 0 35 Il o meterarcindicator OuterValueArcNormalized 85 meterarcindicator IndicatorBackg
275. ngs 10 100 IK TOR gr ZE en XEM QOEM 100 10050 Ln LOM ms cq ELOT TROO 268 Buttons Track Bars and Other Form Control Classes BBRIEU RI CDU E mgar lIv l1Q IQOT WEIN IM Tot IGO String rowStrings Frequency Ohms Capacitance Dt Volts AC Volts DC Amps AC Amps gering i eener e RT Me is RTControlButton rtbutton ChartView chartVu this Font buttonfont font12Bold CartesianCoordinates pTransforml new CartesianCoordinates 0 0 pTransforml SetGraphBorderDiagonal 0 25 68 0 95 0 97 ChartAttribute attribl dodo 1 07 Da new ChartAttribute Color White 3 DashStyle Solid Color SandyBrown for int i 0 i lt selectorStrings Length i d rtbutton new RTControlButton ChartObj RT CONTROL RADIOBUTTON SUBTYPE rtbutton ButtonUncheckedText selectorStrings i if i currentRangeSelectorIndex rtbutton ButtonChecked true else rtbutton ButtonChecked false rtbutton Click new System EventHandler this selector button Click rtbutton ButtonFont buttonfont rangeSelectorButtons Add rtbutton int numColumns 4 int numRows 7 RTFormControlGrid controlgrid new RTFormControlGrid pTransforml null rangeSelectorButtons numRows colStrings rowStrings attribl controlgrid CellRowMargin 0 05 controlgrid CellColumnMargin 0 1 controlgrid FormControlTemplate Frame3DEnable true controlgrid HeadersTemplate LineColor
276. nherited from Control Get the x axis object Get the second x axis object Get the x axis labels object Get the x axis title object Get the x axis grid object Get the y axis object Get the second y axis object Get the y axis labels object Accessible only after BuildGrap Get the y axis title object 334 Miscellaneous Shape Drawing Y Grid Get the y axis grid object A complete listing of RTAutoBarIndicator properties is found in the QCRTGraphNetCompiledHelpFile chm documentation file located in the doc subdirectory There are two different bar graph formats horizontal and vertical Below you will find a brief description of the differences between the formats Flow 493 CH03 100 80 60 a S zm 20 Miscellaneous Shape Drawing 335 Flow 493 Panel meters above and below the bar for the tag name numeric value and alarm status The scale units displayed vertically on the left Turn the BarEndBulb property on and the bar indicator area will rescale to fit in the bulb without overlapting the numeric and alarm status panel 336 Miscellaneous Shape Drawing mimi Miscellaneous Shape Drawing 337 Panel meters to the left and right of the bar for the tag name numeric value and alarm status The scale units displays horizontally under the scale Turn the BarEndBulb property on and the bar indicator area shrinks horizontally in order to fit in the bulb without overlap
277. nput and adjusts the output based on the rate of change The derivative function uses the time derivative of the error term lowclmp Specifies the low clamping value for output If the output of the PID calculation results in a value less than owclmp the value will be clamped to owclmp highclmp Specifies the high clamping value for output If the output of the PID calculation results in a value higher than highclmp the value will be clamped to highclmp rateclmp Clamping limit for the output rate of change measured in output units per minute It limits the rate of change of the algorithm output sampleper Sample period of PID updates in minutes For example if the controller s output is calculated two times a second the value of this parameter is 1 2 60 0 0084 minutes filterconst A value in the range 0 0 to 1 0 affecting the filtering of the noisy measurement signal A value of 0 0 means that no filtering takes place The filtering effect is maximal when rFiltConst is 1 0 The formula for filtering is Filtered value 1 0 rFiltConst Measured value rFiltConst Previous filtered value Selected Public Instance Properties 276 PID Control Set Get derivative constant value DerivativeConstant Set Get error term t 1 Set Get error term t 2 Set Get error term t 3 Set Get high clamping value for output HighClamp IntegralConstant Set Get previous exponential smoothing constant LastMv Set Get previous P
278. nstants RT CONTROL RADIOBUTTON SUBTYPE RT CONTROL MOMENTARYBUTTON SUBTYPE RT CONTROL TOGGLEBUTTON SUBTYPE Selected Public Instance Properties Get Set the button check state ButtonChecked Get Set the color of the button when the button is checked ButtonCheckedColor Get Set the button text when the button is checked ButtonCheckedText Get Set the color of the button text when the button is ButtonCheckedTextColor checked Get Set the button subtype ButtonSubtype RT CONTROL RADIOBUTTON SUBTYPE RT CONTROL MOMENTARYBUTTON SUBTYPE Buttons Track Bars and Other Form Control Classes 249 RT CONTROL TOGGLEBUTTON SUBTYPE Get Set the color of the button when the button is ButtonUncheckedColor unchecked Get Set the button text when the button is unchecked ButtonUncheckedText Get Set the color of the button text when the button is ButtonUncheckedTextColor unchecked A complete listing of RTControlButton properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory Example for momentary and toggle buttons The example below extracted from the PIDControlTuner example creates three RTControlButton buttons two are momentary buttons and one is a toggle button The buttons are added to an RTFormControlGrid in order to position them as a logical group S ze enn C RTControlButton ResetErrorTerm new RTControlButton ChartObj RT CONTROL MOMENT
279. nt fontl0Bold Rectangle2D normrect new Rectangle2D 0 0 0 0 1 0 1 0 CartesianCoordinates pTransforml new CartesianCoordinates RT3DFrame frame3d new RT3DFrame pTransforml normrect facePlateAttrib ChartObj NORM GRAPH POS chartVu AddChartObject frame3d VB Private Sub InitializeBackgroundPanel Dim chartVu As ChartView Me Dim theFont As Font fontlOBold 298 Miscellaneous Shape Drawing Dim normrect As New Rectangle2D 0 0 0 0 1 0 1 0 Dim pTransforml As New CartesianCoordinates Dim frame3d As New RT3DFrame pTransforml normrect facePlateAttrib _ ChartObj NORM GRAPH POS chartVu AddChartObject frame3d End Sub InitializeBackgroundPanel The example below extracted from the PIDControlTuner example file PIDControlTunerControll method InitializeTopBargraphs draws an RT3DFrame object as a backdrop for each of the barographs C for int i 0 i lt PIDProcessItems Length i row i 8 col i 8 x1 xoffset col faceplatewidthspacing yl yoffset row faceplateheightspacing x2 xltfaceplatewidth y2 yl faceplateheight double mindisplayvalue PIDProcessItems i DefaultMinimumDisplayValue double maxdisplayvalue PIDProcessItems i DefaultMaximumDisplayValue pTransforml new CartesianCoordinates 0 0 mindisplayvalue 1 0 maxdisplayvalue Rectangle2D normrect new Rectangle2D x1 yl faceplatewidth faceplateheight RT3DFrame frame3d new RT3DFrame
280. ocation of the individual tick marks of an axis This is a utility class that defines complex 3D shapes as a list of simple 3 sided polygons The contour plotting routines use it QCChart2D CF Class Summary 91 Rectangle2D This is a utility class that extends the RectangleF class using doubles as internal storage 4 Process Variable and Alarm Classes RTProcessVar RTAlarm RTAlarmEventArgs The RTProcessVar class is the core data storage object for all of the real time indicator classes The RTProcessVar class represents a single process variable complete with limit values an unlimited number of high and low alarms historical data storage and descriptive strings for use in displays Indicators that display the current value of a single process variable the RTBarIndicator the RTMeterIndicator and RTPanelMeter classes for example reference back to a single RTProcessVar object Indicators that display the current values of multiple process variables the RTMultiBarIndicator RTMultiValueAnnunciator and RTFormControlGrid classes reference back to a collection of RTProcessVar objects Even though an RTProcessVar object is in a multi value indicator collection with other RTProcessVar objects it maintains its own unique settings for limit values alarm limits and descriptive strings The RTSimpleSingleValuePlot and RTGroupMultiValuePlot classes provide a link between the RTProcessVar class and the charting routines in the QCChart2D CF
281. ocess Variable and Alarm Classes RTProcessVar AlarmTransitionEventEnable to true and the RTProcessVar AlarmStateEventEnable to false In this case you will get one event when the process variable goes into alarm and one when it comes out of alarm If you want a continuous stream of alarm events as long as the RTAlarm object is in alarm set the RTProcessVar AlarmTransitionEventEnable to false and the RTProcessVar AlarmStateEventEnable to true The alarm events will be generated at the same rate as the RTProcessVar SetCurrentValue method is called RTAlarmEventArgs constructors You don t really need the constructors since RTAlarmEventArgs objects are created inside the RTProcessVar class when an alarm event needs to be generated Here they are anyway Visual Basic Overloads Public Sub New _ ByVal pv As RTProcessVar ByVal alarm As RTAlarm _ ByVal channel As Integer _ C public RTAlarmEventArgs RIProcessVar pv RTAlarm alarm int channel Vi Parameters pv The RTProcessVar object associated with the alarm event alarm The RTAlarm object associated with the alarm event channel The channel number associated with the alarm event The most commonly used RTAlarmEventArgs properties are Selected Public Instance Properties Get Set the alarm channel object AlarmChannel Get Set the RTAlarm object associated EventAlarm with the alarm Get Set the RTProcessVar object ProcessVar associated with
282. ociated with the panel meter are set using this property In addition the time or calendar format of the time date value is also set here A complete listing of RTTimePanelMeter properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory Example for RTTimePanelMeter The panel meter below extracted from the Treadmill example method InitializeElapsedTimePanelMeter adds an RTTimePanelMeter as an independent panel meter at the bottom of the display In this example the plot area of the coordinate system is set for the position of the RTTimePanelMeter using pTransform1 SetGraphBorderDiagonal It is positioned inside the plot area using the INSIDE INDICATOR position constant A string panel meter places a title above the time panel meter Current Time C ChartView chartVu this CartesianCoordinates pTransforml new CartesianCoordinates 0 0 0 0 1 0 1 0 pTransforml SetGraphBorderDiagonal 0 285 95 0 535 1 0 Panel Meter Classes 129 ChartAttribute panelmeterattrib new ChartAttribute Color SteelBlue 2 DashStyle Solid Color Black RTTimePanelMeter panelmeter new RTTimePanelMeter pTransforml timeOfDay panelmeterattrib panelmeter PanelMeterPosition ChartObj INSIDE PLOTAREA MIN panelmeter TimeTemplate TextFont font24Numeric panelmeter TimeTemplate TimeFormat ChartObj TIMEDATEFORMAT 24HMS panelmeter AlarmIndicatorColorMode ChartObj RT
283. of the application program and or the URL where the SOFTWARE is installed and being used ii 3 RESTRICTIONS You may not reverse engineer de compile or disassemble the SOFTWARE except and only to the extent that such activity 1s expressly permitted by applicable law notwithstanding this limitation You may not rent lease or lend the SOFTWARE You may not use the SOFTWARE to perform any illegal purpose 4 SUPPORT SERVICES Quinn Curtis Inc may provide you with support services related to the SOFTWARE Use of Support Services is governed by the Quinn Curtis Inc polices and programs described in the user manual in online documentation and or other Quinn Curtis Inc provided materials as they may be modified from time to time Any supplemental SOFTWARE code provided to you as part of the Support Services shall be considered part of the SOFTWARE and subject to the terms and conditions of this EULA With respect to technical information you provide to Quinn Curtis Inc as part of the Support Services Quinn Curtis Inc may use such information for its business purposes including for product support and development Quinn Curtis Inc will not utilize such technical information in a form that personally identifies you 5 TERMINATION Without prejudice to any other rights Quinn Curtis Inc may terminate this EULA if you fail to comply with the terms and conditions of this EULA In such event you must destroy all copies of the SOFTWARE
284. ollGraph System Windows Forms UserControl ChartView RTAutoIndicator Miscellaneous Shape Drawing 359 RTAutoBarIndicator RTAutoScrollGraph The RTAutoScrollGraph is a ChartView derived object that encapsulates all of the chart elements needed to draw a horizontal scrolling graph including an array of RTProcessVar objects a coordinate system axes axes labels RTSingleValuePlot RTGroupMultiValuePlot RTAlarmSymbol alarm symbols legend title subhead footer and units strings The RTAutoScrollGraph support horizontal scrolling only Use the RTAutoVerticalScrollGraph for a vertical scrolling version There are three types of scrolling x scales you can use in a scrolling chart a date time scale an elapsed time scale or a numeric scale Use the appropriate InitR TAutoScroll overload to select which one is most applicable to your data RTAutoScrollGraph constructors Since the RTAutoScrollGraph is designed to be dropped on a form only a default constructor is used The indicator is customized using public properties Visual Basic Overloads Public Sub New C4 public RTAutoScrollGraph A couple of methods are used to initialize the scroll graph after instantiation InitR TAutoScrollGraph and InitStrings The InitRTAutoScrollGraph method initializes the the x and y scales of the scrolling graph Method InitRTAutoScrollGraph VB Initialize x scale to a Date Time scale using ChartCalendar objects linear y scale Publ
285. olor of the indicator objects changes on an alarm Use one of the constants RT INDICATOR COLOR NO ALARM CHANGE RT INDICATOR COLOR CHANGE ON ALARM Set Get a contrast color to use for text when the object is in alarm and the background color of the panel meter changes Get the current process value of the primary channel Set Get to true to enable a 3D frame for the panel meter Set Get the xy values of the PanelMeterNudge property The PanelMeterNudge property moves the relative position using window device coordinates of the text relative to the specified location of the text Set Get the panel meter position value Use one of the panel meter position constants See table for positioning constants Panel Meter Classes 111 Set Get an RTPanelMeter object used as a positioning PositionReference reference for this RTPanelMeter object inherited from RTPanelMeter Set Get the primary channel of the indicator PrimaryChannel inherited from RTPlot Get Set the array list holding the RTProcessVar RTDataSource inherited variables for the indicator from RTSingleValueIndicator Set Get the reference RTPlot object RTPlotObj inherited from RTPanelMeter Set Get the text color of the panel meter TextColor A complete listing of RTPanelMeter properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory Positioning Panel Meters The most complicated thing a
286. om WM IW A 1 51 00 1 53 00 1 55 00 Heart ECG 1 54 50 1 55 00 1 55 10 A display can have multiple scroll frames The frames can be in separate plots and update in a synchronized fashion or they can overlap the same plotting area RTScrollFrame The scrolling algorithm used in this software is different that in earlier Quinn Curtis real time graphics products Scrolling plots are no longer updated incrementally whenever the underlying data is updated Instead the underlying RTProcessVar data objects are updated as fast as you want Scrolling graphs all graphs for that matter are only updated with the ChartView UpdateDraw method is called What makes scrolling graphs appear to scroll is the scroll frame RTScrollFrame When a scroll frame is updated as a result of the ChartView UpdateDraw event it analyze the RTSimpleSingleValuePlot and RTGroupMultiValuePlot objects that have been attached to it and creates a coordinate system that matches the current and historical data associated with the plot objects The plot objects in the scroll frame are drawn into this coordinate system As data progresses forward in time the coordinate system is constantly being rescaled to include the most recent time values as part of the x coordinate system You can control whether or not the starting point of the scroll frame coordinate system remains fixed whether it advances in sync with the constantly changing end of the scroll frame
287. on ChartObj OUTSIDE PLOTAREA MIN panelmeter TextColor Color SpringGreen panelmeter NumericTemplate TextFont fontl6Numeric panelmeter NumericTemplate DecimalPos 0 panelmeter AlarmIndicatorColorMode _ ChartObj RT TEXT BACKGROUND COLOR CHANGE ON ALARM panelmeter PanelMeterNudge New Point2D 0 2 barplot AddPanelMeter panelmeter 120 Panel Meter Classes Alarm Panel Meter Class RTAlarmPanelMeter Com quinncurtis chart2dnetcf ChartPlot RTPlot RTSingleValueIndicator RTPanelMeter RTAlarmPanelMeter The RTAlarmPanelMeter class displays the alarm state of an RTProcessVar object It pulls alarm text and color information out of the associated RTProcessVar object It contains a template based on the QCChart2D CF StringLabel class that is used to specify the font and numeric format information associated with the panel meter RTAlarmPanelMeter constructors Visual Basic Overloads Public Sub New _ ByVal transform As PhysicalCoordinates ByVal datasource As RTProcessVar _ ByVal attrib As ChartAttribute Overloads Public Sub New _ ByVal transform As PhysicalCoordinates ByVal attrib As ChartAttribute C public RTAlarmPanelMeter PhysicalCoordinates transform RTProcessVar datasource ChartAttribute attrib public RTAlarmPanelMeter PhysicalCoordinates transform ChartAttribute attrib Parameters transform The coordinate system for the new RTAlarmPanelMeter object data
288. on file located in the doc subdirectory Example for single channel annunciator The example below extracted from the RTGraphNetDemo example file AnnunciatorControll method InitializeAnnunciatorl creates a single channel annunciator with a tag name numeric readout and alarm C private void InitializeAnnunciatorl ChartView chartVu this CartesianCoordinates pTransforml new CartesianCoordinates 0 0 0 0 1 0 1 0 pTransforml SetGraphBorderDiagonal 0 01 05 0 15 0 35 Background background new Background pTransforml ChartObj PLOT BACKGROUND Color Gray Single and Multiple Channel Annunciators 219 chartVu AddChartObject background Rectangle2D annunrect new Rectangle2D 0 05 0 05 0 9 0 9 ChartAttribute attribl new ChartAttribute Color DarkGray 1 DashStyle Solid Color DarkGray RTAnnunciator annunciator new RTAnnunciator pTransforml processVarl annunrect attribl ChartAttribute panelmeterattrib new ChartAttribute Color SteelBlue 1 DashStyle Solid Color Black RTNumericPanelMeter panelmeter new RTNumericPanelMeter pTransforml processVar2 panelmeterattrib panelmeter PanelMeterPosition ChartObj PLOTAREA CENTER panelmeter NumericTemplate TextFont Forml fontl6Numeric panelmeter NumericTemplate PostfixString char 176 E annunciator AddPanelMeter panelmeter RTAlarmPanelMeter panelmeter2 new RTAlarmPanelMeter pTransforml processVarl panelmeterattrib
289. ontrol instead of the base ChartView class Right click on the project in the Solution Explorer and select Add User Control Choose the UserControl template This will add a basic template for a user defined UserControll to your project Go to the UserControll cs file and change the inheritance from UserControl to ChartView You can then customize the UserControll 398 QCRTGraph CF Tutorial class to produce a specific chart See the UserControll cs code in the ScrollApplication3 example program In order to add a ChartView control at runtime the ChartView control does NOT need to be added to the Visual Studio Toolbox You will need to add the QCChart2DNetCF DLL and QCRTGraphNetCF DLL files to the project by right clicking project name in the Solution Explorer and selecting Add Reference Browse to the QCChart2DNetCF DLL and QCRTGraphNetCF DLL files in the Quinn Curtis DotNet lib folder and select both You will also need to make sure that you reference com quinncurtis chart2dnetcf com quinncurtis rtgraphnetcf and System Drawing Drawing2D in the using section of any module that references ChartView ChartView constructor example extracted from the example program ScrollApplication3 The graph is created from the form s constructor though it can be created at a later time or during the form load event Extracted from file UserControll cs using System using System Collections Generic using System ComponentModel using System Draw
290. oomWithStack chartVu pTransforml True zoomObj SetButtonMask MouseButtons Left zoomObj SetZzoomYEnable True zoomObj SetZzoomXEnable True zoomObj SetZoomXRoundMode ChartObj AUTOAXES FAR 286 Zooming zoomObj SetZoomYRoundMode ChartObj AUTOAXES FAR zoomObj SetEnable True zoomObj SetZoomStackEnable True set range limits to 1000 ms 1 degree zoomObj SetZzoomRangeLimitsRatio New Dimension 1 0 1 0 chartVu SetCurrentMouseListener zoomObj Private Sub zoomOn Button Click ByVal sender As Object ByVal e As System EventArgs Timerl Enabled False Change to display of all collected data fetalHeartECGScrollFrame ScrollScaleModeX ChartObj RT AUTOSCALE X MINMAX Look at updatecounter number of points which is all of them fetalHeartECGScrollFrame MaxDisplayHistory updatecounter Render graph based on new scale showing all past data points Me UpdateDraw Now disable scroll frame fetalHeartECGScrollFrame ChartObjEnable ChartObj OBJECT DISABLE Turn on zooming zoomObj SetEnable True End Sub zoomOn Button Click Private Sub zoomRestore Button Click ByVal sender As Object ByVal e As System EventArgs Dim button As RTControlButton CType sender RTControlButton Turn off zooming zoomObj SetEnable False Restore original y scale values fetalHeartECGScrollFrame ChartObjScale ScaleStartY 1 0 fetalHeartECGScrollFrame ChartObjScale ScaleStopY 4 0 Re establish scroll mode fetalHear
291. oordinates that the image is placed in JPEG and other image files can be imported using the System Drawing Image class and displayed in a chart This class encapsulates a System Drawing Drawing2D GraphicsPath class placing the shape in a chart using a position defined in chart coordinates A chart can display any object that can be defined using System Drawing Drawing2D GraphicsPath class This class defines symbols used by the SimplePlot scatter plot functions Pre defined symbols include square triangle diamond cross plus star line horizontal bar vertical bar 3D bar and circle Mouse Interaction Classes MouseListener MoveObj FindObj DataToolTip DataCursor MoveData MagniView MoveCoordinates MultiMouseListener 88 QCChart2D CF Class Summary ChartZoom Several classes implement delegates for mouse events The MouseListener class implements a generic interface for managing mouse events in a graph window The DataCursor MoveData MoveObj ChartZoom MagniView and MoveCoordinates classes also implement mouse event delegates that use the mouse to mark move and zoom chart objects and data MouseListener MoveObj FindObj DataCursor MoveData DataToolTip ChartZoom This class implements Net delegates that trap generic mouse events button events and mouse motion events that take place in a ChartView window A programmer can derive a class from MouseListener and override the methods for mouse events
292. or Inherited from RTAutoIndicator Get a reference to the RTNumericPanelMeter object Inherited from RTAutoIndicator Get an RTProcessVar object in the Inherited from RTAutoIndicator Get the plot background object Inherited from RTAutoIndicator Inherited from ChartView Get most recently created RTProcessVar Inherited from RTAutoIndicator Inherited from ChartView Inherited from ChartView Get the most recent setpoint RTAlarm object Inherited from RTAutoIndicator Get a reference to the tag panel meter object Inherited from RTAutoIndicator Get Set the tag string Inherited from RTAutoIndicator Get a reference to the units string panel meter object Inherited from RTAutoIndicator Get Set the units string Inherited from RTAutoIndicator Gets or sets a value indicating whether the control is displayed Inherited from Control Gets or sets the width of the control Inherited from Control Get the x axis object Get the second x axis object Get the x axis labels object Get the x axis title object Get the x axis grid object 322 Miscellaneous Shape Drawing Y Axis Get the y axis object Y Axis2 Get the second y axis object Y AxisLab Get the y axis labels object Accessible only after BuildGrap Y AxisTitle Get the y axis title object Y Grid Get the y axis grid object A complete listing of RTAutoBarIndicator properties is found in the QCRTGraphN
293. or graph is the size of the display and the readability of the text RTMultiV alueAnnunciator An RTMultiValueAnnunciator is used to display the current values and alarm states of a collection of RTProcessVar objects It consists of a rectangular grid with individual channels represented by the rows and columns in of the grid Each grid cell can contain the tag name units current value and alarm status message for a single RTProcessVar object Any of these items may be excluded If a channel is in alarm the background of the corresponding cell changes its color giving a strong visual indication that an alarm has occurred 32 Class Architecture co ez Rico s 600 400 200 n R d D H 1 J Each bar in the RTMultiBarIndicator can have individual colors and alarm limits RTMultiBarIndicator An RTMultiBarIndicator is used to display the current value of a collection of RTProcessVar objects using a group of bars changing size The bars are always fixed at the specified base value Bars can change their size either in vertical or horizontal direction Sub types within the RTMultiBarIndicator class support segmented bars custom segmented bars with variable width segments and pointer bar indicators 100 TF RS LI 100 e _ PN 16 45 50 16 45 52 16 45 54 16 45 56 16 45 58 The RTGroupMultiValuePlot class turns QCChart2D CF GroupPlot objects like the MultiLinePlot object above into scrolling plots RTGroupMultiValuePlot The
294. ormation associated with the panel meter 24 Class Architecture The RTTimePanelMeter can display a time date value in any format supported by the QCChart2D CF TimeLabel format constants You can also create custom format not directly supported RTTimePanelMeter Displays the time date value of the time stamp of the associated RTProcessVar object It contains a template based on the QCChart2D CF TimeLabel class that is used to specify the font and time date format information associated with the panel meter RTElapsedTimePanelMeter Displays the elapsed time the TimeSpan value of the time stamp in milliseconds of the associated RTProcessVar object It contains a template based on the QCChart2D ElapsedTimeLabel class that is used to specify the font and time date format information associated with the panel meter RTFormControlPanelMeter Encapsulates an RTFormControl object buttons and track bars primarily though others will also work in a panel meter format Single Value Indicators Com quinncurtis chart2dnetcf ChartPlot RTPlot RTSingleValueIndicator RTAnnunciator RTBarIndicator RTMeterIndicator RTMeterArcIndicator RTMeterNeedleIndicator RTMeterSymbolIndicator RTPanelMeter RTSimpleSingleValuePlot Display objects derived from the RTSingleValueIndicator class are attached to a single RTProcessVar object This includes single channel bar indicators which includes solid segmented custom and pointer bar indicators
295. osition ChartObj PLOTAREA CENTER panelmeter NumericTemplate TextFont Forml fontl6Numeric panelmeter NumericTemplate PostfixString ChrW 176 E annunciator AddPanelMeter panelmeter Dim panelmeter2 As New RTAlarmPanelMeter pTransforml processVarl panelmeterattrib panelmeter2 PanelMeterPosition ChartObj INSIDE BARBASE panelmeter2 AlarmTemplate TextFont Forml font10 panelmeter2 SetPositionReference panelmeter annunciator AddPanelMeter panelmeter2 Dim panelmetertagattrib As New ChartAttribute Color SteelBlue 1 DashStyle Solid Color White Dim panelmeter3 As New RTStringPanelMeter pTransforml processVarl panelmetertagattrib ChartObj RT TAG STRING panelmeter3 SetPositionReference panelmeter panelmeter3 PanelMeterPosition ChartObj INSIDE BAR panelmeter3 TextColor Color Black annunciator AddPanelMeter panelmeter3 chartVu AddChartObject annunciator End Sub InitializeAnnunciatorl Multi Channel Annunciators Class RTMultiValueAnnunciator Com quinncurtis chart2dnetcf ChartPlot RTPlot RTMultiValueIndicator Single and Multiple Channel Annunciators 221 RTMultiValueAnnunciator An RTMultiValueAnnunciator is used to display the current values and alarm states of a collection of RTProcessVar objects It consists of a rectangular grid with individual channels represented by the rows and columns in of the grid Each grid cell can contain the tag name units current value and alarm status messag
296. ot or GroupPlot object can be converted into a real time scrolling graph without adding any code to the QCRTGraph CF library Class Architecture 15 QCRTGraph CF Class Summary The QCRTGraph CF library is a super set of the QCChart2D CF library The classes of the QCChart2D CF library are an integral part of the software A summary of the QCChart2D CF classes appears below QCChart2D CF Class Summary Chart view class Data classes Scale transform classes The chart view class is a UserControl subclass that manages the graph objects placed in the graph There are data classes for simple xy and group data types There are also data classes that handle System DateTime date time data and contour data The scale transform classes handle the conversion of physical coordinate values to working coordinate values for a single dimension Coordinate transform classes Attribute class Auto Scale classes Charting object classes Mouse interaction classes The coordinate transform classes handle the conversion of physical coordinate values to working coordinate values for a parametric 2D coordinate system The attribute class encapsulates the most common attributes line color fill color line style line thickness etc for a chart object The coordinate transform classes use the auto scale classes to establish the minimum and maximum values used to scale a 2D coordinate system The axis classes also use the auto scale clas
297. othing ChartCalendar GetCalendarWidthValue ChartObj SECOND 1 25 attribl 246 Multi Channel Scrolling Plots ohlcplotl SetFastClipMode ChartObj FASTCLIP X Dim stockvars As RTProcessVar stockOpenl stockHighl stockLowl stockClosel rtPlotl New RTGroupMultiValuePlot pTransforml ohlcplotl stockvars chartVu AddChartObject rtPlotl Dim attrib2 As New ChartAttribute Color Green 1 DashStyle Solid Dim lineplot2 As New SimpleLinePlot pTransform2 Nothing attrib2 lineplot2 SetFastClipMode ChartObj FASTCLIP X rtPlot2 New RTSimpleSingleValuePlot pTransform2 lineplot2 NASDAQChannel chartVu AddChartObject rtPlot2 Dim attrib3 As New ChartAttribute Color Blue 1 DashStyle Solid Dim lineplot3 As New SimpleLinePlot pTransform2 Nothing attrib3 lineplot3 SetFastClipMode ChartObj FASTCLIP X rtPlot3 New RTSimpleSingleValuePlot pTransforml lineplot3 movingAverageStock chartVu AddChartObject rtPlot3 14 Buttons Track Bars and Other Form Control Classes RTControlButton RTControlTrackBar RTFormControl RTFormControlPanelMeter RTFormControlGrid Real time displays often require user interface features such as buttons and track bars The Visual Studio Net platform includes a large number of useful controls The Net TrackBar HScrollBar VScrollBar Button and PictureBox controls are examples of what we refer collectively as Form Controls Sometime though the Net Form controls have annoying shortcomings One th
298. ouble v Calculate width as fraction of initial bar width double width 1 0 Bar widest at setpoint narrowest at endpoints Clamp width to 0 05 to 1 0 range width Math Max 0 05 this BarWidth Math Abs 0 04 v temperatureSetpoint width Math Min 1 0 width return width Single Channel Bar Indicator 147 public double TemperatureSetpoint get return temperatureSetpoint set temperatureSetpoint value public void InitializeCustomBarIndicator barplot new CustomRTBarIndicator pTransforml currentTemperaturel barwidth barbase attribl barjust barorient barplot IndicatorBackground new ChartAttribute Color Black 1 DashStyle Solid Color Black barplot SegmentSpacing 1 barplot SegmentWidth 1 barplot IndicatorSubType ChartObj RT BAR SEGMENTED SUBTYPE chartVu AddChartObject barplot VB Public Class CustomRTBarIndicator Inherits RTBarIndicator Private temperatureSetpointD As Double 70 Public Sub New ByVal transform As PhysicalCoordinates _ ByVal datasource As RTProcessVar _ ByVal barwidth As Double ByVal barbase As Double ByVal attrib As CHARTATTRIBUTE ByVal barjust As Integer ByVal barorient As Integer MyBase New transform datasource barwidth _ 148 Single Channel Bar Indicator barbase attrib barjust barorient End Sub New Public Overrides Function GetCustomBarOffset ByVal v As Double As Double Dim offset As Double 0 0
299. ound True rtProcessVarViewerl GridCellFont font10 rtProcessVarViewerl AddProcessVar currentTemperature2 rtProcessVarViewerl SetFormatDecimalPos 0 0 rtProcessVarViewerl SetFormatDecimalPos 1 1 rtProcessVarViewerl SetFormatDecimalPos 2 2 Vertical Orientation DatasetViewer example extracted from the example program ProcessVarDataTables ElapsedTimeV erticalScrolling Process Variable Viewer 313 Scroll Application 3 1 0 00 23 E em e 0 00 33 0 00 43 0 00 53 C datasetViewerl was created sized and added to the ChartView in SimpleDatasetViewerChart Designer cs file rtProcessVarViewerl InitRTProcessVarViewer chartVu pTransforml null currentTemperaturel 6 2 0 ChartObj VERT DIR rtProcessVarViewerl GridCellFont font10 rtProcessVarViewerl AddProcessVar currentTemperature2 VB datasetViewerl was created sized and added to the ChartView in SimpleDatasetViewerChart Designer cs file rtProcessVarViewerl InitRTProcessVarViewer chartVu pTransforml Nothing currentTemperaturel 6 2 0 Ch rtObj VERT DIR rtProcessVarViewerl GridCellFont font10 RtProcessVarViewerl AddProcessVar currentTemperature2 19 Auto Indicator Classes RTAutoBarIndicator RTAutoMultiBarIndicator RTAutoMeterIndicator RTAutoClockIndicator RTAutoDialIndicator RTAutoScrollGraph RTAutoPanelMeterIndicator The auto indicator classes are designed to simplify the cre
300. ounter number of points which is all of them scrollFrame2 MaxDisplayHistory updatecounter Update first to display all historical information then disable to allow for zooming Me UpdateDraw scrollFrame2 ChartObjEnable ChartObj OBJECT DISABLE ScrollFramel ChartObjEnable ChartObj OBJECT DISABLE 292 Zooming Turn on zooming zoomObj SetEnable True End Sub zoomOn Button Click Private Sub zoomRestore Button Click ByVal sender As Object ByVal e As System EventArgs Dim button As RTControlButton CType sender RTControlButton Turn off zooming zoomObj SetEnable False Re establish scroll mode ScrollFramel ScrollScaleModeX ChartObj RT FIXEDEXTENT MOVINGSTART AUTOSCROLL ScrollFramel ChartObjEnable ChartObj OBJECT ENABLE Re establish scroll mode scrollFrame2 ScrollScaleModeX ChartObj RT FIXEDEXTENT MOVINGSTART AUTOSCROLL scrollFrame2 ChartObjEnable ChartObj OBJECT ENABLE Render graph Me UpdateDraw Me Timerl Enabled True End Sub zoomRestore Button Click Limiting the Zoom Range A zoom window needs to have zoom limits placed on the minimum allowable zoom range for the x and y coordinates Unrestricted or infinite zooming can result in numeric under and overflows The default minimum allowable range resulting from a zoom operation is 1 1000 of the original coordinate range Change this value using the ChartZoom SetZoomRangeLimitsRatio method The minimum allowable range for th
301. ows A complete listing of RTMultiValueAnnunciator properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory The CellColumnMargin and the CellRowMargin values represent the total amount of spacing used for the cell column and cell row margins respectively A value of 0 2 implies that 20 of the row or column space will be used as margin and 80 will be used for the annunciator cells The 2096 margin value is divided up between the cells in the row or column If the multi channel annunciator has 4 annunciator cells in a row there are 5 border areas between the cells 3 at the interior of the annunciator cell grid and 2 on either end The total margin of 20 is therefore divided 5 times resulting in a 4 margin between the column of each grid cell Example for a simple multi channel annunciator The example below extracted from the AutoInstrumentPanel example method InitializeAnnunciator creates a multi channel annunciator that shows only the tag name of the associated RTProcessVar object Fuel Battery Coolant Dil Brakes Engine Doors Electric C private void InitializeAnnunciator ChartView chartVu this CartesianCoordinates pTransforml new CartesianCoordinates 0 0 0 0 1 0 1 0 plransforml SetGraphBorderDiagonal 0 03 0 13 0 715 0 21 ChartAttribute attrib ChartAttribute attribArray new ChartAttribute annunciatorl Length for int i 0 i lt
302. pTransforml ChartObj Y AXIS baraxis CalcAutoAxis chartVu AddChartObject baraxis Dim baraxis2 As New LinearAxis pTransforml ChartObj Y AXIS Multiple Channel Bar Indicator 165 baraxis2 CalcAutoAxis baraxis2 SetAxisIntercept pTransforml GetStopX baraxis2 SetAxisTickDir ChartObj AXIS MAX chartVu AddChartObject baraxis2 Dim barAxisLab As New NumericAxisLabels baraxis chartVu AddChartObject barAxisLab Dim barplot As New CustomRTMultiBarIndicator pTransforml processVarArray barwidth barspace barbase attribArray barjust barorient barplot SegmentSpacing 20 barplot SegmentWidth 15 Add panel meters barplot IndicatorSubType ChartObj RT BAR SEGMENTED SUBTYPE barplot SegmentValueRoundMode ChartObj RT CEILING VALUE chartVu AddChartObject barplot End Sub InitializeBar3 8 Meters Coordinates Meter Axes and Meter Axis Labels RTMeterCoordinates RTMeterAxis RTMeterAxisLabels RTMeterStringAxisLabels Familiar examples of analog meter indicators are voltmeters car speedometers pressure gauges compasses and analog clock faces A meter usually consists of a meter coordinate system meter axes meter axis labels and a meter indicator the needle arc or symbol used to display the current value It can also have panel meters RTPanelMeter derived objects that display the meter title numeric readout and alarm state The first three objects the meter coordinate system meter axis and mete
303. ple Channel Bar Indicator 163 chartVu AddChartObject barplot Add panel meters VB Public Class CustomRTBarIndicator Inherits RTBarIndicator Public Sub New ByVal transform As PhysicalCoordinates ByVal datasource As RTProcessVar ByVal barwidth As Double ByVal barbase As Double ByVal attrib As CHARTATTRIBUTE ByVal barjust As Integer ByVal barorient As Integer MyBase New transform datasource barwidth barbase attrib barjust barorient End Sub New Public Overrides Function GetCustomBarOffset ByVal v As Double As Double Dim offset As Double 0 0 Return offset End Function GetCustomBarOffset Public Overrides Function GetCustomBarWidth ByVal v As Double As Double Calculate width as fraction of initial bar width Dim width As Double 0 5 width 0 01 v 100 v 100 Me BarWidth Return width End Function GetCustomBarWidth End Class CustomRTBarIndicator Public Class CustomRTMultiBarIndicator Inherits RTMultiBarIndicator Public Sub New ByVal transform As PhysicalCoordinates ByVal datasource As RTProcessVar ByVal barwidth As Double ByVal barspacing As Double ByVal barbase As Double ByVal attribs As CHARTATTRIBUTE ByVal barjust As Integer ByVal barorient As Integer MyBase New transform datasource barwidth barspacing barbase attribs barjust barorient End Sub New Public Overrides Function GetCustomBarOffset ByVal v As Double As Double This centers the bar segments 16
304. plot The example below extracted from the Dynamometer example file DynamometerControll method InitializeEngine1ScrollGraph creates a multi channel scrolling graph Note You do not have to use an RTGroupMultiValuePlot to plot multi channel data in a scrolling graph You can just use multiple RTSimpleSingleValuePlot objects as in the example below You can also mix object types including line plots bar plots and scatter plot in the same scrolling graph 18 57 40 18 57 50 18 58 00 C 240 The Scroll Frame and Single Channel Scrolling Plots ScrollFramel new RTScrollFrame this EngineCylinderTemp1 0 pTransforml ChartObj RT FIXEDEXTENT MOVINGSTART AUTOSCROLL ScrollFramel AddProcessVar EngineCylinderTempl 1 ScrollFramel AddProcessVar EngineCylinderTempl 2 scrollFramel AddProcessVar EngineCylinderTemp1 3 scrollFramel ScrollScaleModeY ChartObj RT AUTOSCALE Y MINMAX scrollFramel ScrollRescaleMargin 0 05 chartVu AddChartObject scrollFramel for int i 0 i 47 144 SimpleLinePlot lineplot new SimpleLinePlot pTransforml null attribarray i lineplot SetFastClipMode ChartObj FASTCLIP X rtLinePlotArrayl i new RTSimpleSingleValuePlot pTransforml lineplot EngineCylinderTempl i chartVu AddChartObject rtLinePlotArrayl i VB ScrollFramel New RTScrollFrame Me EngineCylinderTemp1 0 pTransforml ChartObj RT FIXEDEXTENT MOVINGSTART AUTOSCROLL ScrollFramel AddProcessVar Engine
305. plottype Color colr string tag Parameters plottype Specifies the simple plot type LINE MARKER PLOT LINE PLOT BAR PLOT SCATTER PLOT colr The primary color of the plot object tag The tag name associated with the plot object Use the UpdateIndicator method to update the scrolling graph with new data Method UpdateIndicator VB Public Sub UpdateIndicator _ values As Double _ updatedraw As Boolean Public Sub UpdateIndicator _ value As Double _ updatedraw As Boolean Cit public void UpdateIndicator double values bool updatedraw 364 Miscellaneous Shape Drawing public void UpdateIndicator double value bool updatedraw Parameters values An array of new values one for each channel of the indicator value A single value if the scroll graphs only has one channel updatedraw True and the indicator is immediately updated Selected Public Instance Properties Name AlarmList AlarmPanelMeter BarDataValue BarFillColor BarLineColor BarLineWidth BarWidth ChartLegend ChartObjType ChartSimpleDataset CoordinateSystem DatasetList Datatooltip DefaultChartFontString Description Get the ArrayList holding all of the RTAlarm objects Inherited from RTAutolIndicator Get a reference to the RTAlarmPanelMeter object Inherited from RTAutoIndicator Get the numeric label template object used to place numeric values on the bars Sets the f
306. r Class RTAutoBarIndicator System Windows Forms UserControl ChartView RTAutoIndicator RTAutoBarIndicator 318 Miscellaneous Shape Drawing The RTAutoBarIndicator combines a RTBarlIndicator object with other objects needed to create a self contained bargraph display These other objects include a RTProcessVar variable axes axis labels title string units string alarm indicators and panel meters used in the display of the bar graphs numeric value tag name and alarm status Since it contains a single RTProcessVar object it displays a single channel of data RTAutoBarIndicator constructors Since the RTAutoBarIndicator is designed to be dropped on a form only a default constructor is used The indicator is customized using public properties Visual Basic Overloads Public Sub New C4 public RTAutoBarIndicator A couple of methods are used to initialize the bar graph after instantiation InitBarIndicator and InitStrings The InitBarIndicator method initialized the orientation of the bars the format of the bar graph and the bar color Method InitBarIndicator VB Public Sub InitBarIndicator _ orientation As Integer _ bargraphformat As Integer _ colr As Color Cit public void InitBarIndicator int orientation int bargraphformat Color colr Parameters orientation Specifies the orientation of the chart ChartObj VERT DIR or ChartObj HORIZ DIR bargraphformat Specifies the bar graph format 0
307. r panelmeter2 chartVu AddChartObject formControlTrackBarl 6 Single Channel Bar Indicator RTBarIndicator An RTBarIndicator is used to display the current value of an RTProcessVar using the height or width of a bar One end of each bar is always fixed at the specified base value Bars can change their size either in vertical or horizontal direction Sub types within the RTBarIndicator class support segmented bars custom segmented bars with variable width segments and pointer bar indicators Panel meters can be attached to the bar indicator where they provide text for numeric read outs alarm warnings descriptions and titles Bar Indicator Class RTBarIndicator Com quinncurtis chart2dnetcf ChartPlot RTPlot RTSingleValueIndicator RTBarIndicator The bar indicator is a relatively simple plot object that resides in the plot area of the specified coordinate system It is usually combined with axes and axis labels though this is not required Since the bar indicator does not include axes or axis labels as option it is up to the user to explicitly create axis and axis label objects for the bar indicator graph The QCChart2D CF axis and axis labels routines make this easy to do RTBarlIndicator constructors Visual Basic Overloads Public Sub New _ ByVal transform As PhysicalCoordinates ByVal datasource As RTProcessVar _ ByVal barwidth As Double _ ByVal barbase As Double _ ByVal attrib As ChartAttribute ByVal barjust As In
308. r DarkMagenta ChartAttribute attrib2 new ChartAttribute Color Aquamarine 1 DashStyle Solid Color Aquamarine ChartAttribute attrib3 new ChartAttribute Color DarkSalmon l DashStyle Solid Color DarkSalmon ChartAttribute attrib4 new ChartAttribute Color Yellow 1 DashStyle Solid Color Yellow ChartAttribute attribArray attribl attrib2 attrib3 attrib4 double barwidth 0 1 barbase 0 0 barspace 0 25 int barjust ChartOb JUSTIFY MIN int barorient ChartObj VERT DIR LinearAxis baraxis new LinearAxis pTransforml ChartObj Y AXIS chartVu AddChartObject baraxis LinearAxis baraxis2 new LinearAxis pTransforml ChartObj Y AXIS Multiple Channel Bar Indicator 157 baraxis2 SetAxisIntercept pTransforml GetStopX baraxis2 SetAxisTickDir ChartObj AXIS MAX chartVu AddChartObject baraxis2 NumericAxisLabels barAxisLab new NumericAxisLabels baraxis barAxisLab TextFont font14 chartVu AddChartObject barAxisLab This uses an RTMultiProcessVar EngineCylinders1 to initialize the RTMultiBarIndicator barplot new RTMultiBarIndicator pTransforml EngineCylindersl barwidth barspace barbase attribArray barjust barorient barplot SegmentSpacing 50 barplot SegmentWidth 30 barplot IndicatorBackground new ChartAttribute Color Black 1 DashStyle Solid Color Black barplot SegmentValueRoundMode ChartObj RT CEILING VALUE barplot SegmentCorn
309. r axis labels are described in this chapter while the meter indicator types are described in the next Meter Coordinates Class RTMeterCoordinates QChart2D PolarCoordinates RTMeterCoordinates A meter coordinate system has more properties than a simple Cartesian coordinate system or even a polar coordinate system Because of the variation in meter styles a meter coordinate system needs to define the start and end angle of the meter arc within the 360 degree polar coordinate system It also needs to map a physical coordinate system representing the meter scale on top of the meter arc And the origin of the meter coordinate system can be offset in both x and y directions with respect to the containing plot area RTMeterCoordinates constructors Visual Basic Overloads Public Sub New ByVal startarcangle As Double _ ByVal arcextent As Double _ ByVal startarcscale As Double _ ByVal endarcscale As Double _ ByVal arcdirection As Boolean _ ByVal x As Double ByVal y As Double ByVal arcradius As Double Overloads Public Sub New ByVal startarcangle As Double _ 170 Meters Coordinates Meter Axes and Meter Axis Labels ByVal arcextent As Double _ ByVal startarcscale As Double _ ByVal endarcscale As Double _ ByVal arcdirection As Boolean _ ByVal arcradius As Double _ Ct public RTMeterCoordinates double startarcangle double arcextent double startarcscale double
310. r axis labels as option it is up to the user to explicitly create axis and axis label objects for the bar indicator graph The QCChart2D CF axis and axis labels routines make this easy to do When an RTPanelMeter object is added to an RTMultiBarIndicator it is used as a template to create a multiple panel meters one for each bar of the multi bar indicator The panel meter for each bar will reference the process variable information associated with that bar stored in the RTProcessVar objects attached to the multi bar indicator RTMultiBarIndicator constructors Visual Basic Overloads Public Sub New _ ByVal transform As PhysicalCoordinates ByVal datasource As RTProcessVar ByVal barwidth As Double _ ByVal barspacing As Double _ ByVal barbase As Double _ ByVal attribs As ChartAttribute ByVal barjust As Integer _ ByVal barorient As Integer _ C public RTMultiBarIndicator PhysicalCoordinates transform 152 Multiple Channel Bar Indicator RTProcessVar datasource double barwidth double barspacing double barbase ChartAttribute attribs int barjust int barorient Parameters transform The coordinate system for the new RTMultiBarIndicator object datasource An array of the process variables associated with the bar indicator barwidth The width of each bar in physical units barspacing The space between adjacent bars in physical units barbase The base of the bar
311. r displays Alarm limits for meter displays are handled by the RTMeterAxis class 100 80 60 40 0 0 2 40 60 380 10 140 MEAM HEREIN dle up 120 7 EN E ME A As gr 80 oo o oen e 18 45 00 18 46 00 The alarm indicators can have one of three forms pointer style symbols horizontal or vertical lines or horizontal or vertical filled areas RTAlarmIndicator RTMultiAlarmIndicator Meter Axis Classes Class Architecture 35 This class is used to provide alarm limit indicators for RTSingleValueIndicator objects This class is used to provide alarm limit indicators for RTMultiValueIndicator objects Each indicator in a multi indicator object can have unique alarm settings QChart2D PolarCoordinates RTMeterCoordinates com quinncurtis chart2dnetcf LinearAxis RTMeter Axis com quinncurtis chart2dnetcf NumericAxisLabels RTMeterAxisLabels com quinncurtis chart2dnetcf StringAxisLabels RTMeterStringAxisLabels RTMeterCoordinates A meter coordinate system has more properties than a simple Cartesian coordinate system or even a polar coordinate system Because of the variation in meter styles a meter coordinate system sets the start and end angle of the meter arc within the 360 degree polar coordinate system It also maps a physical coordinate system representing the meter scale on top of the meter arc And the origin of the meter coordinate system can be offset in both x and y directions with resp
312. r3 PanelMeterPosition ChartObj ABOVE REFERENCED TEXT panelmeter3 TextColor Color Black annunciator AddPanelMeter panelmeter3 chartVu AddChartObject annunciator End Sub InitializeAnnunciator2 Example for a large multi channel annunciator The example below extracted from the RTGraphNetDemo file AnnunciatorControll method InitializeAnnunciator4 example creates a multi channel annunciator that shows the tag name and current value of the associated RTProcessVar object The alarm state is implicit in the annunciator background color See the example program for the code listing 12 The Scroll Frame and Single Channel Scrolling Plots RTScrollFrame RTVerticalScrollFrame RTSimpleSingleValuePlot Scrolling graphs are built using three main classes The first is the RTScrollFrame class that manages the constant rescaling of the coordinate system of the scrolling graph The second and third are RTSimpleSingleValuePlot and RTGroupMultiValuePlot classes that encapsulate the actual line plot bar plot scatter plot or group plot that is plotted in the scrolling graph The RTScrollFrame class and the RTSimpleSingleValuePlot classes are described in this chapter and the RTGroupMultiValuePlot class is described in the next The original RTScrollFrame manges scrolling of numeric time date and elapsed time coordinate systems in the horizontal direction Starting with Revision 2 0 a new scroll frame has been added RTVer
313. ramework First if this is the first Net Compact Framework program you have every created make a few practice application programs using the Visual Studio defaults Don t try to add graphics to an application until you are able to create a simple Net Compact Framework applications using the New Project File New Project application wizard 384 QCRTGraph CF Tutorial e You start the New Project application wizard by selecting File New Project bringing up the New Project dialog box e From this dialog select Visual Basic Projects Smart Device Windows Mobile 5 0 folder on the left and the Device Application template on the right The default Device Application targets a Net CF 2 0 device Do NOT target a Net 1 0 device by selecting the Device Application 1 0 since this software is not compatible with Net 1 0 and 1 1 e Assign a name to the application in the name box either the default DeviceApplication1 or your own pick ScrollApplication11 in the example below Select a location which for our examples is the folder C Quinn Curtis DotNet QCRTGraph Visual Basic CF examples New Project Project types Templates E Visual C Visual Studio installed templates Windows E Smart Device QelDevice Application E class Library Starter Kits JE Control Library IA Console Application Web jelEmpty Project GelDevice Application 1 0 E Other Languages CE Class Library 1 0 2 Console Application 1 0 Vi
314. raphObj ChartObjEnable inherited from GraphObj ChartObjScale inherited from GraphObj CurrentProcessValue inherited from RTSingleValueIndicator FillBaseValue inherited from ChartPlot FillColor inherited from GraphObj IndicatorBackground IndicatorBackgroundEnable IndicatorSubType LabelTemplateDecimalPos inherited from ChartPlot Multiple Channel Bar Indicator 153 Set Get the spacing between adjacent items in multi channel plots Set Get the width of bars in physical coordinates for bar plots Sets the attributes for a chart object using a ChartAttribute object Sets the object clipping mode Use one of the object clipping constants NO_CLIPPING GRAPH AREA CLIPPING PLOT AREA CLIPPING or INHERIT CLIPPING Sets the reference to the ChartView component that the chart object is placed in Enables Disables the chart object A chart object is drawn only if it is enabled A chart object is enabled by default Sets the reference to the PhysicalCoordinates object that the chart object is placed in Get the current process value of the primary channel Set Get the base value in physical coordinates of solid bars and filled areas plot objects Sets the fill color for the chart object Get Set the background attribute of the bar indicator Set to true to enable the display of the bar indicator background Get Set the bar indicator sub type RT BAR SOLID SUBTYPE RT
315. rary F Empty Project Ei Class Library 1 0 AEmpty Project 1 0 E Class Library Bf console Application Gl Device Application 1 0 Ef console Application 1 0 Starter Kits Web Other Languages Visual Basic Windows Smart Device Pocket PC 2003 Smarktnhanse INN lt j gt My Templates gd Search Online Templates A project For creating a NET Compact Framework 2 0 forms application For Windows Mobile 5 0 Pocket PC and later Mame ScrollApplication1 1 Location Ci Quinn CurtisiDotNetQCRTGraph Visual CSharp CF examples 2005 Solution Create new Solution v Create directory For solution Solution Name ScrollApplication1 1 The previous steps apply to all Net Compact Framework applications The following steps are specific to adding QCRTGraph CF charts to your application For purposes of this example the chart will placed in the initial default form Using ChartView with the Visual Studio Design Mode e Add the ChartView control to the Toolbox If it isn t there already add the ChartView UserControl to the Visual Studio Toolbox To add the ChartView control to the VS Toolbox right click on the Toolbox and select Choose Items From the Choose Toolbox Items dialog use the Browse button and go to the Quinn Curtis DotNet Lib folder and select QCChart2DNetCF DLL OK out of the Choose Toolbox Items dialog You will now see a ChartView control in the tool box li
316. re integrates the QCChart2D CF charting software with real time data structures and specialized rendering routines It is designed for on the fly rendering of the real time data using new specialized classes for scrolling graphs gauges bar graphs meters annunciators and text Plot objects created using the QCChart2D CF classes can be freely mixed with the new QCRTGraph CF classes Advanced user interface features such as zooming and tool tips can used with real time scrolling charts Limitation of the Net API Compact Framework API Like the QCChart2D CF software the QCRTGraph CF software uses the graphics features found in the Microsoft Net Compact Framework API The Net Compact Framework includes a basic API for writing applications that make use of GUI s data structures databases files and streams networking and web services The graphics part of the API is a subset of the standard Net graphics API supporting far fewer classes than are found in that API and far fewer methods and properties in the classes that are supported A few of limitations of the Net Compact Framework API compared to the regular Net API are e Net CF applications typically run on CPU challenged devices and as a result are really really slow compared to regular Net applications running under Windows XP Keep this in mind when writing applications While our examples tend to be very complex in order to demonstrate as many programming features as possibl
317. reen panelmeter NumericTemplate TextFont fontl6Numeric panelmeter NumericTemplate DecimalPos 0 panelmeter AlarmIndicatorColorMode ChartObj RT TEXT BACKGROUND COLOR CHANGE ON ALARM panelmeter PanelMeterNudge new Point2D 0 2 barplot AddPanelMeter panelmeter RTAlarmPanelMeter panelmeter2 new RTAlarmPanelMeter pTransforml panelmeterattrib panelmeter2 PanelMeterPosition ChartObj BELOW REFERENCED TEXT panelmeter2 TextColor Color SpringGreen panelmeter2 AlarmTemplate TextFont font14 panelmeter2 SetPositionReference panelmeter panelmeter2 AlarmIndicatorColorMode ChartObj RT TEXT BACKGROUND COLOR CHANGE ON ALARM barplot AddPanelMeter panelmeter2 VB Dim barplot As New RTBarIndicator pTransforml batteryCharge barwidth barbase attribl barjust barorient Dim panelmeterattrib As New ChartAttribute Color SteelBlue 0 DashStyle Solid Color Black Dim paneltagmeterattrib As New ChartAttribute Color SteelBlue 0 DashStyle Solid Color White Dim panelmeter As New RTNumericPanelMeter pTransforml panelmeterattrib panelmeter PanelMeterPosition ChartObj OUTSIDE PLOTAREA MIN panelmeter TextColor Color SpringGreen panelmeter NumericTemplate TextFont fontl6Numeric panelmeter NumericTemplate DecimalPos 0 panelmeter AlarmIndicatorColorMode ChartObj RT TEXT BACKGROUND COLOR CHANGE ON ALARM panelmeter PanelMeterNudge New Point2D 0 2 barplot AddPanel
318. ribute dialComboProcessVarl AddProcessVar bigProcessVarArray 0 dialComboProcessVarl AddProcessVar bigProcessVarArray 1 dialComboProcessVarl SetDivisorItem 0 1 dialComboProcessVarl SetDivisorItem 1 10 dialComboProcessVarl SetModuloItem 0 100 dialComboProcessVarl SetModuloItem 1 100 Dials and Clocks 214 private void InitializeDiall ChartView chartVu this double startarcangle 90 double arcextent 360 double startarcscale 0 0 double endarcscale 100 0 bool arcdirection false double arcradius 0 90 double centerx 0 0 centery 0 0 Font meterFont Forml font12 RTMeterCoordinates meterframe new RTMeterCoordinates startarcangle arcextent startarcscale endarcscale arcdirection centerx centery arcradius meterframe SetGraphBorderDiagonal 0 0 0 0 0 25 0 45 Background gbackground new Background meterframe ChartObj GRAPH BACKGROUND Color White chartVu AddChartObject gbackground ChartAttribute frameattrib new ChartAttribute Color Black 1 DashStyle Solid Color Blue ChartAttribute needleattribl new ChartAttribute Color Black 1 DashStyle Solid Color Blue RTMeterNeedleIndicator meterneedlel new RTMeterNeedleIndicator meterframe bigProcessVarArray 0 meterneedlel NeedleBaseWidth 5 meterneedlel SetChartObjAttributes needleattribl meterneedlel NeedleLength 0 55 chartVu AddChartObject meterneedlel ChartAttribute needleattrib
319. rid object Y Axis Get the y axis object Y Axis2 Get the second y axis object visu uo labels object Accessible only after YAxisLab2 go si labels object Accessible only YAxisTitle Get the y axis title object YGrid Get the y axis grid object A complete listing of RTAutoScrollGraph properties is found in the QCRTGraphNetCompiledHelpFile chm documentation file located in the doc subdirectory The RTAutoScrollGraph class supports a date time elapsed time and numeric time horizontal x axis scale The y axis scale is linear or logarithmic The title and subhead shows above above the chart the legend and footer below Example for initializing RTAutoScrollGraph objects The example below extracted from the AutoGraphDemos SimpleAutoScrollUserControll example draws horizontal and vertical scrolling graphs The top horizontal scrolling graph uses a date time scale for the scrolling axis The bottom horizontal scroll graph uses an elapsed time scale for the scrolling axis 368 Miscellaneous Shape Drawing Time Date Scrolling 15 34 45 15 35 00 15 35 15 15 35 30 Time Channel 1 Channel 2 Channel 3 Footer text Scrolling graph with Date Time x axis scale Elapsed Time Scrolling 15 15 10 10 Quarks 5 0 0 02 10 0 02 20 0 02 30 0 02 40 Time Channel 1 Channel 2 Channel 3 Footer text Scrolling graph with elapsed time x axis scale public void InitializeGraph TOP HORIZONTAL GRAPH
320. rior On Off button text and color control and supports momentary toggle and radio button styles kat Horizontal and vertical track bars can be scaled for physical real world coordinates RTControlTrackBar Derived from the Net Form Control TrackBar class it adds floating point scaling for the track bar endpoints increments current value and tick mark frequency RTFormControl The RTFormControl class wraps the Net Form Controls and our RTControlButton and RTControlTrackBar controls so that they can be placed in a graph RTFormControlPanelMeter This panel meter class contains encapsulates an RTFormControl object in a panel meter class so that controls can be added to indicator objects Class Architecture 39 LEE GG TEEGAA El 2 B EEE EE EG EG AG RTFormControlGrid objects are arranged in a row x column format Additional panel meter objects numeric and string panel meters in the track bar example above can be attached to the primary control grid object RTFormControlGrid The RTFormControlGrid organizes a collection of RTFormControl objects functionally and visually in a grid format An RTControlButton must be added to an RTFormControlGrid before the radio button processes of the RTControlButton will work Scroll Frame Class Com quinncurtis chart2dnetcf ChartPlot RTPlot RTMultiValueIndicator RTScrollFrame RTVerticalScrollFrame 40 Class Architecture Course Difficulty
321. rm of the PID control equation in analog form is Eqn 1 de m t K e t Ki fe tdt Ka dt proportional integral derivative where m t controller output deviation Ke proportional gain Ki reset multiplier integral time constant Kg derivative time constant S t current process setpoint X t actual process measured variable temperature for example e t error as a function of time S t X t The variables Kc Ki and Ka are adjustable and are used to customize a controller for a given process control application The K constant term is listed in some textbooks as 1 K It is simply a matter of the units K is specified in In the Kj form the units are repeats per minute while in the 1 K form the units are minutes per repeat also called reciprocal time The K version presented here is preferred because increasing Kj will increase the integral gain action just like increasing K and Kg will increase the proportional gain and derivative gain action If 1 K is used then decreasing values of Kj will increase the amount of integral gain 272 PID Control The proportional term of the PID equation contributes an amount to the controller output directly proportional to the current process error For example if the setpoint of the process is 100 degrees and the current temperature of the process is 90 degrees then the current process error is 10 degrees The proportional term adds to the controller output an amoun
322. rm once the threshold value of 70 is exceeded If the hysteresis value is 2 then the process variable will not fall out of alarm until the process value is less than alarmlimitvalue hysteresisvalue 70 2 68 If you don t want hysteresis set it equal to 0 0 The most commonly used RTAlarm properties are Selected Public Instance Properties AlarmLimitValue AlarmMessage AlarmState AlarmSymbolColor AlarmTextColor AlarmType Hysteresis Value Get Set the alarm limit value Get Set the current alarm message Get Set the alarm state true if the last call to CheckAlarm show that the process variable currently in alarm Get Set the alarm symbol color Get Set the alarm text color Get Set the alarm type RT ALARM NONE RT ALARM LOWERTHAN ot RT ALARM GREATERTHAN Get Set the alarm hysteresis value A complete listing of RTAlarm properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory Once an RTAlarm object is added to an RTProcessVar object alarm checking takes place every time the RTProcessVar SetCurrentValue method is called Any displays 102 Process Variable and Alarm Classes dependent on the alarm will not change until the ChartView UpdateDraw method is called forcing a repaint of the view Example of RTAlarm objects added to an RTProcessVar object The example below creates and updates an RTProcessVar object that uses alarm
323. rogram file DynBarsControll method InitializeBar1 The default value for the IndicatorSubType property is RT BAR SOLID SUBTYPE so that does not even need to be set sei 100 100 e ei 8 40 40 4 20 20 0 0 C2 For solid bar indicator ChartAttribute attribl new ChartAttribute Color Black 1 DashStyle Solid Color Green double barwidth 1 0 barbase 0 0 int barjust ChartObj JUSTIFY MIN int barorient ChartObj VERT DIR RTBarIndicator barplot new RTBarIndicator pTransforml processVarl barwidth barbase attribl barjust barorient barplot IndicatorSubType ChartObj RT BAR SOLID SUBTYPE For Pointer indicator ChartAttribute attribl 150 Single Channel Bar Indicator new ChartAttribute Color Black 1 DashStyle Solid Color Green double barwidth 1 0 barbase 0 0 int barjust ChartObj JUSTIFY MIN int barorient ChartObj VERT DIR attribl SymbolSize 22 RTBarIndicator barplot new RTBarIndicator pTransforml processVarl barwidth barbase attribl barjust barorient barplot IndicatorSubType ChartObj RT POINTER SUBTYPE VB Dim attribl As New ChartAttribute Color Black 1 DashStyle Solid Color Green Dim barwidth As Double 1 0 Dim barbase As Double 0 0 Dim barjust As Integer ChartObj JUSTIFY MIN Dim barorient As Integer ChartObj VERT DIR Dim barplot As New RTBarIndicator pTransforml processVarl _ barwidth barbase attribl barjust barori
324. rollmode public RTScrollFrame ChartView component PhysicalCoordinates initialscale int scrollxmode int autoscaleymode The Scroll Frame and Single Channel Scrolling Plots 231 Parameters component This ChartView component the scroll frame is placed in processvar The source process variable initialscale A coordinate system that serves as the initial scale for the scroll frame scrollxmode Specifies x axis auto scale mode of the scroll frame Use one of the x axis scroll frame constants RT NO AUTOSCALE X no auto scale for the x axis use in non scrolling graphs RT AUTOSCALE X CURRENT SCALE auto scale based on current scale use in non scrolling graphs RT AUTOSCALE X MIN autoscale x axis minimum only use in non scrolling graphs RT AUTOSCALE X MAX autoscale x axis maximum only use in non scrolling graphs RT AUTOSCALE X MINMAX autoscale x axis minimum and maximum use in non scrolling graphs RT FIXEDEXTENT MOVINGSTART AUTOSCROLL autoscale the x axis for a fixed range with moving maximum and minimum values use in scrolling graphs RT MAXEXTENT FIXEDSTART AUTOSCROLL autoscale the x axis with the start of the x axis fixed and the end of the x axis moving use in scrolling graphs RT FIXEDNUMPOINT AUTOSCROLL autoscale the x axis for a fixed number of points with moving maximum and minimum values use in scrolling graphs autoscaleymode Specifies y axis auto scale mode of the scroll frame Us
325. roundEnable True meterarcindicator IndicatorBackground _ New ChartAttribute Color Black 1 DashStyle Solid Color FromArgb 60 60 60 Add panel meters chartVu AddChartObject meterarcindicator Extracted from the example program RTGraphNetDemo file SegmentedArcMeterControll cs method InitializeMeter3 197 Meter Indicators Needle Arc and Symbol C RTMeterArcIndicator meterarcindicator new RTMeterArcIndicator meterframe processVar2 meterarcindicator SetChartObjAttributes attribl meterarcindicator InnerValueArcNormalized 0 8 meterarcindicator OuterValueArcNormalized 0 95 meterarcindicator IndicatorSubtype ChartObj RT METER SEGMENTED ARC SUBTYPE meterarcindicator SegmentValueRoundMode ChartObj RT CEILING VALUE meterarcindicator SegmentWidth 7 meterarcindicator SegmentSpacing 10 meterarcindicator IndicatorBackgroundEnable true Add panel meters to meter needle chartVu AddChartObject meterarcindicator VB Dim meterarcindicator As New RTMeterArcIndicator meterframe processVar2 meterarcindicator SetChartObjAttributes attribl meterarcindicator InnerValueArcNormalized 0 8 eterarcindicator OuterValueArcNormalized 0 95 meterarcindicator IndicatorSubtype ChartObj RT METER SEGMENTED ARC SUBTYPE meterarcindicator SegmentValueRoundMode ChartObj RT CEILING VALUE meterarcindicator SegmentWidth 7 meterarcindicator SegmentSpacing 10 meterarcindicator IndicatorBackground
326. rt object A chart object is drawn only if it is enabled A chart object is enabled by default Sets the reference to the PhysicalCoordinates object that the chart object is placed in Get the current process value of the primary channel Set Get the base value in physical coordinates of solid bars and filled areas plot objects Sets the fill color for the chart object Get Set the background attribute of the bar indicator Set to true to enable the display of the bar indicator background Get Set the bar indicator sub type RT BAR SOLID SUBTYPE RT BAR SEGMENTED SUBTYPE RT BAR SINGLE SEGMENT SUBTYPE RT POINTER SUBTYPE Set Get number of digits to the right of the decimal point in the PlotLabelTemplate property Set Get the numeric format of the PlotLabelTemplate property 140 Single Channel Bar Indicator LineColor inherited from GraphObj LineStyle inherited from GraphObj LineWidth inherited from GraphObj NumChannels inherited from RTPlot PlotLabelTemplate inherited from ChartPlot PointerSymbolNum PrimaryChannel inherited from RTPlot RTDataSource inherited from RTSingleValueIndicator SegmentCornerRadius SegmentSpacing SegmentValueRoundMode Sets the line color for the chart object Sets the line style for the chart object Sets the line width for the chart object Only line widths of 1 are supported by Net CF Get the number of channels in the indica
327. rtObj LINEAR SCALE ChartObj LINEAR SCALE pTransform3 AutoScale Dataset3 ChartObj AUTOAXES FAR ChartObj AUTOAXES FAR Zooming 291 Dim pTransform4 As New CartesianCoordinates ChartObj LINEAR SCALE ChartObj LINEAR SCALE pTransform4 AutoScale Dataset4 ChartObj AUTOAXES FAR ChartObj AUTOAXES FAR Dim pTransform5 As New CartesianCoordinates ChartObj LINEAR SCALE ChartObj LINEAR SCALE pTransform5 AutoScale Dataset5 ChartObj AUTOAXES FAR ChartObj AUTOAXES FAR Dim transformArray As CartesianCoordinates pTransforml pTransform2 pTransform3 pTransform4 pTransform5 Dim zoomObj As New ZoomWithStack chartVu transformArray 5 True zoomObj SetButtonMask MouseButtons Left zoomObj SetZzoomYEnable True zoomObj SetZzoomXEnable True zoomObj SetZoomXRoundMode ChartObj AUTOAXES FAR zoomObj SetZoomYRoundMode ChartObj AUTOAXES FAR zoomObj SetEnable True zoomObj SetZoomStackEnable True chartVu SetCurrentMouseListener zoomObj Private Sub zoomOn Button Click ByVal sender As Object ByVal e As System EventArgs Me Timerl Enabled False Change to display of all collected data ScrollFramel ScrollScaleModeX ChartObj RT AUTOSCALE X MINMAX Look at updatecounter number of points which is all of them ScrollFramel MaxDisplayHistory updatecounter Render graph based on new scale Change to display of all collected data ScrollFrame2 ScrollScaleModeX ChartObj RT AUTOSCALE X MINMAX Look at updatec
328. rtObject meterarcindicator VB Dim meterarcindicator As New RTMeterArcIndicator meterframe processVarl meterarcindicator SetChartObjAttributes attribl meterarcindicator IndicatorSubtype ChartObj RT METER ARC BAND SUBTYPE meterarcindicator InnerValueArcNormalized 0 65 meterarcindicator OuterValueArcNormalized 0 85 meterarcindicator IndicatorBackgroundEnable True meterarcindicator IndicatorBackground New Add panel meters chartVu AddChartObject meterarcindicator Extracted from the example program RTGraphNetDemo file ArcMeterControll method InitializeMeter3 195 Meter Indicators Needle Arc and Symbol C RTMeterArcIndicator meterarcindicator new RTMeterArcIndicator meterframe processVar2 meterarcindicator SetChartObjAttributes attribl meterarcindicator InnerValueArcNormalized 0 8 meterarcindicator OuterValueArcNormalized 0 95 meterarcindicator IndicatorSubtype ChartObj RT METER ARC BAND SUBTYPE meterarcindicator IndicatorBackgroundEnable true Add panel meters to meter needle chartVu AddChartObject meterarcindicator VB Dim meterarcindicator As New RTMeterArcIndicator meterframe processVar2 meterarcindicator SetChartObjAttributes attribl meterarcindicator InnerValueArcNormalized 0 8 meterarcindicator OuterValueArcNormalized 0 95 meterarcindicator IndicatorSubtype ChartObj RT METER ARC BAND SUBTYPE meterarcindicator IndicatorBackgrou
329. rue rtAutoBarIndicatorl BarEndBulb barbulb rtAutoBarIndicatorl InteriorAxis interioraxis 328 Miscellaneous Shape Drawing rtAutoBar numeric rtAutoBar rtAutoBar alarm rtAutoBar units rtAutoBar units rtAutoBar title rtAutoBar segmented ChartObj RT BA Cha Chart C hart Chart Chart ndicator ndicator ndicator ndicator ndicator ndicator ndicator NumericPanelMeter ChartObjEnable rtObj OBJECT ENABLE ChartObj OBJECT DISABLE NumericPanelMeter NumericTemplate DecimalPos AlarmPanelMeter ChartObjEnable Obj OBJECT ENABLE ChartObj OBJECT DISABLE UnitsPanelMeter ChartObjEnable Obj OBJECT ENABLE ChartObj OBJECT DISABLE YAxisTitle ChartObjEnable Obj OBJECT ENABLE ChartObj OBJECT DISABLE TagPanelMeter ChartObjEnable Obj OBJECT ENABLE ChartObj OBJECT DISABLE BarPlot IndicatorSubType VB rtAutoBarIndicatorl InitBargraph ChartObj VERT DIR 0 Color OrangeRed rAutoBarIndicatorl InitStrings VERT 40 GMB rtAutoBarIndicatorl LowAlarm AlarmLimitValue 23 rtAutoBarIndicatorl HighAlarm AlarmLimitValue 78 rtAutoBarIndicatorl SetpointAlarm AlarmLimitValue 53 rtAutoBarIndicatorl MinIndicatorValue 0 rtAutoBarIndicatorl MaxIndicatorValue 100 rtAutoBarIndicatorl GraphBackground ChartObjAttributes New ChartAttribute Color LightBlue 5 DashStyle Solid Color LightBlue rtAutoBarIndicatorl FaceplateBackgroun
330. s It does not however generate alarm events that notify user defined alarm handlers The example was extracted from the Treadmill example program method InitializeGraph See the example in the RTAlarmEventArgs section for one that generates alarm events C ChartAttribute defaultattrib new ChartAttribute Color Green 1 0 DashStyle Solid Color Green RTAlarm lowheartratealarm new RTAlarm ChartObj RT ALARM LOWERTHAN 30 lowheartratealarm AlarmMessage Low Heart Rate lowheartratealarm AlarmSymbolColor Color Blue lowheartratealarm AlarmTextColor Color Blue RTAlarm highheartratealarm new RTAlarm ChartObj RT ALARM GREATERTHAN 160 highheartratealarm AlarmMessage High Heart Rate highheartratealarm AlarmSymbolColor Color Red highheartratealarm AlarmTextColor Color Red double heartRateValue 0 0 heartRate new RTProcessVar Heart Rate defaultattrib heartRate MinimumValue 0 heartRate MaximumValue 300 heartRate DefaultMinimumDisplayValue 0 heartRate DefaultMaximumDisplayValue 200 heartRate AddAlarm lowheartratealarm heartRate AddAlarm highheartratealarm heartRate SetCurrentValue heartRateValue heartRateValue 60 0 runnersPaceValue 10 0 treadmillElevationValue 3 0 heartRate SetCurrentValue heartRateValue VB Process Variable and Alarm Classes 103 Dim defaultattrib As New ChartAttribute Color Green 1 0 DashStyle Solid Color Green Dim
331. s inherited ChartAttribute object Sets the fill color for the chart object FillColor inherited from GraphObj Set Get the Rectangle2D object used to define the FrameRect position and size of the 3D frame Set Get the apparent direction of the light source LightMode used to highlight the 3D frame Use one of the direction constants LIGHT UPPER LEFT LIGHT UPPER RIGHT LIGHT LOWER LEFT LIGHT LOWER RIGHT LIGHT STRAIGHT ON LIGHT NONE OUTSET 3D LOOK INSET 3D LOOK Sets the line color for the chart object LineColor inherited from GraphObj Sets the line style for the chart object LineStyle inherited from GraphObj Sets the line width for the chart object Only line Line Width inherited from widths of 1 are supported by Net CF GraphObj Get Sets the current position type PositionType inherited from GraphObj Miscellaneous Shape Drawing 297 A complete listing of RT3DFrame properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory Example for drawing RT3DFrame objects The example below extracted from the HomeAutomation example file ThermostatControll draws an RT3DFrame object the size of the entire control area Since each separate control in the example has a similar RT3DFrame background it provides a visual grouping of the objects in each control C private void InitializeBackgroundPanel ChartView chartVu this Font theFo
332. s RTProcessVar Overloads Public Sub New ByVal plottemplate As SimplePlot _ ByVal datasource As RTProcessVar _ C public RTSimpleSingleValuePlot PhysicalCoordinates transform SimplePlot plottemplate RTProcessVar datasource public RTSimpleSingleValuePlot SimplePlot plottemplate RTProcessVar datasource Parameters transform The coordinate system for the new RTSimpleSingleValuePlot object plottemplate This SimplePlot object is used as a template for the scrolling plot object datasource The source process variable 238 The Scroll Frame and Single Channel Scrolling Plots Selected Public Instance Properties Get Set The end of plot marker type Use one of the EndOfPlotLineMarker Marker marker type constants MARKER NULL MARKER VLINE MARKER HLINE MARKER HVLINE Get Set the simple plot template PlotTemplate A complete listing of RTSimpleSingleValuePlot properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory Example for a simple single channel scrolling line plot The example below extracted from the HomeAutomation example file SolarPanelControll method InitializeScrollGraph creates a single channel scrolling graph Note Both the RTScrollFrame and the RTSimpleSingleValuePlot objects are added to the ChartView When the ChartView UpdateDraw method is called the RTScrollFrame object in the ChartView object list causes t
333. s and group bar plots 1997 Prozac QCChart2D CF Class Summary 73 1999 200i 2003 zoloft Paxil Celexa Group and the Stacked bars represent two different ways of displaying the same data GroupBarPlot StackedBarPlot GroupVeraPlot This class is a concrete implementation of the GroupPlot class and displays group data in a group bar format Individual bars the height of which corresponds to the group y values of the dataset display side by side as a group justified with respect to the x position value for each group The group bars share a common base value This class is a concrete implementation of the GroupPlot class and displays data as stacked bars In a stacked bar plot each group is stacked on top of one another each group bar a cumulative sum of the related group items before it The GroupVersaPlot is a plot type that can be any of the eight group plot types GROUPBAR STACKEDBAR CANDLESTICK OHLC MULTILINE STACKEDLINE FLOATINGBAR and FLOATING STACKED BAR Use it when you want to be able to change from one plot type to another without deleting the instance of the old plot object and creating an instance of the new 74 QCChart2D CF Class Summary Video Game Usage by Age Group 100 40 Age Group The height and width of the bars in a Histogram plot carries information HistogramPlot This class is a concrete implementation of the GroupPlot class and displays histogram plots A histogram plot
334. s as defined by the data in a group dataset The position size and rotation of each arrow in the collection is independently controlled Bubble Size en 40 Million Time of bankruptcy The size radius or area of the bubble adds an additional dimension to the graph QCChart2D CF Class Summary 69 BubblePlot This class is a concrete implementation of the GroupPlot class and displays bubble plots The values in the dataset specify the position and size of each bubble in a bubble chart Box and Whisker Plots are used in Descriptive Statistics New York Houston San Francisco Boston Pittsburgh BoxWhiskerPlot This class is a concrete implementation of the GroupPlot class and displays box and whisker plots The BoxWhiskerPlot class graphically depicts groups of numerical data through their five number summaries the smallest observation lower quartile Q1 median Q2 upper quartile Q3 and largest observation 70 QCChart2D CF Class Summary Candlestick Plots in Technical Analysis E ll il LUTTE LI sen rrr The Open Close CandlestickPlot 5 02 05 box is filled if the open price is greater than the close price This class is a concrete implementation of the GroupPlot class and displays stock market data in an open high low close format common in financial technical analysis QCChart2D CF Class Summary 71 Cell Plot of Population Density
335. s in an RTFormControlGtrid they will all end up with the same number of digits to the right of the decimal since one template applies to all of the track bars If the dynamic range of the track bars different enough to require unique decimal precision settings separate them into different grids El 2 O EEG E EG GE M SC See the method InitializePIDParameterTrackbars in the RTPIDControlTuner examplefor the Source to this example Form Control Panel Meter This panel meter class encapsulates Form Control objects including our own RTControlButton and RTControlTrackBar objects in a panel meter class so that controls can be added to indicator objects Class RTFormControlPanelMeter Buttons Track Bars and Other Form Control Classes 261 RTPanelMeter RTFormControlPanelMeter Visual Basic Overloads Public Sub New ByVal transform As PhysicalCoordinates ByVal datasource As RTProcessVar _ ByVal formcontrol As Control ByVal attrib As ChartAttribute Overloads Public Sub New ByVal transform As PhysicalCoordinates ByVal formcontrol As Control ByVal attrib As ChartAttribute Ct public RTFormControlPanelMeter PhysicalCoordinates transform RTProcessVar datasource Control formcontrol ChartAttribute attrib public RTFormControlPanelMeter PhysicalCoordinates transform Control formcontrol ChartAttribute attrib Parameters transform The coordinate system for th
336. sable the RTScrollFrame updates using the 282 Zooming RTScrollFrame ChartObjEnable method set it to ChartObj OBJECT DISABLE When you want to start scrolling again set it to ChartObj OBJECT_ENABLE Simple Zooming of a single channel scroll frame Class ChartZoom GraphObj ChartZoom The ChartZoom class implements Net delegates for mouse events It implements and uses the mouse events OnMouseMove OnDoubleClick OnMouseDown OnMouseUp and OnClick The default operation of the ChartZoom class starts the zoom operation on the OnMouseDown event it draws the zoom rectangle using the XOR drawing mode during the OnMouseMove event and terminates the zoom operation on the mouse released event During the mouse released event the zoom rectangle is converted from device units into the chart physical coordinates and this information is stored and optionally used to rescale the chart scale and all axis objects that reference the chart scale If four axis objects reference a single chart scale for example when axes bound a chart on all for sides all four axes re scale to match the new chart scale In real time applications do not update the screen with the ChartView UpdateDraw method from another thread while in the middle of a zoom 1 e while the XOR zoom rectangle is on the screen This messes up the XOR drawing of the zoom rectangle because the UpdateDraw method will overwrite and erase any previously drawn portion of the zoom rect
337. scale 53 54 Logarithmic auto scaling 56 Logarithmic axis 57 60 64 85 LogAutoScale 56 LogAxis 57 60 64 85 LogScale 53 54 MagniView 1 87 88 89 Marker 87 88 232 238 242 Markers 87 88 232 238 242 Meters 11 19 20 42 45 317 340 343 345 353 Meters Clocks and Dials vi 18 19 22 24 27 28 29 34 35 36 37 93 109 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 186 187 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 207 208 209 210 211 212 213 214 215 216 340 347 350 351 353 MouseListener 87 88 89 MouseListeners 87 88 89 MoveCoordinates 87 88 89 MoveData 87 88 MoveObj 87 88 Moving chart data 87 88 Moving graph objects 87 88 Multi line plots 32 67 76 241 243 244 MultiLinePlot 32 67 76 241 243 244 Nearest point class 89 90 NearestPointData 89 90 Numeric axis labels 19 35 63 64 157 159 162 165 179 Numeric labels 22 86 111 115 116 140 Numeric Panel Meters 18 21 22 30 109 115 116 117 118 119 121 122 125 126 134 136 141 143 145 155 157 159 201 219 220 225 226 257 258 259 260 321 333 342 349 356 365 NumericAxisLabels 19 35 63 64 157 159 162 165 179 NumericLabel 22 86 111 115 116 140 OHLCPlot 67 76 241 245 Open High Low Close plots 67 76 241 245 Panel meters 11 19 20 317 Panel Meters 16 18
338. ses to establish proper tick mark spacing values The chart object classes includes all objects placeable in a chart That includes axes axes labels plot objects line plots bar graphs scatter plots etc grids titles backgrounds images and arbitrary shapes These classes directly and indirectly System EventHandler delegates that trap mouse events and permit the user to create and move data cursors move plot objects display tooltips and select data points in all types of graphs File and printer rendering Not supported under Net Compact Framework 16 Class Architecture Miscellaneous utility classes Other classes use these for data storage file I O and data processing For each of these categories see the associated description in the QCChart2D CF manual The QCRTGraph CF classes are in addition to the ones above They are summarized below QCRTGraph CF Class Summary Process Variable and Alarms Single Value Indicators Multiple Value Indicators Alarm Indicators Panel Meter Classes Real time data is stored in RTProcessVar classes The RTProcessVar class is designed to represent a single process variable complete with limit values an unlimited number of high and low alarms historical data storage and descriptive strings for use in displays A single value indicator is a real time display object that is attached to a single RTProcessVar object This includes single channel bar indicators which includ
339. source The process variable associated with the panel meter attrib The color attributes of the panel meter indicator Selected Public Instance Properties Panel Meter Classes 121 Get Set the string template defining the panel meter alarm AlarmTemplate string format The text properties associated with the panel meter are set using this property A complete listing of RTAlarmPanelMeter properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory Example of RTAlarmPanelMeter used with RTBarIndicator The panel meter below extracted from the HybridCar example method InitializeBatteryChargeGraph adds an RTAlarmPanelMeter underneath the numeric panel meter Note The RTAlarmPanelMeter uses the BELOW REFERENCED TEXT positioning constant and sets the RTAlarmPanelMeter SetPositionReference to the numeric panel meter C RTBarIndicator barplot new RTBarIndicator pTransforml batteryCharge barwidth barbase attribl barjust barorient ChartAttribute panelmeterattrib new ChartAttribute Color SteelBlue 0 DashStyle Solid Color Black ChartAttribute paneltagmeterattrib new ChartAttribute Color SteelBlue 0 DashStyle Solid Color White RTNumericPanelMeter panelmeter 122 Panel Meter Classes new RTNumericPanelMeter pTransforml panelmeterattrib panelmeter PanelMeterPosition ChartObj OUTSIDE PLOTAREA MIN panelmeter TextColor Color SpringG
340. ss Summary TimeAxisLabels ElapsedTimeAxisLabels Axis labels inform the user of the x and y scales used in the chart The labels center on the major tick marks of the associated axis Axis labels are usually numbers times dates or arbitrary strings Axis Labels Possible date labels Possible time labels Possible numeric labels for todays date for the current time for the value 12340 April 04 2005 6 15 30 24 Hour Mode 12340 0 Decimal 2005 6 15 24 Hour Made 1 2340E 004 Scientific 4 2005 15 30 Minute Second 12 340K Business 404 2005 6 15 30 12 Hour Modes 123400096 Percent CH 6 15 12 Haur Made 1 2340x10 Exponent ee 12 340 Currency 4 05 Cadillac 4 04 05 i ue Es Steak knives Multi line axis April Your fired labels are supported Apr A ace a i i Monday Western Eastern Southern Northern Mon Sales Sales Sales Sales M Region Region Region Region AxisLabels This class is the abstract base class for all axis label objects It places numeric labels date time labels or arbitrary text labels at the major tick marks of the associated axis object In addition to the standard font options type size style color etc NumericAxisLabels This class labels the major tick marks of the LinearAxis and LogAxis classes The class supports many predefined and user definable formats including numeric exponent percentage business and currency formats StringAxisLabels This class labels the major tick mar
341. st of controls e Click on the ChartView control in the Toolbox and drop in on the default form 72 ScrollApplication11 Microsoft Visual Studio File Edit View Project Build Debug Data Tools Window Community Help a a Guid A 4 Gi E P Debug gt Any CPU QCRTGraph CF Tutorial 393 DER H ScrollApplication3 E pl AGRA Windows Mobile 5 0 Pocket PC Emulat a A CG ZA ee 7 e HN For A LinkLabel ListBox 33 ListView MainMenu 1 MessageQueue ES MonthCalendar Notification 3 NumericUpDown 7 OpenFileDialog Panel a PictureBox ProgressBar RadioButton E SaveFileDialog 9 SerialPort gt Splitter Le StatusBar C TabControl sbi TextBox Timer 38 ToolBar H TrackBar 7 Treeview vscrollbar E WebBrowser SE chartview i Common Device Controls kk Pointer ab Button w CheckBox ES ComboBox Find Results 1 mi cs Design Start Page O N com quinncurtis chart2dnetcF ChartView 3 mainMenut By Error List Eg Find Results 1 H dai n Solution Explorer ScrollAp nx t d gl SA od Solution Scroll pplication11 1 proj E sj Properties E 0 References C3 mscorlib 3 QCChart2DNetCF C3 QCRTGraphNetCF 3 System 3 System Data DD System Drawing 3 System Windows Form C3 System Xml 2 E Formi cs 9 Formi Designer cs Form resx Program cs i y di Properties wi x ScrollApplication11 Proj
342. stant Next i Sub CalculatePIDValues Dim rMeas As Double 0 0 Dim rSetpoint As Double 0 0 Dim rOutput As Double 0 0 Dim i As Integer For i 0 To 7 Not calculating the PID value will prevent integral errors from continuing to be added to error sum simulate measurement rOutput ControlOutputs i CurrentValue rMeas ProcessModel i rOutput PIDProcessItems i SetCurrentValue rMeas If autoModeEnable i Then rSetpoint ControlSetpoints i CurrentValue rOutput PIDControlLoops i RTCalcPID rMeas rSetpoint ControlOutputs i SetCurrentValue rOutput End If Next i outputControlTrackBar RTValue _ controlOutputs currentTuningChannel CurrentValue End Sub CalculatePIDValues 16 Zooming Real Time Data ChartZoom Zooming is the interactive re scaling of a charts physical coordinate system and the related axes based on limits defined by clicking and dragging a mouse inside the current graph window A typical use of zooming is in applications where the initial chart displays a large number of data points The user interacts with the chart defining smaller and smaller zoom rectangles zeroing in on the region of interest The final chart displays axis limits that have a very small range compared to the range of the original un zoomed chart The ChartZoom class found in the QCChart2D CF software is used for zooming of RTProcessVar historical data The features of this class include e Automatic recalcul
343. state condition Delegate for notification each time the AlarmTransitionEventHandler check of a process variable produces a change of state in alarm state condition A complete listing of RTProcessVar properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory Example of Creating an RTProcessVar Object The example below creates and updates an RTProcessVar object that does not use alarms The example was extracted from the Treadmill example program method InitializeGraph See the example in the RTAlarm section of the manual for one that uses alarms C ChartAttribute defaultattrib new ChartAttribute Color Green 1 0 DashStyle Solid Color Green double METSValue 0 METS new RTProcessVar METS defaultattrib METS ShortDescription Metabolic Equivalents METS MinimumValue 0 METS MaximumValue 100 METS DatasetEnableUpdate true Make sure this is on for scrolling graphs METSValue Math Max 0 heartRateValue 60 60 0 METS SetCurrentValue METSValue VB Dim defaultattrib As New ChartAttribute Color Green 1 0 DashStyle Solid Color Green METSValue 0 METS New RTProcessVar METS defaultattrib METS ShortDescription Metabolic Equivalents METS MinimumValue 0 METS MaximumValue 100 METS DefaultMinimumDisplayValue 0 Process Variable and Alarm Classes 99 METS DefaultMaximumDisplayValue 100 METS Datase
344. stions FAQs First read the FAQ s section of the QCChart2D CF manual All of the FAQs for that software will apply to the QCRTGraph CF software 1 Is the QCRTGraph CF for the Net Compact Framework software compatible with the QCRTGraph for Net software Yes assuming you do not use any of the features that are not supported in QCRTGraph CF such as rotated text printer output and output of image files INDEX 3D Points 89 90 Alarm Panel Meters 18 21 23 30 109 120 121 122 123 141 143 145 155 157 160 219 220 225 227 320 331 341 348 355 364 Alarms 18 20 21 34 35 49 93 96 98 99 100 101 102 103 104 105 106 107 141 143 144 155 157 159 320 321 331 332 333 341 342 348 349 355 356 364 365 366 Annunciators 18 22 24 26 109 217 218 219 220 AntennaAnnotation 78 79 AntennaAxes 57 63 65 AntennaAxesLabels 63 65 AntennaCoordinates 54 55 AntennaGrid 85 AntennaLineMarkerPlot 78 79 AntennaLinePlot 78 79 AntennaPlot 65 78 79 AntennaScatterPlot 78 79 Arrow plots 67 68 ArrowPlot 67 68 AutoScale 56 290 291 Auto scaling classes 56 290 291 Axis v vi 17 35 57 58 63 64 86 169 174 175 179 184 Axis label classes 63 64 86 175 179 180 262 Axis titles 86 AxisLabels 63 64 175 179 180 AxisTitle 86 Background v vi 6 57 156 158 162 164 214 215 218 219 225 226 295 Backgrounds v vi 6 57 156
345. sual Basic ijelEmpty Project 1 0 Windows A Smart Device My Templates Pocket PC 2003 a p A XS Smartphone 2003 FE Search Online Templates Windows CE 5 0 Windows Mobile 5 0 Starter Kits Ateh hs gt lt A project For creating a NET Compact Framework 2 0 Forms application For Windows Mobile 5 0 Pocket PC and later Mame Scrollapplicationi 1 Location C Quinn Curtis DotNeti OCRTGraphivisual Basic CF examples 2005 v Solution Create new Solution v Create directory for solution Solution Name ScrollApplication1 1 The previous steps apply to all Net Compact Framework applications The following steps are specific to adding QCRTGraph CF charts to your application For purposes of this example the chart will placed in the initial default form QCRTGraph CF Tutorial 385 Using ChartView with the Visual Studio Design Mode e Add the ChartView control to the Toolbox If it isn t there already add the ChartView UserControl to the Visual Studio Toolbox To add the ChartView control to the VS Toolbox right click on the Toolbox and select Choose Items From the Choose Toolbox Items dialog use the Browse button and go to the Quinn Curtis DotNet Lib folder and select QCChart2DNetCF DLL OK out of the Choose Toolbox Items dialog You will now see a ChartView control in the tool box list of controls e Click on the ChartView control in the Toolbox and drop in on the default form 72 ScrollApplication
346. t startarcscale endarcscale arcdirection centerx centery arcradius meterframe SetGraphBorderDiagonal 0 025 0 25 0 175 0 6 RTMeterNeedleIndicator meterneedle new RTMeterNeedleIndicator meterframe fuel meterneedle SetChartObjAttributes attribl meterneedle NeedleLength 0 8 chartVu AddChartObject meterneedle RTMeterAxis meteraxis new RTMeterAxis meterframe meterneedle meteraxis SetChartObjAttributes attribl 186 Meters Coordinates Meter Axes and Meter Axis Labels meteraxis SetAxisTickDir ChartObj AXIS MIN meteraxis LineWidth Li meteraxis LineColor Color White meteraxis SetAxisTickSpace 4 meteraxis SetAxisMinorTicksPerMajor 4 meteraxis ShowAlarms true meterneedle MeterAxis meteraxis chartVu AddChartObject meteraxis Font meterFont fontl0Bold RTMeterStringAxisLabels meteraxislabels new RTMeterStringAxisLabels meteraxis meteraxislabels SetTextFont meterFont meteraxislabels SetAxisLabelsDir meteraxis GetAxisTickDir String labelstrings E 1 2 F meteraxislabels OverlapLabelMode ChartObj OVERLAP LABEL DRAW meteraxislabels AxisLabelsEnds ChartObj LABEL MAX meteraxislabels SetAxisLabelsStrings labelstrings 3 meteraxislabels LineColor Color White chartVu AddChartObject meteraxislabels VB Dim chartVu As ChartView Me Dim attribl As New ChartAttribute Color Black 1 DashStyle Solid Color Blue Dim startarcangle As Double
347. t AddPanelMeter panelmeter3 144 Single Channel Bar Indicator chartVu AddChartObject barplot VB Dim chartVu As ChartView Me Dim pTransforml As New CartesianCoordinates 0 0 engineRPM DefaultMinimumDisplayValue 1 0 engineRPM DefaultMaximumDisplayValue pTransforml SetGraphBorderDiagonal 0 75 0 1 0 81 0 325 Dim attribl As New ChartAttribute Color Green 0 DashStyle Solid Color Green Dim barwidth As Double 1 0 Dim barbase As Double 0 0 Dim barjust As Integer ChartObj JUSTIFY MIN Dim barorient As Integer ChartObj VERT DIR Dim baraxis As New LinearAxis pTransforml ChartObj Y AXIS baraxis AxisTickDir ChartObj AXIS MIN baraxis AxisIntercept 1 4 baraxis AxisTickSpace 100 baraxis AxisMinorTicksPerMajor 10 baraxis ChartObjEnable ChartObj OBJECT ENABLE NODRAW chartVu AddChartObject baraxis Dim barplot As New RTBarIndicator pTransforml engineRPM barwidth barbase attribl barjust barorient barplot SegmentSpacing 600 barplot SegmentWidth 420 barplot IndicatorBackground New ChartAttribute Color Black 0 DashStyle Solid Color Black barplot SegmentValueRoundMode ChartObj RT CEILING VALUE barplot SegmentCornerRadius 0 barplot IndicatorSubType ChartObj RT BAR SEGMENTED SUBTYPE Dim baralarms As New RTAlarmIndicator baraxis barplot chartVu AddChartObject baralarms Dim panelmeterattrib As New ChartAttribute Color SteelBlue 0 DashStyle Solid Color Bl
348. t equal to K 10 The gain term K determines how much the control output should change in response to a given error level If the error is 10 a K gain of 0 5 will add 5 to the output of the controller while a gain of 3 will add 30 to the output of the controller The larger the value of K the harder the system reacts to differences between the setpoint and the actual temperature A PID controller can be used as a simple proportional controller by setting the reset rate and derivative time values to 0 0 Simple proportional control cannot take into account load changes in the process under control An example of a load for a temperature control loop is the ambient temperature of the room the process is in The lower the ambient temperature of the room the larger is the heat loss in the room It will take more energy to maintain the vat at a given temperature in a cold room than in a warm room A simple proportional controller cannot account for load changes which take place while the system is under control Integral control converts the first order proportional controller into a second order system which is capable of tracking process disturbances It adds to the controller output a term that corrects for any changes in the load level of the system under control This integral term is proportional to the sum of all previous process errors in the system As long as there is a process error the integral term will add more and more to the controller o
349. t label position constants INSIDE BAR OUTSIDE BAR or CENTERED BAR Set Get the justification of bars in bar graph plot objects Use one of the bar justification constants JUSTIFY MIN JUSTIFY CENTER or JUSTIFY MAX Set Get the bar offset from its fixed x or y value in physical units Set Get the orientation HORIZ DIR or VERT DIR for bar plots Set Get the spacing between adjacent items in multi channel plots BarWidth inherited from ChartPlot ChartObjAttributes inherited from GraphObj ChartObjClippin inherited from GraphObj ChartObjComponent inherited from GraphObj ChartObjEnable inherited from GraphObj ChartObjScale inherited from GraphObj CurrentProcessValue inherited from RTSingleValueIndicator FillBaseValue inherited from ChartPlot FillColor inherited from GraphObj IndicatorBackground IndicatorBackgroundEnable IndicatorSubType LabelTemplateDecimalPos inherited from ChartPlot LabelTemplateNumericForma t inherited from ChartPlot Single Channel Bar Indicator 139 Set Get the width of bars in physical coordinates for bar plots Sets the attributes for a chart object using a ChartAttribute object Sets the object clipping mode Use one of the object clipping constants NO_CLIPPING GRAPH AREA CLIPPING PLOT AREA CLIPPING or INHERIT CLIPPING Sets the reference to the ChartView component that the chart object is placed in Enables Disables the cha
350. tECGScrollFrame ScrollScaleModeX _ ChartObj RT FIXEDEXTENT MOVINGSTART AUTOSCROLL fetalHeartECGScrollFrame ChartObjEnable ChartObj OBJECT ENABLE Render graph Me UpdateDraw Timerl Enabled True End Sub zoomRestore Button Click Zooming 287 Super Zooming of multiple physical coordinate systems The ChartZoom class also supports the zooming of multiple physical coordinate systems super zooming During the mouse released event the zoom rectangle is converted from device units into the physical coordinates of each scale and this information is used to re scale each coordinate system and the axis objects associated with them Use the constructor below in order to super zoom a chart that has multiple coordinate systems and axes ChartZoom constructor Visual Basic Overloads Public Sub New ByVal component As ChartView _ ByVal transforms As PhysicalCoordinates ByVal brescale As Boolean _ C public ChartZoom ChartView component PhysicalCoordinates transforms bool brescale component A reference to the ChartView object that the chart is placed in transforms An array size numtransforms of the PhysicalCoordinates objects associated with the zoom operation brescale True designates that the all of the scales should be re scaled once the final zoom rectangle is ascertained Call the ChartZoom SetEnable true method to enable the zoom object Restrict zooming in the
351. tEnableUpdate True Make sure this is on for scrolling graphs METSValue Math Max 0 heartRateValue 60 60 0 METS SetCurrentValue METSValue Real Time Alarms Class RTAlarm ChartObj RTAlarm The RTAlarm class stores alarm information for the RTProcessVar class The RTAlarm class specifies the type of the alarm the alarm color alarm text messages and alarm hysteresis value The RTProcessVar classes can hold an unlimited number of RTAlarm objects in an internal ArrayList RTProcessVar constructors Visual Basic Overloads Public Sub New _ ByVal processvar As RTProcessVar _ ByVal alarmtype As Integer _ Overloads Public Sub New _ ByVal alarmtype As Integer _ ByVal alarmlimitvalue As Double Overloads Public Sub New _ ByVal processvar As RTProcessVar _ ByVal alarmtype As Integer _ ByVal alarmlimitvalue As Double _ Overloads Public Sub New _ ByVal processvar As RTProcessVar _ ByVal alarmtype As Integer _ ByVal alarmlimitvalue As Double _ ByVal normalmessage As String _ 100 Process Variable and Alarm Classes ByVal alarmmessage As String _ Visual Basic ByVal processvar As RTProcessVar _ ByVal alarmtype As Integer _ ByVal alarmlimitvalue As Double _ ByVal normalmessage As String _ ByVal alarmmessage As String _ ByVal hysteresisvalue As Double _ Ct public RTAlarm RTProcessVar processvar int alarmtype public RTAlarm
352. tText 48 49 85 86 180 181 ChartTitle 85 86 ChartView 4 5 14 17 19 20 21 37 40 41 42 43 44 45 46 47 52 57 88 89 102 109 117 118 128 129 131 132 134 135 139 141 142 144 153 155 156 158 161 164 176 177 178 181 182 185 186 191 210 212 214 215 218 219 222 223 225 226 229 230 231 233 234 238 247 249 251 252 254 258 259 263 264 268 269 282 283 284 285 287 288 290 297 300 304 307 308 309 310 311 312 313 317 321 408 Index 329 333 340 342 347 349 353 356 358 359 365 366 372 383 385 386 387 388 389 390 392 393 394 395 396 397 398 399 clocks 11 19 20 42 46 317 353 356 357 Comma separated values 89 90 Contour plotting 52 53 ContourDataset 52 53 CSV 89 90 Data cursors 87 88 DataCursor 87 88 Dataset 14 52 65 66 93 94 Dataset classes 14 52 65 66 93 94 DatasetViewer 1 4 307 308 309 310 312 DataToolTip 87 88 Dials 11 19 20 42 46 317 347 350 352 Dimension 3 89 90 134 136 258 259 263 264 286 292 293 Elapsed Time scale 18 21 24 109 130 131 132 ElapsedTimeAutoScale 1 2 56 ElapsedTimeAxis 1 2 57 61 65 ElapsedTimeA xisLabels 1 2 64 65 ElapsedTimeGroupDataset 1 52 53 57 ElapsedTimeLabel 1 24 86 130 131 ElapsedTimeScale 1 2 53 54 ElapsedTimeSimpleDataset 1 52 53 57 Error bar plots 67 71 ErrorBarPlot 67 71 F
353. te value 100 to the third shortest of the three needles Electric Meter Format 72 dispalys a three needle dial with a scale range of 0 to 100 with a tag string at the top of the windows and a numeric panel meter above the needle pivot point The internal RTComboProcess Var object assigns the update value to the first longest of the three meter needles the update value 100 to the second middle of the three needles and the update value 10000 to the third shortest of the three needles 352 Miscellaneous Shape Drawing Example for initializing RTAutoDialIndicator objects The example below extracted from the AutoGraphDemos AutoDialsAndClockIndicators example draws each of the 3 different dial formats C public void InitializeGraph this rtAutoDialIndicatorl GraphFormat 0 this rtAutoDialIndicatorl GraphBackground FillColor Color White this rtAutoDialiIndicatoril InvertColors this rtAutoDialIndicatorl InitStrings Altimeter Feet this rtAutoDialIndicator2 GraphFormat 1 this rtAutoDialIndicator2 GraphBackground FillColor Color White this rtAutoDialIndicator2 InitStrings Odometer Miles this rtAutoDialIndicator3 GraphFormat 2 this rtAutoDialIndicator3 InitStrings Electric Meter KW Hr VB Public Sub InitializeGraph Me rtAutoClockIndicatorl GraphFormat 0 Me rtAutoClockIndicatorl GraphBackground FillColor Color White Me rtAutoClockIndicatorl
354. ted ChartAttribute object from GraphObj ChartObjScale inherited from that the chart object is placed in GraphObj Set Get the column headers Set Get the row headers Set Get the string template HeadersTemplate Set Get to true if you want radio button click and InternalAction scroll bar value changed events processed to update colors of buttons and numeric values of scroll bars NumberColumns NumberRows Get the number of channels in the indicator RTPlot n PanelMeterList inherited from RTPlot Get Sets the current position type PositionType inherited from Buttons Track Bars and Other Form Control Classes 267 GraphObj Get Set the extra space between columns of the grid RadioButtonChecked specified in normalized NORM PLOT POS coordinates Set Get the row headers RowHeaders Get Set the array list holding the RTProcessVar RTDataSource inherited from variables for the indicator RTMultiV alueIndicator A complete listing of RTFormControlGrid properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory Example for RTFormControlGrid encapsulation RTControlButton objects The example below extracted from the MiniScope example creates an RTFormControlGrid using a collection of RTControlButtons C ArrayList rangeSelectorButtons new ArrayList public void InitializeRangeSelectorButtons String selectorstri
355. teger 7 Dim controlgrid As New RTFormControlGrid pTransforml Nothing rangeSelectorButtons numColumns numRows colStrings rowStrings attribl controlgrid CellRowMargin 0 05 controlgrid CellColumnMargin 0 1 controlgrid FormControlTemplate Frame3DEnable True controlgrid HeadersTemplate LineColor Color Black controlgrid HeadersTemplate TextFont font14Bold chartVu AddChartObject controlgrid 270 Buttons Track Bars and Other Form Control Classes End Sub InitializeRangeSelectorButtons 15 PID Control Theory Proportional Integral Derivative PID control algorithm is used to drive the process variable measurement to the preset value setpoint Temperature control is the most common form of closed loop control For example in a simple temperature control system the temperature of a vat of material is to be maintained at a given setpoint s t The output of the controller sets the valve of the actuator to apply less heat to the vat if the current temperature of the vat is greater than the setpoint and more heat to the vat if the current temperature is less than the setpoint The PID algorithm calculates its output by summing three terms One term is proportional to the error error is defined as the setpoint minus the current measured value The second term is proportional to the integral of the error over time and the third term is proportional to the rate of change first derivative of the error The general fo
356. teger _ ByVal barorient As Integer _ C public RTBarIndicator PhysicalCoordinates transform RTProcessVar datasource double barwidth 138 Single Channel Bar Indicator double barbase ChartAttribute attrib int barjust int barorient Parameters transform The coordinate system for the new RTBarIndicator object datasource The process variable associated with the bar indicator barwidth The width of the bar in physical units barbase The base of the bar in physical units attrib The color attributes of the bar indicator barjust The justification of bars Use one of the bar justification constants JUSTIFY MIN JUSTIFY CENTER JUSTIFY MAX barorient The orientation of the bar indicator HORIZ DIR or VERT DIR Selected Public Instance Properties AlarmIndicatorColorMode inherited from RTSingleValueIndicator BarDatapointLabelPosition inherited from ChartPlot BarJust inherited from ChartPlot BarOffset BarOrient inherited from ChartPlot BarSpacing inherited from RTPlot Get Set whether the color of the indicator objects changes on an alarm Use one of the constants RT INDICATOR COLOR NO ALARM CHANGE RT INDICATOR COLOR CHANGE ON ALARM Bar plots that support the display of data point values have the option of displaying the data point s numeric values above the bar below the bar or centered in the bar Use one of the data poin
357. terAxis RTMeterAxisLabels RTMeterStringAxisLabels RTMeterIndicator RTMeterArcIndicator RTMeterNeedleIndicator and RTMeterSymbolIndicator For the purposes of this discussion a dial and a clock is a meter that has an arc extent of 360 degrees i e a full circle Also the current value of the dial or clock is characterized by a single value In the case of a clock it is a date time value and in the case of a dial it is a simple numeric value While they are characterized by a single value dials and clocks have multiple meter indicators representing that value using varying degrees of precision Everyone is familiar with the hour minute and second hands of clocks so we don t need to describe that further As for a dial the aircraft altimeter gauge is a perfect example It has a small hand representing thousands of feet and a large hand representing hundreds Clocks and dials must be able to take a single value either time or some floating point value and translate that information into two or more meter indicator values In the case of a clock the current time must be converted into values for the hour minute and second hands The class responsible for this conversion is the RTComboProcessVar class It converts a single RTProcessVar value into multiple RTProcessVar objects one representing the current value of each indicator of the clock or dial Converting Dial and Clock Data using RTComboProcessVar Class RTComboProcessVar RTProcessVar
358. the alarm A complete listing of RTAlarmEventArgs properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory Process Variable and Alarm Classes 105 Example C Setup and enable an alarm transition event handler in the following manner heartRate AlarmTransitionEventEnable true heartRate AlarmTransitionEventHandler new RTAlarmEventDelegate this heartRate HighAlarm where the handler method is this heartRate HighAlarm Setup and enable an alarm state event handler in an identical manner heartRate AlarmStateEventEnable true heartRate AlarmStateEventHandler new RTAlarmEventDelegate this heartRate HighAlarm where the handler method is this heartRate HighAlarm private void heartRate HighAlarm object sender RTAlarmEventArgs e Example of RTProcessVar RTAlarm and Alarm Event Handlers The example below creates and updates an RTProcessVar object that uses alarms and a user defined alarm event handler The example was extracted from the Treadmill example program method InitializeGraph See the example in the RTAlarmEventArgs section for one that generates alarm events C ChartAttribute defaultattrib new ChartAttribute Color Green 1 0 DashStyle Solid Color Green RTAlarm lowheartratealarm new RTAlarm ChartObj RT ALARM LOWERTHAN 30 lowheartratealarm AlarmMessage Low Heart Rate lowheartratealarm AlarmSymbolColor Color Blu
359. the derivative term can result in much faster process response Computer based versions of the PID algorithm are based on sampled data discrete time control theory The discrete time equivalent of the PID equation is Eqn 2 PID Control 273 m i Ke e T Ki La ka T e i e i 1 where T 7 sampling interval e i error at ith sampling interval S t X t e i 1 error at previous sampling interval m i controller output deviation Ke proportional gain Ki integral action time Ka derivative action time The proportional term is the same between the Eqn 1 and Eqn 2 The integral term of the first equation is replaced by a summation term and the derivative term is replaced by the a first order difference approximation In actual practice the first order difference term ei 1 Is very susceptible to noise problems In most practical systems this term is replaced by the more stable higher order equation Ae e i 3 e i 1 3 e i 2 e i 3 6 A common problem in discrete control systems arises from the summation of the error term for the integral action of the control equation If a process maintains an error for a long period of time it is possible that this summation can build to a very large numerical value Even though the error term returns to zero or moves in the opposite direction it will take a very long time to reduce the sum below the D A saturation levels Practical systems stop
360. the numeric value sits on top of the bulb Example for initializing RTAutoBarIndicator objects The example below extracted from the AutoGraphDemos AutoBarIndicators1 example draws four vertical and four horizontal bargraphs Miscellaneous Shape Drawing 327 EB Form1 Auto Scroll Graph Auto Bar Indicators Auto Needle Meters Auto Multi bar Indicators Auto Dials and Clocks Auto Panel Meters Mixed Bar end bulb Interior Axis Numeric readout Alarm readout v Units string Tag string Segmented s TT en 0 20 40 60 80 100 GMB Below you will find the code used to initialize the first of the bargraphs above extracted from the AutoGraphDemos AutoBarIndicators example program C void InitializeBargraphs bool barbulb bool interioraxis bool numeric bool alarm bool units bool title bool segmented rtAutoBarIndicatorl InitBargraph ChartObj VERT DIR 0 Color OrangeRed rtAutoBarIndicatorl InitStrings VERT 0 GMB rtAutoBarIndicatorl LowAlarm AlarmLimitValue 23 rtAutoBarIndicatorl HighAlarm AlarmLimitValue 78 rtAutoBarIndicatorl SetpointAlarm AlarmLimitValue 53 rtAutoBarIndicatorl MinIndicatorValue 0 rtAutoBarIndicatorl MaxIndicatorValue 100 rtAutoBarIndicatorl GraphBackground ChartObjAttributes new ChartAttribute Color LightBlue 5 DashStyle Solid Color LightBlue rtAutoBarIndicatorl FaceplateBackground t
361. the project Right click on the project name ScrollApplication11 in the Solution Explorer and select Add Reference Browse to the Quinn Curtis DotNet Lib folder and add the QCRTGraphNetCF DLL to the project The default name used for the first instance of the ChartView control added to a program is ChartView1 The variable ChartView1 becomes global to the entire Form class You will see a reference to ChartViewl in all of our example programs You will find the definition of the ChartView1 variable in the form s Designer vb module In our example programs in the form s user code area Form vb we typically assign ChartView1 to a local variable named chartVu and then customize the graph using the chartVu variable name You will also need to make sure that you reference System Drawing Drawing2D com quinncurtis chart2dnetcf and com quinncurtis rtgraphnetcf in the Imports section of any module that references ChartView The reference System Drawing Drawing2D is needed for the definition of the DashStyle enumerated type that is used in most of the example programs See the example program ScrollApplicationl for a simple example System Drawing System Drawing Drawing2D com quinncurtis chart2dnetcf com quinncurtis rtgraphnetcf Public Class Forni Private Sub Forml Load ByVal sender As System Object ByVal e As System EventArgs Handles MyBase Load End InitializeGraph Sub Private Sub InitializeScrollGraph End Dim chartVu As
362. tiBarIndicator Multi bar indicator class displaying a multiple bars RTAutoMeterIndicator Meter indicator class displaying a single needle RTAutoClockIndicator Clock indicator displaying hours minute seconds RTAutoDialIndicator Dial indicator displaying up to three needles as part of the dial RTAutoScrollGraph Scrolling graph can display an unlimited number of scroll graph traces RTAutoPanelMeterIndicator A simple panel meter indicator Process Variable and Alarms Classes RTProcessVar RTAlarm RTAlarmEventArgs Class Architecture 21 Real time data is stored in RTProcessVar classes The RTProcessVar class is designed to represent a single process variable complete with limit values an unlimited number of high and low alarms historical data storage and descriptive strings for use in displays RTProcessVar Real time data is stored in RTProcessVar classes The RTProcessVar class is designed to represent a single process variable complete with limit values an unlimited number of high and low alarms historical data storage and descriptive strings for use in displays RTAlarm The RTAlarm class stores alarm information for the RTProcessVar class The RTAlarm class specifies the type of the alarm the alarm color alarm text messages and alarm hysteresis value The RTProcessVar classes can hold an unlimited number of RTAlarm objects in a ArrayList RTAlarmEventArgs The RTProcessVar class can throw an alarm event based on either
363. ticalScrollFrame which manages scrolling in the vertical direction Scroll Frame Class RTScrollFrame Com quinncurtis chart2dnetcf ChartPlot RTPlot RTMultiValueIndicator RTScrollFrame The scrolling algorithm used in this software is different that in earlier Quinn Curtis real time graphics products Scrolling plots are no longer updated incrementally whenever the underlying data is updated Instead the underlying RTProcessVar data objects are updated as fast as you want Scrolling graphs all graphs for that matter are only updated with the ChartView UpdateDraw method is called What makes scrolling graphs appear to scroll is the scroll frame RTScrollFrame When a scroll frame is updated as a result of the ChartView UpdateDraw event it analyzes the RTSimpleSingleValuePlot and RTGroupMultiValuePlot objects that have been attached to it and creates a coordinate system that matches the current and historical data associated with the plot objects The plot objects in the scroll frame are drawn into this coordinate system As data progresses forward in time the coordinate system is constantly 230 The Scroll Frame and Single Channel Scrolling Plots being rescaled to include the most recent time values as part of the x coordinate system You can control whether or not the starting point of the scroll frame coordinate system remains fixed whether it advances in sync with the constantly changing end of the scroll frame Other options allow
364. to instances of the ChartAttribute and PhysicalCoordinates classes The ChartAttribute class contains basic color and line style information for the object while the PhysicalCoordinates maintains the coordinate system used by object The majority of classes in the library derive from the GraphObj class each class a specific charting object such as an axis an axis label a simple plot or a group plot Background This class fills the background of the entire chart or the plot area of the chart using a solid color a color gradient or a texture Axis Classes Axis LinearAxis PolarAxes AntennaAxes ElapsedTimeAxis LogAxis 58 QCChart2D CF Class Summary TimeAxis Creating a PhysicalCoordinates coordinate system does not automatically create a pair of x and y axes Axes are separate charting objects drawn with respect to a specific PhysicalCoordinates object The coordinate system and the axes do not need to have the same limits In general the limits of the coordinate system should be greater than or equal to the limits of the axes The coordinate system may have limits of 0 to 15 while you may want the axes to extend from 0 to 10 Widget Tolerances by Worker 600 4500 13 0K Click on one of the Kg below to enge the e range 60 0 Li WU An i i DI s PA NA 400 1000 12 0K 40 d 6 J d A WI 4 200 500 11 0K d 20 2 0 0 10 0K Ft j rT i Er TTT TTT 0 0 20 40 60 80 100 Event Partition
365. tomized using public properties Visual Basic Overloads Public Sub New C public RTAutoDialIndicator The InitStrings method is used to initialize the dials tag and units strings Method InitStrings VB Public Sub InitStrings _ title As String units As String Cit public void InitStrings string title string units 348 Miscellaneous Shape Drawing Parameters title The title or tag string units The units string Use the UpdateIndicator method to update the dial indicator with new data Method UpdatelIndicator VB Public Sub UpdateIndicator _ value As Double _ updatedraw As Boolean CH public void UpdateIndicator double value bool updatedraw Parameters value Update the indicator channel with this value updatedraw True and the indicator is immediately updated Selected Public Instance Properties Name Description AlarmList Get the ArrayList holding all of the RTAlarm objects AlarmPanelMeter Get a reference to the RTAlarmPanelMeter object DefaultA larmFont Get Set the font used for the subhead title Miscellaneous Shape Drawing 349 DefaultAxisLabelsFont Get Set the default font used for the axes labels and axes titles DefaultDataValueFont DefaultFontString DefaultMainTitleFont DefaultTagFont DefaultUnitsFont DialInterior FaceplateBackground GraphBackground GraphBorder GraphFormat Height HighAlarm LowAlarm MainTitle Maxi
366. tor Set Get the plot objects data point template If the plot supports it this NumericLabel object is used as a template to size color and format the data point numeric values Set Get the symbol used for the pointer symbol indicator subtype RT POINTER SUBTYPE Use one of the constants RT NO SYMBOL RT LEFT LOW ALARM SYMBOL RT LEFT SET POINT SYMBOL RT LEFT HIGH ALARM SYMBOL RT RIGHT LOW ALARM SYMBOL RT RIGHT SETPOINT SYMBOL RT RIGHT HIGH ALARM SYMBOL RT TOP LOW ALARM SYMBOL RT TOP SETPOINT SYMBOL RT TOP HIGH ALARM SYMBOL RT BOTTOM LOW ALARM SYMBOL RT BOTTOM SETPOINT SYMBOL RT BOTTOM HIGH ALARM SYMBOL Set Get the primary channel of the indicator Get Set the array list holding the RTProcessVar variables for the indicator Get Set the corner radius used to draw the segment rounded rectangles Get Set the segments spacing for the RT BAR SEGMENTED SUBTYPE and RT BAR SINGLE SEGMENT SUBTYPE bar indicator sub types Set Get the segment value round mode Specifies that the current process value is rounded up in calculating how many segments to display in Single Channel Bar Indicator 141 RT BAR SEGMENTED SUBTYPE and RT BAR SINGLE SEGMENT SUBTYPE modes Use one of the constants RT FLOOR VALUE RT CEILING VALUE Get Set the thickness of segments for the SegmentWidth RT BAR SEGMENTED SUBTYPE and RT BAR SINGLE SEGMENT SUBTYPE bar indicator sub types If the plot supports it this method will
367. tor object NumericPanelMeter PlotAttrib PlotAttribArray PlotBackground PreferredSize ProcessVariable RenderingMode ResetOnDraw ResizeMode SetpointAlarm TagPanelMeter TagString UnitsPanelMeter UnitsString Visible Width XAxis XAxis2 XAxisLab XAxisTitle XGrid Y Axis Y Axis2 Y AxisLab Y AxisTitle Miscellaneous Shape Drawing 333 Get a reference to the RTNumericPanelMeter object Inherited from RTAutoIndicator Get an ChartAttribute object in the Inherited from RTAutoIndicator Get an array of ther attributes object for the bars of the bar graph Get the plot background object Inherited from RTAutoIndicator Inherited from ChartView Get most recently created RTProcessVar Inherited from RTAutoIndicator Inherited from ChartView Set Get True the ChartView object list is cleared with each redraw Inherited from RTAutoIndicator Inherited from ChartView Get the most recent setpoint RTAlarm object Inherited from RTAutoIndicator Get a reference to the tag panel meter object Inherited from RTAutoIndicator Get Set the tag string Inherited from RTAutoIndicator Get a reference to the units string panel meter object Inherited from RTAutoIndicator Get Set the units string Inherited from RTAutoIndicator Gets or sets a value indicating whether the control is displayed Inherited from Control Gets or sets the width of the control I
368. trib panelmeter2 PanelMeterPosition ChartObj BELOW REFERENCED TEXT panelmeter2 AlarmTemplate TextFont Forml font10 panelmeter2 SetPositionReference panelmeter annunciator AddPanelMeter panelmeter2 ChartAttribute panelmetertagattrib new ChartAttribute Color SteelBlue 1 DashStyle Solid Color White RTStringPanelMeter panelmeter3 new RTStringPanelMeter pTransforml processVarl panelmetertagattrib ChartObj RT TAG STRING panelmeter3 SetPositionReference panelmeter panelmeter3 StringTemplate TextFont Forml font10 panelmeter3 PanelMeterPosition ChartObj ABOVE REFERENCED TEXT 226 Single and Multiple Channel Annunciators panelmeter3 TextColor Color Black annunciator AddPanelMeter panelmeter3 chartVu AddChartObject annunciator VB Private Sub InitializeAnnunciator2 Dim processVarArray As RTProcessVar _ processVarl processVar2 processVar3 processVar4 Dim chartVu As ChartView Me Dim pTransforml As New CartesianCoordinates 0 0 0 pTransforml SetGraphBorderDiagonal 0 175 0 005 0 0 45 1 0 1 0 TATS Dim background As New Background pTransforml ChartObj PLOT BACKGROUND Color Gray chartVu AddChartObject background Dim attribl As New ChartAttribute Color Bisque 1 Color Bisque Dim attrib2 As New ChartAttribute Color Bisque 1 Color Bisque Dim attrib3 As New ChartAttribute Color Bisque 1 Color Bisque Dim attrib4 As New ChartAttribute
369. turn on off the ShowDatapointValue display of data values next to the associated data point inherited from ChartPlot Set Get the plot objects step mode Use one of the line StepMode inherited plot step constants NO STEP STEP START from ChartPlot STEP END or STEP NO RISE LINE Sets the z order of the object in the chart Every object ZOrder inherited from has a z order value Each z order value does NOT have GraphObj to be unique If z order sorting is turned on in the ChartView object objects are sorted by z order before they are drawn A complete listing of RTBarIndicator properties is found in the QCRTGraphNetCFCompiledHelpFile chm documentation file located in the doc subdirectory Example for an RTBarIndicator Segmented Bar Indicator The bar indicator example below extracted from the Dynamometer example method InitializeEngine1 RPMIndicator creates the segmented bar RPM indicator in the upper left corner of the graph It demonstrates how the plot area 1s defined for the bar indicator how to create axes and axis labels An RTAlarmIndicator is also created to display the alarm limit symbols to the right of the bar indicator The image below also includes an RTStringPanelMeter for the RPM tag an RTNumericPanelMeter for the numeric readout below the bar indicator and an RTAlarmPanelMeter below that See the Dynamometer example program for the complete program listing that creates all of these objects 142 S
370. u want Used when the panel meter is attached to a meter indicator Places the panel meter on the right at the radius of the MeterCoordinates system You can set the text justification however you want Used when the panel meter is attached to a meter indicator Places the panel meter at the center of the radius of the MeterCoordinates system You can set the text justification however you want Used when the panel meter is attached to a meter indicator Places the panel meter at the bottom centered on the outside edge of the radius of the MeterCoordinates system Text justification is JUSTIFY CENTER JUSTIFY MAX Used when the panel meter is attached to a meter indicator Places the panel meter at the bottom centered on the inside edge of the radius of the MeterCoordinates system Text justification is JUSTIFY CENTER JUSTIFY MIN Used when the panel meter is attached to a meter indicator Places the panel meter at the bottom centered on the inside edge of the radius of the MeterCoordinates system Text justification is JUSTIFY CENTER JUSTIFY CENTER Used when the panel meter is attached to a meter indicator Places the panel meter at the top centered on the outside edge of the radius of the MeterCoordinates system Text justification is JUSTIFY CENTER JUSTIFY MIN Used when the panel meter is attached to a meter indicator Places the panel meter at the top centered on the inside edge of the radius of the MeterCoord
371. uble _ ByVal filterconst As Double _ Overloads Public Sub New _ ByVal setpnt As Double _ ByVal steadstat As Double ByVal prop As Double ByVal integ As Double ByVal deriv As Double _ ByVal sampleper As Double _ ByVal filterconst As Double _ C public RTPIDControl int ptype double setpnt double steadstat double prop double integ double deriv double lowclmp double highcimp double ratecimp double sampleper double filterconst public RTPIDControl double setpnt double steadstat double prop double integ double deriv double sampleper double filterconst Parameters setpnt PID Control 275 Specifies the desired value for the process variable steadstat Anticipated steady state value for the output also known as bias If you do not know the steady state value use 0 0 for this parameter Setting this value properly improves response because it does not have to rely on integral response starting with a zero initial error summation term to add enough to the control output to make up for system losses prop Specifies the proportional gain constant The proportional term adjust the output value proportional to the current error term integ Specifies the integral gain constant The integral term adjusts the output value by accumulating or integrated the error term over time deriv Specifies the derivative gain constant The derivative term looks at the rate of change of the i
372. uctors Since the RTAutoVerticalScrollGraph is designed to be dropped on a form only a default constructor is used The indicator is customized using public properties Visual Basic Overloads Public Sub New C4 public RTAutoVerticalScrollGraph A couple of methods are used to initialize the scroll graph after instantiation InitRTAutoScrollGraph and InitStrings The InitRTAutoScrollGraph method initializes the the x and y scales of the scrolling graph Note that the y values are now the time based scale rather than the x values as in the RTAutoScrollGraph class Method InitRTAutoScrollGraph VB Initialize the x scale a linear scale and the y scale to a Date Time scale using ChartCalendar objects Miscellaneous Shape Drawing 373 Public Sub InitRTAutoScrollGraph _ minx As Double _ miny As ChartCalendar _ maxx As Double _ maxy As ChartCalendar _ Initialize the x scale to a linear scale and the y scale to a Date Time scale using DateTime objects Public Sub InitRTAutoScrollGraph _ minx As Double _ miny As DateTime _ maxx As Double maxy As DateTime _ Initialize the x scale to a linear scale and the y scale to a linear scale Public Sub InitRTAutoScrollGraph _ minx As Double _ miny As Double _ maxx As Double _ maxy As Double _ Initialize the x scale to a linear scale and the y scale to an elapsed time using TimeSpan objects Public Sub InitRTAutoScrollGraph _ minx As Double _ miny As
373. ues bool updatedraw public void UpdateIndicator double value bool updatedraw Parameters values An array of new values one for each channel of the indicator value A single value if the scroll graphs only has one channel updatedraw True and the indicator is immediately updated Selected Public Instance Properties Refer to the list of properties under the RTAutoScrollGraph description A complete listing of RTAutoVerticalScrollGraph properties is found in the QCRTGraphNetCompiledHelpFile chm documentation file located in the doc subdirectory The RTAutoVerticalScrollGraph class supports a date time elapsed time and numeric time horizontal x axis scale The y axis scale is linear or logarithmic The title and subhead shows above above the chart the legend and footer below 378 Miscellaneous Shape Drawing Example for initializing RTAutoVerticalScrollGraph objects The example below extracted from the AutoGraphDemos SimpleAutoScrollUserControll example draws horizontal and vertical scrolling graphs The rightmost scrolling graph is a vertical scrolling that uses a linear numeric scale RTAutoScrollGraph Subhead Text Time Channel 1 Channel 2 Channel 3 Footer text Vertical scrolling graph numeric y scale public void InitializeGraph Miscellaneous Shape Drawing 379 double startvalue 0 double stopvalue 30 rtAutoVerticalScrollGraphl InitRTAutoScrollGraph 0 start
374. upports a simple color i e no gradients or textures we were able to implement simple linear gradients for our ChartBackground class e Only simple RGB colors are supported with no alpha blending no transparency e Because much of the original software was written using the GraphicsPath class we created our own simple GraphicsPath class to maintain source compatibility e Asimple Matrix class along with related 2D coordinate transformation routines were added so that we could rotate scale and translate geometric shapes and symbols defined using GraphicsPath objects e Image objects incorporated in a chart can be scaled and translated but not rotated e Text still cannot be rotated not even 90 degrees for y axis titles e Weimplemented XOR drawing so that we could properly draw zoom rectangles and data cursor objects e No printer and image output support The XOR drawing is optional We implement XOR drawing by calling a Net CF PInvoke function that permits calling drawing routines in the underlying oprerating system Strickly speaking this violates the Net managed memory paradigm though it never really mattered in Revisions 1 0 1 1 and 2 0 of Net CF For unknown reasons starting with the Net CF 3 5 found in Visual Studio 2008 it does matter The VS 2008 Toolbox will not host a UserControl derived object that contains PInvoke calls Therefore we include two versions of the QCChart2DNetCF DLL one that uses PInvoke and supports XO
375. urrentValues true 380 Miscellaneous Shape Drawing VB Public Sub InitializeGraph Dim startvalue As Double 0 Dim stopvalue As Double 30 rtAutoVerticalScrollGraphl InitRTAutoScrollGraph 0 startvalue 15 rtAutoVerticalScrollGraphl InitSimpleRTPlotObject ChartObj LINE PLOT rtAutoVerticalScrollGraphl InitSimpleRTPlotObject ChartObj LINE PLOT stopvalue Color Blue Channel 1 Color Green Channel 2 rtAutoVerticalScrollGraphl InitSimpleRTPlotObject ChartObj SCATTER PLOT rtAutoVerticalScrollGraphl SimplePlotObj SymbolAttributes SymbolSize Color Red Channel 3 rtAutoVerticalScrollGraphl GraphScrollFrame ScrollRescaleMargin 0 01 rtAutoVerticalScrollGraphl GraphScrollFrame ScrollScaleModeX ChartObj RT AUTOSCALE X MINMAX rtAutoVerticalScrollGraphl InitStrings RTAutoScrollGraph Quarks rtAutoVerticalScrollGraphl GraphBackground FillColor Color BlanchedAlmond rtAutoVerticalScrollGraphl SubHead TextString Numeric Scrolling rtAutoVerticalScrollGraphl SubHead ChartObjEnable ChartObj OBJECT ENABLE rtAutoVerticalScrollGraphl Footer TextString Footer text rtAutoVerticalScrollGraphl Footer ChartObjEnable ChartObj OBJECT ENABLE rtAutoVerticalScrollGraphl YAxisLab2 ChartObjEnable ChartObj OBJECT ENABLE rtAutoVerticalScrollGraphl LowAlarm AlarmLimitValue 4 rtAutoVerticalScrollGraphl HighAlarm AlarmLimitValue 12 rtAutoVerticalScrollGraphl SetpointAlarm AlarmLimitVa
376. use antenna coordinate interpolation This class is a concrete implementation of the AntennaPlot class and displays data in a simple scatter plot format This class is a concrete implementation of the AntennaPlot class and displays data in a simple line markder plot format This class is used to highlight or mark a specific attribute of the chart It can mark a constant radial value using a circle or it can mark a constant angular value using a radial line from the origin to the outer edge of the scale It uses data organized as arrays of x and y values where an x value represents the numeric value of a pie wedge and a y value specifies the offset or explosion of a pie wedge with respect to the center of the pie 80 QCChart2D CF Class Summary Aetius Mutual Fund Asset Allocation Banking 3 5 Automotive 4 2 Click on any pie wedge to see a detail PieChart This class plots data in a simple pie chart format It uses data organized as arrays of x and y values where an x value represents the numeric value of a pie wedge and a y value specifies the offset or explosion of a pie wedge with respect to the center of the pie Click on any pie wedge to see a detail RingChart The ring chart plots data in a modified pie chart format known as a ring chartt It uses data organized as arrays of x and y values where an x value represents the numeric value of a ring segment and a y value specifies the offset or
377. used as adjuncts to other real time indicators such as bar indicators and meters RTNumericPanelMeter Displays the floating point numeric value of an RTProcessVar object It contains a template based on the QCChart2D CF NumericLabel class that is used to specify the font and numeric format information associated with the panel meter Class Architecture 23 The lowest panel meter in these examples is the RTAlarmPanelMeter object Alarm properties include custom text for all alarm levels When an alarm occurs the foreground color of alarm text and the background color of the alarm text rectangle can be programmed to change state RTAlarmPanelMeter Displays an alarm text message It contains a template based on the QCChart2D CF StringLabel class that is used to specify the font and string format information associated with the panel meter It bases the alarm text message on the alarm information in the associated RTProcessVar object Heart Rate Panel meter strings can be used to display an objects tag name units string and description RTStringPanelMeter Displays a string either an arbitrary string or a string based on string data in the associated RTProcessVar object It is usually used to display a channels tag string and units string but it can also be used to display longer descriptive strings It contains a template based on the QCChart2D CF StringLabel class that is used to specify the font and string format inf
378. utput until the sum of all previous errors is zero The term reset rate is used to describe the integral action of a PID controller The term derives from the output response of a PI controller the derivative term set to zero in this case to a step change in the process error signal The response consists of an initial jump from zero to the proportional gain setting K followed by a ramp the integrating action of the integral term which adds the initial proportional response each integral time T Therefore the reset rate is defined as the repeats per minute of the initial proportional response For example if the reset rate is 1 0 then for every minute that the error signal is non zero the amount of corrective action added to the controller output by the integral term will be equal to the amount added by the proportional term alone The higher the reset rate the harder the system will react to non zero error terms The addition of the derivative term to the PI controller described above results in the classic three mode PID controller The derivative action of a PID controller adds to the controller output the value proportional to the slope rate of change of the process error The derivative term anticipates the error providing a harder control response when the error term is going in the wrong direction and a dampening response when the error term is going in the right direction It reduces overshoot for transient upsets Proper use of
379. value 15 stopvalue rtAutoVerticalScrollGraphl InitSimpleRTPlotObject ChartObj LINE PLOT Color Blue Channel 1 rtAutoVerticalScrollGraphl InitSimpleRTPlotObject ChartObj LINE PLOT Color Green Channel 2 rtAutoVerticalScrollGraphl InitSimpleRTPlotObject ChartObj SCATTER PLOT Color Red Channel 3 rtAutoVerticalScrollGraphl SimplePlotObj SymbolAttributes SymbolSize 10 rtAutoVerticalScrollGraphl GraphScrollFrame ScrollRescaleMargin 0 01 rtAutoVerticalScrollGraphl GraphScrollFrame ScrollScaleModeX ChartObj RT AUTOSCALE Y MINMAX rtAutoVerticalScrollGraphl InitStrings RTAutoScrollGraph Quarks Time rtAutoVerticalScrollGraphl GraphBackground FillColor Color BlanchedAlmond rtAutoVerticalScrollGraphl SubHead TextString Subhead Text rtAutoVerticalScrollGraphl SubHead ChartObjEnable ChartObj OBJECT ENABLE rtAutoVerticalScrollGraphl Footer TextString Footer text rtAutoVerticalScrollGraphl Footer ChartObjEnable ChartObj OBJECT ENABLE rtAutoVerticalScrollGraphl YAxisLab2 ChartObjEnable ChartObj OBJECT ENABLE The update of scroll graphs takes place in the timer event handler private vold timerl Tick object sender EventArgs e ChartCalendar timestamp new ChartCalendar for int i 0 i lt currentValues Length i currentValues i 0 5 ChartSupport GetRandomDouble EQUATtE rtAutoVerticalScrollGraph1l UpdateScrollGraph count c
380. verloads Public Sub SetCurrentValue _ ByVal timestamp As Double _ ByVal pv As Double Overridable Overloads Public Sub SetCurrentValue _ ByVal pv As Double Ct public virtual void SetCurrentValue ChartCalendar gv double pv public virtual void SetCurrentValue DateTime dt double pv public virtual void SetCurrentValue double timestamp double pv public virtual void SetCurrentValue double pv Parameters BV D The time stamp as a ChartCalendar object for the process variable dt The time stamp as a DateTime object for the process variable timestamp The time stamp in milliseconds for the process variable See the Important Note below Du The value of the process variable 96 Process Variable and Alarm Classes If the time stamp value is not explicitly provided as in the case of the last overloaded method the current time as stored in the system clock is used as the time stamp Important Note Do Not Use DateTime Now Do NOT use the Net CF DateTime Now function to get the current time in order to time stamp a process value It is horrendously flawed at least in ALL of the Net CF emulators we are not sure of actual implementations on physical devices When running a Net CF application that heavily loads the CPU the time of day clock of the emulator STOPS updating correctly with the minutes field of the time of day failing to rollover when the s
381. w Get a reference to the tag panel meter object Get a reference to the units string panel meter object Get Set the units string Gets or sets a value indicating whether the control is displayed 350 Miscellaneous Shape Drawing Inherited from Control Gets or sets the width of the control Width Inherited from Control A complete listing of RTAutoDialIndicator properties is found in the QCRTGraphNetCompiledHelpFile chm documentation file located in the doc subdirectory There are three different dial formats Use the GraphFormat property 0 2 to set the format Below you will find a brief description of the differences between the formats Altimeter p add T TT Ke 10 Format 0 dispalys a two needle dial with a scale range of 0 to 10 with a tag string at the top of the windows and a numeric panel meter above the needle pivot point The internal RTComboProcessVar object assigns the update value to the first longest of the two meter needles and the update value 10 to the second smaller of the two needles Miscellaneous Shape Drawing 351 Format 1 dispalys a three needle dial with a scale range of 0 to 10 with a tag string at the top of the windows and a numeric panel meter above the needle pivot point The internal RTComboProcessVar object assigns the update value to the first longest of the three meter needles the update value 10 to the second middle of the three needles and the upda
382. ware special round and rectangular shapes that can be used as backdrops for groupings of chart objects and PID control Miscellaneous Classes Com quinncurtis chart2dnetcf GraphObj RT3DFrame Com quinncurtis chart2dnetcf GraphObj RTGenShape Com quinncurtis chart2dnetcf ChartObj RTPIDControl 48 Class Architecture Com quinncurtis chart2dnetcf GraphObj RTSymbol Com quinncurtis chart2dnetcf ChartText RTTextFrame The raised light blue panels are created using RT3D Frame objects RT3DFrame This class is used to draw 3D borders and provide the background for many of the other graph objects most noticeably the RTPanelMeter classes It can also be used directly in your program to provide 3D frames the visually group objects together in a faceplate format Class Architecture 49 The border rectangles in the top graph and the border circle in the bottom graph were created using RTGenShape objects RTGenShape This class is used to draw filled and unfilled rectangles rectangles with rounded corners general ellipses and aspect ratio corrected circles These shapes can be used by the programmer to add visual enhancements to graphs A complete PID Control tuning center can be created using the PID control tools bar indicators scroll frames buttons and track bars RTPIDControl RTSymbol RTTextFrame This class represents a simple control loop with support for proportional integral and derivative control
383. welve different auto meter formats 46 Class Architecture Altimeter Electric Meter Pas s A The RTAutoDialIIndicator is able to take a single numeric value and divide it into multiple needle values RTAutoDialIndicator An RTAutoDialIndicator is a self contained control derived from the ChartView user control It is used to display the values of up to three channels of real time data and includes as options a numeric readout alarm status readout title and units The RTAutoClockIndicator can display the time and date in numeric format RTAutoClockIndicator An RTAutoClockIndicator is a self contained control derived from the ChartView user control It is used to display the values of up to three channels of real time data and includes as options a numeric readout alarm status readout title and units Class Architecture 47 RTAutoScrollGraph g S e 5 5 0 i i i i i 0 14 37 38 14 37 40 14 37 42 14 37 44 14 37 46 Time Channel 1 Channel 2 Channel 43 RTAutoScrollGraph An RTAutoScrollGraph is a self contained control derived from the ChartView user control It is used to display real time data in a variety of plot formats line plots bar plots scatter plots and line marker plots Options include a horizontal or vertical display automatic legend a main title and axis titles Miscellaneous Classes Support classes are used to display special symbols used for alarm limits in the soft
384. xIndicatorValue MinimumSize MinIndicatorValue NumericPanelMeter PlotAttrib PlotBackground PreferredSize ProcessVariable RenderingMode ResizeMode TagPanelMeter UnitsPanelMeter UnitsString Visible Width indicator Set Get the default font used in the chart This is a string specifiying the name of the font Get Set the font used for the main title Get Set the font used for the main title Get Set the font used for the chart footer Set to true to show 3D faceplate Get the graph background object Get the default graph border for the chart Get Set any an indicator format is supported Gets or sets the height of the control Inherited from Control Get the most recent high RTAlarm object Get the most recent low RTAlarm object Get Set the tag string Gets or sets the size that is the upper limit that GetPreferredSize Size can specify Inherited from Control The maximum value for the indicator Gets or sets the size that is the lower limit that GetPreferredSize Size can specify Inherited from Control The minimum value for the indicator Get a reference to the RTNumericPanelMeter object Get an RTProcessVar object in the Get the plot background object Inherited from ChartView Get most recently created RTProcessVar Inherited from ChartView Inherited from ChartView Get a reference to the tag panel meter object Get a reference to the units string panel meter ob
385. y bounded by the charts axes to include the complete graph area the area of the chart outside of the plot area This class is an abstract base class derived from WorkingCoordinates and defines the routines needed to map the physical coordinate system of a plot area into a working coordinate system Different scale objects ChartScale derived are installed for converting physical x and y coordinate values into working coordinate values This class is a concrete implementation of the PhysicalCoordinates class and implements a coordinate system used to plot linear logarithmic and semi logarithmic graphs This class is a concrete implementation of the PhysicalCoordinates class and implements a coordinate system used to plot GregorianCalendar time based data This class is a subclass of the CartesianCoordinates class and implements a coordinate system used to plot elapsed time data This class is a subclass of the CartesianCoordinates class and implements a coordinate system used to plot polar coordinate data This class is a subclass of the CartesianCoordinates class and implements a coordinate system used to plot antenna coordinate data The antenna coordinate system differs from the more common polar coordinate system in that the radius can have plus minus values the angular values are in degrees and the angular values increase in the clockwise direction This class consolidates the common line and fill attributes as a single

Download Pdf Manuals

image

Related Search

Related Contents

User Guide  eBrochure Quattroporte  Franklin MWS-1840 User's Manual  Baumatic BHC700 Technical Drawing  Eiqueta Web - Ecuador CUIDADO  Professional Single Zone Charcoal Grill  Electronique numérique  Invitation - 7/03/2013 - Conseil de circonscription  Betriebs- und Montageanleitung PROBURNER GT  

Copyright © All rights reserved.
Failed to retrieve file