Home

Real-Time Graphics Tools for Silverlight User Manual

image

Contents

1. sse 176 Numeric data point Labele 95 Numeric Panel Meters e Numeric Panel Meters 16 19 20 27 112 117 118 119 120 121 122 124 125 128 142 143 145 155 196 197 214 215 220 221 254 255 256 257 313 326 336 344 351 360 NumericAxisLabels 17 32 69 95 143 144 156 157 160 162 175 176 NumericAxisLabels NumertcAvisglabels 69 NumericLabel 20 87 88 95 114 118 119 140 NumericLabel 20 87 88 95 114 118 119 140 EISE e EE OH LChlot 72 79 95 238 241 242 Open High Low Close plots 72 79 95 238 241 242 Panel Meters sue Sege erre deb erm Panel meters 6 10 17 18 309 Panel Meters testet 113 114 259 Panel Meters rtc Pee Ere ea Perd Panel Meters 14 16 19 22 25 27 35 46 48 97 112 113 114 117 118 119 122 125 129 132 135 151 165 184 213 258 259 289 PhysicalCoordinates 58 59 60 62 63 94 118 123 126 129 130 132 133 135 138 140 146 147 151 152 153 158 160 161 184 212 216 224 227 228 231 239 258 259 262 263 279 280 283 289 293 296 300 PhysicalCoordinates 58 59 60 62 63 94 118 123 126 129 130 132 133 135 138 140 146 147 151 152 153 158 160 161 184 212 216 224 227 228 231 239 258 259 262 263 279 280 283 289 293 296 300 PID Gontrol 54 ote ee ele Bice tette eus PID Control 16 45 4
2. Online Templates Name SLRTApplication1 Location F Quinn Curtis DotNet QCRTGraph Vvisual CSharpiexamples sli Solution name SLRTApplication1 VM create directory For solution Add to source control After you press OK you will see the following dialog Using QCRTGraph to Create Silverlight Applications 379 New Silverlight Application Click the checkbox below to host this Silverlight application in a Web site Otherwise a test page will be generated during build C Host the Silverlight application in a new Web site New Web project name New Web project type Options Silverlight Version BESSER e Uncheck the Host the Silverlight application in a new web site for the purpose of this example Under Options you can select Silverlight Version 4 of Version 5 The XAML portion of the project looks like lt UserControl x Class SLRTApplicationl MainPage xmlns http schemas microsoft com winfx 2006 xaml presentation xmlns x http schemas microsoft com winfx 2006 xaml xmlns d http schemas microsoft com expression blend 2008 xmlns mc http schemas openxmlformats org markup compatibility 2006 mc Ignorable d d DesignHeight 300 d DesignWidth 400 gt lt Grid x Name LayoutRoot Background White gt lt Grid gt lt UserControl gt The window does not yet have any content First define a default size for the window by adjusting the
3. 15 20 0 5 10 Student Individual data points can be automatically labeled 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 Class Summary 85 Sales Volume is Rising Faster than Forecast 1999 2000 2001 2002 2003 2004 2005 2006 Presentation quality graphs with background gradients semi transparent colors legends and titles SimpleLinePlot Measurable work output SimpleScatterPlot SimpleVersaPlot This class is a concrete implementation of the SimplePlot class it displays simple datasets in a line plot format Adjacent data points are connected using a straight or a step line Theoretical vs Experimental Data 20 40 60 80 100 MBAs 1000 employees X Energy Companies Software Companies Predicted Scatter plots usually display some form of sampled data 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 86 QCChart2D Class Summary another without deleting the instance of the old plot object and creating a
4. iii TimeSimpleDataset ToolTips UserControl 12 13 17 18 40 56 57 94 299 309 321 333 342 348 353 361 366 377 UserControl mc UserControl viste deb ita 57 UserCoordin tes ii eiecit oops 59 94 UserCoordinates 59 94 Vertical Scrolling aciei eh ene Vertical Scrolling 9 15 16 27 30 37 39 223 227 228 230 234 235 Visual Basic 7 10 98 99 100 103 107 118 123 126 129 132 135 138 151 165 170 175 180 186 193 197 203 212 216 224 227 231 239 244 252 258 262 271 279 282 283 286 287 289 293 296 305 310 321 334 342 349 354 367 390 Visual Basic Visual Basic Visual C o Visual StudiO vci Visual Studio 2 8 9 10 35 112 244 309 377 390 404 WorkingCoordinates sess 59 60 94 WorkingCoordinates 59 60 94 World oordmates WorldCoordinates Zooming 89 90 94 278 279 280 281 283 284 287 Zoom 2 vi 10 89 90 94 96 278 279 280 281 282 283 284 285 286 287
5. Inherited from RTAutoIndicator Get a reference to the RTAlarmPanelMeter object AlarmbPanelMeter Inherited from RTAutoIndicator Badia Get the numeric label template object used to place a numeric values on the bars BarFillColor Sets the fill color for the chart object BarLineColor Sets the line color for the chart object BarLineWidth Sets the line width for the chart object BarWidth Set Get the bar width ChartLegend Get Set the charts Legend object Get Set the chart object type jTyp ChartObjType Inherited from RTAutoIndicator Get the SimpleDataset object that holds the data ChartSimpleDataset ChartsimpleDataset used to plot the scroll graph Get the coordinate system object for the indicator i D D CoordinateSystem Inherited from RTAutoIndicator DatasetList Get dataset object list Datatooltip Get the data tooltip object for the chart Set Get the default font used in the chart This is a i D D DH DefaultChartFontString string specifiying the name of the font DefaultLegendFont Get Set the font used for the legend DefaultSubHeadFont Get Set the font used for the sub head DefaultToolTipFont Set Get the default font object used for the tooltip DrawEnable Inherited from ChartView 360 Auto Indicator Classes FaceplateBackground GraphBackground GraphBorder GraphFormat GraphScrollFrame GroupPlotObj Height HighAlarm Location LowAlarm MainTitle MaxIndicatorValue MinimumSize
6. 11 Maj r EE 11 Real Time Graphics Tools for Silverlight Class Summary te 13 Namespace com quinncurtis ee 16 eee 2T EA eie EI RTI 31 hui E oro AR nn n nn nn 32 Form Se RE RARA AR IT I 34 BUDE IU eelere 37 ROERO A OO dace aida eiuda Seapayeds 40 OR AN S RR 45 Source Code Differences between the Net versions of QCChart2D OCRTGraph Net WPF oie iss RR OI O PE 48 3 DOCE harc D for Silverlight Class SUMMA EE 56 DOCE hag D for Silverlight Class GEES 56 CALI METERS D IRC cuiu I I I nn 57 AC EEN 58 Coordinate Transform Class S Rem 59 EE 61 4 Process Variable and Alarm Classes csrl ii ie 97 Real Time Process EE 98 Rea Tine A ne ene 102 Real Time Alarms Event Handle io eli ri ira EE 107 hun he iO eege 112 DETTO indici 112 DEER LIO rtical Indicato Graphics Tools to Creat Real Time Graphics Tools for Silverlight 1 Introduction The QCRTGraph for Silverlight software represents an adaptation of the QCRTGraph library to the Silverlight user interface framework We have removed 100 of the GDI based graphics found in the Net System Drawing System Drawing Drawing2D and System Windows Forms namesspaces and replaced them with Silverlight equivalents We have redesigned the chart rendering scheme to work with the Silverlight retained graphics framework But we have maintained the simple to use flexible programming style found in our QCRTGraph for Net softwar
7. 500 msecs timer2 Tick new EventHandler timer2 Tick timerl Start timer2 Start 388 Using Real Time Graphics Tools to Create Silverlight Applications using using using using using using using using using using using Update data using 100 msec timer private void timerl Tick object sender System EventArgs e Random data currentTemperatureValuel 5 0 5 ChartSupport GetRandomDouble currentTemperatureValue2 8 0 5 ChartSupport GetRandomDouble This method uses the default time stamp which is the current time of day currentTemperaturel SetCurrentValue currentTemperatureValuel currentTemperature2 SetCurrentValue currentTemperatureValue2 Update screen on 500 msec timer private void timer2 Tick object sender System EventArgs e chartVu UpdateDraw Reference and initialize the newly created ScrollingGraph class in the MainPage xaml cs behind code file Sys Sys Sys Sys Sys Sys Sys Sys Sys Sys Sys cem cem cem cem cem cem cem cem cem cem P Ling Net Windows Windows Windows Windows Windows Windows Windows tem Collections Generic Controls Documents Input Media Media Animation Shapes Using QCRTGraph to Create Silverlight Applications 389 using com quinncurtis chertzdsl using com quinncurtis rtgraphs1 namespace SLRTApplicationl public
8. MinIndicatorValue NumericPanelMeter PlotAttrib PlotBackground PlotObjectList PreferredSize Process Variable Process VariableArray ResetOnDraw 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 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 RTAutoIndicator 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 Get plot obj
9. The chart definition initialization can take place entirely in the behind code of the windows XAML file or it be done in a separate class created for that purpose Almost all of our examples use a separate class to initialize the ChartView object This keeps the code more modular and the Window file much easier to read In the behind code example below extracted from our BarApplicationl example the ChartView object variable 4 Introduction name barAppl in the example is initialized using the class BarIndicator1 The BarIndicator1 class adds the coordinate systems axes bars and text to the barAppl object turning it into requisite chart namespace BarApplicationl public partial class MainPage UserControl BarIndicatorl bal public MainPage InitializeComponent InitBarApp public void InitBarApp bal new BarIndicatorl barAppl ChartObj RT BAR SOLID SUBTYPE barAppl PreferredSize new Size 300 200 Real Time Graphics Tools for Silverlight Dependencies The QCRTGraph for Silverlight class library is self contained It uses only standard classes that ship with the Microsoft Net Silverlight API The software uses the major Net Silverlight namespaces listed below The QCChart2D for Silverlight class library is self contained It uses only standard classes that ship with the Microsoft Net API The software uses the major Net Silverlight namespaces listed below System Windows Provides sever
10. lSize 8 0 01 ChartObj RT AUTOSCALE Y MINMAX me Quarks 366 Auto Indicator Classes rtAutoScrollGraph2 GraphBackground FillColor ChartColor 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 Handles 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 Scrolling Graph Vertical Indicator Class RTAutoVerticalScrollGraph System Windows Controls UserControl ChartView RTAutoIndicato
11. new RTNumericPanelMeter pTransforml processVar2 panelmeterattrib panelmeter PanelMeterPosition ChartObj CENTERED BAR panelmeter NumericTemplate TextFont FontArchive fontl4Numeric panelmeter NumericTemplate PostfixString char 176 E annunciator AddPanelMeter panelmeter RTAlarmPanelMeter panelmeter2 new RTAlarmPanelMeter pTransforml processVarl panelmeterattrib panelmeter2 PanelMeterPosition ChartObj BELOW REFERENCED TEXT panelmeter2 AlarmTemplate TextFont FontArchive font10 panelmeter2 SetPositionReference panelmeter annunciator AddPanelMeter panelmeter2 ChartAttribute panelmetertagattrib new ChartAttribute ChartCoolor SteelBlue 3 ChartObj LS SOLID Colors White RTStringPanelMeter panelmeter3 new RTStringPanelMeter pTransforml processVarl panelmetertagattrib ChartObj RT TAG STRING 222 Single and Multiple Channel Annunciators panelmeter3 SetPositionReference panelmeter panelmeter3 StringTemplate TextFont FontArchive font10 panelmeter3 PanelMeterPosition ChartObj ABOVE REFERENCED TEXT panelmeter3 TextColor Colors Black annunciator AddPanelMeter panelmeter3 chartVu AddChartObject annunciator VB Private Sub InitializeAnnunciator2 Dim processVarArray As RTProcessVar _ processVarl processVar2 processVar3 processVar4 Dim pTransforml As New CartesianCoordinates 0 0 0 0 1 0 1 0 pTransforml SetGraphBorderDiagonal 0 175 0 005 0 45 0 47
12. For i As Integer 0 To currentValues Length 1 currentValues i 0 5 ChartSupport GetRandomDouble Next count 1 rtAutoVerticalScrollGraphl UpdateScrollGraph count End Sub currentValues True 376 Auto Indicator Classes 20 Using Real Time Graphics Tools to Create Silverlight Applications Critical Note Running the Example Programs The example programs for QCRTGraph Tools for Silverlight software are supplied in complete source In order to save space they have not been pre compiled which means that many of the intermediate object files needed to view the main form are not present This means that the charts will not be visible on the main Window if you attempt to view the main form before the project has been compiled The default state for all of the example projects should be the Start Page Before you do view any other file or form do a build of the project This will cause the intermediate files to be built If you attempt to view the main Form before building the project Visual Studio sometimes decides that the control placed on the main form does not exist and deletes it from the project The primary view class of the QCRTGraph library is the ChartView class The ChartView class derives from the Net System Windows Controls UserControl class It has the properties and methods of the underlying UserControl class Follow the following steps in order to incorporate the QCRTGraph classes into y
13. 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 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 stockLowl 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 ChartAttribute attribl new ChartAttribute Colors Yellow 2 ChartObj LS SOLID OHLCPlot ohlcplotl new OHLCPlot pTr
14. of chart objects in a chart and automatically updates the chart objects whenever the control needs to redraw itself Since the ChartView class is a subclass of the UserControl class it can act as a container for other WPF components such as buttons and checkboxes 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 RTAutoMultiBarIndicator 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 RTProcess Var RTAlarm RTAlarmEventArgs Real time data is stored in RTProcessVar classes The RTProcessVar class is designed to represent a single process variable complete
15. 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 352 Auto Indicator Classes 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 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 RT AutoClockIndicator objects The example below extracted from the AutoGraphDemos AutoDialsAndClockIndicatorsUserControll example shows the different clock formats See the AutoDialsAndClockIndicatorsUserControll asml file to see how the clocks are positioned in the parent window Auto Indicator Classes 353 C public void InitializeGraph Me Me Me Me Me Me Me Me this rtAutoClockIndicatorl GraphFormat 0 this rtAutoClockIndicatorl GraphBackground FillColor Colors White this rtAutoClockIndicatorl InvertColors chis rtAntoUlockIndiocstorl Initstringsi Boston EST this rtAutoClockIndicator2 GraphFormat 1 this H tAutoClockIndicator2 GraphBackground FillColor Colors White this rtAutoClockIndicator2 PlotAttrib FillColor Colors Blue this rtAutoClockIndicatorz InitStrings Pit
16. 152 153 154 184 186 193 197 212 216 223 227 230 238 Ch rtPriit eter aiar printing ChartScale aseene Eege EECH ChartScale itte 58 59 60 94 ChartShape ChartSliape ci de c obere 88 89 96 ChartSymbol 4 eher terere ene es ChartSymbol eene 89 96 Chartl ext sicontiza ian eeu d 176 177 ChartText 46 48 87 88 95 176 177 ChartTitle iecit nee 87 88 95 Chart De ee 87 88 95 386 399 ChartView 8 12 15 17 18 19 38 40 41 42 43 44 45 57 62 90 91 94 105 112 121 140 141 153 155 172 177 185 223 224 225 227 228 232 233 279 280 283 294 297 299 300 301 302 303 309 313 321 326 333 336 342 344 345 348 351 354 359 360 361 366 367 377 ChartView 3 8 12 15 17 18 19 38 40 41 42 43 44 45 57 62 90 91 94 101 105 112 121 140 141 153 155 172 177 185 223 224 225 227 228 232 233 279 280 283 294 297 299 300 301 302 303 304 306 309 313 321 326 333 336 342 344 345 348 351 354 359 360 361 366 367 377 380 381 383 384 390 394 396 397 403 clocks 6 10 17 18 40 44 309 347 348 351 352 353 ContourDataset COSV nana CSM aaa aria iii Customer SUPpport csvrercrrereerererireeececicenione 1 DataCursor DataCursor essere 89 90 94 IR setae lira ChartDataset 12 57 70 71
17. 242 287 349 350 354 355 357 364 366 367 368 370 374 375 384 397 ChartColor ii ChartColor 48 49 92 94 120 121 122 124 125 128 131 132 134 136 137 143 144 159 162 188 189 191 196 197 214 215 217 218 219 220 221 222 246 247 249 250 251 255 256 260 261 265 266 319 320 332 333 363 364 365 366 374 375 GhartEOhnt carrai i ChartFont v 50 51 92 94 112 119 120 131 137 168 169 170 174 178 179 182 183 205 207 209 210 246 247 249 250 254 255 265 266 291 359 384 386 397 399 Chart Im ge ario aero ChartImage 88 89 96 ChartLabel n 87 88 95 259 ChartLabel avena cuzani 87 88 95 259 ChartObj 16 17 35 45 94 98 102 105 106 107 109 110 117 118 120 121 122 124 125 128 129 131 132 134 137 142 143 144 145 147 148 149 150 155 156 157 158 159 160 162 163 173 174 175 178 179 180 182 183 196 197 200 209 210 214 215 218 219 220 221 222 230 232 233 234 235 236 237 240 241 242 243 245 246 247 248 250 255 261 265 279 282 283 284 285 286 287 291 292 293 295 296 298 310 319 320 321 322 332 333 363 364 365 366 373 374 375 ChartPlot 139 140 141 152 153 154 ChartPlot 12 16 19 22 27 37 70 71 95 113 118 122 125 129 132 135 138 139 140 141 151
18. 60 0 runnersPaceValue 10 0 treadmillElevationValue 3 0 heartRate SetCurrentValue heartRateValue VB Dim defaultattrib As New ChartAttribute Colors Green 1 0 ChartObj LS SOLID Colors Green Dim lowheartratealarm As New RTAlarm ChartObj RT ALARM LOWERTHAN 30 lowheartratealarm AlarmMessage Low Heart Rate lowheartratealarm AlarmSymbolColor Colors Blue lowheartratealarm AlarmTextColor Colors Blue Dim highheartratealarm As New RTAlarm ChartObj RT ALARM GREATERTHAN 160 highheartratealarm AlarmMessage High Heart Rate highheartratealarm AlarmSymbolColor Colors Red highheartratealarm AlarmTextColor Colors 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 Process Variable and Alarm Classes 107 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
19. C Host the Silverlight application in a new Web site New Web project name New Web project type Options Silverlight Version BESSER e Uncheck the Host the Silverlight application in a new web site for the purpose of this example Under Options you can select Silverlight Version 4 of Version 5 Default Namespace Issues There is an annoying difference in the default files generated by the VB project wizard versus the C project wizard In C whenever you create a new class the wizard adds a reference to the default name space which is almost always the name of the project You can always see the explicit reference to the name space But in Visual Basic the name space is implied along with the default selection of Import references If you add an explicit reference to a name space in a VB file it messes up the name spaces and you may not be able to properly access classes that yo create The XAML portion of the project looks like lt UserControl x Class SLRTApplicationl MainPage xmlns http schemas microsoft com winfx 2006 xaml presentation xmlns x http schemas microsoft com winfx 2006 xaml xmlns d http schemas microsoft com expression blend 2008 xmlns mc http schemas openxmlformats org markup compatibility 2006 mc Ignorable d d DesignHeight 300 d DesignWidth 400 gt lt Grid x Name LayoutRoot Background White gt Using QCRTGraph to Create Silverlight Applications 39
20. ChartAttribute attrib2 new ChartAttribute Colors Green 2 ChartObj LS SOLID SimpleLinePlot lineplot2 new SimpleLinePlot pTransforml null attrib2 lineplot2 SetFastClipMode ChartObj FASTCLIP X RTSimpleSingleValuePlot solarPanelLinePlot2 new RTSimpleSingleValuePlot pTransforml lineplot2 currentTemperature2 chartVu AddChartObject solarPanelLinePlot2 ChartFont titlefont font14 ChartTitle charttitle new ChartTitle pTransforml titlefont Scroll Application 1 ChartObj CHART HEADER ChartObj CENTER PLOT chartVu AddChartObject charttitle public void InitializeGraph timerl Stop templowalarml new RTAlarm ChartObj RT ALARM LOWERTHAN 80 templowalarml AlarmMessage Low Alarm templowalarml AlarmSymbolColor Colors Blue templowalarml AlarmTextColor Colors Blue temphighalarml new RTAlarm ChartObj RT ALARM GREATERTHAN 120 temphighalarml AlarmMessage High Alarm temphighalarml AlarmSymbolColor Colors Red temphighalarml AlarmTextColor Colors Red currentTemperaturel new RTProcessVar Temp 1 new ChartAttribute Golors Green 1 0 Ghart0bj LS SOLID Colors Green currentTemperaturel MinimumValue 20 currentTemperaturel MaximumValue 200 currentTemperaturel DefaultMinimumDisplayValue 0 Using QCRTGraph to Create Silverlight Applications 387 Hr currentTemperaturel DefaultMaximumDisplayValue 150 currentTemperaturel SetCurrentValue cu
21. ChartObj LS SOLID Colors Green Dim lowheartratealarm As New RTAlarm ChartObj RT ALARM LOWERTHAN 30 lowheartratealarm AlarmMessage Low Heart Rate lowheartratealarm AlarmSymbolColor Colors Blue lowheartratealarm AlarmTextColor Colors Blue Dim highheartratealarm As New RTAlarm ChartObj RT ALARM GREATERTHAN 160 highheartratealarm AlarmMessage High Heart Rate highheartratealarm AlarmSymbolColor Colors Red highheartratealarm AlarmTextColor Colors 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 Process Variable and Alarm Classes 111 Dim buttons As MessageBoxButton MessageBoxButton OKCancel Dim result As MessageBoxResult result MessageBox Show Emergency Heartrate Shutdown Emergency buttons End Sub heartRate HighAlarm 5 Panel Meter Classes RTNumericPanelMeter RTAlarmPanelMeter RTStringPan
22. End Sub Clock Indicator Class RTAutoClockIndicator System Windows Controls 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 meters 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 Auto Indicator Classes 349 Visual Basic Overloads Public Sub New Ct public RTAutoMeterIndicator 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 C 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 UpdateIndicator VB Public Sub UpdateClo
23. RTPanelMeter RTPanelMeter PanelMeterNudge inherited from Set Get the xy values of the panelMeterNudge property It RTPanelMeter moves the relative position using window device coordinates of the text relative to the specified location of LL text from RTPanelMet ii Lu table in the RTPanelMeter dlispter from RTPanelMeter RTPanelMeter from RTPanelMeter template RTPanelMeter reference for this RTPanelMeter object Buttons Track Bars and Other Form Control Classes 261 PositionType inherited from Get Sets the current position type GraphObj RTPlot RTSingleValueIndicator for the indicator A complete listing of RTFormControlPanelMeter properties is found in the QCRTGraphSLCompiledHelpFile chm documentation file located in the doc subdirectory Example for RTControlPanelMeter encapsulation an RTControlTrackBar The example below extracted from the Polygraph example creates an RTControlPanelMeter using an RTControlTrackBar C RTControlTrackBar timeAxisControlTrackbar public void InitializeTimeAxisTrackbar ChartAttribute attribl new ChartAttribute Colors White 3 ChartObj LS SOLID ChartColor Coral 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 ChartColor LightBlue 7 ChartObj LS SOLID ChartColor LightBlue double starttime ori
24. at lors Aquamarine lors DarkSalmon lors Moccasin trib4 Multiple Channel Bar Indicator 161 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 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 162 Multiple Channel Bar Indicator Public Overrides Function GetCustomBarOffset ByVal v As Double As Double Dim offset As Double 0 0 Return offset End Function GetC
25. 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 controlgrid ew RTFormControlGrid pTransforml null buttonlist numColumns 248 Buttons Track Bars and Other Form Control Classes 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 Dim attribl As New ChartAttribute Colors Black 3 ChartObj LS SOLID ChartColor Coral Dim buttonfont As ChartFont font9Bold Dim buttonlist As New ArrayList StartControl ButtonUncheckedText Start StartControl ButtonCheckedText Stop AddHandler StartControl Click New System Windows RoutedEventHandler AddressOf Me controlOn Button Click StartControl ButtonFont buttonfont StartControl ButtonChecked False buttonlist Add StartControl ResetErrorTerm ButtonUncheckedText Reset Error AddHandler ResetErrorTerm Click New System Wi
26. 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 187 Meter Indicators Needle Arc and Symbol LineStyle they are drawn A complete listing of RTMeterIndicator properties is found in the QCRTGraphSLCompiledHelpFile chm documentation file located in the doc subdirectory Arc Meter Indicator RTMeterArcIndicator com quinncurtis chart2dsl 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 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 C public RTMeterArcIndicator RTMeterCoordinates frame RIProcessVa
27. line plot each group is stacked on top of one another each group line a cumulative sum of the related group items before it 80 QCChart2D Class Summary 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 classes Polar Line and Scatter Plots The polar line charts use true polar not linear interpolation between data points PolarLinePlot PolarScatterPlot Antenna Plot Classes AntennaPlot AntennaLinePlot 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 This class is a concrete implementation of the PolarPlot class and displays data in a simple scatter plot format QCChart2D Class Summary 81 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 incl
28. meteraxisl LineWidth 3 meteraxisl LineColor Colors Black meteraxisl SetAxisTickSpace 20 meteraxisl SetAxisMinorTicksPerMajor 1 meteraxisl ShowAlarms false meterneedle MeterAxis meteraxisl chartVu AddChartObject meteraxisl RTMeterAxisLabels meteraxislabelsl new RTMeterAxisLabels meteraxisl meteraxislabels1 SetTextFont meterFont meteraxislabelsl SetAxisLabelsDir meteraxisl GetAxisTickDir meteraxislabelsl OverlapLabelMode ChartObj OVERLAP LABEL DRAW chartVu AddChartObject meteraxislabels1 VB Dim attribl As New ChartAttribute Colors Black 1 ChartObj LS SOLID Colors Blue 180 Meters Coordinates Meter Axes and Meter Axis Labels 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 ChartFont font12 Dim meterframel As New RTMeterCoordinates startarcangle arcextent startarcscale endarcscale arcdirection centerx centery arcradius 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 meterfr
29. tabItem1 gt lt Grid gt lt Grid ColumnDefinitions gt lt ColumnDefinition Width 40 gt lt ColumnDefinition Width 15 gt lt Grid ColumnDefinitions gt lt my ChartView Margin 18 11 16 6 Name elapsedTimeVerticalScrollingApp1 Grid Column 0 i gt lt my2 RTProcessVarViewer Margin 18 11 16 6 Name rtProcessVarViewerApp1 Grid Column 1 gt lt Grid gt lt sdk TabItem gt lt sdk TabItem Header Horizontal RTProcessVarDataTable Name tabItem2 gt lt Grid gt lt Grid RowDefinitions gt RowDefinition Height 40 gt lt RowDefinition Height 15 gt lt Grid RowDefinitions gt lt my ChartView Margin 18 11 16 6 Name scrollingApp1 Grid Row 0 gt lt my2 RTProcessVarViewer Margin 18 11 16 6 Name rtProcessVarViewerApp2 Grid Row 1 gt lt Grid gt lt sdk TabItem gt sdk TabControl Grid UserControl Scroll Application 1 0 00 06 0 00 16 0 00 26 0 00 36 0 50 100 150 308 Process Variable Viewer C public void InitProcessVarViewer RTProcessVarViewer rtProcessVarViewerl int rows 11 columns 3 startindex 0 rtProcessVarViewerl InitRTProcessVarViewer chartVu null currentTemperaturel rows columns startindex ChartObj VERT DIR rtProcessVarViewerl UseStripedGridBackground true rtProcessVarViewerl GridCellFont font14 rtProcessVarViewerl AddProcessVar currentTemperature2 Set custom decimal precision for
30. 0 01 ChartObj NORM GRAPH POS Dim backattrib As New ChartAttribute Colors Black 2 ChartObj LS SOLID Colors White rr SetChartObjAttributes backattrib rr SetChartObjClipping ChartObj NO CLIPPING chartVu AddChartObject rr Dim rrr As New RTRoundedRectangle2D meterframel 0 25 0 35 0 45 0 09 0 0 Miscellaneous Shape Drawing 297 ChartObj NORM GRAPH POS Dim backattrib2 As New ChartAttribute Colors Black 2 ChartObj LS SOLID _ Colors Black rrr SetChartObjAttributes backattrib2 rrr ZOrder 60 rrr SetChartObjClipping ChartObj NO CLIPPING chartVu AddChartObject rrr General Shapes Class RTGenShape com quinncurtis chart2dsl 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 Rectangle2D ByVal corner As Double _ ByVal shape As Integer _ ByVal postype As Integer _ C public RTGenShape PhysicalCoordinates transform Rectangle2D rect double corner int shape int postype 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 obje
31. 1 ChartObj LS SOLID Colors DarkMagenta Dim attrib2 As New ChartAttribute Colors Aquamarine 1 ChartObj LS SOLID Colors Aquamarine Dim attrib3 As New ChartAttribute Colors DarkSalmon 1 ChartObj LS SOLID Colors DarkSalmon Dim attrib4 As New ChartAttribute Colors Yellow 1 ChartObj LS SOLID Colors 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 Dim barjust As Integer ChartObj JUSTIFY MIN Dim barorient As Integer ChartObj VERT DIR Dim baraxis As New LinearAxis pTransforml 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 chartVu AddChartObject barAxisLab This uses an RTMultiProcessVar EngineCylindersl to initialize the indicator Dim barplot As New RTMultiBarIndicator pTransforml EngineCylindersl1 barwidth barspace barbase attribArray barjust barorient Multiple Channel Bar Indicator 159 barplot SegmentSpacing 50 barplot SegmentWidth 30 barplot IndicatorBackground New ChartAttribute Colors Black 1 _ ChartObj LS SOLID Colors Black barplot SegmentValueRoundMode ChartObj RT CEILING VALU
32. 203 204 205 206 208 210 342 345 346 348 RTComboProcessVar vi 16 202 203 204 205 206 208 210 342 345 346 348 RTControlButton 15 17 34 35 36 37 244 245 246 247 248 250 252 258 262 264 265 282 285 RTControlButton 15 37 244 262 RTControlTrackBar 17 34 35 36 136 137 244 252 253 254 255 257 258 260 RTControlTrackBar 17 34 35 36 136 137 244 252 253 254 255 256 257 258 260 261 RTDatasetTruncateArgs 16 RTElapsedTimePanelMeter 16 19 21 132 133 134 RTElapsedTimePanelMeter 16 19 21 112 132 133 134 RTFormControl 17 22 30 35 36 37 135 244 RTFormControl rire 36 RTFormControlGrid 16 27 30 35 37 97 244 245 246 248 249 257 262 263 264 265 RTFormControlPanelMeter 16 19 22 35 36 112 135 136 137 244 255 258 259 260 261 RTFormControlPanelMeter 16 19 22 35 36 112 135 136 137 244 255 256 257 258 259 260 261 RTGenShape 16 45 47 289 296 298 344 350 RTGenShape 16 45 47 289 296 298 344 350 RTGroupDatasetTruncateArgs n 16 RTGroupMultiValuePlot 10 12 15 16 27 29 30 31 38 97 223 227 235 238 239 240 242 354 367 RTGroupMultiValuePlot 10 12 15 16 27 29 30 31 38 97 223 227 235 238 239 240 242 354 367 RTMeterArcIndicator 16 22 25 184 186 187 188 202 RTM
33. 45 309 353 354 355 356 362 363 364 365 366 367 368 369 372 373 374 375 Scrolling Graphs 9 15 16 27 30 37 38 39 223 224 226 227 232 233 236 240 241 242 278 360 Scrolling Graphs 9 15 16 27 30 31 37 38 39 223 224 226 227 232 233 236 240 241 242 278 279 360 383 385 397 399 el 88 89 96 Silverlight applications Silverlight applications 3 5 vii 377 406 SimpleBarPlot 9 83 84 95 SimpleBarPlot e 9 83 84 95 SimpleDataset 57 58 61 62 94 98 286 359 SimpleDataset 57 58 61 62 94 98 203 286 359 SimpleLineMarkerPlot 9 83 84 95 SimpleLineMarkerPlot E SimpleLineMarkerPlot 9 83 84 95 SimpleLinePlot 9 83 85 95 232 233 234 235 236 237 242 243 SimpleLinePlot 9 83 85 95 232 233 234 235 236 237 242 243 386 399 SimplePlot 12 14 22 27 70 83 84 85 89 90 95 97 231 238 416 Appendix SimplePlot 12 14 22 27 70 83 84 85 89 90 95 97 231 238 361 363 364 365 374 375 SimpleScatterPlot 9 83 85 95 SimpleScatterPlot 9 83 85 95 SimpleVersaPlot sess 85 95 361 StackedBarPlot 72 77 95 238 StackedBarPlot 72
34. 90 double y2 0 9 ChartFont axisFont font12 ChartCalendar startTime new ChartCalendar ChartCalendar endTime new ChartCalendar endTime Add ChartCalendar SECOND 20 TimeCoordinates pTransforml new TimeCoordinates startTime currentTemperaturel DefaultMinimumDisplayValue endTime currentTemperaturel DefaultMaximumDisplayValue pTransforml SetGraphBorderDiagonal x1 yl x2 y2 Background graphbackground new Background pTransforml ChartObj GRAPH BACKGROUND Colors White chartVu AddChartObject graphbackground Background plotbackground new Background pTransforml ChartObj PLOT BACKGROUND Colors Black chartVu AddChartObject plotbackground TimeAxis xaxis new TimeAxis pTransforml ChartObj X AXIS xaxis LineColor Colors Black chartVu AddChartObject xaxis Using QCRTGraph to Create Silverlight Applications 385 LinearAxis yaxis new LinearAxis pTransforml ChartObj Y AXIS yaxis LineColor Colors Black chartVu AddChartObject yaxis ChartGrid yAxisGrid new ChartGrid xaxis yaxis ChartObj Y AXIS ChartObj GRID MAJOR yAxisGrid SetColor Colors White yAxisGrid SetLineWidth 1 yAxisGrid SetLineStyle ChartObj LS SOLID chartVu AddChartObject yAxisGrid ChartGrid xAxisGrid new ChartGrid xaxis yaxis ChartObj X AXIS ChartObj GRID MAJOR xAxisGrid SetColor Colors White xAxisGrid SetLineWidth 1 xAxisGrid SetLineStyle ChartObj LS SOLID
35. 94 LinearScale inn hhhhasuc 58 59 94 LineGapPlot sene 72 78 95 LineGapPlot alal 72 78 95 LogAutoScale sss 61 94 LOgAXIS rat 63 65 69 70 87 95 LOSAXIS Hits hac a etti LogAxis see 63 65 69 70 87 L gScale 55 acnumneee ER dedere 58 59 94 LogS a le 5er REIR 58 59 94 Magni View eena na ie bereitet ttt 89 91 94 Markers 88 89 90 96 231 239 markera os nari 70 81 83 89 Marker 9 11 45 70 81 82 83 84 85 88 89 90 95 96 231 235 239 358 371 Meters 10 17 18 40 43 309 333 334 336 339 341 342 349 Meters Clocks and Dials 187 194 198 Meters Clocks and Dials vi 16 19 22 24 25 26 32 97 112 165 166 167 168 169 170 171 172 173 174 178 179 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 202 203 204 205 206 207 208 209 210 211 334 342 345 346 348 MouseListeners Vise EE 89 90 91 94 MoveCoordinates sse 89 91 94 le ER 3 tirones eeiam adatti trs Moveliata i 89 90 94 MOVCOD EE Move bt eege gedd deed ee 89 90 94 Moving chart data eneee 89 90 94 Moving graph objects sess 89 90 94 Appendix 413 MultiLinePlot MultiLinePlot NearestPointData 92 93 94 Numeric axis labelS
36. AlarmStateEventEnable Get Set the flag for the alarm state event enable Set to true to enable alarm checking AlarmTransitionEventEnable Get Set the flag for the AlarmTransitionEventHandler delegate enable Set to true to enable the AlarmTransitionEventHandler delegate CurrentValue Get the process variable current value DatasetEnableUpdate Get Set to true to enable historical data collection in the process variable dataset DefaultAttribute Get Set the default attributes for the process variable DefaultMaximumDisplayValue Get Set maximum allowable display value for the process variable DefaultMinimumDisplayV alue Get Set minimum allowable display value DetailedDescription GoodValue MaximumValue MinimumValue PrevCurrentValue PrevTimeStamp ProcessVarDataset ShortDescription TagName TimeStamp Uniqueldentifier UnitsString Public Instance Events AlarmStateEventHandler AlarmTransitionEventHandler Process Variable and Alarm Classes 101 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 G
37. Application Give the project a unique name In our examples slfolder this example is the SLRTApplicationl so give your example a different name such as SilverlightApplicationl You will end with a basic Silverlight based application For purposes of this example the chart will placed in the initial default window New Project Recent Templates Installed Templates NET Framework 4 v Sort by Default v i Type Visual Basic A wi i Silverlight Application visual Basic Visual Basic A blank project for creating a rich internet Windows application using Silverlight web Silverlight Class Library Visual Basic Office Cloud Silverlight Business Application Visual Basic Reporting SharePoint FS Silverlight Navigation Application Visual Basic Silverlight Test WCF RIA Services Class Library Visual Basic WCF Workflow Visual C Visual C Visual F Other Project Types Database Test Projects Online Templates Name SLRTApplication Location F Quinn Curtis DotNet QCRTGraphivisual Basicexamples sl Solution name SLRTApplicationi U create directory for solution Add to source control After you press OK you will see the following dialog 392 Using Real Time Graphics Tools to Create Silverlight Applications New Silverlight Application Click the checkbox below to host this Silverlight application in a Web site Otherwise a test page will be generated during build
38. Dim rows As Integer 3 columns As Integer 11 startindex As Integer 0 rtProcessVarViewerl InitRTProcessVarViewer chartVu Nothing currentTemperaturel rows columns startindex rtProcessVarViewerl UseStripedGridBackground True rtProcessVarViewerl GridCellFont font12 rtProcessVarViewerl AddProcessVar currentTemperature2 Set custom decimal precision for each row rtProcessVarViewerl SetFormatDecimalPos 0 0 rtProcessVarViewerl SetFormatDecimalPos 1 1 rtProcessVarViewerl SetFormatDecimalPos 2 2 End Sub Vertical Orientation DatasetViewer example extracted from the example program Process VarDataTables ElapsedTimeVerticalScrolling lt UserControl x Class ProcessVarDataTables MainPage xmlns http schemas microsoft com winfx 2006 xaml presentation xmlns x http schemas microsoft com winfx 2006 xaml xmlns d http schemas microsoft com expression blend 2008 xmlns mc http schemas openxmlformats org markup compatibility 2006 mc Ignorable d xmlns myz clr namespace com quinncurtis chart2dsl assembly QCChart2DSL xmlns my2 clr namespace com quinncurtis rtgraphsl assembly QCRTGraphSL d DesignHeight 900 d DesignWidth 1000 xmlns sdk http schemas microsoft com winfx 2006 xaml presentation sdk gt Process Variable Viewer 307 lt Grid x Name LayoutRoot Background White gt lt sdk TabControl Margin 4 7 8 13 Name tabControl1 gt lt sdk TabItem Header Vertical RTProcessVarDataTable Name
39. 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 private void 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 rtAutoScrollGraphl UpdateScrollGraph timestamp currentValues true get elapsed time in milliseconds double etimemsecs timestamp GetCalendarMsecs startCalendar GetCalendarMsecs TimeSpan etimespan TimeSpan FromMilliseconds etimemsecs rtAutoScrollGraph2 UpdateScrollGraph etimespan currentValues true VB Public Sub InitializeGraph Dim starttime As DateTime DateTime Now Dim endtime As DateTime DateTime Now endtime endtime AddSeconds 10 rtAutoScrollGraphl InitRTAutoScrollGraph starttime D rtAutoScrollGraphl InitSimpleRTPlotObject ChartObj LINE rtAutoScrollGraphl InitSimpleRTPlotObject ChartObj LINE rtAutoScrollGraphl InitSimpleRTPlotObject ChartObj SCAT rtAutoScrollGraphl SimplePlotObj SymbolAttributes Symbo rtAutoScrollGraphl GraphScrollFrame ScrollRescaleMargin rtAutoScrollGraphl GraphScrollFrame ScrollScaleModeY rtAutoScrollGraphl InitStrings RTAutoScrollGra
40. 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 QCRTGraph Real Time Graphics Tools for Silverlight blica il ip RR NO 1 Directory Structure of OCR TOraph for Silverlight niaiccuaa t ta herein nie 6 LIE TTT ee MM E 9 2 Class Architecture of the Real Time Graphics Tools for Silverlight Class Library
41. GRAPHAREA BOTTOM RADIUS BOTTOM RADIUS_TOP RADIUS LEFT RADIUS RIGHT RADIUS CENTER PanelMeter SetPositionReference method Text justification is set to JUSTIFY MAX JUSTIFY CENTER Positions the panel meter centered below the plot area Text justification is set to JUSTIFY CENTER JUSTIFY MAX Positions the panel meter centered above the plot area Text justification is 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 1s 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 o
42. Net programs you should copy this file to the Windows Fonts subdirectory AND reboot your computer The reboot forces Windows to re enumerate the fonts 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 subdirectory and the computer rebooted The example below creates an instance of the Digial SF font ChartFont fontl2Numeric new ChartFont Digital SF 12 FontStyles Normal 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 Panel Meter Classes 113 If you create an application that uses this font you have to plan on how to install it on the target computer You can install a copy of the Digital TTF file in the target computers Windows Fonts subdirectory While it may be possible to register a font some other way we aren t aware of a Silverlight equivalent to the Net PrivateFontCollection class Panel Meters Class RTPanelMeter com quinncurtis chart2dsl 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 Get Set whether the color of the indicator objec
43. UpdateIndicator 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 Auto Indicator Classes 313 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 MainTitle MaxIndicatorValue MinimumSize 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 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 Inherit
44. 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 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 RIProcessVar ByVal alarm As RTAlarm _ ByVal channel As Integer Cf public RTAlarmEventArgs RTProcessVar pv RTAlarm alarm int channel 108 Process Variable and Alarm Classes 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 Th
45. 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 AnnunciatorRect Get Set the annunciator rectangle A complete listing of RTAnnuciator properties is found in the QCRTGraphSLCompiledHelpFile chm documentation file located in the doc subdirectory Example for single channel annunciator The example below extracted from the RTGraphNetDemo example file AnnunciatorUserControll method InitializeAnnunciator1 creates a single channel annunciator with a tag name numeric readout and alarm C private void InitializeAnnunciatorl CartesianCoordinates pTransforml new CartesianCoordinates 0 0 0 0 1 0 1 0 pIransformi SetGraphBorderDiagonal 0 01 05 0 15 0 35 Single and Multiple Channel Annunciators 215 Background background new Background pTransforml ChartObj PLOT BACKGROUND Colors Gray chartVu AddChartObject background Rectangle2D annunrect new Rectangle2D 0 05 0 05 0 9 0 9 ChartAttribute attribl new ChartAttribute Colors DarkGray 5 ChartObj LS SOLID Colors DarkGray RTAnnunciator annunciator new RTAnnunciator pTransforml processVarl annunrect attribl ChartAttribute panelmeterattrib new ChartAttribute ChartColor SteelBlue 3 ChartObj LS SOLID Colors Black RTNumericPanelMeter panelmeter new RTNumericPanelMeter p
46. barjust As Integer _ ByVal barorient As Integer _ C public RTBarIndicator PhysicalCoordinates transform RTProcessVar datasource double barwidth 140 Single Channel Bar Indicator double barbase ChartAttribute attrib int barjust int barorient Parameters transform The coordinate system for the new RTBarlIndicator 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 BarWidth inherited from 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
47. 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 scatter plot symbols SQUARE TRIANGLE DIAMOND CROSS PLUS STAR LINE HBAR VBAR BAR3D CIRCLE Class Architecture 27 RTPanelMeter The abstract base class for the panel meter types Panel meters based objects can be added to RTSingleValueIndicator and RTMultiValueIndicator objects to enhance the graphics display with numeric alarm and string information The RTNumericPanelMeter RTAlarmPanelMeter RTStringPanelMeter and RTTimePanelMeter classes are described in the preceding section Solar Panel 140 120 100 80 60 18 45 00 18 46 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 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 chart2dsl ChartPlot RTPlot RTMultiValueIndicator RTMultiValueAnnunciator RTMultiBarIndicator RTGroupMultiValuePlot RTFormControlGrid RTScrollFrame RTVerticalScrollFrame Display objects deri
48. chartVu AddChartObject xAxisGrid LinearAxis yaxis2 new LinearAxis pTransforml ChartObj Y AXIS yaxis2 LineColor Colors Black yaxis2 AxisTickDir ChartObj AXIS MAX yaxis2 AxisIntercept xaxis AxisMax chartVu AddChartObject yaxis2 TimeAxisLabels xAxisLab new TimeAxisLabels xaxis xAxisLab TextFont axisFont chartVu AddChartObject xAxisLab NumericAxisLabels yAxisLab new NumericAxisLabels yaxis yAxisLab TextFont axisFont chartVu AddChartObject yAxisLab ScrollFrame new RTScrollFrame chartVu currentTemperaturel pTransforml ChartObj RT FIXEDEXTENT MOVINGSTART AUTOSCROLL rapid ScrollFrame AddProcessVar currentTemperature2 ScrollFrame ScrollScaleModeY ChartObj RT AUTOSCALE Y MINMAX Allow 100 samples to accumlate before autoscaling y axis This prevents changes of the y scale for the first few samples ScrollFrame MinSamplesForAutoScale 100 scrollFrame ScrollRescaleMargin 0 05 chartVu AddChartObject scrollFrame 386 Using Real Time Graphics Tools to Create Silverlight Applications ChartAttribute attribl new ChartAttribute Colors Yellow 2 ChartObj LS SOLID SimpleLinePlot lineplotl new SimpleLinePlot pTransforml null attribl lineplotl SetFastClipMode ChartObj FASTCLIP X RTSimpleSingleValuePlot solarPanelLinePlotl new RTSimpleSingleValuePlot pTransforml lineplotl currentTemperaturel chartVu AddChartObject solarPanelLinePlotl
49. class The WPF Silverlight version of the Color class derives from the System Windows Media Color class Whereas the color enumerated constants for System Drawing colors are found in the Color class in WPF they are found in the Colors class The Silverlight version of the Color class only includes a minimal set of predefined colors We were forced to create an auxiliary class ChartColor which includes static constants you can reference for the missing named colors Class Architecture 49 Example System Drawing WPF Silverlight C Color c Color Red Color c Colors Red Color c Colors Red VB Dim c as Color Color Red Dim c as Color Colors Red Dim c as Color Colors Red Access additional colors in the Silverlight version using the static color constants in the ChartColor class CH Color c ChartColor Aqua VB Dim c as Color ChartColor Aqua ChartColor FromArgb and Color Rgb Custom RGB colors were defined in Net using the Color FromArgb static method It had a couple of overrides one with four arguments for a full ARGB color with alpha blending specification and one with just three for RGB The WPF Color class has two different static methods used to define RGB colors Color FromArgb for the full ARGB specification and Color FromRgb for just RGB The Silverlight Color class has only one such method FromArgb which uses byte arguments for the color rgba values Since we use these routines extensively we added additional
50. 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 Controls UserControl ChartView The starting point of a chart is the ChartView class The ChartView class derives from the Net System Windows Controls UserControl class The ChartView class manages a collection of chart objects in a chart and automatically updates the chart objects whenever the control needs to redraw itself Since the ChartView class is a subclass of the UserControl class it can act as a container for other Silverlight components such as buttons and checkboxes 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 58 QCChart2D Class Summary SimpleDataset TimeSimpleDataset the x value array the number of x values the dataset name and the dataset type Represents simple xy data where for
51. 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 130K Click on one of the Batone below to change the nua range 60 El al d 10 N gd 4 CAM VA fi AN 4 al IA AX MAA 8 v 4 400 1000 12 0K 40 I l l 4 J J A 6 d A 1 si a J 200 500 11 0K A j 20 4 7 al d A N R 3 F Vi ND f d H HE i wd A GI Ve A Leal 1 vi 1 Vi ui di 0 0 10 0K tg gf ee 3p a ef D 0 20 40 60 80 100 Event Partition Graphs can have an UHLIMITED number of x and y axes 64 QCChart2D Class Summary Axis This class is the abstract base class for the other axis classes It contains data and drawing routines common to all axis classes Linear Axes 100 0 00004 0 00002 0 00000 0 01 0 02 0 03 0 04 0 05 0 00002 50 50 0 00004 100 0 4 0 2 0 0 0 2 0 4 cotiiitiiitiirirtiii tis 0 10000 20000 30000 40000 10 A IE MS p ca E34 ag PO asa 80 80 2800 15 20 40 40 2400 25 0 TTTTTTTTTTTTTTTTTTT 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
52. 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 the 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 attribi barjust barorient ChartAttribute panelmeterattrib new ChartAttribute ChartColor SteelBlue 3 ChartObj LS SOLID Colors Black RTNumericPanelMeter panelmeter new RTNumericPanelMeter pTransforml panelmeterattrib panelmeter PanelMeterPosition ChartObj OUTSIDE PLOTAREA MIN panelmeter TextColor Colors SpringGreen panelmeter NumericTemplate TextFont fontl4Numeric panelmeter NumericTemplate DecimalPos 0 122 Panel Meter Classes panelmeter AlarmIndicatorColorMode ChartObj RT TEXT BACKGROUND COLOR CHANGE ON ALARM panelmeter PanelMeterNudge new Point2D 0 4 barplot AddPanelMeter panelmeter VB Dim barplot As New RTBarIndicator pTransforml batteryCharge _ barwidth barbase attribl barjust barorient Dim panelmeterattrib As New ChartAttribute ChartColor SteelBlue 3 _ ChartObj LS SOLID Colors Black Dim paneltagmeterattrib As New ChartAttribute ChartColor SteelBlue 0 _ ChartObj LS SOLID
53. end bulb Interior axs Numeric readout 020 60 100 GMB 20 40 60 80 100 Genre GMB v Units string Tag string Segmented wb be 0 20 40 60 80 100 0 20 40 60 80 100 GMB GMB Below you will find the code used to initialize the first of the bargraphs above extracted from the AutoGraphDemos AutoBarIndicatorsUserControll example program The bars are placed in the underlying windows using the AutoBarIndicatorsUserControll xaml file UserControl x Class AutoGraphDemo AutoBarIndicatorsUserControli xmlns http schemas microsoft com winfx 2006 xaml presentation xmlns x http schemas microsoft com winfx 2006 xaml xmlns d http schemas microsoft com expression blend 2008 xmlns mc http schemas openxmlformats org markup compatibility 2006 mc Ignorable d xmlns my clr namespace com quinncurtis chart2ds1 assembly QCChart2DSL xmlns my2 clr namespace com quinncurtis rtgraphsl assembly QCRTGraphSL Height 600 Width 800 xmlns sdk http schemas microsoft com winfx 2006 xaml presentation sdk gt lt Grid gt lt Grid RowDefinitions gt lt RowDefinition Height 10 gt lt RowDefinition Height 10 gt lt RowDefinition Height 10 gt RowDefinition Height 10 gt lt Grid RowDefinitions gt lt Grid ColumnDefinitions gt lt ColumnDefinition Width 10 gt lt ColumnDefinition Width 10 gt 320 Auto Indicator Classes ColumnDefinition Widt
54. 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 100 s0 OC 40 4 20 b EN 100 SE 40 4 20 0 0 20 40 60 80 100 zm 4 A b 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 the bar indicators Other items also shown include axes axis labels panel meters and alarm indicators 24 Class Architecture RTBarIndicator 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 40 60 0 80 0 100 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 RTMet
55. extent arcExtent ArcRadius Get Set radius of the meter arc in plot area normalized coordinates Get Set the scaling value associated with the ending position of the meter arc Get Set Specifies the starting arc angle position of the meter arc in degrees Get Set the scaling value associated with the startArcAngle position of the meter arc A complete listing of RTMeterCoordinates properties is found in the QCRTGraphSLCompiledHelpFile 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 Meters Coordinates Meter Axes and Meter Axis Labels 169 degrees and has an arc extent of 270 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 ChartFont 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 Double 0 0 Dim endarcscale As Double 100 0 Dim arcd
56. format of the PlotLabelTemplate property Sets the line color for the chart object Sets the line style for the chart object Sets the line width for the chart object Get the number of channels in the indicator Set Get the plot objects data point template If the plot from ChartPlot PointerSymbolNum PrimaryChannel inherited from RTPlot RTDataSource inherited from RTSingleValueIndicator SegmentCornerRadius SegmentSpacing SegmentValueRoundMode SegmentWidth ShowDatapointValue inherited from ChartPlot StepMode inherited from ChartPlot ZOrder inherited from GraphObj Multiple Channel Bar Indicator 155 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 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
57. from the example program RTGraphNetDemo file Diall methods InitializeGraph and InitializeDiall 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 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 Dials and Clocks 210 private void InitializeDiall 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 ChartFont meterFont FontArchive 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 Colors White chartVu AddChartObject gbackground ChartAttribute frameattrib new ChartAttribute Colors Black 3 ChartObj LS SOLID Colors Blue ChartAttribute needleattribl new ChartAttribute C
58. meters 164 Multiple Channel Bar Indicator 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 meter 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 origi
59. 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 PHYS POS formControlTrackBarl FormControlSize new Dimension 1 0 1 0 chartVu AddChartObject formControlTrackBarl VB Dim trackbarfont As ChartFont font64Numeric Dim trackbarTitlefont As ChartFont font12Bold 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 ChartColor LightBlue 7 ChartObj LS SOLID ChartColor LightBlue runnersPaceTrackbar New RTControlTrackBar 0 0 15 0 0 1 1 0 1 n 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 138 Panel Meter Classes formControlTrackBarl SetLocation 0 0 0 ChartObj PHYS POS formControlTrackBarl Form
60. 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 screen 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 10 updates second 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 because faster the screen updates should be able to approach the 30 60 frames seconds of a CRT monitor It will never need to be higher than that because the eye cannot track changes in the screen faster than that anyway Since all real time plot objects are derived from the QCChart2D ChartPlot class the methods and properties of that class are available to set commonly used attributes such as the real time
61. 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 318 Auto Indicator Classes 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 Horiz 3 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 the numeric value sits on top of the bulb Example for initializing RTAutoBarIndicator objects The example below extracted from the AutoGraphDemos AutoBarIndicators example draws four vertical and four horizontal bargraphs Auto Indicator Classes 319 Wi Window1 eee Mixed Chart AutoBarIndicators AutoMeterIndicators AutoMultiBarIndicators AutoPanelMeterIndicators AutoDialsAndClocksIndicators 100 A 60 E PET O an L Bar
62. 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 168 Meters Coordinates Meter Axes and Meter Axis Labels arcradius Specifies radius of the meter arc in plot area normalized coordinates Selected Public Instance Properties ArcCenterX Get Set Specifies x position of the center of the meter arc in plot area normalized coordinates ArcCenterY Get Set Specifies y position of the center of the meter arc in plot area normalized coordinates ArcDirectionPositive Get Set 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 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
63. 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 library two special classes RTSimpleSingleValuePlot and RTGroupMultiValuePlot are used to interface the QCChart2D plot objects to the process variable data classes That way any QCChart2D SimplePlot or GroupPlot object can be converted into a real time scrolling graph without adding any code to the Real Time Graphics Tools for Silverlight library Class Architecture 13 Real Time Graphics Tools for Silverlight Class Summary The Real Time Graphics Tools for Silverlight library is a super set of the QCChart2D library The classes of the QCChart2D library are an integral part of the software A summary of the QCChart2D classes appears below QCChart2D Class Summary Chart view class Data classes Scale transform classes The chart view class is a System Windows Controls 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 con
64. 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 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 default 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 Inherited from DataGridBase Set to true and the table will redraw using the current data associated with the update of th RTProcessVar ColumnHeaderAttribute Inherited from DataGridBase AutoRedrawTable ColumnHeaderFont ColumnHeads DataArray Dock DoubleBufferEnable DrawEnable GridAttribute GridCellFont Height HorizontalGroupPlot HorizontalScroll HScroll HScrollBarl Left Location NumCols NumericFormat N
65. pv Parameters SV 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 pv The value of the process variable 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 100 Process Variable and Alarm Classes 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 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 If you plan to use the RTAlarm event handlers make sure that you create a unique RTAlarm object for every alarm added to a RTProcessVar object The most commonly used RTProcessVar properties are Selected Public Instance Properties
66. 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 QCChart2D Class Summary 83 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 explosion of a ring segment with respect to the origin of the ring 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 84 QCChart2D Class Summary Production of Green Bars is Up P 4 E IE LL To a n rur Tee Uo Tp um 1998 1999 2000 2001 2002 2003 2004 2005 Bar plots can have the values of the bars displayed above or inside each bar 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 SimpleBarPlot History Test Results 100 NEE 23 23 n 90 nn DI 2 4 a o oa Bene AECH LEE RE 3 VM o
67. schemas microsoft com winfx 2006 xaml presentation xmlns x http schemas microsoft com winfx 2006 xaml xmlns d http schemas microsoft com expression blend 2008 xmlns mc http schemas openxmlformats org markup compatibility 2006 xmlns my clr namespace com quinncurtis chart2dsl assembly QCChart2DSL xmlns my2 clr namespace com quinncurtis rtgraphsl assembly QCRTGraphSL mc Ignorable d d DesignHeight 300 d DesignWidth 400 gt lt Grid x Name LayoutRoot Background White gt my ChartView x Name scrollPlot1 Margin 10 10 10 10 gt lt Grid gt lt UserControl gt Display the MainPage asml cs behind code file It will look something like this e Adda reference to the QCChart2DSL and QCRTGraphSL namespaces com quinncurtis chart2dsl and com quinncurtis rtgraphsl in the using section of the program using com quinnturtis chartzds1 using com quinncurtis rtgraphsl s In some of our other examples we also add references to some other Net and ImageTool libraries in support of printing and Image files Add a new simple class file named ScrollingGraph to the project Alternatively select Add Existing Item and select the file ScrollingGraph cs from our SLRTApplicationl example folder If you do that make sure you change the declared namespace at the top of the file matches your projects namespace 382 Using Real Time Graphics Tools to Create Silverlight Applications Add New Item SLRTApplication
68. 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 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 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 display of data values next to the associated data point Set Get the plot objects step mode Use one of the line plot step constants NO STEP STEP START STEP END or STEP NO RISE LINE Sets the z order of the object in the chart Every object has a z order value Each z order value does NOT have 156 Multiple Channel Bar Indicator 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 RTMultiBarIndicator properties is found in the QCRTGraphSLCompiledHelpFile 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 InitializeEngine1TempIndicator creates the 4 bar segmented bar temperature indicator in the left upper section of the graph It demonst
69. static routines for Color creation in the ChartColor class System Drawing CH Color c Color FromArgb 127 255 0 0 Color c Color FromArgb 255 0 0 VB Dim as Color GColor FromArgb 127 25570 0 Dim c as Color Color FromArgb 255 0 0 WPF CH Color es Color FromArgb 127 255 0 0 Color c Color FromRgb 255 0 0 VB Dim e as Color Color FromArgb 127 255 0 0 Dim e as Color Colot FromRgb 255 0 0 Silverlight CH Color e ChareColor FromArgb 127 255 0 9 Color c ChartColor FromRgb 255 0 0 VB Dim e as Color ChartColor FromArgb 127 255 0 0 Dim e as Color ChartColor FromRgb 255 0 0 50 Class Architecture Linestyle Constants Line styles are used to specify whether a line is solid dashed dotted or some combination of dot and dash styles The line style class used in the Net Forms based version of QCChart2D QCRTGraph is derived from the System Drawing DashStyle class The WPF version of the line style class derives from the System Windows Media DashStyle class Whereas the line style enumerated constants for System Drawing line styles are found in the DashStyle class in WPF they are found in the DashStyles class Silverlight does not have any predefined line styles Instead line sty les are created by manipulating the Stroke characteristics of line shapes We use some predefined line style constants found as static constants in the ChartObj class to make specifying line styles simpler Note that the dash st
70. 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 RTVerticalScrollFrame which manages scrolling in the vertical direction Scroll Frame Class RTScrollFrame com quinncurtis chart2dsl 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 1s 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 Single and Multiple Chan
71. 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 76 QCChart2D Class Summary Price 35 30 25 NASDAQ Daily Stock Price 1800 T 1 05 09 FloatingStackedBarPlot T T T T T T T 1 12 09 1 19 09 1 26 09 2 02 09 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 plots and group bar plots Drug Sales The Group bar graph and the Stacked bar graph represent two different ways of displaying the same data GroupBarPlot 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 QCChart2D Class Summary 77 StackedBarPlot 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 Group VersaPlot T
72. 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 62 QCChart2D Class Summary values in SimpleDataset and GroupDataset objects Logarithmic scales and axes use it for auto scale calculations TimeAutoScale This class is a concrete implementation of the 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 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 line
73. 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 Linear Axis ChartObjAttributes inherited from GraphObj InnerAlarmArcNormalized MajorTickLine Width MeterAxisLabels 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 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 Get Set the major tick line width Get Set the RTMeterAxisLabels object
74. the same as our original QCChart2D QCRTGraph Grid class WPF Silverlight CH ChartAttribute attrib3 new ChartAttribute Colors Gray 1 ChartO bj L5 DOT 1 4 ChartGrid ygrid new ChartGrid xAxis yAxis ChartObj Y AXIS ChartObj GRID MAJOR ygrid SetChartObjAttributes attrib3 chartVu AddChartObject ygrid VB Dim attrib3 As New ChartAttribute Colors Gray 1 ChartObj LS DOT 1 4 Dim ygrid As New ChartGrid xAxis yAxis ChartObj Y AXIS ChartObj GRID MAJOR ygrid SetChartObjAttributes attrib3 chartVu AddChartObject ygrid Mouse Button Constants WPF events use different mouse button constants than Net Forms based programming The Net Forms mouse event constants are found in System Windows Forms Mouse Buttons while the WPF mouse constants are found in System Windows Input MouseButton Silverlight does not have any mouse button constants So we added integer Left Right and Middle constants to a MouseButton class we include with the library Mouse Event Arguments In Net Forms programming the MouseDown MouseUp and MouseMove events use the System Windows Forms MouseEventArgs data type In WPF Silverlight programming the MouseDown and MouseUp events use the System Windows Input MouseButtonEventArgs type and the MouseMove event uses the System Windows Input MouseEventArgs type Net Forms Class Architecture 53 protected void OnMouseDown MouseEventArgs e protected void OnMouseUp MouseEventArgs e pro
75. 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 The user can recover previous zoom levels using a zoom stack e User definable zoom limits prevent numeric under and overflows The Real Time Graphics Tools for Silverlight 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 return 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 280 Zooming values displayed Disable the RTScrollFrame updates u
76. 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 0 00 00 ElapsedTimeAxis 8 00 00 16 00 00 1D 0 00 00 Time The elapsed time axis is very similar to the linear axis and is subclassed from that class The main 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 Polar Axes A 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 68 QCChart2D Class Summary 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 180 AntennaAxes 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 cente
77. timer2 As New System Windows Threading DispatcherTimer currentTemperatureValuel As Double 110 0 currentTemperaturel As RTProcessVar currentTemperatureValue2 As Double 100 0 currentTemperature2 As RTProcessVar ScrollFrame As New RTScrollFrame templowalarml As RTAlarm temphighalarml As RTAlarm templowalarm2 As RTAlarm temphighalarm2 As font12 As New Char fontl4 As New Char RTAlarm tFont Microsoft Sans Serif 12 tFont Microsoft Sans Serif 14 FontStyles Normal FontStyles Normal fontl4Numeric As New ChartFont Digital SF 14 FontStyles Normal chartVu As ChartView Public Sub New chartvu 1 As ChartView chartVu InitializeGraph End Sub Private Dim Dim Dim Dim Dim Dim Dim chartvu 1 Sub InitializeScrollGraph x1 As yl As x2 As y2 As Double Double Double Double D 0 Ox 0 1 L 9 9 axisFont As ChartFont font12 startTime As New ChartCalendar endTime As New ChartCalendar endTime Add ChartCalendar SECOND 20 Dim pTransforml As New TimeCoordinates startTime currentTemperaturel DefaultMinimumDisplayValue endTime currentTemperaturel DefaultMaximumDisplayValue 398 Using Real Time Graphics Tools to Create Silverlight Applications pTransforml SetGraphBorderDiagonal x1 yl x2 y2 Dim graphbackground As New Background pTransforml ChartObj GRAPH BACKGROUND Colors White chartVu AddChartObject graphbac
78. 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 form of the PID control equation in analog form is Eqn 1 de m t K e t Ki fe t dt Ka di proportional integral derivative where m t controller output deviation K proportional gain Ki reset multiplier integral time constant Ka 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 K K and Kg 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 K 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 K will increase the integral gain action just like increasing K and Ka will increase the proportional gain and derivative gain action If 1 K is used then decreasing values of K will
79. 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 File and Printer Rendering Classes ChartPrint BufferedImage ChartPrint BufferedImage This class implements printing using the Silverlight System Windows Printing PrintDocument print related services It can select setup and output a chart to a printer Printing from a Silverlight application running in a web browser requires special security considerations In general it can only be initiated by the user not the program This class will convert a ChartView object to a System Windows Media Imaging WriteableBitmap 92 QCChart2D Class Summary object Silverlight does not yet have any image transformation encoders as do regular Net and WPF a bizarre omission So you can t easily transform your WriteableBitmap to a JPEG TIFF GIF or BMP file Instead you must use encoders available from a third party Imagetools for example to save a WriteableBitmap image to a file There are special security issues associated with saving files to the computer when running an Internet application Though it is possible to save files to isolated storage a web server via a web service or to the users own machine Miscellaneous Utility Classes ChartCalendar ChartFont ChartColor CSV Dimension Point2D
80. 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 Class Architecture 19 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 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 chart2dsl 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
81. 0 Click checkBox2_Click gt Numeric readout lt CheckBox gt lt ColumnDefinition Width 10 gt lt ColumnDefinition Width 10 gt lt ColumnDefinition Width 10 gt lt ColumnDefinition Width 10 gt lt ColumnDefinition Width 10 gt id ColumnDefinitions gt RTAutoMeterIndicator Grid Column gt RTAutoMeterIndicator Grid Column 1 gt RTAutoMeterIndicator Grid Column 2 gt RTAutoMeterIndicator Grid Column 3 gt RTAutoMeterIndicator Grid Column gt RTAutoMeterIndicator Grid Column 1 gt RTAutoMeterIndicator Grid Column 2 gt RTAutoMeterIndicator Grid Column 3 gt RTAutoMeterIndicator Grid Column gt RTAutoMeterIndicator Grid Column 1 gt RTAutoMeterIndicator Grid Column 2 gt RTAutoMeterIndicator Grid Column 3 gt Margin 2 2 2 2 Margin 2 2 2 2 Margin 2 2 2 2 Margin 2 2 2 2 Margin 2 2 2 2 Margin 2 2 2 2 Margin 2 2 2 2 Margin 2 2 2 2 Margin 2 2 2 2 Margin 2 2 2 2 Margin 2 2 2 2 Margin 2 2 2 2 Auto Indicator Classes 341 Name rtAutoMeterIndicator1 Name rtAutoMeterIndicator2 Name rtAutoMeterIndicator3 Name rtAutoMeterIndicator4 Name rtAutoMeterIndicator5 Name rtAutoMeterIndicator6 Name rtAutoMeterIndicator7 Name rtAutoMeterIndicator8 Name rtAutoMeterIndicator9 Name rtAutoMeterIndicator10 Name rtAutoMeterIndicator11 Name rtAutoMeterIndicator12 Grid Row 2 Grid Column 4 gt l
82. 0 bool arcdirection false double arcradius 0 50 double centerx 0 0 centery 0 0 ChartFont meterFont font12 RTMeterCoordinates meterframe new RTMeterCoordinates startarcangle arcextent startarcscale endarcscale arcdirection centerx centery arcradius meterframe SetGraphBorderDiagonal 0 8 0 0 99 0 3 ChartAttribute frameattrib new ChartAttribute Colors Black 3 ChartObj LS SOLID Colors Blue Seconds ChartAttribute needleattribl new ChartAttribute Colors Black 1 ChartObj LS SOLID Colors Blue RTMeterNeedleIndicator meterneedlel 207 Dials and Clocks new RTMeterNeedleIndicator meterframe clockdata 0 meterneedlel NeedleBaseWidth 1 meterneedlel SetChartObjAttributes needleattribl meterneedlel NeedleLength 0 5 chartVu AddChartObject meterneedlel Minutes ChartAttribute needleattrib2 new ChartAttribute Colors Black l ChartObj LS SOLID Colors 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 Colors Black 1 ChartObj LS SOLID Colors Blue RTMeterNeedleIndicator meterneedle3 new RTMeterNeedleIndicator meterframe clockdata 2 meterneedle3 NeedleBaseWidth 5 meterneedle3 SetChartObjAtt
83. 0 double arcextent 90 double startarcscale 0 0 double endarcscale 32 0 bool arcdirection false Meters Coordinates Meter Axes and Meter Axis Labels 183 double arcradius 0 8 double centerx 0 0 centery 0 0 RTMeterCoordinates meterframe new RTMeterCoordinates startarcangle arcextent 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 meteraxis SetAxisTickDir ChartObj AXIS MIN meteraxis LineWidth 2 meteraxis LineColor Colors White meteraxis SetAxisTickSpace 4 meteraxis SetAxisMinorTicksPerMajor 4 meteraxis ShowAlarms true meterneedle MeterAxis meteraxis chartVu AddChartObject meteraxis ChartFont meterFont font10Bold 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 SetAxisLa
84. 0 1 barbase 0 0 barspace 0 25 int barjust ChartObj 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 baraxis2 SetAxisIntercept pTransforml GetStopX baraxis2 SetAxisTickDir ChartObj AXIS MAX chartVu AddChartObject baraxis2 NumericAxisLabels barAxisLab new NumericAxisLabels baraxis chartVu AddChartObject barAxisLab RTMultiBarIndicator barplot new RTMultiBarIndicator pTransforml EngineCylinderTempl barwidth barspace barbase attribArray barjust barorient barplot SegmentSpacing 50 barplot SegmentWidth 30 barplot IndicatorBackground new ChartAttribute Colors Black 1 ChartObj LS SOLID Colors Black barplot SegmentValueRoundMode ChartObj RT CEILING VALUE barplot SegmentCornerRadius 0 barplot IndicatorSubType ChartObj RT BAR SEGMENTED SUBTYPE Add panel meters to barplot chartVu AddChartObject barplot 158 Multiple Channel Bar Indicator VB Private Sub InitializeEnginelTempIndicator Dim pTransforml As New CartesianCoordinates 0 0 0 0 1 0 800 0 pTransforml SetGraphBorderDiagonal 0 15 0 175 0 48 0 35 Dim background As New Background pTransforml ChartObj PLOT BACKGROUND Colors Gray chartVu AddChartObject background Dim attribl As New ChartAttribute Colors DarkMagenta
85. 01 209 210 212 214 215 216 220 221 222 289 290 291 300 301 303 304 305 306 307 312 313 319 320 325 326 332 333 335 336 344 347 348 350 351 353 360 363 364 365 366 374 375 379 381 384 392 394 398 Backgrounds 1 2 63 96 142 144 155 157 159 162 209 210 214 215 220 221 289 Bar graphs i narrare Bar graphs 6 10 17 18 40 41 42 309 310 314 317 319 320 321 327 330 332 333 354 366 BarDatapointValue see BarDatapointValue eee 95 Baretaphs deine pede eere req Bargraphs 16 19 22 24 29 97 112 121 122 123 124 125 128 138 139 142 143 144 145 146 147 148 149 150 151 158 160 161 310 312 325 BoxWhiskerPlot 72 74 95 BubblePlot BubblePlotLegend 86 95 BubblePlotLegendItem 86 95 BufferedlImage eene 91 94 BufferedImage sess 91 94 Button Controls estie te ge tens Button Controls 15 37 244 262 CandlestckPlot EE 72 74 95 CartesianCoordinates 59 60 94 120 131 134 136 137 142 144 155 157 159 161 213 215 217 218 220 221 246 249 255 260 265 286 291 292 293 CartesianCoordinates 59 60 94 120 131 134 136 137 142 144 155 157 159 161 213 215 217 218 220 221 246 248 249 250 251 25
86. 1 Installed Templates Sort by Default E Visual Cat Code ei Silverlight User Control Visual C Data General Web Silverlight h Installed Templates Type Visual C An empty class definition Silverlight Application Class Visual Silverlight Page Visual Online Templates Silverlight Child Window Visual Silverlight Templated Control Visual C Visual Silverlight Resource Dictionary Visual Class Diagram Visual Code File Visual HTML Page Visual JScript File Visual C e d S n Ha T 0 Resources File Visual C RuleSet Visual C Style Sheet Visual C CH m Tow Eile Mies ow SrolingGraph cs x The resulting ScrollingGraph cs file will contain using System using System Windows using System Collections Generic using System Linq using System Text using System Windows Media using System Windows Controls using System Windows Input namespace SLRTApplicationl public class ScrollingGraph public ScrollingGraph using using using using using using using using using using Using QCRTGraph to Create Silverlight Applications 383 Modify the ScrollingGraph file to create the desired chart Most all of our examples are structured the same way The constructor is changed to pass in a ChartView object Then a chart initialization routine is called which customized the chart See the ScrollingGraph cs f
87. 1 TestPage html lt x 8 File Edit View Favorites Tools Help sli Favorites amp gt FreeHotmal amp e gt s RTApplicationt n de gt Pagev Safety Tools Scroll Application 1 15 39 00 15 39 05 15 39 10 15 39 15 Internet There are other ways to incorporate charts into your application You can add a UserControl to your program Add UserControl and place the chart entirely in the UserControl The ChartView object is referenced in the Grid panel of the UserControl s xaml file and initialized in the UserControl s behind code file The UserControl derived class is then referenced in the main MainPage xaml file The UserControlChartExamplel demonstrates this method Or You can add a UserControl to your program but change the inheritance from UserControl to ChartView Since ChartView is a subclass of UserControl this is valid In this case you want to remove the Grid section from the xaml file of the ChartView derived class The Grid panel is opaque and the chart will not show through The ChartView derived class is then referenced in the main MainPage xaml file See the UserControlChartExample2 program for an example of this technique Or Youcan just reference the ChartView class in the main MainPage xaml file Define the chart in the behind code file MainPage xaml cs or MainPage xaml vb See the UserControlChartExample3 program for an example of this technique 21 Using Rea
88. 2 chartVu AddChartObject genshape 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 RTProcessVarViewer 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 In normal use you add the RTProcessVar Viewer to the XAML file of a window just like you have been adding a ChartView window The RTProcessVarViewer can be aligned with a chart by placing it in a grid row below or above the chart or in a grid column to the left or right of the chart You can allocate a different amount of space for the grid versus the chart using the Silverlight Gr
89. 2 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 Colors White chartVu AddChartObject gbackground Dim frameattrib As New ChartAttribute Colors Black 3 ChartObj LS SOLID Colors Blue Dim needleattribl As New ChartAttribute Colors Black 1 ChartObj LS SOLID Colors Blue Dim meterneedlel As New RTMeterNeedleIndicator meterframe bigProcessVarArray 0 meterneedlel NeedleBaseWidth 5 meterneedlel SetChartObjAttributes needleattribl meterneedlel NeedleLength 0 55 Dials and Clocks 212 chartVu AddChartObject meterneedlel Dim needleattrib2 As New ChartAttribute Colors Black 1 ChartObj LS SOLID Colors 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 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 messa
90. 3 lt Grid gt lt UserControl gt The window does not yet have any content First define a default size for the window by adjusting the DesignHeight and DesignWidth properties and add references to the QCChart2D and QCRTGraph namespaces In this case the QCChart2D namespace is com quinncurtis chart2dsl and it is located in the assembly DLL with the name QCChart2DSL The QCRTGraph namespace is com quinncurtis rtgraphsl and it is located in the assembly DLL with the name QCRTGraphSL So add the following line under the other xmlns namespace tags xmlns my clr namespace com quinncurtis chart2dsl assembly QCChart2DSL xmlns my2 2 clr namespace com quinncurtis rtgraphsl assembly QOCRTGraphSL These lines need to be resolved by adding a references to the QCChart2DSL and QCRTGraphSL libraries to the project Right click on Reference in the Solution Explorer window and select Add Reference Browse to the Quinn Curtis DotNet lib subdirectory and select QCChart2DSL DLL and QCRTGraphSL DLL files 394 Using Real Time Graphics Tools to Create Silverlight Applications Add Reference NET Projects Browse Recent Look in lib 514 QCChart2DSL dil I QCRTGraphsL dll SS QCSPCChartSL dll File name QCRTGraphSL dll QCChart2DSL dll Files of type Executable Files View the MainPage xaml code and add the reference to ChartView in the Grid layout panel The Mai
91. 4 118 122 125 129 132 135 138 139 140 141 151 152 153 154 184 185 186 193 197 212 216 223 227 230 238 242 243 260 264 357 358 363 364 365 370 371 373 374 375 RTProcessVar 10 12 14 16 18 19 20 21 22 24 25 26 277 28 29 33 38 97 98 99 100 101 102 103 104 105 106 107 108 109 110 112 114 118 119 121 122 123 126 127 129 132 135 138 141 146 147 151 152 154 158 159 160 161 170 184 185 186 187 193 197 198 202 203 204 205 206 212 213 216 217 219 221 222 223 224 227 228 231 238 239 242 258 260 262 263 264 274 276 278 299 300 301 304 310 313 321 326 334 336 344 351 354 360 367 RTProcessVar 7 10 12 14 16 18 19 20 21 22 24 25 26 27 28 29 33 38 97 98 99 100 101 102 103 104 105 106 107 108 109 110 112 114 118 119 121 122 123 126 127 129 132 135 138 141 146 147 151 152 154 158 159 160 161 170 184 185 186 187 193 197 198 202 203 204 205 206 212 213 216 217 219 221 222 223 224 227 228 231 238 239 242 258 260 262 263 264 274 276 278 299 300 301 303 304 305 306 307 310 313 321 326 334 336 344 351 354 360 367 383 386 387 397 400 Appendix 415 RTRoundedRectangle2D 16 289 293 294 295 RTRoundedRectangle2D e RTRoundedRectangle2D 16 289 293 294 295 RIScroll
92. 4 350 359 RTAnnunciator 16 19 22 23 112 212 213 214 215 RTAnnunciator 16 19 22 23 112 212 213 214 215 RTAutoBarIndicator 10 17 18 40 41 309 310 314 317 321 327 354 366 RTAutoBarIndicator 6 10 17 18 40 41 309 310 314 317 319 320 321 327 354 366 RTAutoClockIndicator 10 17 18 40 44 309 348 351 352 RTAutoClockIndicator 6 10 17 18 40 44 309 347 348 351 352 353 RTAutoDialIndicator 10 17 18 40 43 309 342 345 347 RTAutoDialIndicator 6 10 17 18 40 43 309 342 345 347 348 RTAutoMeterIndicator 10 17 18 40 43 309 333 334 336 339 349 RTAutoMeterIndicator 10 17 18 40 43 309 333 334 336 339 341 342 349 RTAutoMultiBarIndicator 10 17 18 40 42 309 321 330 RTAutoMultiBarIndicator 6 10 17 18 40 42 309 321 330 332 333 RTAutoPanelMeterIndicator 10 17 18 309 RTAutoPanelMeterIndicator 6 10 17 18 309 RTAutoScrollGraph eee RTAutoScrollGraph 6 10 17 18 45 309 353 354 355 356 362 363 364 365 366 367 368 369 372 373 374 375 RTBarlIndicator 16 19 22 24 97 112 121 122 123 124 125 128 138 139 142 143 144 145 146 147 149 150 158 160 310 312 325 RTBarlIndicator 16 19 22 24 97 112 121 122 123 124 125 128 138 139 142 143 144 145 146 147 148 149 150 158 160 161 310 312 325 RTComboProcessVar 16 202
93. 5 Dim background As New Background pTransforml ChartObj PLOT BACKGROUND Colors Gray chartVu AddChartObject background Dim attribl As New ChartAttribute ChartColor Bisque 5 ChartObj ChartColor Bisque Dim attrib2 As New ChartAttribute ChartColor Bisque 5 ChartObj ChartColor Bisque Dim attrib3 As New ChartAttribute ChartColor Bisque 5 ChartObj ChartColor Bisque L SOLID LS SOLID L SOLID Dim attrib4 As New ChartAttribute ChartColor Bisque 5 ChartObj ChartColor Bisque Dim attribArray As ChartAttribute attribl attrib2 attrib3 Dim numrows As Integer 2 Dim numcols As Integer 2 Dim annunciator As New RTMultiValueAnnunciator pTransforml processVarArray numcols numrows attribArray LS SOLID attrib4 Dim panelmeterattrib As New ChartAttribute ChartColor SteelBlue 3 ChartObj LS SOLID Colors Black Dim panelmeter As New RTNumericPanelMeter pTransforml processVar2 panelmeterattrib panelmeter PanelMeterPosition ChartObj CENTERED BAR panelmeter NumericTemplate TextFont FontArchive fontl4Numeric panelmeter NumericTemplate PostfixString ChrW 176 E Single and Multiple Channel Annunciators 223 annunciator AddPanelMeter panelmeter Dim panelmeter2 As New RTAlarmPanelMeter pTransforml processVarl _ panelmeterattrib panelmeter2 PanelMeterPosition ChartObj BELOW REFERENCED TEXT panelmeter2 AlarmTem
94. 5 0 475 0 5 0 65 Dim background As New Background pTransforml ChartObj PLOT BACKGROUND Colors White chartVu AddChartObject background Dim attribl As New ChartAttribute Colors Green ChartObj LS SOLID ChartColor BlanchedAlmond Dim attrib2 As New ChartAttribute Colors Green 1 ChartObj LS SOLID Colors Aquamarine Dim attrib3 As New ChartAttribute Colors Green 1 ChartObj LS SOLID Colors DarkSalmon Dim attrib4 As New ChartAttribute Colors Green 1 ChartObj LS SOLID Colors Moccasin Dim attribArray As ChartAttribute attribl attrib2 attrib3 attrib4 Dim barwidth As Double 0 2 Dim barbase As Double 0 0 Dim barspace As Double 0 25 Dim barjust As Integer ChartObj JUSTIFY MIN Dim barorient As Integer ChartObj VERT DIR Dim baraxis As New LinearAxis pTransforml ChartObj Y AXIS baraxis CalcAutoAxis chartVu AddChartObject baraxis Dim baraxis2 As New LinearAxis pTransforml ChartObj Y AXIS 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
95. 5 256 260 261 265 266 286 291 292 293 SUN iS eed edidere rs 72 15 95 238 Chart object attributes 13 56 60 ChartAttribute 60 61 62 94 98 102 105 106 109 110 118 120 121 122 123 124 125 126 128 129 130 131 132 133 134 135 136 137 138 139 140 142 143 144 146 147 148 149 150 151 152 153 156 157 158 159 162 171 173 174 176 177 178 181 182 184 186 193 196 197 198 203 205 206 207 208 209 210 211 212 214 215 216 217 218 219 220 221 222 234 235 238 241 242 243 246 249 255 258 259 260 262 263 265 289 290 295 296 297 298 320 326 332 333 ChartAttribute 52 60 61 62 94 98 102 105 106 109 110 118 120 121 122 123 124 125 126 128 129 130 131 132 133 134 135 136 137 138 139 140 142 143 144 146 147 148 149 150 151 152 153 156 157 158 159 160 161 162 171 173 174 176 177 178 181 182 184 186 188 189 191 193 196 197 198 203 205 206 207 208 209 210 211 212 214 215 216 217 218 412 Appendix 219 220 221 222 234 235 238 241 242 243 246 247 249 250 251 255 256 258 259 260 261 262 263 265 266 289 290 295 296 297 298 320 326 332 333 386 387 399 400 ChartCalendar 58 62 66 88 92 94 99 242 287 349 350 354 355 357 364 366 367 368 370 374 375 ChartCalendar 58 62 66 88 92 94 99
96. 5 Day Week Dag Hour Ca RERPIRESST ELELE ELE TTT 10803 13 03 There a I 172003 42703 10103 10203 1103103 10403 ire more than 40 different time date axes types appropriate for scales ranging from 1 second to 100 years 66 QCChart2D Class Summary Date Axes QuartedMonth di a2 os 04 o o2 a3 p at 2001 2002 2003 Month PERT ho a oie Tee it TET TET FEI JFMAMJJASOND JFMAMJJSASONDJFMAMJJASOND J 2000 2001 2002 2003 Month FA ari ule de ehe da 2008 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Jan Feb Mar Apr May Jun Jul Aug Sep 2004 Day Day Week f T T T T T T T F T M 113108 T T T T T T T 1 T wo T T Day 7 Day Week T T T T T T Wed Thu Fi Sat Sun Mon 4 05 03 Tue Wed Thu Fri T T T T T T T Sat Sun Mon Tue Wed Thu 42 03 There are more than 40 different time date axes types appropriate for scales ranging from 1 second to 100 years Date Axes Gau Hour 8 HourHour rr rr 10108 10203 10303 104038 000 800 1600 000 6 00 10103 10203 4 HouvHout Hours Minute morea rm 000 400 00 1200 1600 0 00 1 00 200 200 400 10108 10108 Hous Minute 15 Minute Minute mmy Erri reer 0 00 1 00 2 00 3 00 0 00 0 15 0 30 0 45 1 00 10108 110108 5 Minute Minute Minute 15 Seconds poo rm O00 005 040 045 am 025 00000 00100 00200 00300 00400 10108 10103 Minute S Second 5 Second Second mor 0 00 00 0 100 0 02 00 00300 00000 00005 00010 00045 0 00 20 10103 101 08 Ther
97. 7 257 271 273 274 276 PieChart 2 uec etes 70 82 95 Plot object classes 12 16 19 22 27 37 70 71 95 113 118 122 125 129 132 135 138 139 140 141 151 152 153 154 184 186 193 197 212 216 223 227 230 238 Point3D sv che hte Polar Ax68 3 dene PolarAxesLabels PolarCoordinates PolarGrid u cte stele Pire PolarLinePlot 2 eerte etr PolarPlot s PolarScatterPlot s ict eet Polysurface class Ge Buggie aghe 91 94 Rectangle2D 92 93 94 178 179 212 214 215 289 290 291 292 293 296 298 300 RingCh artz crise danaro nido ne 83 RT XE 16 18 19 97 100 101 102 103 104 105 106 107 108 109 110 312 313 325 326 335 336 344 350 351 359 360 361 RT3DFrame 16 45 46 178 179 289 290 291 292 293 414 Appendix RTAlarm 16 18 19 20 27 31 32 47 97 100 101 102 103 104 105 106 107 108 109 110 112 122 123 124 125 142 143 144 145 155 214 215 220 222 312 313 325 326 335 336 344 350 351 354 359 360 361 367 383 386 387 397 399 400 RTAlarmEventArgs 16 18 19 97 105 107 108 109 110 RTAlarmEventArgs 16 18 19 97 105 107 108 109 110 RTAlarmIndicator 16 31 32 47 142 143 144 155 312 325 RTAlarmIndicator 16 31 32 47 142 143 144 155 312 325 RTAlarmPanelMeter 16 19 20 27 112 122 123 124 125 142 143 145 155 214 215 220 222 312 325 335 34
98. 76 77 95 238 StackedLinePlot 72 79 95 238 StackedLinePlot 72 79 95 238 StandardLegend StandardLegend StandardLegend String axis labels i ioter edes String Panel Meters 16 19 21 27 112 125 126 127 128 129 131 132 142 143 145 155 214 215 218 219 220 222 Tack Mark eno occ o ite iris ian TickMark Time Panel Meters 16 19 21 27 112 129 130 131 132 133 Time Panel Meters ari Time Panel Meters 0 ccccccccsessseceeessseeeeeee 130 TimeAutoScale rees 61 62 94 TimeAxis 63 66 70 87 95 ee EE Tune Avis 63 66 67 69 70 87 Time AxisLabels 222 e enit 69 70 95 TimeAxisLabels sse TimeAxisLabels TimeCoordinates 59 60 94 284 TimeCoordinates 59 60 94 284 384 397 TimeGroupDataset 16 18 19 57 58 62 94 97 100 101 102 103 104 105 106 107 108 109 110 312 313 325 326 335 336 344 350 351 359 360 361 TimeGroupDataset ii TimeGroupDataset sese 57 58 62 TimeLabel 21 87 88 95 129 130 TimeLabel 21 22 87 88 95 129 130 132 133 Timescale ieus e deae dete 58 59 94 Timescale a e HR eite 58 59 94 TimeSimpleDataset 57 58 62 94 203 TimeSimpleDataset
99. 85 259 260 263 264 279 289 290 293 294 296 297 Grid3 vi 11 13 14 15 16 27 28 30 35 37 52 56 87 95 97 216 217 244 245 246 247 248 249 250 251 252 257 261 262 263 264 265 266 267 299 300 301 302 303 304 305 306 307 313 318 319 326 331 332 340 341 361 362 379 380 381 385 390 392 393 394 398 403 GTS urli LEA 87 95 261 GroupBarPlot esses 72 76 95 238 GroupBarPlot 72 76 95 238 GroupDataset sees 57 58 61 62 94 GroupDataset 16 57 58 61 62 94 GroupPlot 10 12 14 28 29 70 72 73 74 75 76 77 78 79 95 97 238 239 GroupPlot10 12 14 28 29 70 72 73 74 75 76 77 78 79 95 97 238 239 302 360 GroupVersaPlot 72 77 95 360 HistogramPlot 72 77 95 238 HistogramPlot 72 77 95 238 Image ODJEcts i 88 89 96 Image Rendering BufferedImage sees 91 94 Legend 11 45 86 90 95 354 359 362 367 372 Legend classes esses 86 95 359 I gendltem i n cede tete ee SEN EN coro ansia Linear axis LinearAutoScale LinearAxis 17 32 63 64 69 70 87 95 142 144 156 157 160 162 170 171 EN EE Linear Aas meeega 63 64 69 70 87 LinearScale 2e casas cessor a ttis 58 59
100. 94 97 98 Dataset classes 12 57 70 71 94 97 98 DatasetViewer 299 301 302 303 305 Data Ke Ke EE DataToolTip sess 89 90 94 359 nale ess Eed dee Dials 6 10 17 18 40 43 309 342 345 347 348 Dimension 92 93 94 137 255 261 283 287 Elapsed Time scale s Elapsed Time scale 16 19 21 112 132 133 134 ElapsedTimeAutoScale 61 62 94 ElapsedTimeAxiS eee 63 67 70 ElapsedTimeAxisLabels 69 70 95 ElapsedTimeGroupDataset 57 58 62 94 ElapsedTimeLabel 22 88 95 132 133 El psedTim Scale e ee torre 58 59 ElapsedTimeSimpleDataset 57 58 62 94 ErrorBarPlot FINdOD z cirie tel E 2 dete eere ped FloatingBarPlot FloatingBarPlot 72 75 95 238 Form Control Panel Meters Form Control Panel Meters 16 19 22 35 36 112 135 136 137 244 255 256 257 258 259 260 261 Graph object class 140 141 153 154 171 172 176 177 184 185 259 260 263 264 290 294 297 GraphObj 19 45 61 62 81 95 112 140 141 153 154 171 172 176 177 184 185 259 260 263 264 279 289 290 293 294 296 297 GraphObj 19 45 61 62 81 95 112 140 141 153 154 171 172 176 177 184 1
101. AddProcessVar currentTemperature2 ScrollFrame ScrollScaleModeY ChartObj RT AUTOSCALE Y MINMAX Allow 100 samples to accumlate before autoscaling y axis This prevents rapid changes of the y scale for the first few samples ScrollFrame MinSamplesForAutoScale 100 scrollFrame ScrollRescaleMargin 0 05 chartVu AddChartObject scrollFrame Dim attribl As New ChartAttribute Colors Yellow 2 ChartObj LS SOLID Dim lineplotl As New SimpleLinePlot pTransforml Nothing attribl lineplotl SetFastClipMode ChartObj FASTCLIP X Dim solarPanelLinePlotl As New RTSimpleSingleValuePlot pTransforml lineplotl currentTemperaturel chartVu AddChartObject solarPanelLinePlot1 Dim attrib2 As New ChartAttribute Colors Green 2 ChartObj LS SOLID Dim lineplot2 As New SimpleLinePlot pTransforml Nothing attrib2 lineplot2 SetFastClipMode ChartObj FASTCLIP X Dim solarPanelLinePlot2 As New RTSimpleSingleValuePlot pTransforml lineplot2 currentTemperature2 chartVu AddChartObject solarPanelLinePlot2 Dim titlefont As ChartFont font14 Dim charttitle As New ChartTitle pTransforml titlefont Scroll Application 1 ChartObj CHART HEADER ChartObj CENTER PLOT chartVu AddChartObject charttitle End Sub Public Sub InitializeGraph timerl Stop templowalarml New RTAlarm ChartObj RT ALARM LOWERTHAN 80 templowalarml AlarmMessage Low Alarm templowalarml AlarmSymbolColor Colors Blue templowalarml Alar
102. AddRTPlotObject VB Public Sub AddRTPlotObject plottype As Integer _ colr As Color tag As String Auto Indicator Classes 371 CH public void AddRTPlotObject int plottype Calor solr 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 UpdatelIndicator VB Public Sub UpdateIndicator _ values As Double _ updatedraw As Boolean Public Sub UpdateIndicator _ value As Double _ updatedraw As Boolean C public void UpdateIndicator double values bool updatedraw public void UpdateIndicator double value bool updatedraw 372 Auto Indicator Classes 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 QCRTGraphSLCompiledHelpFile chm documentation file located in the doc subdirectory The RTAutoVerticalScrollGraph class supports a date time elapsed time and numeric time horizontal x
103. As ChartAttribute Overloads Public Sub New _ ByVal transform As PhysicalCoordinates ByVal attrib As ChartAttribute _ C public RTElapsedTimePanelMeter PhysicalCoordinates transform RTProcessVar 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 The color attributes of the panel meter indicator Selected Public Instance Properties ElapsedTimeTemplate Set Get the ElapsedTimeLabel template for the panel meter time date value The text properties associated 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 RTElapsedTimePanelMeter properties is found in the QCRTGraphSLCompiledHelpFile chm documentation file located in the doc subdirectory Example for RTElpasedTimePanelMeter 134 Panel Meter Classes 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 insid
104. Bulb property on and the numeric and alarm status panel meters will sit on top of the bar end bulb 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 316 Auto Indicator Classes 100 80 60 40 20 GMB 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 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 229 NODO er sasa 20 40 60 80 100 GMB Auto Indicator Classes 317 a 0 20 40 60 80 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 Horiz 1 Horiz 1 az OTTO 100 Horiz 1 Horiz 1 ae i 20 om 100 Panel meters to the left and right of the bar for the
105. Color SteelBlue _ 0 ChartObj LS SOLID Colors White Dim panelmeter As New RTNumericPanelMeter pTransforml1 panelmeterattrib panelmeter PanelMeterPosition ChartObj OUTSIDE PLOTAREA MIN barplot AddPanelMeter panelmeter Dim panelmeter3 As New RTStringPanelMeter pTransforml _ paneltagmeterattrib ChartObj RT TAG STRING panelmeter3 PanelMeterPosition ChartObj OUTSIDE PLOTAREA MAX panelmeter3 TextColor Colors Black panelmeter3 StringTemplate TextFont font12 panelmeter3 PanelMeterNudge New Point2D 0 6 panelmeter3 AlarmIndicatorColorMode ChartObj RT INDICATOR COLOR NO ALARM CHANGE barplot AddPanelMeter panelmeter3 Time Date Panel Meter Class RTTimePanelMeter com quinncurtis chart2dsl 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 TimeLabel class that is used to specify the font and time date format information associated with the panel meter 130 Panel Meter Classes 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 C4 public RTTimePanelMeter PhysicalCoordinates tran
106. Colors Green METSValue 0 METS New RTProcessVar METS defaultattrib METS ShortDescription Metabolic Equivalents METS MinimumValue 0 METS MaximumValue 100 METS DefaultMinimumDisplayValue 0 METS DefaultMaximumDisplayValue 100 METS DatasetEnableUpdate 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 Process Variable and Alarm Classes 103 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 Visuel Basic Overloads Public Sub New _ ByVal processvar As RTProcessVar ByVal alarmtype As Integer Overloads Public Sub New ByVal alarmtype As Integer Overloads Public Sub New ByVal processvar As RTProcessVar ByVal alarmlimitvalue As Double u ByVal alarmtype As Integer Overloads Public Sub New ByVal processvar As RTProcessVar ByVal alarmlimitvalue As Double ByVal alarmtype As Integer ByVal normalmessage As String _ ByVal alarmmessage As String Visual Basic ByVal processvar As RIProcessVar _ ByVal alarmtype As Integer ByVal al
107. Colors White Dim panelmeter As New RTNumericPanelMeter pTransforml panelmeterattrib panelmeter PanelMeterPosition ChartObj OUTSIDE PLOTAREA MIN panelmeter TextColor Colors SpringGreen panelmeter NumericTemplate TextFont fontl4Numeric panelmeter NumericTemplate DecimalPos 0 panelmeter AlarmIndicatorColorMode ChartObj RT TEXT BACKGROUND COLOR CHANGE ON ALARM panelmeter PanelMeterNudge New Point2D 0 4 barplot AddPanelMeter panelmeter Alarm Panel Meter Class RTAlarmPanelMeter com quinncurtis chart2dsl 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 Panel Meter Classes 123 contains a template based on the QCChart2D 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 ChartAttrib
108. ControlSize New Dimension 1 0 1 0 chartVu AddChartObject formControlTrackBarl 6 Single Channel Bar Indicator RTBarlIndicator 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 chart2dsl 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 axis and axis labels routines make this easy to do RTBarIndicator 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
109. D Class Summary 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 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 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 valu
110. DesignHeight and DesignWidth properties and add references to the QCChart2D and QCRTGraph namespaces In this case the QCChart2D namespace is com quinncurtis chart2dsl and it is located in the assembly DLL with the name QCChart2DSL The QCRTGraph namespace is com quinncurtis rtgraphsl and it is 380 Using Real Time Graphics Tools to Create Silverlight Applications located in the assembly DLL with the name QCRTGraphSL So add the following line under the other xmIns namespace tags xmlns my clr namespace com quinncurtis chart2dsl assembly QCChart2DSL xmlns my2 2 clr namespace com quinncurtis rtgraphsl assembly QCRTGraphSL These lines need to be resolved by adding a references to the QCChart2DSL and QCRTGraphSL libraries to the project Right click on Reference in the Solution Explorer window and select Add Reference Browse to the Quinn Curtis DotNet lib subdirectory and select QCChart2DSL DLL and QCRTGraphSL DLL files Add Reference NET Projects Browse Recent Look in lib 9514 QCChart2DSL d QCRTGraphsL dll 8 QCSPCChartSL dll File name l HCRTGraphSL di OCChart2DSL dll Files of type Executable Files View the MainPage xaml code and add the reference to ChartView in the Grid layout panel The MainPage xaml file now looks like Using QCRTGraph to Create Silverlight Applications 381 lt UserControl x Class SLRTApplicationl MainPage xmlns http
111. E barplot SegmentCornerRadius 0 barplot IndicatorSubType ChartObj RT BAR SEGMENTED SUBTYPE Add panel meters to barplot 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 DynCustomBarsUserControll 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 RTMultiBarIndicator 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 IEEE pm uan E I 40 L 80 ae 5 Il I se A 3 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 barju
112. EXTENT 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 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 Single Channel Scrolling Graphs Class RTSimpleSingleValuePlot com quinncurtis chart2dsl ChartPlot RTPlot RTSingleValueIndicator 232 Single and Multiple Channel Annunciators RTSimpleSingleValuePlot The RTSimpleSingleValuePlot plot class uses a template based on the QCChart2D 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 SimplePlot can be plotted as a scrolling graph RTS
113. Erame nemen 360 RTScrollFrame 9 15 16 27 30 31 37 38 39 223 224 226 227 232 233 236 240 241 242 278 279 360 383 385 397 399 RTSimpleSingleValuePlot 9 12 15 16 22 27 30 38 97 223 227 230 231 232 233 234 235 236 237 239 242 243 361 RTSimpleSingleValuePlot9 12 15 16 22 27 30 38 97 223 227 230 231 232 233 234 235 236 237 239 242 243 361 386 399 RTSingleValueIndicator 16 19 22 27 32 113 114 118 122 125 129 132 135 138 139 140 141 152 153 154 184 185 186 193 197 230 260 RTSingleValueIndicator 16 19 22 27 32 113 114 118 122 125 129 132 135 138 139 140 141 152 153 154 184 185 186 193 197 230 260 RITextFrame eea 16 46 48 RTTextFrame 16 46 48 RTTimePanel Meter i RTTimePanelMeter snosseseeeseesseeeeneesseereeeeee 130 RTVerticalScrollFrame i RTVerticalScrollFrame 9 15 16 27 30 37 39 223 227 228 230 234 235 Scale classesi ode eres 58 59 60 94 scatter Plots inco ER REND scatter pIotS i 70 80 81 83 Scatter Plots 13 45 56 70 80 81 83 Scrolling graph 9 15 16 39 223 227 228 230 234 235 Scrolling graph 9 15 16 27 30 37 39 223 227 228 230 234 235 Scrolling Graph 10 17 18 45 309 353 354 362 363 364 365 367 372 374 375 Scrolling Graph 6 10 17 18
114. Filtered value 1 0 rFiltConst Measured value rFiltConst Previous filtered value Selected Public Instance Properties DerivativeConstant Set Get derivative constant value 274 PID Control Set Get high clamping value for output Set Get previous exponential smoothing constant LasiPIDValue MvFilter NewEmor OldEmor RateClamp Set Get rate first derivative of output clamping value for output SetPoint Set Get steady state output position Set Get sum of all previous errors Selected Public Instance Methods RTCalcPID This method performs a PID loop calculation RTResetErrorTerms This method resets all of the error terms for the PID calculations pdatePIDIntermediateParameters This method updates the intermediate values in the PID calculation A complete listing of RTPIDControl properties is found in the QCRTGraphSLCompiledHelpFile 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 valve or dc servomotor which has
115. GroupPoint2D DoubleArray DoubleArray2D BoolArray Point3D NearestPointData TickMark Polysurface Rectangle2D ChartCalendar ChartFont ChartColor CSV This class contains utility routines used to process ChartCalendar date objects This class encapsulates Font properties into a class similar to the Net Font class This class includes a list of named colors which are accessed as static constants ChartColor AliceBlue for example This is a utility class for reading and writing CSV Comma Separated Values files Dimension Point2D GroupPoint2D DoubleArray DoubleArray2D BoolArray Point3D NearestPointData TickMark Polysurface Rectangle2D QCChart2D Class Summary 93 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
116. Inherited from Control Simple RTProcessVarViewer example extracted from the example program Process VarDataTables ScrollApplicationUserControll cs lt UserControl x Class ProcessVarDataTables MainPage xmlns http schemas microsoft com winfx 2006 xaml presentation xmlns x http schemas microsoft com winfx 2006 xaml xmlns d http schemas microsoft com expression blend 2008 xmlns mc http schemas openxmlformats org markup compatibility 2006 mc Ignorable d xmlns my clr namespace com quinncurtis chart2ds1 assembly QCChart2DSL xmlns my2 clr namespace com quinncurtis rtgraphsl assembly QCRTGraphSL d DesignHeight 900 d DesignWidth 1000 xmlns sdk http schemas microsoft com winfx 2006 xaml presentation sdk gt Process Variable Viewer 305 lt Grid x Name LayoutRoot Background White gt lt sdk TabControl Margin 4 7 8 13 Name tabControl1 gt lt sdk TabItem Header Vertical RTProcessVarDataTable Name tabItem1 gt lt Grid gt lt Grid ColumnDefinitions gt lt ColumnDefinition Width 40 gt lt ColumnDefinition Width 15 gt lt Grid ColumnDefinitions gt lt my ChartView Margin 18 11 16 6 Name elapsedTimeVerticalScrollingApp1 Grid Column 6 f gt lt my2 RTProcessVarViewer Margin 18 11 16 6 Name rtProcessVarViewerApp1 Grid Column 1 gt lt Grid gt lt sdk TabItem gt lt sdk TabItem Header Horizontal RTProcessVarDataTable Name tabItem2 gt lt Grid gt lt Grid RowDefi
117. InitBargraph ChartObj VERT DIR 0 ChartColor OrangeRed LightBlue 322 Auto Indicator Classes rtAutoBarIndicatorl UnitsPanelMeter ChartObjEnable IfTest units ChartObj OBJECT ENABLE ChartObj OBJECT DISABLE rtAutoBarIndicatorl YAxisTitle ChartObjEnable IfTest units ChartObj OBJECT ENABLE ChartObj OBJECT DISABLE rtAutoBarIndicatorl TagPanelMeter ChartObjEnable IfTest title ChartObj OBJECT ENABLE ChartObj OBJECT DISABLE rtAutoBarIndicatorl BarPlot IndicatorSubType IfTest segmented ChartObj RT BAR SEGME TED SUBTYPE ChartObj RT BAR SOLID SUBTYPE Multi Channel Bar Indicator Class RTAutoMultiBarIndicator System Windows Controls UserControl ChartView RTAutoIndicator RTAutoBarlIndicator 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 alarm 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 Publ
118. LID Colors Black Dim panelmeter As 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 FontArchive font24Numeric meterneedle AddPanelMeter panelmeter chartVu AddChartObject meterneedle Symbol Meter Indicators Class RTMeterSymbolIndicator com quinneurtis chart2dsl 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 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 199 Meter Indicators Needle Arc and Symbol LineStyle ChartAttribute attrib public RTMeterSymbolIndica
119. MeterPosition ChartObj OUTSIDE PLOTAREA MIN barplot AddPanelMeter panelmeter RTAlarmPanelMeter panelmeter2 new RTAlarmPanelMeter pTransforml panelmeterattrib panelmeter2 PanelMeterPosition ChartObj BELOW REFERENCED TEXT panelmeter2 SetPositionReference panelmeter panelmeter2 TextColor Colors SpringGreen Panel Meter Classes 125 panelmeter2 AlarmTemplate TextFont font10 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 ChartColor SteelBlue 3 ChartObj LS SOLID Colors Black Dim paneltagmeterattrib As New ChartAttribute ChartColor SteelBlue 0 ChartObj LS SOLID Colors White Dim panelmeter As New RTNumericPanelMeter pTransforml1 panelmeterattrib panelmeter PanelMeterPosition ChartObj OUTSIDE PLOTAREA MIN panelmeter TextColor Colors SpringGreen panelmeter NumericTemplate TextFont fontl4Numeric panelmeter NumericTemplate DecimalPos 0 panelmeter AlarmIndicatorColorMode _ ChartObj RT TEXT BACKGROUND COLOR CHANGE ON ALARM panelmeter PanelMeterNudge New Point2D 0 4 barplot AddPanelMeter panelmeter Dim panelmeter2 As New RTAlarmPanelMeter pTransforml panelmeterattrib panelmeter2 PanelMeterPosition ChartObj BELOW REFERENCED TEXT
120. MoveCoordinates 90 QCChart2D Class Summary classes also implement mouse event delegates that use the mouse to mark move and zoom chart objects and data MouseListener 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 creating a custom version of the class MoveObj 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 FindObj This class extends the MouseListener class providing additional methods that selectively determine what graphical objects intersect the mouse cursor DataCursor 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 MoveData This class selects and moves individual data points of an object derived from the SimplePlot class DataToolTip A data tooltip is a p
121. New CartesianCoordinates 0 0 0 0 1 0 1 0 pTransforml SetGraphBorderDiagonal 0 05 0 1 0 725 0 175 Dim For attrib As ChartAttribute attribArray annunciatorl Length As ChartAttribute i As Integer i 0 To annunciatorl Length 1 Colors White attrib New ChartAttribute ChartColor DarkRed 3 ChartObj L5 SOLID ChartColor DarkRed attribArray i attrib Next i Dim numrows As Integer 1 Dim numcols As Integer 8 Dim annunciator As New RTMultiValueAnnunciator pTransforml annunciatorl numcols numrows attribArray 219 220 Single and Multiple Channel Annunciators annunciator CellColumnMargin 0 05 annunciator CellRowMargin 0 1 Dim panelmetertagattrib As New ChartAttribute ChartColor SteelBlue 3 _ ChartObj LS SOLID Colors White Dim panelmeter As New RTStringPanelMeter pTransforml annunciator1 0 _ panelmetertagattrib ChartObj RT TAG STRING panelmeter StringTemplate TextFont font10Bold panelmeter PanelMeterPosition ChartObj INSIDE BAR panelmeter Frame3DEnable False panelmeter TextColor Colors 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 Annunc
122. OL RADIOBUTTON SUBTYPE rtbutton ButtonUncheckedText selectorStrings i If i currentRangeSelectorIndex Then rtbutton ButtonChecked True Else rtbutton ButtonChecked False End If AddHandler rtbutton Click New System Windows RoutedEventHandler AddressOf Me selector button Click rtbutton ButtonFont buttonfont rangeSelectorButtons Add rtbutton Next Dim numColumns As Integer 4 Dim numRows As Integer 7 Dim controlgrid As New RTFormControlGrid pTransforml Nothing rangeSelectorButtons numColumns numRows colStrings 268 Buttons Track Bars and Other Form Control Classes rowStrings attribl controlgrid contrelgrid controlgrid controlgrid controelgrid CellRowMargin 0 05 CellColumnMargin 0 1 FormControlTemplate Frame3DEnable True HeadersTemplate LineColor Colors Black HeadersTemplate TextFont font14Bold chartVu AddChartObject controlgrid End Sub 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
123. Places the panel meter on the outside edge of the bar 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 MIN Horizontal Bars JUSTIFY MIN JUSTIFY CENTER INSIDE BAR 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 INSIDE BARBASE OUTSIDE BARBASE INSIDE INDICATOR OUTSIDE INDICATOR BELOW REFERENCED TEXT ABOVE REFERENCED TEXT RIGHT REFERENCED TEXT LEFT REFERENCED TEXT Panel Meter Classes 115 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 indica
124. QCRTGraph Real Time Graphics Tools for Silverlight Real Time Graphics Tools for Silverlight 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 Revision Date 1 21 2014 QCRTGraph Silverlight Documentation and Software Copyright Quinn Curtis Inc 2014 Quinn Curtis Inc Tools for Net 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 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 sold 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 num
125. 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 second 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 362 Auto Indicator Classes Get the second y axis labels object Accessible only YAxisLab2 after BuildGrap Y AxisTitle Get the y axis title object Y Grid Get the y axis grid object A complete listing of RTAutoScrollGraph properties is found in the QCRTGraphSLCompiledHelpFile 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 See the SimpleAutoScrollUserControll xaml file f
126. RTControlButton ChartObj RT CONTROL MOMENTARYBUTTON SUBTYPE RTControlButton ClearButton new RTControlButton ChartObj RT CONTROL MOMENTARYBUTTON SUBTYPE 250 Buttons Track Bars and Other Form Control Classes public void InitializeStartStopButtons ChartFont buttonfont font12Bold CartesianCoordinates pTransforml w CartesianCoordinates 0 0 0 0 1 0 1 0 pTransforml SetGraphBorderDiagonal 0 01 65 0 2 0 98 ChartAttribute attribl new ChartAttribute Colors Black 5 ChartObj LS SOLID ChartColor LightBlue ArrayList buttonlistl new ArrayList StartButton ButtonUncheckedText Start StartButton ButtonChecked true StartButton Click new System Windows RoutedEventHandler this selector Button Click StartButton ButtonFont buttonfont buttonl istl A dd StartButton StopButton ButtonUncheckedText Stop StopButton ButtonChecked false StopButton Click new System Windows RoutedEventHandler this StopButton ButtonFont buttonfont button istl Add StopButton ResetButton ButtonUncheckedText Reset ResetButton ButtonChecked false ResetButton Click new System Windows RoutedEventHandler this selector Button Click ResetButton ButtonFont buttonfont buttonlistl Add ResetButton ClearButton ButtonUncheckedText Clear ClearButton ButtonChecked false ClearBut
127. RTGraphSLCompiledHelpFile chm documentation file located in the doc subdirectory Example The panel meter below extracted from the Treadmill example method InitializeRightPanelMeters is an independent panel 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 DefaultMaximum Display Value C public void InitializeRightPanelMeters ChartFont numericfont font64Numeric 120 Panel Meter Classes ChartFont trackbarTitlefont font12Bold CartesianCoordinates pTransforml new CartesianCoordinates 0 0 0 0 1 0 1 0 pTransforml SetGraphBorderDiagonal 0 0 0 0 1 0 1 0 ChartAttribute attribl new ChartAttribute ChartColor LightBlue 7 ChartObj LS SOLID ChartColor LightBlue ChartAttribute panelmeterattrib new ChartAttribute ChartColor SteelBlue 3 ChartObj LS SOLID Colors Black RTNumericPanelMeter panelmeterl new RTNumericPanelMeter pTransforml METSCumlative panelm
128. STIFY CENTER JUSTIFY MIN INSIDE RADIUS TOP 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 MAX CENTER RADIUS TOP 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 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 118 Panel Meter Classes 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 chart2dsl ChartPlot RTPlot RTSingl
129. SegmentSpacing 400 barplot SegmentWidth 250 barplot IndicatorBackground New ChartAttribute Colors Black 1 ChartObj LS SOLID Colors 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 ChartColor SteelBlue 3 ChartObj LS SOLID Colors Black Dim paneltagmeterattrib As New ChartAttribute ChartColor SteelBlue 3 ChartObj LS SOLID Colors White 146 Single Channel Bar Indicator Dim panelmeter As New RTNumericPanelMeter pTransforml panelmeterattrib barplot AddPanelMeter panelmeter Dim panelmeter2 As New RTAlarmPanelMeter pTransforml panelmeterattrib barplot AddPanelMeter panelmeter2 Dim panelmeter3 As New RTStringPanelMeter pTransforml _ paneltagmeterattrib ChartObj RT TAG STRING barplot AddPanelMeter panelmeter3 chartVu AddChartObject barplot 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 overridin
130. TStringPanelMeter RTTimePanelMeter RTElapsedTimePanelMeter RTFormControlPanelMeter RTAnnunciator RTBarIndicator RTMeterIndicator RTMeterArcIndicator RTMeterNeedleIndicator RTMeterSymbolIndicator RTSimpleSingleValuePlot RTMultiValueIndicator RTMultiValueAnnunciator RTMultiBarIndicator RTGroupMultiValuePlot RTFormControlGrid RTScrollFrame RTVerticalScrollFrame com quinncurtis chart2dsl PolarCoordinates RTMeterCoordinates com quinncurtis chart2dsl LinearAxis RTMeterAxis com quinncurtis chart2dsl NumericAxisLabels RTMeterAxisLabels com quinncurtis chart2dsl StringAxisLabels RTMeterStringAxisLabels System Windows Controls Button RTControlButton System Windows Controls Slider RTControlTrackBar com quinncurtis chart2dsl ChartObj RTFormControl System Windows Controls UserControl ChartView RTAutoIndicator RTAutoBarIndicator RTAutoMultiBarIndicator RTAutoMeterIndicator RTAutoClockIndicator RTAutoDialIndicator RTAutoScrollGraph RTAutoPanelMeterIndicator QCRTGraph Classes System Windows Controls UserControl ChartView RTAutoIndicator RTAutoBarIndicator RTAutoMultiBarIndicator RTAutoMeterIndicator RTAutoClockIndicator RTAutoDialIndicator RTAutoScrollGraph RTAutoPanelMeterIndicator Class Architecture 17 The starting point of a chart is the ChartView class The ChartView class derives from the WPFSystem Windows Controls UserControl class The ChartView class manages a collection 18 Class Architecture
131. TWARE 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 of the application program and or the URL where the SOFTWARE is installed and being used 3 RESTRICTIONS You may not reverse engineer de compile or disassemble the SOFTWARE except and only to the extent that such activi
132. Transforml processVar2 panelmeterattrib panelmeter PanelMeterPosition ChartObj PLOTAREA CENTER panelmeter NumericTemplate TextFont FontArchive fontl6Numeric panelmeter NumericTemplate PostfixString char 176 E annunciator AddPanelMeter panelmeter RTAlarmPanelMeter panelmeter2 new RTAlarmPanelMeter pTransforml processVarl panelmeterattrib panelmeter2 PanelMeterPosition ChartObj INSIDE BARBASE panelmeter2 AlarmTemplate TextFont FontArchive font10 panelmeter2 SetPositionReference panelmeter annunciator AddPanelMeter panelmeter2 ChartAttribute panelmetertagattrib new ChartAttribute ChartColor SteelBlue 3 ChartObj LS SOLID Colors White RTStringPanelMeter panelmeter3 new RTStringPanelMeter pTransforml processVarl panelmetertagattrib ChartObj RT TAG STRING panelmeter3 SetPositionReference panelmeter panelmeter3 PanelMeterPosition ChartObj INSIDE BAR panelmeter3 TextColor Colors Black annunciator AddPanelMeter panelmeter3 chartVu AddChartObject annunciator VB Private Sub InitializeAnnunciatorl 216 Single and Multiple Channel Annunciators 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 Colors Gray chartVu AddChartObject background Dim annunrect As New Rectangle2D 0 05 0 05 0 9 0 9 Dim attrib
133. 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 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 Set Get the width of bars in physical coordinates for ChartPlot ChartObjAttributes inherited from GraphObj ChartObjClipping inherited from GraphObj ChartObjComponent inherited from GraphObj ChartObjEnable inherited from GraphObj ChartObjScale inherited from GraphObj CurrentProcess Value inherited from RTSingleValueIndicator FillBaseValue inherited from ChartPlot FillColor inherited from GraphObj IndicatorBackground IndicatorBackgroundEnable IndicatorSubType LabelTemplateDecimalPos inherited from ChartPlot LabelTemplateNumericForma t inherited from ChartPlot LineColor inherited from GraphObj LineStyle inherited from GraphObj LineWidth inherited from GraphObj NumChannels inherited from RTPlot PlotLabel Template inherited from ChartPlot PointerSymbolNum Single Channel Bar Indicator 141 bar plots Sets the attributes for a chart object using a ChartAttribute object Sets the object clipping mode Use one of the object cl
134. Val dataset As TimeSimpleDataset ByVal defaultattribute As ChartAttribute Overloads Public Sub New _ ByVal tagname As String _ ByVal defaultattribute As ChartAttribute _ C public RTComboProcessVar TimeSimpleDataset dataset ChartAttribute defaultattribute Ct public RTComboProcessVar string tagname ChartAttribute defaultattribute Parameters dataset A dataset that will be used to store historical values defaultattribute Specifies the default attribute for this process variable tagname 205 Dials and Clocks The string representing the tag name of the process variable Selected Public Instance Properties Item Get the RTProcessVar item at the specified index in the process variable list Selected Public Instance Methods AddProcessVar Adds a new process variable to the process variable list ResetProcessVarsList Clears the process variable list Overloaded Updates the current value and the 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 SetModuloltem Sets the modulo factor at the specified index A complete listing of RTComboProcessVar properties is found in the QCRTGraphSLCompiledHelpFile chm documentation file located in the doc subdirectory Examples for using RTComboProcessVar in a clock application The example extracted from the exam
135. Value 100 0 sampleper 60 0 filterConstant 276 PID Control void CalculatePIDValues double rMeas 0 0 double rSetpoint 0 0 double rOutput 0 0 for int L Up L L e iT 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 rSetpoint ControlOutputs i SetCurrentValue rOutput outputControlTrackBar RTValue ControlOutputs currentTuningChannel CurrentValue VB Private PIDProcessItems 15 As RTProcessVar Private ProportionalControl 15 As RTProcessVar Private IntegralControl 15 As RTProcessVar Private DerivativeControl 15 As RTProcessVar Private ControlSetpoints 15 As RTProcessVar Private ControlTrackBarOutputs 15 As RTProcessVar Private ControlOutputs 15 As RTProcessVar Private PIDControlLoops 15 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 278 Moving Chart Objects and Data Points pidSteadyState ProportionalControl i CurrentValue IntegralControl i CurrentValue DerivativeControl i CurrentValue 100 0 sampleper 60 0 filterConstant Next i Sub CalculatePIDValues Dim rMeas As Double 0 0 Il
136. _ maxy As Double _ scaletype As Integer _ C 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 356 Auto Indicator Classes 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 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 Auto Indicator Classes 357 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 Metho
137. a space between columns of the annunciator specified in normalized NORM PLOT POS coordinates CellRowMargin Get Set the extra space between rows of the annunciator specified in normalized 218 Single and Multiple Channel Annunciators NORM PLOT POS coordinates NumberColumns Get the number of rows in the annunciator NumberRows Get the number of rows in the annunciator A complete listing of RTMultiValueAnnunciator properties is found in the QCRTGraphSLCompiledHelpFile 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 20 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 Battery Coolant E Brakes E
138. aValueFont DefaultTagFont Get Set the font used for the main title DefaultUnitsFont Get Set the font used for the chart footer FaceplateBackground Set to true to show 3D faceplate 336 Auto Indicator Classes GraphBackground GraphBorder GraphFormat Height HighAlarm LowAlarm MainTitle MaximumSize MaxIndicatorValue MinimumSize MinIndicatorValue NumericPanelMeter PlotAttrib PlotBackground PreferredSize Process Variable RenderingMode ResizeMode TagPanelMeter UnitsPanelMeter UnitsString Visible Width 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
139. abels 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 customized 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 C public wold InitStringsi string title string units Parameters title The title or tag string units The units string Auto Indicator Classes 343 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 344 Auto Indicator Classes Selected Public Instance Properties Name AlarmList AlarmPanelMeter DefaultAlarmFont DefaultAxisLabelsFont DefaultDataValueFont DefaultFon
140. aceplate 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 326 Auto Indicator Classes MultiBarPlot NumericPanelMeter PlotAttrib PlotAttribArray PlotBackground PreferredSize Process Variable RenderingMode ResetOnDraw ResizeMode SetpointAlarm TagPanelMeter TagString UnitsPanelMeter UnitsString Visible Width XAxis XAxis2 XAxisLab XAxisTitle XGrid YAxis YAxis2 YAxisLab YAxisTitle YGrid Get a reference to the RTMultiBarIndicator object Get a reference to the RTNumericPanelMeter object Inherited from RTAutoIndicator Get an ChartAttribute object i
141. ach 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 128 Panel Meter Classes RPM RI Current RES 80 80 40 RTMultiBarIndicator barplot new RTMultiBarIndicator pTransforml motorvars barwidth barspace barbase attribarray barjust barorient ChartAttribute panelmeterattrib new ChartAttribute ChartColor SteelBlue 3 ChartObj LS SOLID Colors Black RTNumericPanelMeter panelmeter new RTNumericPanelMeter pTransforml panelmeterattrib panelmeter PanelMeterPosition ChartObj OUTSIDE PLOTAREA MIN barplot AddPanelMeter panelmeter ChartAttribute paneltagmeterattrib new ChartAttribute ChartColor SteelBlue 0 ChartObj LS SOLID Colors White RTStringPanelMeter panelmeter3 new RTStringPanelMeter pTransforml paneltagmeterattrib ChartObj RT TAG STRING panelmeter3 PanelMeterPosition ChartObj OUTSIDE PLOTAREA MAX panelmeter3 TextColor Colors Black panelmeter3 StringTemplate TextFont font12 panelmeter3 AlarmIndicatorColorMode ChartObj RT INDICATOR COLOR NO ALARM CHANGE barplot AddPanelMeter panelmeter3 VB Panel Meter Classes 129 Dim barplot As New RTBarIndicator pTransforml batteryCharge _ barwidth barbase attribl barjust barorient Dim paneltagmeterattrib As New ChartAttribute Chart
142. ackbarTitlefont font12Bold 256 Buttons Track Bars and Other Form Control Classes CartesianCoordinates pTransforml new CartesianCoordinates 0 0 0 0 1 0 1 0 pTransforml SetGraphBorderDiagonal 0 01 12 0 06 0 3 ChartAttribute attribl new ChartAttribute ChartColor LightBlue 7 ChartObj LS_SOLID ChartColor LightBlue runnersPaceTrackbar new RIContrelTrackBar 0 0 15 0 0 1 140 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 PHYS POS formControlTrackBarl FormControlSize new Dimension 1 0 1 0 ChartAttribute panelmeterattrib new ChartAttribute ChartColor SteelBlue 3 ChartObj LS SOLID Colors 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 chartVu AddChartObject formControlTrackBarl VB Public Sub Initi
143. ahr 60 40 100 80 Below you will find the code used to initialize the first of the meters above extracted from the AutoGraphDemos AutoMeterIndicatorsUserControll example program The meters are positioned using the AutoMeterIndicatorsUserControl asml file UserControl x Class AutoGraphDemo AutoNeedleMeterIndicatorsUserControl1 xmlns http schemas microsoft com winfx 2006 xaml presentation xmlns x http schemas microsoft com winfx 2006 xaml xmlns d http schemas microsoft com expression blend 2008 xmlns mc http schemas openxmlformats org markup compatibility 2006 mc Ignorable d xmlns my clr namespace com quinncurtis chart2ds1 assembly QCChart2DSL xmlns my2 clr namespace com quinncurtis rtgraphsl assembly QCRTGraphSL Height 600 Width 878 xmlns sdk http schemas microsoft com winfx 2006 xaml presentation sdk gt lt Grid gt lt Grid RowDefinitions gt lt RowDefinition Height 10 gt lt RowDefinition Height 10 gt lt RowDefinition Height 10 gt lt Grid RowDefinitions gt lt Grid ColumnDefinitions gt lt Gr lt my2 Grid Row 0 lt my2 Grid Row 0 lt my2 Grid Row 0 lt my2 Grid Row 0 lt my2 Grid Row 1 lt my2 Grid Row 1 lt my2 Grid Row 1 lt my2 Grid Row 1 lt my2 Grid Row 2 lt my2 Grid Row 2 lt my2 Grid Row 2 lt my2 Grid Row 2 StackPanel Margin 20 20 10 1
144. al important Silverlight base element classes various classes that support the Silverlight property system and event logic and other types that are more broadly consumed by the Silverlight core and framework System System Windows Automation Introduction 5 Provides support for Silverlight UI Automation clients System Globalization The System Globalization namespace contains classes that define culture related information including the language the country region the calendars in use the format patterns for dates currency and numbers and the sort order for strings System IO The IO namespace contains types that allow synchronous and asynchronous reading and writing on data streams and files System Collections The System Collections namespace contains interfaces and classes that define various collections of objects such as lists queues bit arrays hashtables and dictionaries System Windows Controls Provides classes to create elements known as controls that enable a user to interact with an application The control classes are at the core of the user s experience with any application because they allow a user to view select or enter data or other information System Windows Controls Primitives Contains base classes and controls that are intended to be used as part of other more complex controls System Windows Media Provides types that enable integration of rich media including drawings text and audio
145. alizeLeftPanelMeters Dim trackbarfont As ChartFont font64Numeric Dim trackbarTitlefont As ChartFont font12Bold Dim pTransforml As New CartesianCoordinates 0 0 0 0 1 0 1 0 Buttons Track Bars and Other Form Control Classes 257 pTransforml SetGraphBorderDiagonal 0 01 0 12 0 05 0 3 Dim attribl As New ChartAttribute Colors Black 2 ChartObj LS SOLID ChartColor LightBlue runnersPaceTrackbar New RTControlTrackBar 0 0 15 0 1 0 0 1 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 formControlTrackBarl FormControlSize New Dimension 1 0 1 0 Must be in same units as SetLocation Dim panelmeterattrib As New ChartAttribute ChartColor SteelBlue 3 ChartObj LS SOLID Colors 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 panelmeter1l Dim panelmet
146. alues 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 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 204 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 _ By
147. amel 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 AXIS MIN meteraxisl LineWidth 3 meteraxisl LineColor Colors Black meteraxisl SetAxisTickSpace 20 meteraxisl SetAxisMinorTicksPerMajor 1 meteraxisl ShowAlarms False meterneedle MeterAxis meteraxisl chartVu AddChartObject meteraxis1 Meters Coordinates Meter Axes and Meter Axis Labels 181 Dim meteraxislabelsl1 As New RTMeterAxisLabels meteraxisl meteraxislabelsl SetTextFont meterFont meteraxislabels1 SetAxisLabelsDir meteraxis1 GetAxisTickDir meteraxislabelsl OverlapLabelMode ChartObj OVERLAP LABEL DRAW chartVu AddChartObject meteraxislabels1 String Meter Axis Labels Class RTMeterStringAxisLabels com quinncurtis chart2dsl StringAxisLabels RTMeterStringAxisLabels 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 Sel
148. 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 chart2dsl ChartPlot RTPlot RTMultiValueIndicator RTScrollFrame RTVerticalScrollFrame 38 Class Architecture Course Difficulty 13 37 40 13 37 50 Heart ECG 13 37 30 13 37 30 13 37 40 13 37 50 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 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
149. anelmeterattrib panelmeter PanelMeterPosition ChartObj INSIDE INDICATOR panelmeter TimeTemplate TextFont font36Numeric panelmeter TimeTemplate TimeFormat ChartObj TIMEDATEFORMAT 24HMS panelmeter AlarmIndicatorColorMode ChartObj RT INDICATOR COLOR NO ALARM CHANGE chartVu AddChartObject panelmeter Dim panelmetertagattrib As New ChartAttribute ChartColor Beige 0 _ ChartObj LS SOLID ChartColor Beige Dim panelmeter3 As New RTStringPanelMeter pTransforml timeOfDay _ panelmetertagattrib ChartObj RT TAG STRING panelmeter3 StringTemplate TextFont font10 panelmeter3 PanelMeterPosition ChartObj ABOVE REFERENCED TEXT panelmeter3 SetPositionReference panelmeter panelmeter3 TextColor Colors Black chartVu AddChartObject panelmeter3 Class RTElapsedTimePanelMeter com quinneurtis chart2dsl 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 Panel Meter Classes 133 RTTimePanelMeter constructors Visual Basic Overloads Public Sub New ByVal transform As PhysicalCoordinates _ ByVal datasource As RTProcessVar ByVal attrib
150. ansforml 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 new ChartAttribute Colors Green 3 ChartObj LS 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 Colors Blue 3 ChartObj LS 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 stockHighl scrollFramel AddProcessVar stockLowl scrollFramel AddProcessVar stockClosel ScrollFramel ScrollRescaleMargin 0 05 chartVu AddChartObject scrollFramel scrollFrame2 N
151. armlimitvalue As Double _ ByVal normalmessage As String _ ByVal alarmmessage As String ByVal hysteresisvalue As Double C public RTAlarm RIProcessVar processvar int alarmtype public RTAlarm int alarmtype double alarmlimitvalue public RTAlarm RTProcessVar processvar ByVal alarmlimitvalue As Double _ 104 Process Variable and Alarm Classes int alarmtype double alarmlimitvalue public RTAlarm RTProcessVar processvar int alarmtype double alarmlimitvalue string normalmessage string alarmmessage public RTAlarm RIProcessVar 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 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 proce
152. ass Reference and initialize the newly created ScrollingGraph class in the MainPage xaml vb behind code file Imports com quinncurtis chart2dsl Imports com quinncurtis rtgraphsl 402 Using Real Time Graphics Tools to Create Silverlight Applications Partial Public Class MainPage Inherits UserControl Private sgl As ScrollingGraph Public Sub New InitializeComponent InitScrollApp End Sub Public Sub InitScrollApp sgl New ScrollingGraph scrollPlotl scrollPlotl PreferredSize New Size 600 400 End Sub End Class e The reference to PreferredSize tells the software that the font sizes specified in the graph are with respect to a chart window of size 600 400 If the chart is sized larger than this the fonts will be larger if it is sized smaller the fonts will be smaller Ifyou want to add printing see the example Dynamometer MainPage xaml vb file for the printer code you need to add See the QCChart2D manual for additional details about printing from a Silverlight application Build the Solution Build Build Solution If the project fails to compile you need to go back and check the errors and the previous steps When it runs properly it the SLRTApplicationl chart looks like Using QCRTGraph to Create Silverlight Applications 403 SLRTApplication1 Windows Internet Explorer F Quinn Curtis DotNet QCRTGraph Visual Basic examples sl SLRTApplication1 SLRTApplication1 Bin Debug SLRTApplication
153. ates 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 RTFOrmControlGrid 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 264 Buttons Track Bars and Other Form Control Classes 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 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 at
154. 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 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 See the SimpleAutoScrollUserControll xaml file for how the scroll graph is positioned in the underlying window Auto Indicator Classes 373 RTAutoScrollGraph Subhead Text Time 0 5 10 15 Quarks Channel 1 Channel 2 Channel 3 Footer text Vertical scrolling graph numeric y scale public void InitializeGraph double startvalue 0 double stopvalue 30 rtAutoVerticalScrollGraphl InitRTAutoScrollGraph 0 startvalue 15 stopvalue rtAutoVerticalScrollGraphl InitSimpleRTPlotObject ChartObj LINE PLOT Colors Blue Channel 41 rtAutoVerticalScrollGraphl InitSimpleRTPlotObject ChartObj LINE PLOT 374 Auto Indicator Classes Colors Green Channel 2 rtAutoVerticalScrollGraphl InitSimpleRTPlotObject ChartObj SCATTER PLOT Colors Red rtAutoVerticalScrollGraph rtAutoVerticalScrollGraph rtAutoVerticalScrollGraph ChartObj RT A rtAutoVerticalScrollGrap rtAutoVerticalScrollGraphl rtAutoVerticalScrollGrap rtAutoVerticalScrollGrap rtAutoVerticalS
155. axislabels SetAxisLabelsDir meteraxis GetAxisTickDir Dim labelstrings As String E 1 2 F meteraxislabels OverlapLabelMode ChartObj OVERLAP LABEL DRAW meteraxislabels AxisLabelsEnds ChartObj LABEL MAX meteraxislabels SetAxisLabelsStrings labelstrings 3 meteraxislabels LineColor Colors 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 chart2dsl 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 al
156. bels C ChartAttribute attribl new ChartAttribute Colors Black 1 Chart0bj LS SOLID Colors 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 attrib1l meteraxis SetAxisTickDir ChartObj AXIS MIN meteraxis LineWidth 5 meteraxis LineColor Colors White meteraxis SetAxisTickSpace 1 meteraxis SetAxisMinorTicksPerMajor 1 meteraxis ShowAlarms true meterneedle MeterAxis meteraxis chartVu AddChartObject meteraxis RTMeterAxis meteraxis2 new RTMeterAxis meterframe meterneedle meteraxis2 SetChartObjAttributes attribl meteraxis2 SetAxisTickDir ChartObj AXIS MIN meteraxis2 LineWidth 1 meteraxis2 LineColor Colors White meteraxis2 SetAxisTickSpace 0 1 meteraxis2 AxisMinorTickLength 10 Meters Coordinates Meter Axes and Meter Axis Labels 175 meteraxis2 AxisMajorTickLength 10 m
157. belsStrings labelstrings 3 meteraxislabels LineColor Colors White chartVu AddChartObject meteraxislabels VB Dim attribl As New ChartAttribute Colors Black 1 ChartObj LS SOLID Colors Blue Dim startarcangle As Double 180 Dim arcextent As Double 90 Dim startarcscale As Double 0 0 Dim endarcscale As Double 32 0 184 Meters Coordinates Meter Axes and Meter Axis Labels 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 chartVu AddChartObject meterneedle Dim meteraxis As New RTMeterAxis meterframe meterneedle meteraxis SetChartObjAttributes attribl meteraxis SetAxisTickDir ChartObj AXIS MIN 2 meteraxis LineWidth meteraxis LineColor Colors White meteraxis SetAxisTickSpace 4 meteraxis SetAxisMinorTicksPerMajor 4 meteraxis ShowAlarms True meterneedle MeterAxis meteraxis chartVu AddChartObject meteraxis Dim meterFont As ChartFont font10Bold Dim meteraxislabels As New RTMeterStringAxisLabels meteraxis meteraxislabels SetTextFont meterFont meter
158. ber 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 Trial 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 SOF
159. cale and the y scale to a Date Time scale using ChartCalendar objects 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 368 Auto Indicator Classes 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 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 _ maxy As Double _ scaletype As Integer _ CH 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 Auto Indicator Classes 369 Initialize the x scale to a linear scale and the y scale to a Date Time scale us
160. cales 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 Meter tick mark strings can be horizontal parallel and perpendicular to the tick mark RTMeterStringAxisLabels This class labels the major tick marks of the RTMeterAxis class using user defined strings Form Control Classes System Windows Controls Button RTControlButton System Windows Controls Slider RTControlTrackBar Class Architecture 35 com quinncurtis chart2dsl ChartObj RTFormControl RTPanelMeter RTFormControlPanelMeter RTMultiValueIndicator RTFormControlGrid Real time displays often require user interface features such as buttons and track bars The Visual Studio Silverlight platform includes a large number of useful controls The Slider ScrollBar and Button controls are examples of what we refer collectively as Form Controls We created subclassed versions of the Slider control and the Button control Our version of the Slider control is RTControlTrackBar It is pretty much the same as the underlying Slider type since it supports floating point setup parameters Our version of the Button control is RTControlButton adds superior On Off button text and color control and supports momentary toggle and radio button styl
161. 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 Auto Indicator Classes 345 RenderingMode Inherited from ChartView ResizeMode Inherited from ChartView TagPanelMeter Get a reference to the tag panel meter object UnitsPanelMeter Get a reference to the units string panel meter object UnitsString Get Set the units string Visible Gets or sets a value indicating whether the control is displayed 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 QCRTGraphSLCompiledHelpFile 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 Bag T Ve 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 346 Auto Indica
162. ck _ time As DateTime _ updatedraw As Boolean _ Public Sub UpdateClock _ time As ChartCalendar _ updatedraw As Boolean 350 Auto Indicator Classes C 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 Name AlarmList AlarmPanelMeter DefaultAlarmFont DefaultAxisLabelsFont DefaultDataValueFont DefaultFontString DefaultMainTitleFont DefaultTagFont DefaultUnitsFont DialInterior FaceplateBackground GraphBackground GraphBorder Description Get the ArrayList holding all of the RTAlarm objects Get a reference to the RTAlarmPanelMeter object Get Set the font used for the subhead title 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 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 GraphFormat Height HighAlarm LowAlarm MainTitle MaximumSize MaxInd
163. 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 chart2dsl Linear Axis RTMeterAxis com quinncurtis chart2dsl NumericAxisLabels RTMeterAxisLabels com quinncurtis chart2dsl 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 respect to the containing plot area Class Architecture 33 3 RPM x 1000 4 A meter axis can have any number of alarm arcs A meter can have multiple axes representing multiple scales RTMeterAxis 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 34 Class Architecture 100 150 A useful feature of multiple meter s
164. 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 PID Control 275 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 E umi 10 52 45 10 53 00 10 53 15 10 53 30 ube Quinn utis Ine 2008 C RTPIDControl PIDControlLoops new RTPIDControl 16 RTProcessVar ProportionalControl new RTProcessVar 16 RTProcessVar IntegralControl new RTProcessVar 16 RTProcessVar DerivativeControl new RTProcessVar 16 RTProcessVar ControlSetpoints new RTProcessVar 16 RTProcessVar ControlTrackBarOutputs new RTProcessVar 16 RTProcessVar ControlOutputs new RTProcessVar 16 for int i90 i lt 16 itt Note derivative value is saled down by 100x PIDControlLoops i new RTPIDControl ControlSetpoints i CurrentValue pidSteadyState ProportionalControl i CurrentValue IntegralControl i CurrentValue DerivativeControl i Current
165. 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 Public 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 InitRTAutoScrolleraph minx As DateTime _ Auto Indicator Classes 355 miny As Double _ 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
166. contains a template based on the QCChart2D StringLabel class that is used to specify the font and string format information associated with the panel meter It bases Class Architecture 21 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 StringLabel class that is used to specify the font and string format information associated with the panel meter The RTTimePanelMeter can display a time date value in any format supported by the QCChart2D 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 TimeLabel class that is used to specify the font and time date format information associated with the panel meter RTElapsedTimePanelMeter 22 Class Architecture Displays the elapsed time the TimeSpan value of the time stamp in milliseconds of the associated RTProcessVar object It contains a tem
167. crollGraphl rtAutoVerticalScrollGrap rtAutoVerticalScrollGrap SEI DI DI DI Channel 3 SubHead TextString Subhead Text SubHead ChartObjEnable Footer TextString Footer text Footer ChartObjEnable YAxisLab2 ChartObjEnable L SimplePlotObj SymbolAttributes SymbolSize 10 Ll GraphScrollFrame ScrollRescaleMargin 0 01 L GraphScrollFrame ScrollScaleModeX UTOSCALE Y MINMAX hl InitStrings RTAutoScrollGraph Quarks Time GraphBackground FillColor ChartColor BlanchedAlmond ChartObj OBJECT ENABLE ChartObj OBJECT ENABLE ChartObj OBJECT ENABLE The update of scroll graphs takes place in the timer event handler private void timerl Tick obj ChartCalendar timestamp for int i 0 i curren currentValues i 0 eonunt rtAutoVerticalScrollGraphl VB Public Sub InitializeGraph ect sender EventArgs e new ChartCalendar tValues Length i 5 ChartSupport GetRandomDouble UpdateScrollGraph count currentValues true Dim startvalue As Double Dim stopvalue r E tAu tAu tAu tAu tAu tAu tAu tAu tAu tAu tAu tAu tAu tAu tAu tAu tAu End Sub toVertical toVertical toVertical toVertical toVertical toVertical toVertical toVertical toVertical toVertical toVertical toVertical toVertical toVertical toVertical toVertical toVertical As D Scrol
168. ct Use one of the generalized shape constants RT SHAPE RECTANGLE RT SHAPE ROUNDEDRECTANGLE RT SHAPE ELLIPSE postype 298 Miscellaneous Shape Drawing 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 AspectRatioCorrection ChartObjAttributes inherited from GraphObj ornerRadius FillColor inherited from GraphObj GenShape Height LineColor inherited from GraphObj LineStyle inherited from GraphObj LineWidth inherited from GraphObj PositionType inherited from GraphObj ShapeRect Width Z Order inherited from GraphObj Selected Public Instance Properties Get Set the aspect ratio correction mode for the RT SHAPE ELLIPSE shape NO ASPECT RATIO CORRECTION FIXED X ASPECT RATIO CORRECTION FIXED Y ASPECT RATIO CORRECTION Sets the attributes for a chart object using a ChartAttribute object Get Set the corner radius of the rounded rectangle Sets the fill color for the chart object Get Set the shape control property genShape Use one of the generalized shape constants RT SHAPE RECTANGLE RT SHAPE ROUNDEDRECTANGLE RT SHAPE ELLIPSE Get Set the height of the shape rectangle Sets the line color for the chart object Sets the line style for the chart object Sets the line width for the chart object Get Sets the current position type Get Set the rectangle control t
169. currentTemperature2 MinimumValue 20 currentTemperature2 MaximumValue 200 currentTemperature2 DefaultMinimumDisplayValue 0 currentTemperature2 DefaultMaximumDisplayValue 150 currentTemperature2 SetCurrentValue currentTemperatureValue2 currentTemperature2 AddAlarm templowalarm2 currentTemperature2 AddAlarm temphighalarm2 Important enables historical data collection for scroll graphs currentTemperature2 DatasetEnableUpdate True InitializeScrollGraph timerl Interval TimeSpan FromMilliseconds 500 200 msecs AddHandler timerl Tick New EventHandler AddressOf timerl Tick timer2 Interval TimeSpan FromMilliseconds 1000 Using QCRTGraph to Create Silverlight Applications 401 500 msecs AddHandler timer2 Tick New EventHandler AddressOf timer2 Tick timerl Start timer2 Start End Sub Update data using 100 msec timer Private Sub timerl Tick sender As Object e As System EventArgs Random data currentTemperatureValuel 5 0 5 ChartSupport GetRandomDouble currentTemperatureValue2 8 0 5 ChartSupport GetRandomDouble This method uses the default time stamp which is the current time of day currentTemperaturel SetCurrentValue currentTemperatureValuel currentTemperature2 SetCurrentValue currentTemperatureValue2 End Sub Update screen on 500 msec timer Private Sub timer2 Tick sender As Object e As System EventArgs chartVu UpdateDraw End Sub End Cl
170. d InitStrings VB public void InitStringsi string title string units C public void InitStringsi 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 _ colr As Color _ tag As String _ 356 Auto Indicator Classes CH public void AddRTPlotObject 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 CH public void UpdateIndicator double values bool updatedraw public void UpdateIndicator double value bool updatedraw Auto Indicator Classes 359 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 Description Get the ArrayList holding all of the RTAlarm AlarmList objects
171. 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 to organize the location 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 This is a utility class that extends the RectangleF class using doubles as internal storage 94 QCChart2D Class Summary A diagram depicts the class hierarchy of the QCChart2D for Silverlight library Cham Arrow ChartCalendar CSV Dimension Point3D NearestPointData Polysurface ChartScale LinearScale LogScale TimeScale ElapsedTimeScale UserCoordinates WorldCoordinates WorkingCoordinates PhysicalCoordinates CartesianCoordinates PolarCoordinates AntennaCoordinates TimeCoordinates ElapsedTimeCoordinates ChartDataset SimpleDataset TimeSimpleDataset ElapsedTimeSimpleDataset ContourDataset GroupDataset TimeGroupDataset ElapsedTimeGroupDataset AutoScale LinearAutoScale LogAutoScale TimeAutoScale ElapsedTimeAutoScale MouseListener MoveObj FindObj DataToolTip ChartZoom MagniView MoveCoo
172. dateDraw 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 alarms 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 Colors Green 1 0 ChartObj LS SOLID Colors Green RTAlarm lowheartratealarm new RTAlarm ChartObj RT ALARM LOWERTHAN 30 lowheartratealarm AlarmMessage Low Heart Rate lowheartratealarm AlarmSymbolColor Colors Blue lowheartratealarm AlarmTextColor Colors Blue RTAlarm highheartratealarm new RTAlarm ChartObj RT ALARM GREATERTHAN 160 highheartratealarm AlarmMessage High Heart Rate 106 Process Variable and Alarm Classes highheartratealarm AlarmSymbolColor Colors Red highheartratealarm AlarmTextColor Colors Red double heartRateValue 0 0 heartRate new RTProcessVar Heart Rate defaultattrib heartRate MinimumValue 0 heartRate MaximumValue 300 Os heartRate DefaultMinimumDisplayValue heartRate DefaultMaximumDisplayValue 200 heartRate AddAlarm lowheartratealarm heartRate AddAlarm highheartratealarm heartRate SetCurrentValue heartRateValue heartRateValue
173. 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 Real Time Graphics Tools for Silverlight is downloaded in a file named something like SLRTGDEVIUR2x0x561x1 zip The developer version does not time out and you can use it to create application programs that you can distribute royalty free You can download free updates for a period of 2 years When you placed your order you were e mailed download link s that will download the software Those download links will remain active for at least 2 years and should be used to download current versions of the software After 2 years you may have to purchase an upgrade to continue to download current versions of the software Source Code Introduction 9 The commented source code to the QCRTGraph charting software also available The source code is written entirely in C It can be compiled using Visual Studio 2008 and higher Net CH compilers It can be ordered using the model SL RTG SRC Purchasers of the QCRTGraph source code must also own a valid Developer License since all example programs user manuals and licenses are installed as part of the Developer Version of the software Some programmers seem to think they can make do with just the source code without the Developer Version Purchasing the source without a Developer License does not give a license to us
174. dicators organized in a grid and scrolling graph plots based on a QCChart2D 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 indicators needed new classes to support the drawing of meter axes meter axis labels and meter alarm objects The Silverlight Button System Windows Controls Button and Slider System Windows Controls Slider objects have been subclassed and enhanced for use in instrument panels The Scroll Frame Auto Indicator Classes Miscellaneous Classes Class Architecture 15 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 Slider class RTControlButton and RTTrackBar objects can be group together in a grid organizing the control objects functionally and visually A scroll frame manages constant rescaling of coordinate systems of plot objects RTSimpleSingleValuePlot and RTGroupMultiValuePlot objects that are displayed in a scrolling graph The RTScrollFrame c
175. e ChartObj RT INDICATOR COLOR NO ALARM CHANGE chartVu AddChartObject panelmeter Form Control Panel Meter Class RTFormControlPanelMeter com quinncurtis chart2dsl 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 to use the RTPanelMeter positioning constants to position the form controls with respect to indicators plot areas text 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 136 Panel Meter Classes Control formcontrol ChartAttribute attrib public RTFormControlPanelMeter PhysicalCoordinates transform Control formoontrol 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 t
176. e In general you place one or more of our QCRTGraph chart objects as visual elements in the XAML window of your application The chart itself is customized in the behind code of the XAML form Tutorials Tutorials that describe how to get started with the Real Time Graphics Tools for Silverlight charting software are found in Chapter 18 Using Real Time Graphics Tools for Silverlight to Create Windows Applications and Chapter 19 Using Real Time Graphics Tools for Silverlight to Create Web Applications Customer Support Use our forums at http www quinn curtis com ForumFrame htm for customer support Please do not post questions on the forum unless you are familiar with this manual and have run the examples programs provided We try to answer most questions by referring to the manual or to existing example programs We will always attempt to answer any question that you may post but be prepared that we may ask you to create and send to us a simple example program The program should reproduce the problem with no or minimal interaction from the user You should strip out of any code not directly associated with reproducing the problem You can use either your own example or a modified version of one of our own examples Real Time Graphics Tools for Silverlight 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 me
177. e 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 04 1940 26 5 1930 11 52 15 11 52 30 11 52 45 11 53 00 C ChartZoom zoomObj TimeCoordinates timecoordsarray pTransforml pTransform2 zoomObj new ChartZoom chartVu timecoordsarray true zoomObj SetButtonMask MouseButton Left zoomObj SetZoomYEnable true zoomObj SetZoomXEnable true zoomObj SetZoomXRoundMode ChartObj AUTOAXES FAR 286 Zooming zoomObj SetZoomYRoundMode ChartObj AUTOAXES FAR zoomObj SetEnable false zoomObj SetZzoomStackEnable true zoomObj InternalZoomStackProcesssing true chartVu SetCurrentMouseListener zoomObj private void zoomOn Button Click object sender System EventArgs e 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 displa
178. e e Dim rSetpoint As Double Dim rOutput As Double 0 0 Dim i As Integer For i D To 15 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 software is used for zooming of RTProcessVar historical data The features of this class include e Automatic recalculation of axis properties for tick mark spacing and axis labels Zooming of
179. e located in the doc subdirectory 228 Single and Multiple Channel Annunciators See the examples for the RTSimpleSingleValuePlot and RTGroupMultiValuePlot for example of the use of the RTScrollFrame class Class RTVerticalScrollFrame com quinneurtis chart2dsl 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 RIProcessVar ByVal initialscale As PhysicalCoordinates ByVal scrollymode As Integer ByVal autoscalexmode As Integer Overloads Public Sub New ByVal component As ChartView _ ByVal processvar As RIProcessVar 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 C public RTVerticalScrollFrame ChartView component RIProcessVar processvar PhysicalCoordinates initialscale int scrollymode int autoscalex
180. e true 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 Visual Basic 284 Zooming Dim zoomObj As New ChartZoom chartVu pTransforml zoomObj SetButtonMask MouseButton Left zoomObj SetZoomYEnable True zoomObj SetZoomXEnable True zoomObj SetZoomXRoundMode ChartObj AUTOAXES FAR zoomObj SetZoomYRoundMode ChartObj AUTOAXES FAR zoomObj SetEnable True zoomObj SetZzoomStackEnable True zoomObj InternalZoomStackProcesssing True set range limits to 1000 ms 1 degree zoomOb gt SetZoomRangeLimitsRatio New Dimension 1 0 chartVu SetCurrentMouseListener zoomObj True 1 079 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 i
181. e 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 software special round and rectangular shapes that can be used as backdrops for groupings of chart objects and PID control Miscellaneous Classes com quinncurtis chart2dsl GraphObj RT3DFrame com quinncurtis chart2dsl GraphObj RTGenShape com quinncurtis chart2dsl ChartObj RTPIDControl com quinncurtis chart2dsl GraphObj 46 Class Architecture RTSymbol com quinncurtis chart2dsl 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 47 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 programme
182. e are more than 40 different time date axes types appropriate for scales ranging from 1 second to 100 years Time Date Axes with Custom Hour Range 8 30 AM to 4 00 PM Day 2 Hour EES SETY T 4 01 03 4 02 03 1 03 03 40403 2 HourHour S7 DEEN ECKE 1200 1400 30 10 00 830 10 00 10103 102 03 Hour Minute 4 HouriHour E LELE E a 8 90 12 00 8 90 12 00 10103 10203 Heu Minute 830900 1000 11 00 12 00 13 00 1400 10103 15 Minute Minute 30 om 10 00 11 00 4 01 03 5 Minute Minute 830 935 840 845 850 855 1 0103 Minute Second 8 30 00 8 31 00 8 32 00 8 33 00 4 0103 Atime axis can be customize TimeAxis 8 30 8 46 9 00 9 15 930 4 01 03 Minute 15 Seconds SEET 8 30 00 831400 83200 83300 83400 10103 5 Second Second PLL E TETTE IRE 8 30 00 8 30 05 83030 83018 8 30 20 4 01 03 id for non 24 hour range This class is the most complex of the axis classes It supports time scales ranging from 1 milliseond to hundreds of years Dates and times are specified using the Net 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 QCChart2D Class Summary 67 range of 9 30 AM to 4 00 PM The chart time axis excludes
183. e 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 QCChart2D Class Summary 61 This class consolidates the common line and fill attributes as a single class Most of the graph objects have a property of this class that controls the color line thickness and fill attributes of the object The ChartGradient class expands the number of color options available in the ChartAttribute class ChartAttribute This class consolidates the common line and fill attributes associated with a GraphObj object into a single class ChartGradient A ChartGradient can be added to a ChartAttribute object defining a multicolor gradient that is applied wherever the color fill attribute is normally used 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
184. e 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 Heat Distribution of a Plasma Torch Degrees C 1000 0 1200 0 1400 0 1600 0 1800 0 1900 0 2000 0 2100 0 2200 0 2400 0 2600 0 2800 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 72 QCChart2D Class Summary Group Plot Classes GroupPlot ArrowPlot BoxWhiskerPlot BubblePlot CandlestickPlot CellPlot ErrorBarPlot FloatingBarPlot FloatingStackedBarPlot GroupBarPlot GroupVersaPlot HistogramPlot LineGapPlot MultiLinePlot OHLCPlot StackedBarPlot StackedLinePlot GroupVersaPlot 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
185. e 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 output 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 cont
186. e freely mixed with the new Real Time Graphics Tools for Silverlight classes Advanced user interface features such as zooming and tool tips can used with real time scrolling charts WPF and Silverlight Background Initially the primary graphics text rendering and user interface framework for programmers using the Net languages was GDI an evolutionary adaptation of the older Windows GDI programming model in place since Windows 1 0 GDI under Net is extremely successful and there are no indications Microsoft plans to end support for it in subsequent releases of Visual Studio But Microsoft has long had an alternative graphics framework for game programmers DirectX which programmers found a better fit for the complex graphics required in game programming One of the strong selling points of DirectX is that the Windows operating system can offload time intensive graphics calculations to specialized GPU Graphics Processing Unit chips found in high and medium end computers Starting early in the last decade Microsoft wrote an alternative graphics rendering and user interface framework around DirectX This framework is known as the Windows Presentation Framework or WPF for short At the same time Microsoft was developing WPF it also developed another related product now known as Silverlight Silverlight is an application framework for writing and running rich Internet applications Programs written using Silverlight can run on a large nu
187. e most commonly used RTAlarmEventArgs properties are Selected Public Instance Properties AlarmChannel Get Set the alarm channel object EventAlarm Get Set the RTAlarm object associated with the alarm ProcessVar Get Set the RTProcessVar object associated with the alarm A complete listing of RTAlarmEventArgs properties is found in the QCRTGraphSLCompiledHelpFile chm documentation file located in the doc subdirectory 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 Process Variable and Alarm Classes 109 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 ChartAt
188. e the plot area using the INSIDE_INDICATOR position constant A string panel meter places a title above the time panel meter Current Time C CartesianCoordinates pTransforml new CartesianCoordinates 0 0 0 0 1 0 1 0 pTransforml SetGraphBorderDiagonal 0 53 85 0 72 0 96 7 ChartAttribute panelmeterattrib new ChartAttribute ChartColor SteelBlue 3 ChartObj LS SOLID Colors Black RTElapsedTimePanelMeter panelmeter new RTElapsedTimePanelMeter pTransforml 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 VB Dim pTransforml As New CartesianCoordinates 0 0R 0 0R 1 0R 1 0R pTransforml SetGraphBorderDiagonal 0 53 0 85 0 72 0 96 Panel Meter Classes 135 Dim panelmeterattrib As New ChartAttribute ChartColor SteelBlue 3 ChartObj LS SOLID Colors Black Dim panelmeter As New RTElapsedTimePanelMeter pTransforml stopWatch panelmeterattrib panelmeter PanelMeterPosition ChartObj INSIDE INDICATOR panelmeter TimeTemplate TextFont font32Numeric panelmeter TimeTemplate TimeFormat ChartObj TIMEDATEFORMAT 24HMS panelmeter TimeTemplate DecimalPos 0 panelmeter AlarmIndicatorColorMod
189. e the software so don t do it Chapter Summary The remaining chapters of this book discuss the Real Time Graphics Tools for Silverlight package designed to run on any hardware that has a Net runtime installed on it Chapter 2 presents the overall class architecture of the Real Time Graphics Tools for Silverlight and summarizes all of the classes found in the software Chapter 3 summarizes the important QCChart2D classes that you must be familiar with in order to use the Real Time Graphics Tools for Silverlight software Chapter 4 describes the process variable and alarm classes that hold Real Time Graphics Tools for Silverlight 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 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 classes RTScrollFrame and RTVerticalScrollFrame and the implementation of scrolling p
190. e user interface features such as buttons and track Silverlight The Visual Studio Silverlight platform includes a large number of useful controls The Silverlight Slider ScrollBar and Button controls are examples of what we refer collectively as Form Controls We created subclassed versions of the Slider control and the Button control Our version of the Slider control is RTControlTrackBar and adds floating point scaling for the track bar endpoints increments and current value 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 Control Buttons Class RTControlButton System Windows Controls Button RTControlButton The RTControlButton class is subclassed from the Silverlight 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 is pressed it toggles its state to checked or unchecked A momentary button is more like a regular Silverlight 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 RTContro
191. eDataset 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 99 Once created the RTProcessVar object is updated using the SetCurrentValue 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 Overloads Public Sub SetCurrentValue _ ByVal timestamp As Double _ ByVal pv As Double Overridable Overloads Public Sub SetCurrentValue _ ByVal pv As Double C public virtual void SetCurrentValue ChartCalendar gv double pv public virtual void SetCurrentValue DateTime dt double pv rz public virtual void SetCurrentValue double timestamp double pv VE public virtual void SetCurrentValue double
192. ePlot lineplotl new SimpleLinePlot pTransforml null attribl lineplotl SetCoordinateSwap true RTSimpleSingleValuePlot solarPanelLinePlotl new RTSimpleSingleValuePlot pTransforml lineplotl currentTemperaturel chartVu AddChartObject solarPanelLinePlotl ChartAttribute attrib2 new ChartAttribute Colors Green 1 ChartObj LS SOLID 236 Single and Multiple Channel Annunciators SimpleLinePlot lineplot2 new SimpleLinePlot pTransforml null attrib2 lineplot2 SetCoordinateSwap true RTSimpleSingleValuePlot solarPanelLinePlot2 new RTSimpleSingleValuePlot pTransforml lineplot2 currentTemperature2 chartVu AddChartObject solarPanelLinePlot2 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 Dim attribl As New ChartAttribute Colors Yellow 2 ChartObj LS SOLID Dim lineplotl As New SimpleLinePlot pTransforml Nothing attribl lineplotl SetCoordinateSwap True Dim solarPanelLinePlotl As New RTSimpleSingleValuePlot pTransforml lineplotl currentTemperaturel sola
193. eValueIndicator RTPanelMeter RTNumericPanelMeter The RTNumericPanelMeter class displays the floating point numeric value of an RTProcessVar object It contains a template based on the QCChart2D NumericLabel class 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 C4 public RTNumericPanelMeter PhysicalCoordinates transform RTProcessVar datasource ChartAttribute attrib E public RTNumericPanelMeter PhysicalCoordinates transform ChartAttribute attrib Parameters Panel Meter Classes 119 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 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 QC
194. each row rtProcessVarViewerl SetFormatDecimalPos 0 0 rtProcessVarViewerl SetFormatDecimalPos 1 1 rtProcessVarViewerl SetFormatDecimalPos 2 2 VB Public Sub InitProcessVarViewer rtProcessVarViewerl As RTProcessVarViewer Dim posrect As New Rectangle2D 0 05 0 67 0 87 0 26 Dim rows As Integer 11 columns As Integer 3 startindex As Integer 0 rtProcessVarViewerl InitRTProcessVarViewer chartVu Nothing currentTemperaturel columns startindex ChartObj VERT DIR rtProcessVarViewerl UseStripedGridBackground True rtProcessVarViewerl GridCellFont font14 rtProcessVarViewerl AddProcessVar currentTemperature2 Set custom decimal precision for each row rtProcessVarViewerl SetFormatDecimalPos 0 0 rtProcessVarViewerl SetFormatDecimalPos 1 1 rtProcessVarViewerl SetFormatDecimalPos 2 2 End Sub rows 19 Auto Indicator Classes RTAutoBarlIndicator RTAutoMultiBarIndicator RTAutoMeterIndicator RTAutoClockIndicator RTAutoDialIndicator RTAutoScrollGraph RTAutoPanelMeterIndicator The auto indicator classes are designed to simplify the creation 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 s
195. ect list Inherited from ChartView Get most recently created RTProcessVar Inherited from RTAutoIndicator Get the ArrayList holding all of the RTProcessVar objects Set Get True the ChartView object list is cleared ResizeMode SetpointAlarm SimplePlotObj Single ValuePlot Single ValuePlotList Size SmoothingMode SubHead Tag TagPanelMeter TagString Text TextRenderingHint UnitsPanelMeter UnitsString Visible Width XAxis XAxis2 XAxisLab XAxisLab2 XAxisTitle XGrid YAxis YAxis2 Y AxisLab Auto Indicator Classes 361 with each redraw Inherited from RTAutoIndicator Inherited from ChartView Get the most recent setpoint RTAlarm object Inherited from RTAutoIndicator 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
196. ected Public Instance Properties The properties of the RTMeterStringAxisLabels class are pretty much the same as the RTMeterAxisLabels class with these exceptions MeterLabelTextOrient Get Set if the text is horizontal METER LABEL HORIZONTAL at right 182 Meters Coordinates Meter Axes and Meter Axis Labels angles to the tick mark METER LABEL PERPENDICULAR 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 ings inherited from Sets the string array used to hold user defined StringAxisLabels axis label strings Setting the string array does not automatically turn on the use of string labels Use enableAxisLabelsStrings to enable axis strings A complete listing of RTMeterStringAxisLabels properties is found in the QCRTGraphSLCompiledHelpFile 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 E ChartAttribute attribl new ChartAttribute Colors Black 1 ChartObj LS SOLID Colors Blue double startarcangle 18
197. ed 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 314 Auto Indicator Classes MinIndicatorValue NumericPanelMeter PlotAttrib PlotBackground PreferredSize ProcessVariable RenderingMode ResizeMode SetpointAlarm TagPanelMeter TagString UnitsPanelMeter UnitsString Visible Width XAxis XAxis2 XAxisLab XAxisTitle XGrid YAxis YAxis2 YAxisLab YAxisTitle YGrid 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 Inherited from ChartView Get most recently created RTProcessVar Inherited from RTAutoIndicator I
198. ed 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 328 Auto Indicator Classes 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 Auto Indicator Classes 329 oo NIIT a 330 Auto Indicator Classes 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 Example for initializing RT AutoMultiBarIndicator objects The example below extracted from the AutoGraphDemos AutoMultiBarIndicators example draws four vertical and four horizontal bargraphs Auto Indicator Classes 331 Wi Window1 Mixed Chart AutoBarIndicators AutoMeterIndicators AutoMultiBarIndicators AutoPanelMeterIndicators AutoDialsAndClocksIndicators Flow 493 Flow 493 ETTI i v Numeric readout v Alarm readout v Units string v Tag string v Title string Below you will find the code used to initialize the first of the bargrap
199. ed with the QCChart2D QCRTGraph class ChartFont Since the WPF Silverlight FontStyle type does not include bold options an additional constructor is added which has a FontWeight parameter Specify the font weight using one of the FontWeights enumerated constants CH ChartFont theFont new ChartFont Microsoft Sans Serif 10 FontStyles Normal ChartFont theFont new ChartFont Microsoft Sans Serif 10 FontStyles Normal FontWeights Bold VB Dim theFont As New ChartFont Microsoft Sans Serif 10 FontStyles Normal Dim theFont As New ChartFont Microsoft Sans Serif 10 FontStyles Normal FontWeights Bold Font Style Constants The System Drawing FontStyle enumerated constants are different than the WPF Silverlight FontStyles constants Net Forms WPF Silverlight Bold Italic Oblique Italic Regular Normal Normal Strikeout Underline Font Weight Constants The WPF Silverlight FontWeights enumerated constants include Bold DemiBold ExtraBlack ExtraBold ExtraLight Heavy Light Medium Normal Regular SemiBold Thin UltraBlack UltraThin and UltraBold 52 Class Architecture Grid Grid is a panel class used everywhere in WPF Silverlight programs for the layout of visual objects Rather than force programmers to fully qualify the QCChart2D QCRTGraph Grid class which does something entirely different than the WPF Grid class we changed the name of our grid to ChartGrid Otherwise the parameters remain
200. 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 304 Process Variable Viewer SourceDataset StartCol StartRow SyncChart TableGreenBarFlag TableStartPosX TableStartPosY TableStopPosX TableStopPosY TextRenderingHint Title Top TransformList 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 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 VScroll VScrollBar1 Width 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 Gets or sets a value indicating whether the vertical scroll bar is visible Inherited from ScrollableControl Inherited from DataGridBase Gets or sets the width of the control
201. egrees The meter scale extends from 0 0 to 100 0 in the counterclockwise direction Two axes are created The first is created so that it draws just the major tick marks using a thicker line width The second uses thin tick marks for the minor tick marks of the meter axis Only the first is included below since it is the one labeled C ChartAttribute attribl new ChartAttribute Colors Black I ChartObj L8 SOLID Colors Blue double startarcangle 225 double arcextent 270 double startarcscale 0 0 Meters Coordinates Meter Axes and Meter Axis Labels 179 double endarcscale 100 0 bool arcdirection false double arcradius 0 6 double centerx 0 0 centery 0 2 ChartFont 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 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
202. el inherited from RTPlot RTDataSource inherited from RTSingleValueIndicator SegmentCornerRadius SegmentSpacing SegmentValueRoundMode SegmentWidth ShowDatapointValue inherited from ChartPlot StepMode inherited from ChartPlot ZOrder inherited from GraphObj 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 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 RT BAR SEGMENTED SUBTYPE and RT BAR SINGLE SEGMENT SUBTYPE bar indicator sub types If the plot supports it this method will tur
203. elMeter 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 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 ChartFont 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 order to use the font in Visual Studio
204. elMeter panelmeter new RTNumericPanelMeter pTransforml panelmeterattrib panelmeter PanelMeterPosition ChartObj OUTSIDE PLOTAREA MIN barplot AddPanelMeter panelmeter RTAlarmPanelMeter panelmeter2 new RTAlarmPanelMeter pTransforml panelmeterattrib panelmeter2 PanelMeterPosition ChartObj BELOW REFERENCED TEXT barplot AddPanelMeter panelmeter2 RTStringPanelMeter panelmeter3 new RTStringPanelMeter pTransforml paneltagmeterattrib ChartObj RT TAG STRING panelmeter3 PanelMeterPosition ChartObj OUTSIDE PLOTAREA MAX Single Channel Bar Indicator 145 barplot AddPanelMeter panelmeter3 chartVu AddChartObject barplot VB Dim pTransforml As New CartesianCoordinates 0 0 0 0 1 0 5000 0 pTransforml SetGraphBorderDiagonal 0 05 0 175 0 08 0 35 Dim background As New Background pTransforml ChartObj PLOT BACKGROUND Colors Gray chartVu AddChartObject background Dim attribl As New ChartAttribute Colors Green 1 ChartObj LS SOLID Colors 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 chartVu AddChartObject baraxis Dim barAxisLab As New NumericAxisLabels baraxis chartVu AddChartObject barAxisLab Dim barplot As New RTBarIndicator pTransforml EngineRPM1 barwidth _ barbase attribl barjust barorient barplot
205. elf 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 DotNet lib 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 Indicator Class RTAutoBarIndicator System Windows Controls UserControl ChartView RTAutoIndicator RTAutoBarIndicator Auto Indicator Classes 311 The RTAutoBarIndicator combines a RTBarIndicator 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
206. els LineColor Colors White meteraxislabels SetAxisLabelsDir meteraxis GetAxisTickDir meteraxislabels OverlapLabelMode ChartObj OVERLAP LABEL DRAW chartVu AddChartObject meteraxislabels Dim meteraxis2 As New RTMeterAxis meterframe meterneedle meteraxis2 SetChartObjAttributes attribl meteraxis2 SetAxisTickDir ChartObj AXIS MIN meteraxis2 LineWidth 1 meteraxis2 LineColor Colors White meteraxis2 SetAxisTickSpace 0 1 meteraxis2 AxisMinorTickLength 10 meteraxis2 AxisMajorTickLength 10 meteraxis2 SetAxisMinorTicksPerMajor 10 meteraxis2 ShowAlarms False chartVu AddChartObject meteraxis2 Numeric Meter Axis Labels Class RTMeterAxisLabels com quinncurtis chart2dsl NumericAxisLabels 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 C public RTMeterAxisLabels RTMeterAxis baseaxis Parameters Meters Coordinates Meter Axes and Meter Axis Labels 177 baseaxis The RTMeterAxis object associated with the labels Selected Public Instance Properties AxisLabelsDecimalPos inherited from NumericAxisLabels AxisLabelsDir inherited from AxisLabels AxisLabelsEnds inherited from AxisLabels AxisLabelsFormat in
207. enerating 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 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 A complete listing of RTScrollFrame properties is found in the QCRTGraphSLCompiledHelpFile chm documentation fil
208. ength of the needle in normalized plot coordinates length NeedleOverhang Set Get the overhang of the back end of the needle indicator specified as a fraction of the needle length PieWedgeDegrees Set Get Specifies the arc width of the needle for the RT METER NEEDLE PIEWEDGE SUBTYPE needle type in degrees coordinates PivotColor Set Get the color of the needle pivot PivotDrawFlag Set to true to draw the needle pivot PivotRadius Set Get in device coordinates the radius of the pivot point of the needle analogous to the bearing or axle supporting the meter needle A complete listing of RTMeterNeedleIndicator properties is found in the QCRTGraphSLCompiledHelpFile chm documentation file located in the doc subdirectory Meter Indicators Needle Arc and Symbol 196 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 NeedleMeterUserControll 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 att
209. ent 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 chart2dsl 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 C public RT3DFrame PhysicalCoordinates transform Rectangle2D rect ChartAttribute attrib int postype Parameters transform Places the RT3DFrame object in the coordinate system defined by transform rect Specifies the position and size of the frame Miscellaneous Shape Drawing 291 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 all chart objects have bounding boxes Be sure and check for null GraphObj ChartAttribute object GraphObj FrameRect Set Get the Rectangle2D object used to define the pm psn eb M Set Get the apparent direction of the light source used to high
210. entation Gets or sets a value indicating the horizontal or vertical orientation Orientation Horizontal or Orientation Vertical of the track bar RTLargeChange Specifies the floating point large change value for the track bar Equivalent to the TrackBar LargeChange property except allows floating point numbers Buttons Track Bars and Other Form Control Classes 255 RTMaximum Specifies the floating point maximum value for the track bar Equivalent to the TrackBar Maximum property except allows floating point numbers RTMinimum Specifies the floating point minimum value for the track bar Equivalent to the TrackBar Minimum property except allows floating point numbers RTSmallChange Specifies the floating point small change value for the track bar Equivalent to the TrackBar SmallChange property except allows floating point numbers RTTickFrequenc RTValue Specifies the double value of the RTControlTrackBar slider A complete listing of RTControlTrackBar properties is found in the QCRTGraphSLCompiledHelpFile chm documentation file located in the doc subdirectory Example for single RTControlTrackBar combined with an RTNumericPanelMeter 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 ChartFont trackbarfont font64Numeric ChartFont tr
211. ented 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 created 12 Class Architecture The chapter also summarizes the classes in the Real Time Graphics Tools for Silverlight library There are five primary features of the overall architecture of the Real Time Graphics Tools for Silverlight classes These features address major shortcomings in existing charting software for use with both Net and other computer languages O O O Real Time Graphics Tools for Silverlight uses the standard Net Silverlight window architecture Real Time graphs are placed in a ChartView window that derives from the System Windows Controls UserControl class Position one or more ChartView objects in Silverlight container windows using the standard container layout managers Mix static QCChart2D and real time charts with other components in the same container The Real Time Graphics Tools for Silverlight 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
212. entric circles with descriptive text giving the key for the value associated with a bubble of this size ChartGrid Classes ChartGrid PolarGrid AntennaGrid QCChart2D Class Summary 87 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 ChartGrid PolarGrid AntennaGrid Chart Text Classes ChartText ChartTitle AxisTitle ChartLabel This class defines the grid lines associated with an axis 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 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 NumericLabel TimeLabel StringLabel 88 QCChart2
213. er Overloads Public Sub New ByVal component As ChartView _ ByVal initialscale As PhysicalCoordinates ByVal scrollxmode As Integer _ ByVal autoscaleymode As Integer Ct public RTScrollFrame ChartView component RTProcessVar processvar PhysicalCoordinates initialscale int scrollxmode int autoscaleymode public RTScrollFrame ChartView component RTProcessVar processvar PhysicalCoordinates initialscale int scrollmode public RTScrollFrame ChartView component PhysicalCoordinates initialscale int scrollxmode 226 Single and Multiple Channel Annunciators int autoscaleymode 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
214. erIndicator 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 Class Architecture 25 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 other classes Only the blue meter arc is the arc indicator The other elements of the meter include meter axes meter axis labels and panel 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 26 Class Architecture 100 0 80 20 60 ER 40 40 60 20 80 0 100 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
215. ericForma t inherited from ChartPlot LineColor inherited from GraphObj LineStyle inherited from GraphObj LineWidth inherited from GraphObj NumChannels inherited from RTPlot PlotLabelTemplate inherited for bar plots 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 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
216. ertagattrib As New ChartAttribute ChartColor Beige 0 ChartObj LS SOLID ChartColor Beige Dim panelmeter2 As New RTStringPanelMeter pTransforml1 runnersPace panelmetertagattrib ChartObj RT TAG STRING panelmeter2 SetPositionReference panelmeterl panelmeter2 StringTemplate TextFont trackbarTitlefont panelmeter2 PanelMeterPosition ChartObj BELOW REFERENCED TEXT panelmeter2 TextColor Colors Black formControlTrackBarl AddPanelMeter panelmeter2 chartVu AddChartObject formControlTrackBarl Dim pTransform2 As New CartesianCoordinates 0 0 0 0 1 0 1 0 pTransform2 SetGraphBorderDiagonal 0 01 0 41 0 05 0 59 treadmillElevationTrackbar New RTControlTrackBar 0 0 15 0 1 0 0 1 1 treadmillElevationTrackbar Orientation Orientation Vertical treadmillElevationTrackbar RTValue 0 258 Buttons Track Bars and Other Form Control Classes MUST USE RTValue to set double value Dim formControlTrackBar2 As New RTFormControlPanelMeter pTransform2 treadmillElevationTrackbar attribl formControlTrackBar2 RTDataSource treadmillElevation formControlTrackBar2 SetLocation 0 0 0 formControlTrackBar2 FormControlSize New Dimension 1 0 1 0 Dim panelmeter3 As New RTNumericPanelMeter pTransform2 runnersPace panelmeterattrib panelmeter3 NumericTemplate TextFont trackbarfont panelmeter3 NumericTemplate DecimalPos 1 panelmeter3 PanelMeterPosition ChartObj RIGHT REFERENCED TEXT panelmeter3 SetPositio
217. es No matter what Form Control is used either ours or the original Silverlight 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 WPFForm Control Button class it adds superior On Off button text and color control and supports momentary toggle and radio button styles pom 36 Class Architecture Horizontal and vertical track bars can be scaled for physical real world coordinates RTControlTrackBar Derived from the Silverlight Control Slider class it adds floating point scaling for the track bar endpoints increments current value and tick mark frequency RTFormControl The RTFormControl class wraps the Silverlight 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 jer ud o sif ol Class Architecture 37 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
218. es for use as axis labels Miscellaneous Chart Classes Marker ChartImage ChartShape QCChart2D Class Summary 89 ChartSymbol 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 This class displays one of five marker types in a graph The marker is used to create data cursors or to mark data points ChartImage This class encapsulates a System Windows Control Image class defining a rectangle in chart coordinates that the image is placed in JPEG and other image files can be imported using the Image class and displayed in a chart ChartShape This class encapsulates a System Windows Media PathGeometry 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 PathGeometry class ChartSymbol 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 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
219. et 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 alarm state condition Delegate for notification each time the check of a process variable produces aChartView chartVu change of state in alarm state condition A complete listing of RTProcessVar properties is found in the QCRTGraphSLCompiledHelpFile 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 102 Process Variable and Alarm Classes ChartAttribute defaultattrib new ChartAttribute Colors Green 1 0 ChartObj LS SOLID Colors 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 Colors Green 1 0 ChartObj LS SOLID
220. eterArcIndicator 16 22 25 184 186 187 188 189 190 191 192 202 RTMeterAxis 17 31 32 33 34 165 170 172 173 174 175 176 178 179 180 182 183 185 202 RTMeterAxisLabels 17 32 34 165 171 175 177 178 180 202 RTMeterCoordinates 16 32 165 166 167 168 169 170 171 172 173 174 178 179 182 183 185 186 187 193 194 197 198 202 205 207 209 210 RTMeterCoordinates 16 32 165 166 167 168 169 170 171 172 173 174 178 179 182 183 185 186 187 193 194 197 198 202 205 207 209 210 RTMeterIndicator 16 19 22 24 97 112 170 171 172 184 186 187 193 194 197 198 202 334 342 348 RTMeterIndicator 16 19 22 24 25 97 112 170 171 172 184 186 187 193 194 197 198 202 334 342 348 RTMeterNeedleIndicator 16 22 26 173 174 178 179 182 183 184 193 194 195 196 202 205 206 207 208 209 210 211 RTMeterNeedleIndicator 16 22 26 173 174 178 179 182 183 184 193 194 195 196 202 205 206 207 208 209 210 211 RTMeterStringAxisLabels 17 32 34 165 180 181 182 183 202 RTMeterSymbolIndicator 16 22 26 184 197 198 199 200 202 RTMeterSymbolIndicator i RTMeterSymbolIndicator 16 22 26 184 197 198 199 200 202 RTMultiAlarmIndicator 16 31 32 325 RTMultiAlarmIndicator 16 31 32 325 RTMultiBarInd
221. eterattrib panelmeterl NumericTemplate TextFont numericfont panelmeterl NumericTemplate DecimalPos 0 panelmeterl PanelMeterPosition ChartObj CUSTOM POSITION panelmeterl SetLocation 0 81 0 30 ChartObj NORM GRAPH POS chartVu AddChartObject panelmeterl VB Public Sub InitializeRightPanelMeters Dim numericfont As ChartFont font64Numeric Dim trackbarTitlefont As ChartFont font12Bold Dim pTransforml As New CartesianCoordinates 0 0 0 0 1 0 1 0 pTransforml SetGraphBorderDiagonal 0 0 0 0 1 0 1 0 Dim attribl As New ChartAttribute ChartColor LightBlue 7 ChartObj LS SOLID ChartColor LightBlue Dim panelmeterattrib As New ChartAttribute ChartColor SteelBlue 3 ChartObj LS SOLID Colors 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 Panel Meter Classes 121 End Sub InitializeRightPanelMeters Example of RTNumericPanelMeter used with an RTBarIndicator The panel meter below extracted from the HybridCar example method InitializeBatteryChargeGraph is an RTNumericPanelMeter attached to a RTBarIndicator bar plot object The position of the panel meter is OUTSIDE PLOTAREA MIN which places underneath the
222. eteraxis2 SetAxisMinorTicksPerMajor 10 meteraxis2 ShowAlarms false chartVu AddChartObject meteraxis2 VB Dim attribl As New ChartAttribute Colors Black 1 ChartObj LS SOLID Colors Blue Dim startarcangle As Double 135 Dim arcextent As Double 230 Il e 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 attribl meteraxis SetAxisTickDir ChartObj AXIS MIN meteraxis LineWidth 5 meteraxis LineColor Colors White meteraxis SetAxisTickSpace 1 meteraxis SetAxisMinorTicksPerMajor 1 meteraxis ShowAlarms True meterneedle MeterAxis meteraxis chartVu AddChartObject meteraxis Dim meterFont As ChartFont fontl4Bold 176 Meters Coordinates Meter Axes and Meter Axis Labels Dim meteraxislabels As New RTMeterAxisLabels meteraxis meteraxislabels SetTextFont meterFont meteraxislab
223. every x value there is one y value A subclass of SimpleDataset it is initialized using ChartCalendar dates a wrapper around the System DateTime value class in place of the x or y values ElapsedTimeSimpleDataset A subclass of SimpleDataset it is initialized with ContourDataset GroupDataset TimeGroupDataset TimeSpan objects 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 QCChart2D Class Summary 59 LinearScale A concrete implementation of the Cha
224. ew 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 Colors Yellow 2 ChartObj LS SOLID Dim ohlcplotl As New OHLCPlot pTransforml Nothing _ ChartCalendar GetCalendarWidthValue ChartObj SECOND 1 25 attribl ohlcplotl SetFastClipMode ChartObj FASTCLIP X Dim stockvars As RTProcessVar stockOpenl stockHighl stockLowl stockClosel rtPlotl New RTGroupMultiValuePlot pTransforml1 ohlcplotl stockvars chartVu AddChartObject rtPlot1 Dim attrib2 As New ChartAttribute Colors Green 3 ChartObj LS 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 Colors Blue 3 ChartObj LS 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 requir
225. f 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 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 Panel Meter Classes 117 however you want OUTSIDE RADIUS BOTTOM 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 INSIDE RADIUS BOTTOM 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 CENTER RADIUS BOTTOM 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 OUTSIDE RADIUS TOP 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 JU
226. ference 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 RTProcessVar datasource double barwidth double barspacing double barbase ChartAttribute attribs int barjust int barorient Parameters transform Multiple Channel Bar Indicator 153 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 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 AlarmIndicatorColorMode inherited from RTSingleValueIndicator BarDatapoi
227. 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 Use 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 AutoScaleRoundXMode 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 AutoScaleRoundYMode MaxDisplayHistory MinSamplesForAutoScale ScrollRescaleMargin ScrollScaleModeX ScrollScaleModeY TimeStampMode Single and Multiple Channel Annunciators 227 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 g
228. forml 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 chart2dsl ChartPlot RTPlot RTMultiValueIndicator RTMultiBarIndicator 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 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 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 re
229. forml SetGraphBorderDiagonal 0 3 85 0 55 0 96 7 ChartAttribute panelmeterattrib new ChartAttribute ChartColor SteelBlue 3 ChartObj LS SOLID Colors Black RTTimePanelMeter panelmeter new RTTimePanelMeter pTransforml timeOfDay panelmeterattrib panelmeter PanelMeterPosition ChartObj INSIDE INDICATOR panelmeter TimeTemplate TextFont new ChartFont Digital SF 36 FontStyles Normal panelmeter TimeTemplate TimeFormat ChartObj TIMEDATEFORMAT 24HMS panelmeter AlarmIndicatorColorMode ChartObj RT INDICATOR COLOR NO ALARM CHANGE chartVu AddChartObject panelmeter ChartAttribute panelmetertagattrib new ChartAttribute ChartColor Beige 0 ChartObj LS SOLID ChartColor Beige RTStringPanelMeter panelmeter3 new RTStringPanelMeter pTransforml timeOfDay panelmetertagattrib ChartObj RT TAG STRING panelmeter3 StringTemplate TextFont new ChartFont Microsoft Sans Serif 10 FontStyles Normal panelmeter3 PanelMeterPosition ChartObj ABOVE REFERENCED TEXT panelmeter3 SetPositionReference panelmeter panelmeter3 TextColor Colors Black 132 Panel Meter Classes chartVu AddChartObject panelmeter3 VB Dim pTransforml As New CartesianCoordinates 0 0 0 0 1 0 1 0 pTransforml SetGraphBorderDiagonal 0 3 0 85 0 55 0 96 Dim panelmeterattrib As New ChartAttribute ChartColor SteelBlue 3 _ ChartObj LS SOLID Colors Black Dim panelmeter As New RTTimePanelMeter pTransforml timeOfDay p
230. g 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 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 Single Channel Bar Indicator 147 90 70 50 gt 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 double 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 public double TemperatureSetpoint 148 Single Channel Bar Indicator get return temperatureSetpoint set temperatu
231. gStartTime 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 Windows RoutedEventHandler this timeAxisControlTrackbar Click 262 Buttons Track Bars and Other Form Control Classes timeAxisControlTrackbar RTValue 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 Public Sub InitializeTimeAxisTrackbar Dim attribl As New ChartAttribute Colors White 3 ChartObj LS SOLID ChartCoolor Ooral 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 ChartColor LightBlue 7 ChartObj LS SOLID ChartColor 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 O
232. ge 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 quinneurtis chart2dsl ChartPlot RTPlot RTMultiValueIndicator RTAnnunciator An RTAnnunciator is used to display the 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 RIProcessVar ByVal annunpos As Rectangle2D _ ByVal attrib As ChartAttribute C 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 214 Single and Multiple Channel Annunciators annunpos 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
233. h 10 gt lt ColumnDefinition Width 10 gt lt ColumnDefinition Width 10 gt lt Grid ColumnDefinitions gt my2 RTAutoBarIndicator Margin 10 11 10 6 Name rtAutoBarIndicator1 Grid Row Grid RowSpan 2 Grid Column 0 gt my2 RTAutoBarIndicator Margin 10 11 10 6 Name rtAutoBarIndicator2 Grid Row Grid RowSpan 2 Grid ColumnSpan 2 Grid Column 1 gt lt my2 RTAutoBarIndicator Margin 10 11 10 6 Name rtAutoBarIndicator3 Grid Row 0 Grid RowSpan 2 Grid Column 3 gt my2 RTAutoBarIndicator Margin 10 11 10 6 Name rtAutoBarIndicator4 Grid Row Grid RowSpan 2 Grid Column 4 gt my2 RTAutoBarIndicator Margin 10 11 10 6 Name rtAutoBarIndicator5 Grid Row 2 Grid ColumnSpan 2 Grid Column gt my2 RTAutoBarIndicator Margin 10 11 10 6 Name rtAutoBarIndicatore Grid Row 2 Grid ColumnSpan 2 Grid Column 2 gt lt my2 RTAutoBarIndicator Margin 10 11 10 6 Name rtAutoBarIndicator7 Grid Row 4 Grid ColumnSpan 2 Grid Column gt lt my2 RTAutoBarIndicator Margin 10 11 10 6 Name rtAutoBarIndicator8 Grid Row 4 Grid ColumnSpan 2 Grid Column 2 gt StackPanel Margin 20 10 10 10 Grid Row 2 Grid RowSpan 2 Grid Column 4 gt lt CheckBox Name checkBox1 Margin 10 gt Bar end bulb lt CheckBox gt lt CheckBox Name checkBox2 Margin 10 gt Interior axs lt CheckBox gt lt CheckBox Name checkBox3 Margin 10 gt Numeric readout lt CheckBox gt lt CheckB
234. hartObjAttributes attribl meterarcindicator IndicatorSubtype ChartObj RT METER SEGMENTED ARC SUBTYPE meterarcindicator SegmentValueRoundMode ChartObj RT CEILING VALUE meterarcindicator SegmentWidth 7 meterarcindicator SegmentSpacing 10 Il c meterarcindicator InnerValueArcNormalized 35 meterarcindicator OuterValueArcNormalized 0 85 meterarcindicator IndicatorBackgroundEnable True meterarcindicator IndicatorBackground New ChartAttribute Colors Black 2 ChartObj LS SOLID ChartColor FromRgb 60 60 60 Add panel meters chartVu AddChartObject meterarcindicator Extracted from the example program RTGraphNetDemo file SegmentedArcMeterUserControll cs method InitializeMeter3 193 Meter Indicators Needle Arc and Symbol LineStyle 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 RTMeterArcInd
235. he 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 Video Game Usage by Age Group 100 E E n E R E gt E gt a E E 3 5 o gt 5 t 3 o S a 20 40 60 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 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 78 QCChart2D Class Summary LineGapPlot MultiLinePlot Pa a E Collector Current mA Sales vs Cost Gap The Line Gap chart is useful for emphasizing the difference between two lines s 2 e 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 Kb 350uA Kb 300uA Kb 25004 Mb 200uA Kb 150uA Kb 100uA C
236. he PopZoomStack method return the chart scale is to its original condition after which the PopZoomStack method has no effect Integrated zoom stack processing Starting with Revision 2 0 zoom stack processing is internal to ChartZoom class There is no need to subclass the ChartZoom class in order to implement a zoom stack Just set the ChartZoom InternalZoomStackProcessing property true zoomObj InternalZoomStackProcesssing true Return to a previous zoom level by right clicking the mouse Change the zoom stack button using the ZoomStackButtonMask property Setting it to MouseButton Left MouseButton Right or MouseButton Middle Aspect Ratio Correction Starting with Revision 2 0 you can force the zoom rectangle to maintain a fixed aspect ratio Use the ChartZoom ArCorrectionMode property to specify the aspect ratio correction mode ZOOM NO AR CORRECTION Allow the x and y dimension of the zoom rectangle to change the overall charts physical aspect ratio This is the default mode and the only mode supported prior to Revision 2 0 282 Zooming ZOOM X AR CORRECTION Track the x dimension of the zoom rectangle and calculate the y dimension in order to maintain a fixed aspect ratio ZOOM Y AR CORRECTION Track the y dimension of the zoom rectangle and calculate the x dimension in order to maintain a fixed aspect ratio The target aspect ratio is the aspect ratio of the coordinate system s at the time the ChartZoom object is intitia
237. he 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 AN TC 0 m a a ee 3 i 100 e N 16 45 50 16 45 52 16 45 54 16 45 56 16 45 58 The RTGroupMultiValuePlot class turns QCChart2D GroupPlot objects like the MultiLinePlot object above into scrolling plots RTGroupMultiValuePlot The RTGroupMultiValuePlot plot class uses a template based on the QCChart2D GroupPlot class to create a real time plot that displays a collection of RTProcessVar objects as a group plot in a scrolling graph 30 Class Architecture Frequency Ohms Capacitance DC Volts AC Volts DC Amps AC Amps Pell LL S A nuti 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
238. he 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 mode constants RT_ORIG CONTROL SIZE RT MIN CONTROL SIZE RT INDICATORRECT CONTROL SIZE A complete listing of RTFormControlPanelMeter properties is found in the QCRTGraphSLCompiledHelpFile chm documentation file located in the doc subdirectory Example for RTControlTrackbar in an RTFormControlPanelMeter The panel meter below extracted 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 CartesianCoordinates pTransforml new CartesianCoordinates 0 0 0 0 1 0 1 0 Panel Meter Classes 137 pTransforml SetGraphBorderDiagonal 0 01 12 0 06 0 3 ChartAttribute attribl new ChartAttribute ChartColor LightBlue 7 ChartObj LS SOLID ChartColor LightBlue runnersPaceTrackbar
239. he size and position of the object Get Set the width of the rectangle Get Set the x value of the shape rectangle Get Set the y value of the shape rectangle 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 Miscellaneous Shape Drawing 299 A complete listing of RTGenShape properties is found in the QCRTGraphSLCompiledHelpFile chm documentation file located in the doc subdirectory Example for drawing RTGenShape objects The example below extracted from the AutoInstrumentPanel example file AutoInstrumentPanelUserControll method InitializeClock draws a circle around the borders of the clock C ChartAttribute attrib2 new ChartAttribute Colors Gray 5 ChartObj LS SOLID Colors White Rectangle2D shaperect new Rectangle2D 0 8 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 Dim attrib2 As New ChartAttribute Colors Gray 5 ChartObj LS SOLID Colors 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 attrib
240. herited from AxisLabels 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 Set Get the number of digits to the right of the decimal point for numeric axis labels Set Get the justification of the axis labels with respect to the axis tick marks Use one of the tick direction constants AXIS MIN AXIS MAX Set Get whether there should be labels for the axis minimum LABEL MIN maximum 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 labels 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 t
241. hs above extracted from the AutoGraphDemo AutoMultiBarIndicatorsUserControll The controls are placed in the underlying window using the AutoMultiBarIndicatorsUserControll xaml file lt UserControl x Class AutoGraphDemo AutoMultiBarIndicatorsUserControli1 xmlns http schemas microsoft com winfx 2006 xaml presentation xmlns x http schemas microsoft com winfx 2006 xaml xmlns d http schemas microsoft com expression blend 2008 xmlns mc http schemas openxmlformats org markup compatibility 2006 mc Ignorable d xmlns myz clr namespace com quinncurtis chart2dsl assembly QCChart2DSL xmlns my2 2 clr namespace com quinncurtis rtgraphsl assembly QCRTGraphSL Height 600 Width 878 xmlns sdk http schemas microsoft com winfx 2006 xaml presentation sdk gt lt Grid gt lt Grid ColumnDefinitions gt lt ColumnDefinition Width 10 gt lt ColumnDefinition Width 10 gt lt ColumnDefinition Width 5 gt 332 Auto Indicator Classes lt Grid ColumnDefinitions gt lt Grid RowDefinitions gt RowDefinition Height 10 gt RowDefinition Height 5 gt lt Grid RowDefinitions gt my2 RTAutoMultiBarIndicator Margin 5 5 5 5 Name rtAutoMultiBarIndicator1 Grid Column 0 gt my2 RTAutoMultiBarIndicator Margin 5 5 5 5 Name rtAutoMultiBarIndicator2 Grid Column 1 gt StackPanel Margin 10 10 10 10 Grid Column 2 gt lt CheckBox Name checkBox1 Margin 10 gt Bar end bulb lt CheckBox gt lt CheckBox Na
242. ialIndicatorl InitStrings Altimeter Feet his rtAutoDialIndicator2 GraphFormat 1 his rtAutoDialIndicator2 GraphBackground FillColor Colors White his rtAutoDialIndicator2 InitStrings Odometer Miles his rtAutoDialIndicator3 GraphFormat 2 his rtAutoDialIndicator3 InitStrings Electric Meter KW Hr VB Public Sub InitializeGraph rtAutoClockIndicatorl GraphFormat 0 rtAutoClockIndicatorl GraphBackground FillColor Colors White rtAutoClockIndicatorl InvertColors ttAutoClogkIndicatsrl Inhitstrings Boston EST rtAutoClockIndicator2 GraphFormat 1 rtAutoClockIndicator2 GraphBackground FillColor Colors White rtAutoClockIndicator2 PlotAttrib FillColor Colors Blue 348 Auto Indicator Classes Me rtAutoclockIndicatorz InitStrings Pittsburgh EST Me rtAutoClockIndicator3 GraphFormat 2 Me rtAutoClockIndicator3 PlotAttrib FillColor Colors Green Me rtAutoClockIndicator3 InitStrings Ft Myers EST Me rtAutoDialIndicatorl GraphFormat 0 Me rtAutoDialIndicatorl GraphBackground FillColor Colors White Me rtAutoDialIndicatorl InvertColors Me rtAutoDialIndicatorl InitStrings Altimeter Feet Me rtAutoDialIndicator2 GraphFormat 1 Me rtAutoDialIndicator2 GraphBackground FillColor Colors White Me rtAutoDialIndicator2 InitStrings Odometer Miles Me rtAutoDialIndicator3 GraphFormat 2 Me rtAutoDialIndicator3 InitStrings Electric Meter KW Hr
243. iatorUserControll 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 Single and Multiple Channel Annunciators 221 processVarl processVar2 processVar3 processVar4 CartesianCoordinates pTransforml new CartesianCoordinates 0 0 0 0 1 0 1 0 prransforml SetGraphBorderDiagonal 0 175 005 0 45 0 475 Background background new Background pTransforml ChartObj PLOT BACKGROUND Colors Gray chartVu AddChartObject background ChartAttribute attribl new ChartAttribute ChartColor Bisque 5 ChartObj LS SOLID ChartColor Bisque ChartAttribute attrib2 new ChartAttribute ChartColor Bisque 5 ChartObj LS SOLID ChartColor Bisque ChartAttribute attrib3 new ChartAttribute ChartColor Bisque 5 ChartObj LS SOLID ChartColor Bisque ChartAttribute attrib4 new ChartAttribute ChartColor Bisque 5 ChartObj LS SOLID ChartColor 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 ChartColor SteelBlue 3 ChartObj LS SOLID Colors Black RTNumericPanelMeter panelmeter
244. ic Sub New Ct 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 Auto Indicator Classes 323 Method InitMultiBarIndicator VB Public Sub InitMultiBarIndicator _ orientation As Integer _ bargraphformat As Integer _ colr As Color _ num As Integer _ C public void InitMultiBarIndicator int orientation int bargraphformat Color cooly 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 initialized the title tags and units strings Method InitStrings VB Public Sub InitStrings _ title As String units As String tags As stringi _ CH 324 Auto Indicator Classes public void InitStrings i string title string units string tags 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 wi
245. icalCoordinates CartesianCoordinates TimeCoordinates ElapsedTimeCoordinates PolarCoordinates AntennaCoordinates Attribute Class ChartAttribute ChartGradient This class derives from the WorldCoordinates class and extends the physical coordinate system of the plot area the area typically 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 GregorianCalenar 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 coordinat
246. icator meterframe meterarcindicator SetChartObjAttributes attribl meterarcindicator InnerValueArcNormalized 0 8 meterarcindicator OuterValueArcNormalized 0 95 processVar2 meterarcindicator IndicatorSubtype ChartObj RT METER SEGMENTED ARC SUBTYPE meterarcindicator SegmentValueRoundMode ChartObj RT CEILING VALUE meterarcindicator SegmentWidth 7 meterarcindicator SegmentSpacing 10 meterarcindicator IndicatorBackgroundEnable True Meter Indicators Needle Arc and Symbol 194 Add panel meters chartVu AddChartObject meterarcindicator Needle Meter Indicator RTMeterNeedleIndicator com quinncurtis chart2dsl 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 C public RTMeterNeedleIndicator RTMeterCoordinates frame RIP
247. icator 16 19 27 29 97 112 127 151 152 155 156 157 158 161 321 326 RTMultiBarIndicator 29 151 158 160 161 RTMultiValueAnnunciator 16 27 28 97 212 215 216 217 218 220 221 RTMultiValueAnnunciator 16 27 28 97 212 215 216 217 218 220 221 RTMultiValueIndicator 16 27 32 35 37 151 212 216 223 227 238 262 264 RTNumericPanelMeter 16 19 20 27 112 117 118 119 120 121 122 124 125 128 142 143 145 155 196 197 214 215 220 221 254 255 257 313 326 336 344 351 360 RTNumericPanelMeter cccccscccessceesecesseeeeeessseeees RTNumericPanelMeter 16 19 20 27 112 117 118 119 120 121 122 124 125 128 142 143 145 155 196 197 214 215 220 221 254 255 256 257 313 326 336 344 351 360 RTPanelMeter 14 16 19 22 25 27 35 46 48 97 112 113 114 117 118 119 122 125 129 132 135 151 165 184 213 258 259 289 RTPa nelMeter ini RTPanelMeter 14 16 19 22 25 27 35 46 48 97 112 113 114 117 118 119 122 125 129 132 135 151 165 184 213 258 259 289 RTPIDControl 16 45 47 271 273 274 276 RTPIDControl 16 45 47 257 271 273 274 276 RTPlot 16 19 22 27 37 113 114 118 122 125 129 132 135 138 139 140 141 151 153 154 184 185 186 193 197 212 216 223 227 230 238 260 264 RTPlot 12 16 19 22 27 37 70 71 95 113 11
248. icatorValue MinimumSize MinIndicatorValue NumericPanelMeter PlotAttrib PlotBackground PreferredSize Process Variable RenderingMode ResizeMode TagPanelMeter UnitsPanelMeter UnitsString Visible Width Auto Indicator Classes 351 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 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 QCRTGraphSLCompiledHelpFile chm documentation file located in the doc
249. id relative size definition parameters In the example below the ChartView is place in Grid Row 0 where the row has a height of 5 The RTProcessVarViewer is place in GridRow 1 where the row has a size of 2 The result is that the chart will occupy 5 7 of the display space and the dataset viewer 2 7 of the display space No matter how you resize the window that relationship will be maintained lt UserControl x Class RTStockDisplay MainPage Process Variable Viewer 301 xmlns http schemas microsoft com winfx 2006 xaml presentation xmlns x http schemas microsoft com winfx 2006 xaml xmlns d http schemas microsoft com expression blend 2008 xmlns mc http schemas openxmlformats org markup compatibility 2006 mc Ignorable d xmlns my clr namespace com quinncurtis chart2ds1 assembly QCChart2DSL xmlns my2 clr namespace com quinncurtis rtgraphs1l assembly QCRTGraphSL d DesignHeight 900 d DesignWidth 1000 xmlns sdk http schemas microsoft com winfx 2006 xaml presentation sdk gt lt Grid x Name LayoutRoot Background White gt lt Grid RowDefinitions gt lt RowDefinition Height 40 gt lt RowDefinition Height 15 gt lt Grid RowDefinitions gt lt my ChartView x Name rtStockDisplayApp1 Margin 10 10 10 10 Grid Row 0 Grid Column 0 gt lt my2 RTProcessVarViewer x Name rtProcessVarApp1 Margin 10 10 10 10 Grid Row 1 Grid Column 0 gt lt Grid gt lt UserControl gt RTProcessVarViewe
250. if any associated with this object Meters Coordinates Meter Axes and Meter Axis Labels 173 MeterFrame Get Set the RTMeterCoordinates coordinate system associated with this object MeterIndicator Get Set the RTMeterIndicator object if any associated with this object MinorTickLineWidth Get Set the minor tick line width OuterAlarmArcNormalized Get Set the outer arc of the axis in normalized radius coordinates ShowAlarms Get Set true to show the alarm arcs ZOrder inherited from GraphObj 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 A complete listing of RTMeterAxis properties is found in the QCRTGraphSLCompiledHelpFile 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 Two axes are created The first is created so that it draws Just the major tick marks using a thicker line width The second uses thin tick marks for the minor tick marks of the meter axis 0 E RPMx1000 4 174 Meters Coordinates Meter Axes and Meter Axis La
251. ile of the SLRTApplicationl example System System Windows System Collections Generic System Ling System Text System Windows Media System Windows Controls System Windows Input com quinneurtis chart2dsl com quinncurtis rtgraphsl namespace SLRTApplicationl lt summary gt Summary description for ScrollApplicationUserControll lt summary gt public class ScrollingGraph System Windows Threading DispatcherTimer timerl new System Windows Threading DispatcherTimer System Windows Threading DispatcherTimer timer2 new System Windows Threading DispatcherTimer double currentTemperatureValuel 110 0 RTProcessVar currentTemperaturel double currentTemperatureValue2 100 0 RTProcessVar currentTemperature2 RTScrollFrame scrollFrame new RTScrollFrame RTAlarm templowalarml RTAlarm temphighalarml RTAlarm templowalarm2 RTAlarm temphighalarm2 384 Using Real Time Graphics Tools to Create Silverlight Applications ChartFont font12 new ChartFont Microsoft Sans Serif 12 FontStyles Normal ChartFont font14 new ChartFont Microsoft Sans Serif 14 FontStyles Normal ChartFont fontl4Numeric new ChartFont Digital SF 14 FontStyles Normal ChartView chartVu public ScrollingGraph ChartView chartvu chartVu chartvu InitializeGraph private void InitializeScrollGraph double x1 0 1 double yl 0 1 double x2 0
252. impleSingleValuePlot constructors Visual Basic Overloads Public Sub New _ ByVal transform As PhysicalCoordinates ByVal plottemplate As SimplePlot _ ByVal datasource As 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 Selected Public Instance Properties EndOfPlotLineMarker Get Set The end of plot marker type Use one of the Marker marker type constants MARKER NULL MARKER VLINE MARKER HLINE MARKER HVLINE PlotTemplate Get Set the simple plot template Single and Multiple Channel Annunciators 233 A complete listing of RTSimpleSingleValuePlot properties is found in the QCRTGraphSLCompiledHelpFile 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 SolarPanelUserControll method InitializeScrollGraph creates a single channel scrolling graph Note Both the RTScrollFrame and the RTSimpleS
253. increase the amount of integral gain 270 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 amount 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 th
254. indicator 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 The bottom meter indicator extracted from the example program RTGraphNetDemo file SymbolMeterUserControl1 cs method InitializeMeter3 C RTMeterSymbolIndicator metersymbolindicator new RTMeterSymbolIndicator meterframe processVar2 metersymbolindicator SetChartObjAttributes attrib1l 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 RTMeterSymbolIndicator meterframe processVar2 metersymbolindicator SetChartObjAttributes attribl metersymbolindicator IndicatorSubtype ChartObj RT METER SYMBOL ARC SUBTYPE metersymbolindicator SymbolSpacing 10 metersymbolindicator SymbolNum ChartObj CIRCLE Meter Indicators Needle Arc and Symbol 202 metersymbolindicat
255. ing 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 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 370 Auto Indicator Classes minx The 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 string title string units C publio void InitsStrings 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
256. ingleValuePlot objects are added to the ChartView When the ChartView UpdateDraw method is called the RTScrollFrame object in the ChartView object list causes the 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 140 120 100 80 60 18 45 00 18 46 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 SimpleLinePlot lineplot new SimpleLinePlot pTransforml null attribl lineplot SetFastClipMode ChartObj FASTCLIP X RTSimpleSingleValuePlot solarPanelLinePlot new RTSimpleSingleValuePlot pTransforml lineplot currentTemperaturel chartVu AddChartObject solarPanelLinePlot 234 Single and Multiple Channel Annunciators 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
257. instrument cluster BarApplication1 A simple dynamic bar graph example program Dynamometer A simulation of a engine dynamometer test stand application ElapsedTimeScrollApplication1 A couple of scroll graphs which use an elapsed time scale Introduction 7 FetalMonitor A fetal monitor simulation HomeAutomation A simple home automation control panel HybridCar Simulation of the power control system for a hybrid car MeterApplicationl A simple meter example program MiniScope A simple mini scope multimeter simulation PIDControlTuner A PID example program Polygraph A polygraph simulation ProcessMonitoring A SCADA Supervisory Control and Data Acquistion simulation ProcessVarDataTables An example in the use of the RTProcessVarViewer class RTGraphNetDemo A miscellaneous assortment of scrolling graphs dynamic bar graphs meters annunciators dials and clocks RTStockDisplay A real time stock monitoring simulation RTXYDisplay A real time XY plot displaying Lissajous figures ScrollApplication1 A simple scrolling graph application Treadmill A treadmill display simulation VerticalScrolling Vertical scrolling examples WeatherStation A computerized weather station simulation SLRTApplication1 A simple scrolling graph example referenced in the tutorial SLRTApplication2 A more complicated scrolling graph example referenced in the tu
258. ipping 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 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 PlotLabel Template property Set Get the numeric format of the PlotLabelTemplate property Sets the line color for the chart object Sets the line style for the chart object Sets the line width for the chart object Get the number of channels in the indicator 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 142 Single Channel Bar Indicator PrimaryChann
259. irection As Boolean False Dim arcradius As Double 0 6 Dim centerx As Double 0 0 Dim centery As Double 0 2 Dim meterFont As ChartFont font12 Dim meterframel As New RTMeterCoordinates startarcangle 170 Meters Coordinates Meter Axes and Meter Axis Labels arcextent arcdirection centerx centery startarcscale endarcscale _ arcradius The example below extracted from the RTGraphNetDemo example file ArrowMeterUserControll 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 0 20 40 60 80 100 C double startarcangle 90 double arcextent 180 double startarcscale 0 0 double endarcscale 100 0 bool arcdirection false double arcradius 0 6 double centerx 0 25 centery 0 0 ChartFont meterFont FontArchive font12 RTMeterCoordinates meterframe new RTMeterCoordinates startarcangle arcextent startarcscale endarcscale VB Dim Dim Dim Dim startarcangle As Double 90 arcextent As Double 180 startarcscale As Double 0 0 endarcscale As Double 100 0 arcdirection centerx centery arcradius Dim Dim Dim Dim Dim Dim Meters Coordinates Meter Axes and Meter Axis Labels 171 arcdirection As Boolean False arcradius As Double 0 6 centerx As Double 0 25 centery A
260. is 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 axis label text can be rotated 360 degrees in one degree increments This class labels the major tick marks of the LinearAxis and LogAxis classes The class supports many predefined 70 QCChart2D Class Summary StringAxisLabels TimeAxisLabels ElapsedTimeAxisLabels PolarAxesLabels AntennaAxesLabels Chart Plot Classes ChartPlot ContourPlot GroupPlot PieChart PolarPlot AntennaPlot SimplePlot and user definable formats including numeric exponent percentage business and currency formats This class labels the major tick marks of the LinearAxis and LogAxis classes using user defined strings 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 AD 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
261. 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 charting package The RTSimpleSingleValuePlot class combines any of the QCChart2D SimplePlot classes with an RTProcessVar object and the RTGroupMultiValuePlot class combines any of the QCChart2D GroupPlot classes with a collection of RTProcessVar objects The RTProcessVar class manages a historical data buffer based on the QCChart2D ChartDataset class Each time the current value of the RTProcessVar object is updated it is time s
262. ith 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 41 Il A Horiz 1 ia 20550707 D The RTAutoBarIndicator has many different format options for self contained single channel bar indicators RTAutoBarIndicator 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 42 Class Architecture oo Mi 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 43 The RTAutoMeterIndicator has many different format o
263. j OBJECT DISABLE rtAutoBarIndicatorl UnitsPanelMeter ChartObjEnable units ChartObj OBJECT ENABLE ChartObj OBJECT DISABLE rtAutoBarIndicatorl YAxisTitle ChartObjEnable units ChartObj OBJECT ENABLE ChartObj OBJECT DISABLE rtAutoBarIndicatorl TagPanelMeter ChartObjEnable title ChartObj OBJECT ENABLE ChartObj OBJECT DISABLE rtAutoBarIndicatorl BarPlot IndicatorSubType 0 segmented ChartObj RT BAR SEGMENTED SUBTYPE ChartObj RT BAR SOLID SUBTYPE VB rAutoBarIndicetorl InitStrings VERT 0 GMB rtAutoBarIndicatorl LowAlarm AlarmLimitValue 23 rtAutoBarIndicatorl HighAlarm AlarmLimitValue 78 rtAutoBarIndicatorl SetpointAlarm AlarmLimitValue 53 rtAutoBarIndicatorl MinIndicatorValue 0 rtAutoBarIndicatorl MaxIndicatorValue 100 H tAutoBarIndicatorl GraphBackground ChartObjAttributes New hartAttribute ChartColor LightBlue 5 Chartobj LS SOLID ChartColor 3 rtAutoBarIndicatorl FaceplateBackground True rtAutoBarIndicatorl BarEndBulb barbulb rtAutoBarIndicatorl InteriorAxis interioraxis rtAutoBarIndicatorl NumericPanelMeter ChartObjEnable IfTest numeric hartObj OBJECT ENABLE ChartObj OBJECT DISABLE Q rtAutoBarIndicatorl NumericPanelMeter NumericTemplate DecimalPos 0 H tAutoBarIndicatorl AlarmPanelMeter ChartObjEnable IfTest alarm hartObj OBJECT ENABLE ChartObj OBJECT DISABLE Q rtAutoBarIndicatorl
264. j OBJECT DISABLE rtAutoMultiBarIndicatorl AlarmPanelMeter ChartObjEnable alarm ChartObj OBJECT ENABLE ChartObj OBJECT DISABLE rtAutoMultiBarIndicatorl UnitsPanelMeter ChartObjEnable units ChartObj OBJECT ENABLE ChartObj OBJECT DISABLE rtAutoMultiBarIndicatorl YAxisTitle ChartObjEnable units ChartObj OBJECT ENABLE rtAutoMultiBarIndicatorl TagPanelMeter ChartObjEnable tags ChartObj OBJECT ENABLE rtAutoMultiBarIndicatorl MainTitle ChartObjEnable title ChartObj OBJECT ENABLE Auto Indicator Classes 333 ChartObj OBJECT DISABLE ChartObj OBJECT DISABLE ChartObj OBJECT DISABLE VB rtAutoMultiBarIndicatorl InitMultiBarIndicator ChartObj VERT DIR 1 ChartColor 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 ChartColor LightBlue 5 ChartObj LS SOLID ChartColor LightBlus rtAutoMultiBarIndicatorl FaceplateBackground True rtAutoMultiBarIndicatorl BarEndBulb barbulb tAutoMultiBarIndicatorl InteriorAxis interioraxis rtAutoMultiBarIndicatorl NumericPanelMete
265. ject 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 281 C 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 previous zoom operation Repeated calls to t
266. kground Dim plotbackground As New Background pTransforml ChartObj PLOT BACKGROUND Colors Bladck chartVu AddChartObject plotbackground Dim xaxis As New TimeAxis pTransforml ChartObj X AXIS xaxis LineColor Colors Black chartVu AddChartObject xaxis Dim yaxis As New LinearAxis pTransforml ChartObj Y AXIS yaxis LineColor Colors Black chartVu AddChartObject yaxis Dim yAxisGrid As New ChartGrid xaxis yaxis ChartObj Y AXIS ChartObj GRID MAJOR yAxisGrid SetColor Colors White yAxisGrid SetLineWidth 1 yAxisGrid SetLineStyle ChartObj LS SOLID chartVu AddChartObject yAxisGrid Dim xAxisGrid As New ChartGrid xaxis yaxis ChartObj X AXIS ChartObj GRID MAJOR xAxisGrid SetColor Colors White xAxisGrid SetLineWidth 1 xAxisGrid SetLineStyle ChartObj LS SOLID chartVu AddChartObject xAxisGrid Dim yaxis2 As New LinearAxis pTransforml ChartObj Y AXIS yaxis2 LineColor Colors Black yaxis2 AxisTickDir ChartObj AXIS MAX yaxis2 AxisIntercept xaxis AxisMax chartVu AddChartObject yaxis2 Dim xAxisLab As New TimeAxisLabels xaxis xAxisLab TextFont axisFont chartVu AddChartObject xAxisLab Dim yAxisLab As New NumericAxisLabels yaxis yAxisLab TextFont axisFont chartVu AddChartObject yAxisLab Using QCRTGraph to Create Silverlight Applications 399 scrollFrame New RTScrollFrame chartVu currentTemperaturel pTransforml ChartObj RT_FIXEDEXTENT MOVINGSTART AUTOSCROLL scrollFrame
267. l sorely Scroll scroll Scroll seroll scroll Scroll LScroll LSGrerll e E Scroll Scroll Scroll Scroll Soroll Scroll ouble Graphl Graphl Graphl Graphl Graphl Graphl Graphl Graphl Graphl Graphl Graphl Graphl Graphi Graphl Graphl Graphl Graphl 0 30 InitRTAutoScrollGraph 0 InitSimpleRTPlotObject C InitSimpleRTPlotObject C InitSimpleRTPlotObject C SimplePlotObj SymbolAttr GraphScrollFrame ScrollS InitStrings RTAutoScrol GraphBackground FillColo SubHead TextString Nu SubHead ChartObjEnable Footer TextString Foo Footer ChartObjEnable YAxisLab2 ChartObjEnable LowAlarm AlarmLimitValue HighAlarm AlarmLimitValu Auto Indicator Classes 375 Startvalue 15 stopvalue hartObj LINE PLOT Colors Blue Channel 1 hartObj LINE PLOT Colors Green Channel 2 hartObj SCATTER PLOT Colors Red Channel 3 ibutes SymbolSize 10 GraphScrollFrame ScrollRescaleMargin 0 01 caleModeX ChartObj RT AUTOSCALE X MINMAX 1Graph Quarks Time r ChartColor BlanchedAlmond meric Scrolling ChartObj OBJECT ENABLE ter pexr ChartObj OBJECT ENABLE ChartObj OBJECT ENABLE 4 e 12 SetpointAlarm AlarmLimitValue 8 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
268. l As New ChartAttribute Colors DarkGray 5 ChartObj LS SOLID Colors DarkGray Dim annunciator As New RTAnnunciator pTransforml processVarl annunrect attribl Dim panelmeterattrib As New ChartAttribute ChartColor SteelBlue 3 ChartObj LS SOLID Colors Black Dim panelmeter As New RTNumericPanelMeter pTransforml processVar2 panelmeterattrib panelmeter PanelMeterPosition ChartObj PLOTAREA CENTER panelmeter NumericTemplate TextFont FontArchive 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 FontArchive font10 panelmeter2 SetPositionReference panelmeter annunciator AddPanelMeter panelmeter2 Dim panelmetertagattrib As New ChartAttribute ChartColor SteelBlue 3 ChartObj LS SOLID Colors White Dim panelmeter3 As New RTStringPanelMeter pTransforml processVarl panelmetertagattrib ChartObj RT TAG STRING panelmeter3 SetPositionReference panelmeter panelmeter3 PanelMeterPosition ChartObj INSIDE BAR panelmeter3 TextColor Colors Black annunciator AddPanelMeter panelmeter3 chartVu AddChartObject annunciator End Sub InitializeAnnunciatorl Multi Channel Annunciators Class RTMultiValueAnnunciator Single and Multiple Channel Annunciators 217 com quinnc
269. l IsEnabled true timerl Interval TimeSpan FromMilliseconds 2000 timerl Tick new EventHandler timerl Elapsed VB Private timerl As New System Windows Threading DispatcherTimer timerl IsEnabled True timerl Interval TimeSpan FromMilliseconds 2000 AddHandler timerl Tick New EventHandler AddressOf timerl Elapsed Silverlight CH System Windows Threading DispatcherTimer timerl new System Windows Threading DispatcherTimer timerl Start timerl Interval TimeSpan FromMilliseconds 2000 timerl Tick new EventHandler timerl Elapsed VB Private timerl As New System Windows Threading DispatcherTimer timerl Start timerl Interval TimeSpan FromMilliseconds 2000 AddHandler timerl Tick New EventHandler AddressOf timerl Elapsed Class Architecture 55 3 QCChart2D for Silverlight Class Summary This chapter is a summary of the information in the QCChart2DSLManual PDF file It is not meant to replace that information Refer to that manual for detailed information concerning these classes QCChart2D for Silverlight Class Summary The following categories of classes realize these design considerations Chart view class Data classes Scale transform classes The chart view class is a System Windows Controls 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 Syste
270. l Time Graphics Tools for Silverlight to Create Web Applications Normally Silverlight is used to create web applications It is easier to debug your project if you just skip the whole web deployment part and run your application in the default Visual Studio Developer Server Ultimately your Silverlight application is going to end up on a server somewhere where you will run the application by pointing to it with a browser You only need to do a couple of additional things in order to deploy the the projects described in Chapter 20 on to a a web site First when you initially create a new Silverlight application project and are at the dialog box below New Silverlight Application Click the checkbox below to host this Silverlight application in a Web site Otherwise a test page will be generated during build Host the Silverlight application in a new Web site New Web project name SLRTBrowserApplicationi Web New Web project type ASP NET Web Application Project Options Silverlight Version BESSER M C Enable WCF RIA Services check off the Host the Silverlight application in a new Web site checkbox and use the default Web project type of ASP NET Web Application Project You can select Silverlight version 4 or 5 Using QCRTGraph for Silverlight to Create Web Applications 405 Your project will end up looking a little different because it will now include some web deployment stuff Sol
271. l meter indicator types and these are listed here Selected Public Instance Properties AlarmIndicatorColorMode Get Set whether the color of the indicator objects inherited from changes on an alarm Use one of the constants RTSingleValueIndicator RT_INDICATOR COLOR NO ALARM CHANGE RT_INDICATOR COLOR CHANGE ON ALARM ChartObjAttributes inherited Sets the attributes for a chart object using a from GraphObj ChartAttribute object ChartObjEnable inherited Enables Disables the chart object A chart object is from GraphObj drawn only if it is enabled A chart object is enabled by default ChartObjScale inherited from Sets the reference to the PhysicalCoordinates object GraphObj that the chart object is placed in CurrentProcessValue Get the current process value of the primary channel 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 inherited from RTPlot RTDataSource inherited from RTSingleValueIndicator UnderRangeNormalizedValue ZOrder inherited from GraphObj Meter Indicators Needle Arc and Symbol 186 Sets the fill color for the chart object Get Set the backgro
272. lButton constructor Visual Basic Overloads Public Sub New ByVal buttontype As Integer _ C public RIControlButtoni 246 Buttons Track Bars and Other Form Control Classes int buttontype E Parameters buttontype The button type of the new button User on of the button subtype constants RT CONTROL RADIOBUTTON SUBTYPE RT_CONTROL MOMENTARYBUTTON SUBTYPE RT_CONTROL TOGGLEBUTTON SUBTYPE Selected Public Instance Properties ButtonChecked Get Set the button check state ButtonCheckedColor Get Set the color of the button when the button is checked ButtonCheckedText Get Set the button text when the button is checked ButtonCheckedTextColor Get Set the color of the button text when the button is checked ButtonSubtype Get Set the button subtype RT_CONTROL RADIOBUTTON SUBTYPE RT CONTROL MOMENTARYBUTTON SUBTYPE RT CONTROL TOGGLEBUTTON SUBTYPE ButtonUncheckedColor Get Set the color of the button when the button is unchecked ButtonUncheckedText Get Set the button text when the button is unchecked ButtonUncheckedTextColor Get Set the color of the button text when the button is unchecked A complete listing of RTControlButton properties is found in the QCRTGraphSLCompiledHelpFile 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 button
273. lass manages a horizontal scroll frame while the RTVerticalScrollFrame manages a vertical scroll frame 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 Real Time Graphics Tools for Silverlight Classes The QCRTGraph classes are a super set of the QCChart2D charting software No attempt should be made to utilize the QCRTGraph classes without a good understanding of the QCChart2D classes See the QCChart2DSLManual PDF file for detailed information about the QCChart2D classes The diagram below depicts the class hierarchy of the Real Time Graphics Tools for Silverlight library without the additional QCChart2D classes 16 Class Architecture Namespace com quinncurtis rtgraphsl System EventArgs RTAlarmEventArgs RTGroupDatasetTruncateArgs RTDatasetTruncateArgs com quinncurtis chart2dsl ChartObj RTAlarm RTAlarmIndicator RTMultiAlarmIndicator RTProcessVar RTComboProcessVar RTPIDControl RTRoundedRectangle2D RTSymbol RTTextFrame RTGenShape RT3DFrame com quinncurtis chart2dsl ChartPlot RTPlot RTSingleValueIndicator RTPanelMeter RTNumericPanelMeter RTAlarmPanelMeter R
274. lection of Frequently Asked Questions about Real Time Graphics Tools for Silverlight 2 Class Architecture of the Real Time Graphics Tools for Silverlight Class Library Major Design Considerations This chapter presents an overview of the Real Time Graphics Tools for Silverlight class architecture Based on the QCChart2D charting architecture it has the same design considerations listed in that software These are 6 O It is based on the Net Silverlight Retained Graphics API model 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 Silverlight routed event handling Design consideration specific to Real Time Graphics Tools for Silverlight are S Updates of data classes are asynchronous with rendering of graphics to the screen Real Time plot objects are derived from QCChart2D plot objects resulting in standardized methods for setting plot object properties Any standard plot type from the QCChart2D software package both simple and group plot types can be implem
275. light 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 GraphObj GraphObj GraphObj GraphObj A complete listing of RT3DFrame properties is found in the QCRTGraphSLCompiledHelpFile chm documentation file located in the doc subdirectory Example for drawing RT3DFrame objects The example below extracted from the HomeAutomation example file ThermostatUserControll 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 292 Miscellaneous Shape Drawing C private void InitializeBackgroundPanel ChartFont theFont font10Bold 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 theFont As ChartFont fontl0Bold 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 InitializeBackgroundPa
276. lized zoomObj ArCorrectionMode ChartObj ZOOM X AR CORRECTION 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 E s D sec I E D pi E E B ni iD pa E DEZ E d 2 ES Lp A DD La C ChartZoom zoomObj zoomObj new ZoomWithStack chartVu pTransforml true zoomObj SetButtonMask MouseButton Left zoomObj SetZoomYEnable true Zooming 283 zoomObj SetZoomXEnable true zoomObj SetZoomXRoundMode ChartObj AUTOAXES FAR zoomObj SetZoomYRoundMode ChartObj AUTOAXES FAR zoomObj SetEnable false zoomObj InternalZoomStackProcesssing true chartVu SetCurrentMouseListener zoomObj private void zoomOn Button Click object sender System EventArgs e 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 this UpdateDraw Now disable scroll frame fetalHeartECGScrollFrame ChartObjEnable ChartObj OBJECT DISABLE Turn on zooming zoomObj SetEnabl
277. lots based on the QCChart2D SimpleLinePlot SimpleBarPlot SimpleScatterPlot and SimpleLineMarkerPlot classes using the RTSimpleSingleValuePlot class 10 Introduction Chapter 13 describes the RTGroupMultiValuePlot class and the implementation of scrolling plots based on the QCChart2D 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 RTAutoBarIndicator 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 Real Time Graphics Tools for Silverlight to create Windows applications using Visual Studio Net Visual C and Visual Basic Chapter 21 is a tutorial that describes how to use Real Time Graphics Tools for Silverlight to create ASP NET web applications using Visual Studio Net Visual C and Visual Basic Chapter 22 is a col
278. low close plot with two RTSimpleSingleValuePlot plot RTScrollFrame The RTScrollFrame plot manages horizontal scrolling and auto scaling for the RTSimpleSingleValuePlot and RTGroupMultiValuePlot objects The RTScrollFrame class is discussed in more detail a couple of sections down RTVerticalScrollFrame The RTVerticalScrollFrame plot manages vertical scrolling and auto scaling for the RTSimpleSingleValuePlot and Class Architecture 31 RTGroupMultiValuePlot objects The RTScrollFrame class is discussed in more detail a couple of sections down 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 meter displays Alarm limits for meter displays are handled by the RTMeterAxis class 100 0 20 40 60 80 100 32 Class Architecture 140 MEMINI cia 120 EE _ _ 80 co ME P 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 This class is used to provide alarm limit indicators for RTSingleValueIndicator objects This
279. m 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 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 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 permit the user to create and move data cursors move plot objects display tooltips and select data points in all types of graphs QCChart2D Class Summary 57 File and printer rendering These classes render the chart image to a printer to a variety of file formats including JPEG and BMP or to a Silverlight System Windows Media Imaging WriteableBitmap object Miscellaneous utility
280. mTextColor Colors Blue temphighalarml New RTAlarm ChartObj RT ALARM GREATERTHAN 120 temphighalarml AlarmMessage High Alarm 400 Using Real Time Graphics Tools to Create Silverlight Applications temphighalarml AlarmSymbolColor Colors Red temphighalarml AlarmTextColor Colors Red Hr currentTemperaturel New RTProcessVar Temp 1 New ChartAttribute Colors Green 1 0 ChartObj LS SOLID Colors Green Hr currentTemperaturel MinimumValue 20 Hr currentTemperaturel MaximumValue 200 Hr currentTemperaturel DefaultMinimumDisplayValue 0 rm currentTemperaturel DefaultMaximumDisplayValue 150 Hr currentTemperaturel SetCurrentValue currentTemperatureValuel currentTemperaturel AddAlarm templowalarml currentTemperaturel AddAlarm temphighalarml Important enables historical data collection for scroll graphs Hr currentTemperaturel DatasetEnableUpdate True templowalarm2 New RTAlarm ChartObj RT ALARM LOWERTHAN 80 templowalarm2 AlarmMessage Low Alarm templowalarm2 AlarmSymbolColor Colors Blue templowalarm2 AlarmTextColor Colors Blue temphighalarm2 New RTAlarm ChartObj RT ALARM GREATERTHAN 120 temphighalarm2 AlarmMessage High Alarm temphighalarm2 AlarmSymbolColor Colors Red temphighalarm2 AlarmTextColor Colors Red rm currentTemperature2 New RTProcessVar Temp 2 New ChartAttribute Colors Green 1 0 ChartObj L8 SOLID Colors Green
281. mber of browsers running on a great variety of hardware platforms many more than either regular Net or WPF Since WPF and Silverlight both are Net based products they share much of the same code base Silverlight uses a retained mode graphics system very similar to WPF though much more streamlined in order to minimize the Silverlight download footprint critical for web applications It includes many of the same overall features as WPF Resolution independence An emphasis on vector graphics means that programs can be more easily designed to be independent of the resolution of the output __ device Arbitrary line thickness and line styles for all lines 8 S Gradients fill patterns and color transparency for solid objects Introduction 3 Generalized geometry support used to create arbitrary shapes Printer and image output support Improved font support for a large number of fonts using a variety of font styles size and rotation attributes Imaging support for a large number of image formats Advanced matrix support for handling 2D transformations 000 Oo In addition to the retained mode rendering for the display Silverlight utilizes a new declarative user interface definition framework known as XAML for Extensible Application Markup Language This framework combines customizable rendering of user interface components with a two tier programming model analogous to the the way you program ASP Net web pages
282. me checkBox2 Margin 10 gt Interior axs lt CheckBox gt lt CheckBox Name checkBox3 Margin 10 gt Numeric readout lt CheckBox gt lt CheckBox Name checkBox4 Margin 10 gt Alarm readout lt CheckBox gt lt CheckBox Name checkBox5 Margin 10 gt Units string lt CheckBox gt lt CheckBox Name checkBox6 Margin 10 gt Tag string lt CheckBox gt lt CheckBox Name checkBox7 Margin 10 gt Title string lt CheckBox gt lt StackPanel gt lt Grid gt lt UserControl gt C void InitializeBargraphs bool barbulb bool interioraxis bool numeric bool alarm bool units bool tags bool title rtAutoMultiBarIndicatorl InitMultiBarIndicator ChartObj VERT_DIR 1 ChartColor 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 ChartColor LightBlue 5 ChartObj LS SOLID ChartColor LightBlue rtAutoMultiBarIndicatorl FaceplateBackground true rtAutoMultiBarIndicatorl BarEndBulb barbulb rtAutoMultiBarIndicatorl InteriorAxis interioraxis rtAutoMultiBarIndicatorl NumericPanelMeter ChartObjEnable numeric ChartObj OBJECT ENABLE ChartOb
283. meterFont As ChartFont font12 Dim meterframe As New RTMeterCoordinates startarcangle arcextent Startarcscale endarcscale arcdirection centerx centery arcradius meterframe SetGraphBorderDiagonal 0 8 0 0 0 99 0 3 Dim frameattrib As New ChartAttribute Colors Black 3 ChartObj LS SOLID Colors Blue Seconds Dim needleattribl As New ChartAttribute Colors Black 1 ChartObj LS SOLID Colors 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 Colors Black 1 ChartObj LS SOLID Colors Blue Dim meterneedle2 As New RTMeterNeedleIndicator meterframe clockdata 1 meterneedle2 NeedleBaseWidth 3 meterneedle2 SetChartObjAttributes needleattrib2 meterneedle2 NeedleLength 0 45 chartVu AddChartObject meterneedle2 Hours 209 Dials and Clocks Dim needleattrib3 As New ChartAttribute Colors Black 1 ChartObj LS SOLID Colors 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
284. mode public RTVerticalScrollFrame ChartView component Single and Multiple Channel Annunciators 229 RIProcessVar processvar PhysicalCoordinates initialscale int scrollmode public RTVerticalScrollFrame 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
285. n 0 05 chartVu AddChartObject scrollFramel for int i 0 i lt 4 i 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 EngineCylinderTempl 1 ScrollFramel AddProcessVar EngineCylinderTempl 2 scrollFramel AddProcessVar EngineCylinderTempl 3 238 Single and Multiple Channel Annunciators 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 GroupPlot class as a template to define the attributes of the multi channel plot It is not the only technique since the previous cha
286. n instance of the new Legend Classes LegendItem BubblePlotLegendItem Legend StandardLegend BubblePlotLegend 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 This class is the abstract base class for chart legends LegendItem This class is the legend item class for all plot objects except for bubble plots Each legend item manages one symbol and descriptive text for that symbol The StandardLegend class uses objects of this type as legend items BubblePlotLegendItem 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 StandardLegend 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 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 conc
287. n 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 Meters Coordinates Meter Axes and Meter Axis Labels 167 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 arcradius As Double C public RTMeterCoordinates double startarcangle double arcextent double startarcscale double 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
288. n on off the display of data values next to the associated data point Set Get the plot objects step mode Use one of the line plot step constants NO STEP STEP START STEP END or STEP NO RISE LINE 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 Single Channel Bar Indicator 143 A complete listing of RTBarIndicator properties is found in the QCRTGraphSLCompiledHelpFile 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 is 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 C CartesianCoordinates pTransforml new CartesianCoordinates 0 0 0 0 1 0 5000 0 pT
289. n 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 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 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 Get the y axis grid object Auto Indicator Classes 327 A complete listing of RTAutoBarIndicator properties is found in the QCRTGraphSLCompiledHelpFile chm documentation file locat
290. nPage xaml file now looks like XUserControl x Class SLRTApplicationl MainPage xmlns xmlns xmlns xmlns xmlns xmlns http schemas microsoft com winfx 2006 xaml presentation x http schemas microsoft com winfx 2006 xaml d http schemas microsoft com expression blend 2008 mc http schemas openxmlformats org markup compatibility 2006 my clr namespace com quinncurtis chart2dsl assembly QCChart2DSL my2 2 clr namespace com quinncurtis rtgraphsl assembly QCRTGraphSL mc Ignorable d d DesignHeight 300 d DesignWidth 400 gt lt Grid x Name LayoutRoot Background White gt my ChartView x Name scrollPlot1 Margin 10 10 10 10 gt lt Grid gt lt UserControl gt Using QCRTGraph to Create Silverlight Applications 395 Display the MainPage asml vb behind code file It will look something like this Partial Public Class MainPage Inherits UserControl Public Sub New InitializeComponent End Sub End Class e Adda reference to the QCChart2DSL and QCRTGraphSL namespaces com quinncurtis chart2dsl and com quinncurtis rtgraphsl in the using section of the program Imports com quinncurtis chart2dsl Imports com quinncurtis rtgraphsl e In some of our other examples we also add references to some other Net and ImageTool libraries in support of printing and Image files Adda new simple class file named ScrollingGraph to the project Alternatively select Add E
291. nReference formControlTrackBar2 formControlTrackBar2 AddPanelMeter panelmeter3 Dim panelmeter4 As New RTStringPanelMeter pTransform2 runnersPace panelmetertagattrib ChartObj RT TAG STRING panelmeter4 SetPositionReference panelmeter3 panelmeter4 StringTemplate TextFont trackbarTitlefont panelmeter4 PanelMeterPosition ChartObj BELOW REFERENCED TEXT panelmeter4 TextColor Colors Black formControlTrackBar2 AddPanelMeter panelmeter4 chartVu AddChartObject formControlTrackBar2 End Sub 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 controls 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 See the method InitializePIDParameterTrackbars in the RTPIDControlTuner examplefor the source to this example Buttons Track Bars and Other Form Control Classes 259 Form Control Panel Meter This panel meter class encapsulates Form Control objects including our own RTControlButton and RTC
292. nd data processing 14 Class Architecture For each of these categories see the associated description in the QCChart2D manual The Real Time Graphics Tools for Silverlight classes are in addition to the ones above They are summarized below Real Time Graphics Tools for Silverlight Class Summary Process Variable and Alarms Single Value Indicators Multiple Value Indicators Alarm Indicators Panel Meter Classes Meter Axis Classes Form Control 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 includes 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 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 in
293. ndows RoutedEventHandler AddressOf Me resetErrorTerm Button Click ResetErrorTerm ButtonFont buttonfont ResetErrorTerm ButtonChecked False buttonlist Add ResetErrorTerm ResetAll ButtonUncheckedText Reset All AddHandler ResetAll Click New System Windows RoutedEventHandler AddressOf resetAll Button Click ResetAll ButtonFont buttonfont ResetAll ButtonChecked False buttonlist Add ResetAll Buttons Track Bars and Other Form Control Classes 249 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 Example for momentary and radio buttons 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 C RTControlButton StartButton new RTControlButton ChartObj RT CONTROL RADIOBUTTON SUBTYPE RTControlButton StopButton new RTControlButton ChartObj RT CONTROL RADIOBUTTON SUBTYPE RTControlButton ResetButton new
294. nel The example below extracted from the PIDControlTuner example file PIDControlTunerUserControll method InitializeTopBargraphs draws an RT3DFrame object as a backdrop for each of the barographs Miscellaneous Shape Drawing 293 C for int i20 i lt PIDProcessItems Length i row i 8 gol i 8 xl xoffset col faceplatewidthspacing yl yoffset row faceplateheightspacing x2 xl faceplatewidth 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 pTransforml normrect rectattrib ChartObj NORM GRAPH POS chartVu AddChartObject frame3d VB Dim i As Integer For i 0 To PIDProcessItems Length 1 row i AS col i Mod 8 x1 xoffset col faceplatewidthspacing 294 Miscellaneous Shape Drawing 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 Ne
295. nel Annunciators 225 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 Other options allow 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 Integ
296. ngine Doors Electric C private void InitializeAnnunciator CartesianCoordinates pTransforml new CartesianCoordinates 0 0 0 0 1 0 1 0 pTransforml SetGraphBorderDiagonal 0 05 0 1 0 725 0 175 ChartAttribute attrib ChartAttribute attribArray new ChartAttribute annunciatorl Length for int i 0 i lt annunciatorl Length i attrib new ChartAttribute ChartColor DarkRed 3 ChartObj LS SOLID ChartColor DarkRed attribArray i attrib int numrows 1 int numcols 8 Single and Multiple Channel Annunciators RTMultiValueAnnunciator annunciator new RTMultiValueAnnunciator pTransforml annunciatorl numcols numrows attribArray annunciator CellColumnMargin 0 05 annunciator CellRowMargin 0 1 ChartAttribute panelmetertagattrib new ChartAttribute ChartColor SteelBlue 3 ChartObj LS SOLID 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 Colors 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 pTransforml As
297. nherited 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 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 Get the y axis grid object Auto Indicator Classes 315 A complete listing of RTAutoBarIndicator properties is found in the QCRTGraphSLCompiledHelpFile 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 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 BarEnd
298. nimum allowable range for this 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 GetCalendarWidth Value 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 double minZoomYRange 0 01 Dimension zoomLimits new Dimension minZoomTimeRange minZoomYRange zoomObj SetZoomRangeLimits 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 SetZoomRangeLimits zoomLimits Zooming 289 17 Miscellaneous Shape Drawing RT3DFrame RTRoundedRectangle2D 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 of the example programs use these shapes either directly or indirectly as the 3D border elem
299. nitions gt lt RowDefinition Height 40 gt RowDefinition Height 15 gt lt Grid RowDefinitions gt lt my ChartView Margin 18 11 16 6 Name scrollingApp1 Grid Row 0 gt lt my2 RTProcessVarViewer Margin 18 11 16 6 Name rtProcessVarViewerApp2 Grid Row 1 gt lt Grid gt lt sdk TabItem gt sdk TabControl Grid UserControl Scroll Application 1 130 120 110 100 11 39 45 11 40 00 11 40 15 11 40 30 114 115 EE 117 120 122 123 11 40 30 0 11 40 31 0 11 40 32 0 11 40 33 0 11 40 34 0 11 40 35 0 11 40 36 0 11 40 37 0 11 40 38 0 11 40 39 0 127 8 125 2 126 9 123 0 A RTProcessVarViewer displaying two RTProcessVar objects 306 Process Variable Viewer C public void InitProcessVarViewer RTProcessVarViewer rtProcessVarViewerl int rows 3 columns 11 startindex 0 rtProcessVarViewerl InitRTProcessVarViewer chartVu null currentTemperaturel rows columns startindex rtProcessVarViewerl UseStripedGridBackground true rtProcessVarViewerl GridCellFont font12 rtProcessVarViewerl AddProcessVar currentTemperature2 Set custom decimal precision for each row rtProcessVarViewerl SetFormatDecimalPos 0 0 rtProcessVarViewerl SetFormatDecimalPos 1 1 rtProcessVarViewerl SetFormatDecimalPos 2 2 Visual Basic Public Sub InitProcessVarViewer rtProcessVarViewerl As RTProcessVarViewer
300. nt barorient ChartObj VERT DIR RTBarIndicator barplot new RTBarIndicator pTransforml processVarl barwidth barbase attribi barjust barorient barplot IndicatorSubType ChartObj RT BAR SOLID SUBTYPE For Pointer indicator ChartAttribute attribl new ChartAttribute Colors Black 1 ChartObj LS SOLID double barwidth 1 0 barbase 0 0 int barjust ChartObj JUSTIFY MIN int barorient ChartObj VERT DIR Colors Green Colors Green Single Channel Bar Indicator 151 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 Colors Black 1 ChartObj LS SOLID Colors 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 barorient barplot IndicatorSubType ChartObj RT BAR SOLID SUBTYPE For Pointer indicator Dim attribl As New ChartAttribute Colors Black 1 ChartObj LS SOLID Colors 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 pTrans
301. ntLabelPosition inherited from ChartPlot BarJust inherited from ChartPlot BarOffset BarOrient inherited from 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 point 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 154 Multiple Channel Bar Indicator ChartPlot BarSpacing inherited from RTPlot BarWidth inherited from ChartPlot ChartObjAttributes inherited from GraphObj ChartObjClipping inherited from GraphObj ChartObjComponent inherited from GraphObj ChartObjEnable inherited from GraphObj ChartObjScale inherited from GraphObj CurrentProcess Value inherited from RTSingleValueIndicator FillBaseValue inherited from ChartPlot FillColor inherited from GraphObj IndicatorBackground IndicatorBackgroundEnable IndicatorSubType LabelTemplateDecimalPos inherited from ChartPlot LabelTemplateNum
302. ntrol 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 input 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 owc mp 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
303. o small the major tick marks are to close together or in the case of time axis labels to large for the 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 178 Meters Coordinates Meter Axes and Meter Axis Labels property It moves the relative position using window device coordinates of the text relative to the specified location of the text TextRotation inherited from ChartText Set Get the rotation of the text in the normal viewing plane ZOrder inherited from GraphObj 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 A complete listing of RTMeterAxisLabels properties is found in the QCRTGraphSLCompiledHelpFile 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 d
304. ollector Emitter Voltage The MultLinePlot will plot a multiple y vectors vs a single x vector 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 QCChart2D Class Summary 79 Daily Stock Price Price Volume NASDAQ Scroll Week 7 22 02 7 29 02 8 05 02 8 12 02 8 19 02 The classic stock 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 Cumulative Plot of Noise vs Time from 7 Sources 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
305. olors Black 1 ChartObj LS SOLID Colors Blue RTMeterNeedleIndicator meterneedlel new RTMeterNeedleIndicator meterframe bigProcessVarArray 0 meterneedlel NeedleBaseWidth 5 meterneedlel SetChartObjAttributes needleattribl meterneedlel NeedleLength 0 55 chartVu AddChartObject meterneedlel ChartAttribute needleattrib2 new ChartAttribute Colors Black l ChartObj LS SOLID Colors Blue RTMeterNeedleIndicator meterneedle2 new RTMeterNeedleIndicator meterframe bigProcessVarArray 1 meterneedle2 NeedleBaseWidth 3 meterneedle2 SetChartObjAttributes needleattrib2 meterneedle2 NeedleLength 0 35 chartVu AddChartObject meterneedle2 211 Dials and Clocks VB dialComboProcessVarl New RTComboProcessVar Altimeter processVarl DefaultAttribute dialComboProcessVarl AddProcessVar bigProcessVarArray 0 dialComboProcessVarl AddProcessVar bigProcessVarArray 1 dialComboProcessVarl SetDivisorItem 0 1 dial dial dial Pri ComboProcessVarl SetDivisorItem 1 10 ComboProcessVarl SetModuloItem 0 100 ComboProcessVarl SetModuloItem 1 100 vate Sub InitializeDiall 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 ChartFont FontArchive font1
306. olors Black 2 ChartObj LS SOLID ChartColor FromRgb 60 60 60 Add panel meters chartVu AddChartObject meterarcindicator VB Dim meterarcindicator As New RTMeterArcIndicator meterframe me me me me me me ChartObj LS SO terarcindica terarcindica terarcindica terarcindica terarcindica terarcindica Meter Indicators Needle Arc and Symbol 190 tor SetChartObjAttributes attribl tor IndicatorSubtype ChartObj tor InnerValueArcNormalized tor OuterValueArcNormalized tor IndicatorBackgroundEnable tor IndicatorBackground New LID ChartColor FromRgb 60 Add panel meters chartVu AddChartObject meterarcindicator 0 0 ChartAttribute Colors Black 60 RT METER ARC BAND SUBTYPE 205 Ra True 60 processVarl 2 Extracted from the example program RTGraphNetDemo file ArcMeterUserControll method InitializeMeter3 C RTMeterArcIndicator meterarcindicator new RTMeterArcIndicator meterframe processVar2 meterarcindicator SetChartObjAttributes attribl meterarcindicator InnerValueArcNormalized 0 Bj 191 Meter Indicators Needle Arc and Symbol LineStyle meterarcindicator OuterValueArcNormalized 0 95 meterarcindicator IndicatorSubtype ChartObj RT METER ARC BAND SUBTYPE meterarcindicator IndicatorBackgroundEnable true Add panel meters to meter needle chartVu AddChartObject meterarcindica
307. 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 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 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 Single and Multiple Channel Annunciators 231 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 QCRTGraphSLCompiledHelpFile 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 this currentTemperaturel pTransforml ChartObj RT_FIXED
308. ontrolTrackBar objects in a panel meter class so that controls can be added to indicator objects Class RTFormControlPanelMeter 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 C public RTFormControlPanelMeter PhysicalCoordinates transform RTProcessVar datasource Control formcontrol ChartAttribute attrib 260 Buttons Track Bars and Other Form Control Classes public RTFormControlPanelMeter PhysicalCoordinates transform Control formcontrol ChartAttribute attrib Parameters transform The coordinate system for the 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 EEODUEHES Grap hObj sai ChartAttribute object GraphOb phObj me the chart object is placed in ControlSizeMode Set Get to the size mode for the Control Use one of the Control size mode constants RT_ORIG CONTROL SIZE RT MIN CONTROL SIZE RT INDICATORRECT CONTROL SIZE FormControlSize Get the size of the form control in device units
309. opup 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 ChartZoom 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 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 MagniView MoveCoordinates MultiMouseListener QCChart2D Class Summary 91 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 009000 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
310. or Button Click StartButton ButtonFont buttonfont buttonlistl Add StartButton StopButton ButtonUncheckedText Stop StopButton ButtonChecked False AddHandler StopButton Click New System Windows RoutedEventHandler AddressOf Me selector Button Click StopButton ButtonFont buttonfont buttonlistl Add StopButton 252 Buttons Track Bars and Other Form Control Classes ResetButton ButtonUncheckedText Reset ResetButton ButtonChecked False AddHandler ResetButton Click New System Windows RoutedEventHandler AddressOf Me selector Button_Click ResetButton ButtonFont buttonfont buttonlistl Add ResetButton ClearButton ButtonUncheckedText Clear ClearButton ButtonChecked False AddHandler ClearButton Click New System Windows RoutedEventHandler 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 buttonlist1l numColumns numRows attribl 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 Colors Black 5 ChartObj LS SOLID ChartColor LightGreen Dim pTransform2 As New CartesianCoordinate
311. or IndicatorBackgroundEnable True metersymbolindicator SymbolSize 12 metersymbolindicator SymbolPosPercent 0 9 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 RTMeterAxis 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 v
312. or how the scroll graph is positioned in the underlying window RTAutoScrollGraph Subhead Text 14 03 42 14 03 44 14 03 46 14 03 48 14 03 50 Time Channel 1 Channel 2 Channel 3 Footer text Scrolling graph with Date Time x axis scale Channel 1 Channel 2 Channel 3 Auto Indicator Classes 363 RTAutoScrollGraph Subhead Text 0 00 13 0 00 23 0 00 33 Time Footer text Scrolling graph with elapsed time x axis scale public void InitializeGraph TOP HORIZONTAL GRAPH Date Time scale DateTime starttime endtime rtAu rtAu rtAu rtAu rtAu rtAu rtAu rtAu rtAu rtAu rtAu rtAu rtAu rtAu toScroll toScroll toScroll toscroll LtoScroll toseroll toScroll toSeroll tosceroll toscroll toScroll toScroll toscroll toScroll DateTime endtime DateTime Now DateTime Now endtime AddSeconds 10 Colors Colors Colors Graphl Graphl Graphl Graphl Graphl Graphl Graphl Graphl Graphi Graphl lGraphl Blue Channel 1 Graphl Green Channel 2 Graphi Red Channel 3 Graphl InitRTAutoScrollGraph starttime 0 endtime 15 InitSimpleRTPlotObject ChartObj LINE PLOT InitSimpleRTPlotObject ChartObj LINE PLOT InitSimpleRTPlotObject ChartObj SCATTER PLOT SimplePlotObj SymbolAttributes SymbolSize 8 GraphScrollFrame Sc
313. ot class to create a real time plot that displays a collection of RTProcessVar objects as a group plot in a scrolling graph format RTGroupMultiValuePlot constructors Visual Basic Overloads Public Sub New ByVal transform As PhysicalCoordinates ByVal plottemplate As GroupPlot _ ByVal datasource As RTProcessVar C public RTGroupMultiValuePlot PhysicalCoordinates transform GroupPlot plottemplate RTProcessVar datasource Parameters transform The coordinate 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 EndOfPlotLineMarker Get Set The end of plot marker type Use one of the Marker marker type constants MARKER NULL MARKER VLINE MARKER HLINE MARKER HVLINE MarkerGroupNumber Get Set the group number that is used for the end of plot line marker PlotTemplate Get Set the group plot template A complete listing of RTGroupMultiValuePlot properties is found in the QCRTGraphSLCompiledHelpFile 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 DynamometerUserControll method InitializeEngine2ScrollGraph creates a multi channel scrolling graph Note You do not have to use an RTGroupMultiValuePlot
314. our 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 to be the most flexible Visual C for Silverlight Ifyou do not already have an application program project create one using the Visual Studio project wizard File New Project Visual C Silverlight On the right select a project type of Silverlight Application Give the project a unique name In our examples slfolder this example is the SLRTApplicationl so give your example a different name such as SilverlightApplicationl You will end with a basic Silverlight based application For purposes of this example the chart will placed in the initial default window 378 Using Real Time Graphics Tools to Create Silverlight Applications New Project Recent Templates Installed Template Visual Basic NET Framework 4 v Sort by Default Search Installed Templates Type Visual C Visual C m aol A blank project for creating a rich internet 3 Visual C application using Silverlight Windows Silverlight Class Library Visual C Web Office Silverlight Business Application Visual C Cloud Reporting Gei Silverlight Navigation Application Visual C SharePoint Silverlight WCF RIA Services Class Library Visual C Test WCF Workflow Visual C Visual F Other Project Types Database Test Projects E a
315. ource ChartAttribute attrib int stringtype public RTStringPanelMeter PhysicalCoordinates transform ChartAttribute attrib int stringtype public RTStringPanelMeter PhysicalCoordinates transform RTProcessVar datasource ChartAttribute attrib Panel Meter Classes 127 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 String Template TextString property to set the string Selected Public Instance Properties Get Set the string template defining the panel meter string format The text properties associated with the panel meter are set using this property A complete listing of RTStringPanelMeter properties is found in the QCRTGraphSLCompiledHelpFile chm documentation file located in the doc subdirectory Example for RTStringPanelMeter used with RTMultiBarIndicator The 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 e
316. owledge 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 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
317. ox Name checkBox4 Margin 10 gt Alarm readout lt CheckBox gt lt CheckBox Name checkBox5 Margin 10 gt Units string lt CheckBox gt lt CheckBox Name checkBox6 Margin 10 gt Tag string lt CheckBox gt lt CheckBox Name checkBox7 Margin 10 gt Segmented lt CheckBox gt lt StackPanel gt lt Grid gt lt UserControl gt C void InitializeBargraphs bool barbulb bool interioraxis bool numeric bool alarm bool units bool title bool segmented rtAutoBarIndicatorl InitBargraph ChartObj VERT DIR 0 ChartColor OrangeRed rtAutoBarlndicatorl 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 Auto Indicator Classes 321 new ChartAttribute ChartColor LightBlue 5 ChartObj LS SOLID ChartColor LightBlue rtAutoBarIndicatorl FaceplateBackground true rtAutoBarIndicatorl BarEndBulb barbulb rtAutoBarIndicatorl InteriorAxis interioraxis rtAutoBarIndicatorl NumericPanelMeter ChartObjEnable numeric ChartObj OBJECT ENABLE ChartObj OBJECT DISABLE rtAutoBarIndicatorl NumericPanelMeter NumericTemplate DecimalPos rtAutoBarIndicatorl AlarmPanelMeter ChartObjEnable alarm ChartObj OBJECT ENABLE ChartOb
318. pTransforml _ lineplot currentTemperaturel chartVu AddChartObject solarPanelLinePlot Example for a simple two channel vertical scrolling line plot The example below extracted from the VerticalScrolling ElapsedTimeVerticalScrolling method InitializeVerticalScrollGraph creates a vertical elapsed time based two channel scrolling graph Note Both the RTVertcialScrollFrame 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 the 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 Single and Multiple Channel Annunciators 235 0 00 42 0 00 32 0 00 22 0 00 12 0 50 100 150 scrollFrame new RTVerticalScrollFrame this currentTemperaturel pTransforml ChartObj RT FIXEDEXTENT MOVINGSTART AUTOSCROLL scrollFrame AddProcessVar currentTemperature2 scrollFrame ScrollScaleModeX ChartObj RT AUTOSCALE X MINMAX Allow 100 samples to accumlate before autoscaling y axis This prevents rapid changes of the y scale for the first few samples scrollFrame MinSamplesForAutoScale 100 scrollFrame ScrollRescaleMargin 0 05 chartVu AddChartObject scrollFrame ChartAttribute attribl new ChartAttribute Colors Yellow 1 ChartObj LS SOLID SimpleLin
319. panelmeter2 SetPositionReference panelmeter panelmeter2 TextColor Colors SpringGreen panelmeter2 AlarmTemplate TextFont font10 panelmeter2 AlarmIndicatorColorMode ChartObj RT TEXT BACKGROUND COLOR CHANGE ON ALARM barplot AddPanelMeter panelmeter2 String Panel Meter Class RTStringPanelMeter 126 Panel Meter Classes com quinncurtis chart2dsl 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 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 transform As PhysicalCoordinates ByVal datasource As RTProcessVar ByVal attrib As ChartAttribute ByVal stringtype As Integer Overloads Public Sub New ByVal transform As PhysicalCoordinates ByVal attrib As ChartAttribute _ ByVal stringtype As Integer Overloads Public Sub New ByVal transform As PhysicalCoordinates ByVal datasource As RTProcessVar _ ByVal attrib As ChartAttribute C public RTStringPanelMeter PhysicalCoordinates transform RTProcessVar datas
320. partial class MainPage UserControl ScrollingGraph sol public MainPage InitializeComponent InitScrollappi public void InitScrollApp sgl new ScrollingGraph scrollPlotl ScrollPlotl PreferredSize new Size 600 400 The reference to PreferredSize tells the software that the font sizes specified in the graph are with respect to a chart window of size 600 400 If the chart 1s sized larger than this the fonts will be larger if it is sized smaller the fonts will be smaller Ifyou want to add printing see the example Dynamometer MainPage xaml cs file for the printer code you need to add See the QCChart2D manual for additional details about printing from a Silverlight application Build the Solution Build Build Solution If the project fails to compile you need to go back and check the errors and the previous steps When it runs properly it the SLRTApplicationl chart looks like 390 Using Real Time Graphics Tools to Create Silverlight Applications SLRTApplication1 Windows Internet Explorer E F Quinn Curtis DotNet QCRTGraph Visual CSharp examples sSLRTApplication1 SLRTApplicationi Bin DebugSLRTApplicationi TestPage html lt x 8 File Edit View Favorites Tools Help sli Favorites Js gt Free Hotmail e gt s RTApplicationt n de gt Pagev Safety Toos Scroll Application 1 14 38 10 14 38 15 14 38 20 14 38 25 Internet The
321. ph Ti rtAutoScrollGraphl GraphBackground FillColor ChartCol rtAutoScrollGraphl SubHead TextString Time Date Scro rtAutoScrollGraphl SubHead ChartObjEnable ChartObj OB rtAutoScrollGraphl Footer TextString Footer text rtAutoScrollGraphl Footer ChartObjEnable rtAutoScrollGraphl YAxisLab2 ChartObjEnable ChartObj rtAutoScrollGraphl LowAlarm AlarmLimitValue 4 rtAutoScrollGraphl HighAlarm AlarmLimitValue 12 rtAutoScrollGraphl SetpointAlarm AlarmLimitValue 8 Dim startts As TimeSpan TimeSpan FromSeconds 0 Dim endts As TimeSpan TimeSpan FromSeconds 30 rtAutoScrollGraph2 InitBRTAutoScrollGraph startts 0 en rtAutoScrollGraph2 InitSimpleRTPlotObject ChartObj LINE rtAutoScrollGraph2 InitSimpleRTPlotObject ChartObj LINE rtAutoScrollGraph2 InitSimpleRTPlotObject ChartObj SCAT rtAutoScrollGraph2 SimplePlotObj SymbolAttributes Symbo rtAutoScrollGraph2 GraphScrollFrame ScrollRescaleMargin rtAutoScrollGraph2 GraphScrollFrame ScrollScaleModeY rtAutoScrollGraph2 InitStrings RTAutoScrollGraph Ti Auto Indicator Classes 365 endtime 15 PLOT Colors Blue Channel 1 PLOT Colors Green Channel 2 TER PLOT Colors Red Channel 3 lSize 8 0 01 ChartObj RT AUTOSCALE Y MINMAX me Quarks or BlanchedAlmond lling JECT ENABLE ChartObj OBJECT ENABLE OBJECT ENABLE dts 15 PLOT Colors Blue Channel 1 PLOT Colors Green Channel 2 TER PLOT Colors Red Channel 3
322. placed at equally spaced intervals 1000 100 Linear X 10 LogY 1 0 0 1 0 20 40 60 80 40 20 0 0 2 0 4 0 6 1 100 10 1 8 01 02 Logarithmic LogAxis QCChart2D Class Summary 65 Logarithmic Axes 50000 400 5000 Log X Log X 200 Linear Y 500 Log Y 50 0 5 100 0 02 0 2 2 20 200 1 10 100 1000 Log X Linear Y 2 4 6 10 20 40 60 100 499 400600 1000 Time X Log Y 9 01 02 10 01 02 axes can be combined with linear logarithmic and time axes 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 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 Year YeavQuarer TTT 1985 1998 T TITIO 1995 2000 TT 1998 TTT 2000 TIT TTT a 1990 1999 2001 2002 2003 YearMonth Quarter Month TTT 712002 LL T 14999 2000 2001 2002 2003 1 2002 4 002 10 2002 1 2003 MonthiWeek Month Day 7 Day Week F7 910102 10108 a a TEE 40 402 140102 12 0402 10103 11 0102 42 04 02 10108 Month Day 5 Day Week WeeldDay Day Week 210303 303103 40103 10503 1203 1903 12603 WeekiD ay
323. plate TextFont FontArchive font10 panelmeter2 SetPositionReference panelmeter annunciator AddPanelMeter panelmeter2 Dim panelmetertagattrib As New ChartAttribute ChartColor SteelBlue 3 ChartObj LS SOLID Colors White Dim panelmeter3 As New RTStringPanelMeter pTransforml processVarl _ panelmetertagattrib ChartObj RT TAG STRING panelmeter3 SetPositionReference panelmeter panelmeter3 StringTemplate TextFont FontArchive font10 panelmeter3 PanelMeterPosition ChartObj ABOVE REFERENCED TEXT panelmeter3 TextColor Colors 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 AnnunciatorUserControll 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
324. plate 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 quinneurtis chart2dsl 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 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 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 Class Architecture 23 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
325. ple 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 12 hour clock Dials and Clocks 206 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 N clock12Hour AddProcessVar clockdata 0 seconds N clock12Hour 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 clock12Hour SetModuloItem 0 12 apply modulo 12 base clockl2Hour SetModuloItem 1 12 apply modulo 12 base clock12Hour SetModuloItem 2 12 apply modulo 12 base private void InitializeClock double startarcangle 90 double arcextent 360 double startarcscale 0 0 double endarcscale 12
326. plots group bar plots error bar plots floating bar plots floating stacked bar plots open high low close plots candlestick plots arrow plots histogram plots cell plots box and whisker plots and bubble plots GroupPlot This class is an abstract base class for all group plot classes QCChart2D Class Summary 73 Flow Analysis Stealth Project I A AN RS RS SS EES ESSE SII BPRS ODES TS j M 7 e em P e X gt j e a ane i 7 e M ur E 1 mj d nf axe UE T T Tresa 0 2 4 6 8 10 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 arrows as defined by the data in a group dataset The position size and rotation of each arrow in the collection is independently controlled 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 74 QCChart2D Class Summary 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
327. points with moving maximum and minimum values use in scrolling graphs autoscalexmode Specifies x axis auto scale mode of the scroll frame Use one of the y axis scroll 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 230 Single and Multiple Channel Annunciators Selected Public Instance Properties AutoScaleRoundXMode AutoScaleRoundYMode 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
328. 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 0 00 30 0 00 20 0 00 10 0 00 00 100 RTVerticalScrollFrame Class Architecture 39 coordinate system remains fixed whether it advances in sync with the constantly changing end of the scroll frame Other options allow the y scale to be constantly rescaled to reflect the current dynamic range of the y values in the scroll frame The RTScrollFrame horizontally scrolls data with a numeric time date or elapsed time time stamp Scroll Application 1 110 120 130 An example of a vertical elapsed time scroll frame 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 40 Class Architecture Auto Indicator Classes com quinneurtis chart2ds ChartView RTAutoIndicator RTAutoBarlIndicator 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 w
329. properties is found in the QCRTGraphSLCompiledHelpFile chm documentation file located in the doc subdirectory Meter Indicators Needle Arc and Symbol 200 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 the 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 SymbolMeterUserControll method InitializeMeter2 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 201 Meter Indicators Needle Arc and Symbol LineStyle VB Dim metersymbolindicator As New RTMeterSymbolIndicator meterframe processVar2 metersymbolindicator SetChartObjAttributes attribl metersymbol
330. pter 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 i 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 GroupPlot objects The first type is a multi channel plot Plot objects of this type include QCChart2D MultiLinePlot QCChart2D StackedLinePlot QCChart2D GroupBarPlot QCChart2D 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 HistogramPlot QCChart2D BubblePlot QCChart2D FloatingBarPlot QCChart2D CellPlot and QCChart2D 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 GroupPlot objects can be used in scrolling graphs Multi Channel Scrolling Graphs Class RTGroupMultiValuePlot com quinncurtis chart2dsl ChartPlot RTPlot RTMultiValueIndicator RTGroupMultiValuePlot The RTGroupMultiValuePlot plot class uses a template based on the QCChart2D GroupPl
331. ptions and security settings in the project settings You have probably already solved all of these issues for deployment of Silverlight applications to your web site so adjust the project in line with your other Silverlight projects Everything associated with the Quinn Curtis software should automatically transfer to the web site when you deploy it since all referenced files are bundled into the deployment zip files One simple way to deploy the application as is without any changes to the project defaults is to just copy the projects Web folder to your server web site Then on your server using the IIS Management Tool create a new application pool if needed for your Silverlight applications Silverlight Applications for example Then using the IIS Manager go to the application folder SLRTBrowswerApplication Web in our examples in your web site and select Properties for the folder Add it to the Silverlight Applications pool you already created Then in the Properties Asp Net tab select Asp Net 4 0 or higher You would then be able to run the project from a browser like this TestPage aspx http quinn curtis com SLRTBrowserApplicationl Web SLRTBrowserApplication TestPage aspx and TestPage html http quinn curtis com SLRTBrowserA pplicationl Web SLRTBrowserApplication TestPage html 22 Frequently Asked Questions FAQs First read the FAQ s section of the QCChart2D manual All of the FAQs for that
332. ptions 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 twelve different auto meter formats Altimeter Electric Meter The RTAutoDialIndicator 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 44 Class Architecture 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 45 RTAutoScrollGraph 15 15 10 10 e e 5 IB 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 3 RTAutoScrollGraph An RTAutoScrollGraph is a self contained control derived from th
333. r RTAutoBarIndicator RTAutoVerticalScrollGraph Auto Indicator Classes 367 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 InitRTAutoScroll overload to select which one is most applicable to your data RTAutoVerticalScrollGraph constructors 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 Cf public RTAutoVerticalScrollGraph 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 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 s
334. r ChartObjEnable IfTest numeric ChartObj OBJECT ENABLE ChartObj OBJECT DISABLE 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 ChartObj OBJECT DISABLE rtAutoMultiBarIndicatorl MainTitle ChartObjEnable IfTest title ChartObj OBJECT ENABLE ChartObj OBJECT DISABLE Meter Indicator Class RTAutoMeterIndicator System Windows Controls UserControl ChartView 334 Auto Indicator Classes 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 indicato
335. r 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 C public RTProcessVarViewer ChartView chartvu PhysicalCoordinates transform Rectangle2D posrect RIProcessVar pv H nt rows KG ht cols jH nt Start 302 Process Variable Viewer 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 display 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
336. r datasource double innerarc double outerarc ChartAttribute attrib Meter Indicators Needle Arc and Symbol 188 public RTMeterArcIndicator RTMeterCoordinates 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 InnerArcCapStyle Set Get the inner arc cap style Use one of the constants RT_ METER ARC RADIUS CAP RT METER ARC WEDGE WIDTH CAP RT METER ARC FLAT CAP InnerValueArcNormalized Set Get the value of the inner arc radius in normalized radius coordinates OuterArcCapStyle Set Get the outer arc cap style Use one of the constants RT METER ARC RADIUS CAP RT METER ARC WEDGE WIDTH CAP RT METER ARC FLAT CAP OuterValueArcNormalized Set Get the value of the outer arc radius in normalized radius coordinates SegmentSpacing Set Get the spacing of the arc segments in degrees SegmentValueRoundMode Set Get how the current p
337. r is customized using public properties Visual Basic Overloads Public Sub New Ct 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 C public void InltStringsi string title String units Parameters title The title or tag string units The units string Auto Indicator Classes 335 Use the UpdateIndicator method to update the meter indicator with new data Method UpdateIndicator 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 DefaultAlarmFont 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 DefaultFontStrin Set Get the default font used in the chart This is a string VRBE specifying the name of the font DefaultMainTitleFont Get Set the font used for the main title DefaultDat
338. r to add visual enhancements to graphs 800 600 400 200 lie 10 52 45 10 53 00 10 53 15 10 53 30 xeyright Quinn Curtis Inz 2008 A complete PID Control tuning center can be created using the PID control tools bar indicators scroll frames buttons and track bars RTPIDControl This class represents a simple control loop with support for proportional integral and derivative control It includes advanced features for anti reset windup error term smoothing error term reset and rate limiting of control outputs RTSymbol This class is used by the RTAlarmIndicator class to draw the alarm indicator symbols 48 Class Architecture RTTextFrame This adds a 3D border to the standard QCChart2D 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 Source Code Differences between the Net versions of QCChart2D QCRTGraph Net WPF and Silverlight There are some minor difference in the names of classes between the Net versions of QCChart2D QCRTGraph These differences are summarized below All of these changes are the result of changes in base types used by WPF and Silverlight or conflicts between the original QCChart2D QCRTGraph software and base classes in WPF and Silverlight If you intend to translate applications from the original QCChart2D QCRTGraph for Net software to the WPF and Silverlight ver
339. rPanelLinePlotl LineColor Colors Yellow chartVu AddChartObject solarPanelLinePlot1 Dim attrib2 As New ChartAttribute Colors Green 2 ChartObj LS SOLID Dim lineplot2 As New SimpleLinePlot pTransforml Nothing attrib2 lineplot2 SetCoordinateSwap True Dim solarPanelLinePlot2 As New RTSimpleSingleValuePlot pTransforml lineplot2 currentTemperature2 solarPanelLinePlot2 LineColor Colors Yellow solarPanelLinePlot2 EndOfPlotLineMarker ChartObj MARKER HLINE Example for a multi channel scrolling line plot The example below extracted from the Dynamometer example file DynamometerUserControll method InitializeEnginelScrollGraph 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 Single and Multiple Channel Annunciators 237 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 scrollFramel new RTScrollFrame this EngineCylinderTemp1 0 pTransforml ChartObj RT FIXEDEXTENT MOVINGSTART AUTOSCROLL scrollFramel AddProcessVar EngineCylinderTemp1 1 ScrollFramel AddProcessVar EngineCylinderTempl 2 ScrollFramel AddProcessVar EngineCylinderTemp1 3 ScrollFramel ScrollScaleModeY ChartObj RT AUTOSCALE Y MINMAX scrollFramel ScrollRescaleMargi
340. ransforml SetGraphBorderDiagonal 0 05 0 175 0 08 0 35 Background background new Background pTransforml ChartObj PLOT BACKGROUND Colors Gray chartVu AddChartObject background ChartAttribute attribl new ChartAttribute Colors Green 1 Chart0bj L3 SOLID Colors 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 144 Single Channel Bar Indicator baraxis CalcAutoAxis chartVu AddChartObject baraxis NumericAxisLabels barAxisLab new NumericAxisLabels baraxis chartVu AddChartObject barAxisLab RTBarIndicator barplot new RTBarIndicator pTransforml EngineRPM1 barwidth barbase attribl barjust barorient barplot SegmentSpacing 400 barplot SegmentWidth 250 barplot IndicatorBackground new ChartAttribute Colors Black 1 ChartObj LS SOLID Colors 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 ChartColor SteelBlue 3 ChartObj LS SOLID Colors Black ChartAttribute paneltagmeterattrib new ChartAttribute ChartColor SteelBlue 3 ChartObj LS SOLID Colors White RTNumericPan
341. rates 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 s cen ica Mica ene 600 400 200 0 ma Esa EA NND IR ECH NL C private void InitializeEnginelTempIndicator CartesianCoordinates pTransforml new CartesianCoordinates 0 0 0 0 1 0 800 0 plransforml SetGraphBorderDiagonal 0 15 175 0 48 0 35 Background background new Background pTransforml ChartObj PLOT BACKGROUND Colors Gray chartVu AddChartObject background Multiple Channel Bar Indicator 157 ChartAttribute attribl new ChartAttribute Colors DarkMagenta 1 ChartObj LS SOLID Colors DarkMagenta ChartAttribute attrib2 new ChartAttribute Colors Aquamarine 1 ChartObj LS SOLID Colors Aquamarine ChartAttribute attrib3 new ChartAttribute Colors DarkSalmon 1 ChartObj LS SOLID Colors DarkSalmon ChartAttribute attrib4 new ChartAttribute Colors Yellow 1 ChartObj LS SOLID Colors Yellow ChartAttribute attribArray attribl attrib2 attrib3 attrib4 double barwidth
342. rdinates MultiMouseListener DataCursor MoveData ChartAttribute ChartFont ChartColor ChartGradient ChartPrint BufferedImage System Windows Controls UserControl ChartView Rectangle2D Point2D Point3D GroupPoint2D DoubleArray DoubleArray2D BoolArray Polysurface GraphObj AntennaAnnotation TickMark Axis LinearAxis PolarAxes AntennaAxes LogAxis TimeAxis ElapsedTimeAxis ChartText ChartTitle AxisTitle ChartLabel NumericLabel BarDatapointValue TimeLabel ElapsedTimeLabel StringLabel AxisLabels NumericAxisLabels TimeAxisLabels ElapsedTimeAxisLabels StringAxisLabels PolarAxesLabels AntennaAxesLabels ChartGrid PolarGrid AntennaGrid LegendItem BubblePlotLegendItem Legend StandardLegend BubblePlotLegend ChartPlot SimplePlot SimpleLinePlot SimpleBarPlot SimpleScatterPlot SimpleLineMarkerPlot SimpleVersaPlot GroupPlot ArrowPlot BubblePlot CandlestickPlot CellPlot ErrorBarPlot FloatingBarPlot FloatingStackedBarPlot GroupBarPlot HistogramPlot LineGapPlot MultiLinePlot OHLCPlot StackedBarPlot StackedLinePlot BoxWhiskerPlot GroupVersaPlot PieChart RingChart PolarPlot PolarLinePlot PolarScatterPlot AntennaPlot AntennaLinePlot QCChart2D Class Summary 95 96 QCChart2D Class Summary AntennaScatterPlot AntennaLineMarkerPlot Background ChartImage ChartShape ChartSymbol Marker ChartZoom 4 Process Variable and Alarm Classes RTProcessVar RTAlarm RTAlarmEventArgs The RTProcessVar class
343. re are other ways to incorporate charts into your application You can add a UserControl to your program Add UserControl and place the chart entirely in the UserControl The ChartView object is referenced in the Grid panel of the UserControl s xaml file and initialized in the UserControl s behind code file The UserControl derived class is then referenced in the main MainPage xaml file The UserControlChartExamplel demonstrates this method Or You can add a UserControl to your program but change the inheritance from UserControl to ChartView Since ChartView is a subclass of UserControl this is valid In this case you want to remove the Grid section from the xaml file of the ChartView derived class The Grid panel is opaque and the chart will not show through The ChartView derived class is then referenced in the main MainPage xaml file See the UserControlChartExample2 program for an example of this technique Or Youcan just reference the ChartView class in the main MainPage xaml file Define the chart in the behind code file MainPage xaml cs or MainPage xaml vb See the UserControlChartExample3 program for an example of this technique Visual Basic for Silverlight Ifyou do not already have an application program project create one using the Visual Studio project wizard File New Project Visual Basic Silverlight On the right Using QCRTGraph to Create Silverlight Applications 391 select a project type of Silverlight
344. reSetpoint value public void InitializeCustomBarIndicator barplot new CustomRTBarIndicator pTransforml currentTemperaturel barwidth barbase attribl barjust barorient barplot IndicatorBackground new ChartAttribute Colors Black 1 ChartObj LS SOLID Colors 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 barbase attrib barjust barorient End Sub New Public Overrides Function GetCustomBarOffset ByVal v As Double As Double Single Channel Bar Indicator 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 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 GetCus
345. red 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 Axis Label Classes AxisLabels QCChart2D Class Summary 69 NumericAxisLabels StringAxisLabels PolarAxesLabels AntennaAxesLabels 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 July 19 2002 15 15 11 24 Hour Mode 12340 0 Decimal 2002 15 115 24 Hour Mode 1 2340E4 Scientific 7 2002 15 11 Minute Second 12 340K Business 7 19 2002 3 15 11 12 Hour Mode 1234000 Percent 19 07 2002 3 15 12 Hour Mode 1 23401 04 Exponent 02 o 12340 Currency 7102 ou 7 19 02 19 07 02 ue Multi line and rotated 0 360 degrees July ge axis labels are supported Jul ge J 4 Friday rrTTTTITTTT TTTTT ITTTTT TTTT Fri Western Eastern Southern Northern F Sales Sales Sales Sales Region Region Region Region In addition to the predefined formats programmers can define custom time date and numeric formats Axis Labels NumericAxisLabels This class is the abstract base class for all ax
346. ribl meterneedle NeedleLength 0 7 meterneedle ZOrder 55 Add panel meters chartVu AddChartObject meterneedle 197 Meter Indicators Needle Arc and Symbol LineStyle Extracted from the example program RTGraphNetDemo file ArrowMeterUserControll cs method InitializeMeter8 C RTMeterNeedleIndicator meterneedle new RTMeterNeedleIndicator meterframe processVarl meterneedle IndicatorSubtype ChartObj RT METER NEEDLE ARROW SUBTYPE meterneedle SetChartObjAttributes attribl meterneedle NeedleLength 0 55 ChartAttribute panelmeterattrib new ChartAttribute ChartColor SteelBlue 3 ChartObj LS SOLID Colors 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 FontArchive font24Numeric 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 55 Meter Indicators Needle Arc and Symbol 198 Dim panelmeterattrib As New ChartAttribute ChartColor SteelBlue 3 _ ChartObj LS SO
347. ributes 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 New RTProcessVar Hours defaultattrib clock12Hour New RTComboProcessVar 12 Hour Clock defaultattrib clockl2Hour AddProcessVar clockdata 0 seconds clock12Hour AddProcessVar clockdata 1 minutes clock12Hour AddProcessVar clockdata 2 hours Clock Meter coordinates is going to be scaled from 0 12 All values must be converted to this range Dials and Clocks 208 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 clock12Hour SetModuloItem 1 12 apply modulo 12 base clockl2Hour SetModuloItem 2 12 apply modulo 12 base Private Sub InitializeClock 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 5 Dim centerx As Double 0 0 Dim centery As Double 0 0 Dim
348. rientation Orientation Horizontal AddHandler timeAxisControlTrackbar ValueChanged New System Windows RoutedPropertyChangedEventHandler 0f Double AddressOf Me timeAxisControlTrackbar Click timeAxisControlTrackbar RTValue 100 MUST USE RTValue to set double value Dim timeAxisControlPanelTrackBar As New 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 End Sub Form Control Grid Buttons Track Bars and Other Form Control Classes 263 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 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 PhysicalCoordin
349. rm3 As New CartesianCoordinates ChartObj LINEAR SCALE ChartObj LINEAR SCALE pTransform3 AutoScale Dataset3 ChartObj AUTOAXES FAR ChartObj AUTOAXES FAR 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 ChartZoom chartVu transformArray 5 True 287 288 Zooming zoomObj SetButtonMask MouseButton Left zoomObj SetZoomYEnable True zoomObj SetZzoomXEnable True zoomObj SetZoomXRoundMode ChartObj AUTOAXES FAR zoomObj SetZoomYRoundMode ChartObj AUTOAXES FAR zoomObj SetEnable True zoomObj SetZzoomStackEnable True zoomObj InternalZoomStackProcesssing True chartVu SetCurrentMouseListener zoomObj 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 mi
350. rocess value is rounded up in calculating how many segments to display in RT METER SEGMENTED ARC SUBTYPE RT METER SINGLE SEGMENT ARC SUBTYPE modes Use one of the constants RT FLOOR VALUE RT CEILING VALUE SegmentWidth Set Get the value of the arc segment width in degrees 189 Meter Indicators Needle Arc and Symbol LineStyle A complete listing of RTMeterArcIndicator properties is found in the QCRTGraphSLCompiledHelpFile chm documentation file located in the doc subdirectory In the single segment arc indicator subtype RTMeterArcIndicator IndicatorSubType 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 ArcMeterUserControll method InitializeMeter1 C 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 C
351. rocessVar datasource double needlelength double needleoverhang double needlewidth ChartAttribute attrib public RTMeterNeedleIndicator RTMeterCoordinates frame RTProcessVar datasource Parameters 195 Meter Indicators Needle Arc and Symbol LineStyle frame The RTMeterCoordinates object defining the meter coordinate system datasource 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 IndicatorSubtype inherited Set Get the meter indicator subtype Use one of the meter from RTMeterIndicator needle indicator subtype constants RT METER NEEDLE SIMPLE SUBTYPE RT METER NEEDLE PIEWEDGE SUBTYPE RT METER NEEDLE ARROW SUBTYPE NeedleBaseWidth Set Get the width of the base end of the needle for the RT METER NEEDLE SIMPLE SUBTYPE needle type in device coordinates NeedleHeadLengthMultiplier Set Get the head length multiplier for the RT METER NEEDLE ARROW SUBTYPE needle type in device coordinates NeedleHeadWidthMultiplier Set Get the head width multiplier for the RT METER NEEDLE ARROW SUBTYPE needle type in device coordinates NeedleLength Set Get the l
352. rollRescaleMargin 0 01 GraphScrollFrame ScrollScaleModeY ChartObj RT AUTOSCALE Y MINMAX InitStrings RTAutoScrollGraph Time Quarks GraphBackground FillColor ChartColor BlanchedAlmond SubHead TextString Subhead Text SubHead ChartObjEnable ChartObj OBJECT ENABLE Footer TextString Footer text Footer ChartObjEnable ChartObj OBJECT ENABLE YAxisLab2 ChartObjEnable ChartObj OBJECT ENABLE 364 Auto Indicator Classes 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 Colors Blue Channel 1 rtAutoScrollGraph2 InitSimpleRTPlotObject ChartObj LINE PLOT Colors Green Channel 2 rtAutoScrollGraph2 InitSimpleRTPlotObject ChartObj SCATTER_ PLOT Colors 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 ChartColor BlanchedAlmond rtAutoScrollGraph2 SubHead TextString Subhead Text rtAutoScrollGraph2 SubHead ChartObjEnable ChartObj OBJECT
353. roller 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 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 Egn 2 PID Control 271 m i K e T K e ka T e i e i 1 where T 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 K proportional gain K 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 e eii is very susceptible to noise problems In most practical systems this term is replaced by the more stable higher order equation Ae eli 3 e i 1 3 e i 2 e i 3 6 A common problem in discrete control sy
354. rrentTemperatureValuel currentTemperaturel AddAlarm templowalarml currentTemperaturel AddAlarm temphighalarml Important enables historical data collection for scroll graphs currentTemperaturel DatasetEnableUpdate true templowalarm2 new RTAlarm ChartObj RT ALARM LOWERTHAN 80 templowalarm2 AlarmMessage Low Alarm templowalarm2 AlarmSymbolColor Colors Blue templowalarm2 AlarmTextColor Colors Blue temphighalarm2 new RTAlarm ChartObj RT ALARM GREATERTHAN 120 temphighalarm2 AlarmMessage High Alarm temphighalarm2 AlarmSymbolColor Colors Red temphighalarm2 AlarmTextColor Colors Red Hr currentTemperature2 new RTProcessVar Temp 2 new ChartAttribute Colors Green 1 0 ChartObj LS SOLID Colors Green currentTemperature2 MinimumValue 20 currentTemperature2 MaximumValue 200 currentTemperature2 DefaultMinimumDisplayValue 0 currentTemperature2 DefaultMaximumDisplayValue 150 Hr currentTemperature2 SetCurrentValue currentTemperatureValue2 currentTemperature2 AddAlarm templowalarm2 Hr currentTemperature2 AddAlarm temphighalarm2 Important enables historical data collection for scroll graphs currentTemperature2 DatasetEnableUpdate true InitializeScrollGraph timerl Interval TimeSpan FromMilliseconds 500 200 msecs timerl Tick new EventHandler timerl Tick timer2 Interval TimeSpan FromMilliseconds 1000
355. rtScale 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 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 contains routines for drawing lines rectangles and text using Silverlight device coordinates WorldCoordinates This class derives from the UserCoordinates class and maps a device independent world coordinate system on top of the Silverlight device coordinate system 60 QCChart2D Class Summary WorkingCoordinates Phys
356. s 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 New System Windows RoutedEventHandler AddressOf Me selector Button Click PrimaryLineButton ButtonFont buttonfont buttonlist2 Add PrimaryLineButton SecondaryLineButton ButtonUncheckedText Secondary Line SecondaryLineButton ButtonChecked False Buttons Track Bars and Other Form Control Classes 253 AddHandler SecondaryLineButton Click New System Windows RoutedEventHandler AddressOf Me selector Button Click SecondaryLineButton ButtonFont buttonfont buttonlist2 Add SecondaryLineButton Concurrent ButtonUncheckedText Concurrent Concurrent ButtonChecked False AddHandler Concurrent Click New System Windows RoutedEventHandler AddressOf Me selector Button Click numColumns End Concurrent ButtonFont buttonfont buttonlist2 Add Concurrent numColumns 1 numRows 4 Dim controlgrid2 As New RTFormControlGrid pTransform2 Nothing buttonlist2 numRows attrib2 controlgrid2 CellRowMargin 0 1 controlgrid2 CellColumnMargin 0 0 controlgrid2 FormControlTemplate Frame3DEnable flag3DBorder chartVu AddChartObject controlgrid2 Sub Control TrackBars Class RTControlTrackBar System Windows Controls Slider RTControlTrackBar The RTControlTrackBar class is subclas
357. s Double 0 0 meterFont As ChartFont FontArchive font12 meterframe As New RTMeterCoordinates startarcangle arcextent _ startarcscale endarcscale arcdirection centerx centery arcradius Meter Axis RTMeterAxis com quinncurtis chart2dsl LinearAxis RTMeterAxis 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 Ct ByVal frame As RTMeterCoordinates ByVal graphplot As RTMeterIndicator _ ByVal tickspace As Double _ ByVal tickspermajor As Integer public RTMeterAxis RTMeterCoordinates frame RTMeterIndicator graphplot public RTMeterAxis RTMeterCoordinates frame RTMeterIndicator graphplot double tickspace int tickspermajor 172 Meters Coordinates Meter Axes and Meter Axis Labels Parameters 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
358. s and one is a toggle button The buttons are added to an RTFormControlGrid in order to position them as a logical group C RTControlButton ResetErrorTerm new RTControlButton ChartObj RT CONTROL MOMENTARYBUTTON SUBTYPE RTControlButton ResetAll Buttons Track Bars and Other Form Control Classes 247 new RTControlButton ChartObj RT CONTROL MOMENTARYBUTTON SUBTYPE RTControlButton StartControl new RTControlButton ChartObj RT CONTROL TOGGLEBUTTON SUBTYPE public void InitializeStartStopButtons ChartAttribute attribl new ChartAttribute Colors Black 3 ChartObj LS SOLID ChartColor CoralCoral ChartFont buttonfont font9Bold ArrayList buttonlist new ArrayList StartControl ButtonUncheckedText Start StartControl ButtonCheckedText Stop StartControl Click new System Windows RoutedEventHandler this controlOn Button Click StartControl ButtonFont buttonfont StartControl ButtonChecked false buttonlist Add StartControl ResetErrorTerm ButtonUncheckedText Reset Error ResetErrorTerm Click new System Windows RoutedEventHandler this resetErrorTerm Button Click ResetErrorTerm ButtonFont buttonfont ResetErrorTerm ButtonChecked false buttonlist Add ResetErrorTerm ResetAll ButtonUncheckedText Reset All ResetAll Click new System Windows RoutedEventHandler resetAll Button Click ResetAll ButtonFont buttonfont ResetAll ButtonChecked
359. s anti reset windup technique 272 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 Double _ 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 publie RIPIDContrel st int ptype double setpnt double steadstat double prop double integ double deriv double lowclmp double highclmp double rateclmp double sampleper double filterconst public RTPIDCOontrolt double setpnt double steadstat double prop double integ double deriv double sampleper double filterconst Parameters setpnt PID Control 273 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 co
360. s is the meter ticks point inward in format 4 and outward 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 7 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 9 Auto Indicator Classes 339 Format 10 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 RT AutoMeterIndicator objects The example below extracted from the AutoGraphDemos AutoMeterIndicatorsUserControll example draws each of the 12 different meter formats 340 Auto Indicator Classes L Window1 Mixed Chart AutoBarIndicators AutoMeterIndicators AutoMultiBarIndicators AutoPanelMeterIndicators AutoDialsAndClocksIndicators 0 20 0 20 40 Kl KE E 100 Numeric readout 100 100 Alarm readout 60 80 Fahr 20 R Units string 20 F
361. s 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 Cf public ChartZoom ChartView component PhysicalCoordinates transforms bool brescale component transforms A reference to the ChartView object that the chart is placed in An array size numtransforms of the PhysicalCoordinates objects associated with the zoom operation Zooming 285 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 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 Super zoom example Adapted from the RTStockDisplay example In this exampl
362. 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 points 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 QCChart2D Class Summary 71 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 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 th
363. sed from the WPFSlider class Our version of the TrackBar control adds floating point scaling for the track bar endpoints increments and current value Unlike the WPF version it does not include tick marks because the underlying Slider class does not support tick marks RTControlButton constructor Visual Basic Overloads Public Sub New ByVal minvalue As Double _ 254 Buttons Track Bars and Other Form Control Classes 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 C public RTControlTrackBar double minvalue double maxvalue double largechange double smallchange double tickfrequency public RTControlTrackBar double minvalue double maxvalue Parameters minvalue Specifies the floating point minimum value for the track bar Equivalent to the TrackBar Minimum property maxvalue Specifies the floating point maximum value for the track bar Equivalent to the TrackBar Maximum property largechange Specifies the floating point large change value for the track bar Equivalent to the TrackBar LargeChange property smallchange Specifies the floating point small change value for the track bar Equivalent to the TrackBar SmallChange property tickfrequency No supported Selected Public Instance Properties RTOri
364. sform RTProcessVar datasource ChartAttribute attrib public RTTimePanelMeter PhysicalCoordinates transform ChartAttribute attrib Parameters transform The coordinate system for the new RTTimePanelMeter object datasource The process variable associated with the panel meter attrib The color attributes of the panel meter indicator Selected Public Instance Properties TimeTemplate Set Get the TimeLabel template for the panel meter time date value The text properties associated 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 QCRTGraphSLCompiledHelpFile chm documentation file located in the doc subdirectory Example for RTTimePanelMeter Panel Meter Classes 131 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 CartesianCoordinates pTransforml new CartesianCoordinates 0 0 0 0 1 0 1 0 pTrans
365. sing the RTScrollFrame ChartObjEnable method set it to ChartObj DBJECT 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 WPFdelegates 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 rectangle You must place a check to see if the zoom ob
366. sions take special note of these differences It can be confusing because in WPF Silverlight many classes have the same name as their Net Forms equivalents Color Timer ChartColor FromArgb and MouseEventArgs are a few It is just that they are in different name spaces Usually the default collection of using statements at the top of WPF Silverlight classes point you to the correct name spaces Other WPF Silverlight classes have slightly different names than their Net equivalents Colors DashStyles FontStyles FontWeights Color FromArgb MouseButtons and MouseButtonEventArgs Another confusing issue for those translating to from WPF to Silverlight is that while the two run time environments share the same names spaces the actual classes in the names spaces often contain different classes Think of WPF as a massive code base and architecture from which Silverlight sprung Then consider that when creating the Silverlight run time Microsoft pared down WPF to an absolute minimum in order to make downloading of the Silverlight run time as fast as possible Many of the useful classes you find in WPF are not found in Silverlight Also you will also find that many of the classes WPF and Silverlight have in common have had their methods and properties pared down to an absolute minimum in the Silverlight version of the class Color The color class used in the Net Forms based version of QCChart2D QCRTGraph is derived from the System Drawing Color
367. software will apply to the QCRTGraph software 1 Is the Real Time Graphics Tools for Silverlight software backward compatible with the Charting Tools for Windows and the Graphics Class Libraries for MFC No the Real Time Graphics Tools for Silverlight software is not backward compatible with earlier Quinn Curtis products It was developed explicitly for the new Net programming object oriented programming framework You should have no problems recreating any charts that you created using our older Windows software in most cases it will take far fewer lines of code One of the few chart types that are not supported is the sweep graph INDEX E EE Alarms 16 18 19 20 27 31 32 47 97 100 101 102 103 104 105 106 107 108 109 110 112 122 123 124 125 142 143 144 145 155 214 215 220 222 312 313 325 326 335 336 344 350 351 354 359 360 361 367 383 386 387 397 399 400 Annuncl tors sciiti Annunciators 16 19 22 23 112 212 213 214 215 AntennaAnnotation 81 82 95 ANtENDAAXES ii 63 68 70 95 AntennaAxesLabels AntennaCoordinates AntennaGrid nene AntennaLineMarkerPlot 81 82 96 AntennaLinePlot 80 81 95 AntennaPlot 70 80 81 82 95 AntennaScatterPlot 81 82 96 ATTOWPIOL eere Pee 72 73 95 AITOWS 94 WII 10 Au
368. ss 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 alarm 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 Process Variable and Alarm Classes 105 Selected Public Instance Properties AlarmLimitValue Get Set the alarm limit value AlarmMessage Get Set the current alarm message AlarmState Get Set the alarm state true if the last call to CheckAlarm show that the process variable currently in alarm AlarmSymbolColor Get Set the alarm symbol color AlarmTextColor Get Set the alarm text color AlarmType Get Set the alarm type RT_ALARM NONE RT ALARM LOWERTHAN ot RT ALARM GREATERTHAN Hysteresis Value Get Set the alarm hysteresis value A complete listing of RTAlarm properties is found in the QCRTGraphSLCompiledHelpFile 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 dependent on the alarm will not change until the ChartView Up
369. st barorient 160 Multiple Channel Bar Indicator public override double GetCustomBarOffset double v This centers the bar segments double offset return offset this BarWidth 2 GetCustomBarWidth v 2 public override double GetCustomBarWidth double v double width 0 5 width 0 01 v 100 v 100 this BarWidth return width private void InitializeBar3 RIProcess processVarl Var II processVarArray processVar2 processVar3 CartesianCoordinates pTransforml new CartesianCoordinates 0 0 Gals 1 pTransforml SetGraphBorderDiagonal 0 05 Background background 2 475 100 0 Dou Oe processVar4 65 new Background pTransforml ChartObj PLOT BACKGROUND Colors White chartVu AddChartObject background ChartAttribute attribl new ChartAttribute Colors ChartColor BlanchedAlmond ChartAttribute attrib2 new ChartAttribute Colors ChartAttribute attrib3 new ChartAttribute Colors ChartAttribute attrib4 new ChartAttribute Colors ChartAttribute attribArray double barwidth int barju st D 20 barbase 0 0 Green ChartObj Green UChartob Green ChartObj Green ChartObj lattribl attrib2 barspace ChartObj JUSTIFY MIN LS SO LS SO LS SO LS SO attrib3 0 25 LID LID LID LID D Col Col Col
370. stems 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 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 use
371. 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 Ct 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 _ gole As Color C 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 3 colr 312 Auto Indicator Classes 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 C public void InitStrings string title string units Use the UpdateIndicator method to update the bar indicator with new data Method
372. style and gradient 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 to instances of the ChartAttribute and PhysicalCoordinates classes The ChartAttribute class contains basic color line style and gradient 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 QCChart2D Class Summary 63 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 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
373. t CheckBox Name checkBox1 IsChecked True Margin 5 Click checkBox1_Click gt Tag string lt CheckBox gt lt CheckBox Name checkBox2 IsChecked True Margin 5 lt CheckBox Name checkBox3 IsChecked True Margin 5 Click checkBox3_Click gt Alarm readout lt CheckBox gt lt CheckBox Name checkBox4 IsChecked True Margin 5 Click checkBox4_Click gt Units string lt CheckBox gt lt StackPanel gt lt Grid gt lt UserControl gt C rtAutoMeterIndicatorl GraphFormat 0 rtAutoMeterIndicatorl InitStrings Format 0 Fahr rtAutoMeterIndicatorl LowAlarm AlarmLimitValue 50 rtAutoMeterIndicatorl HighAlarm AlarmLimitValue 233 rtAutoMeterIndicatorl MinIndicatorValue 0 rtAutoMeterIndicatorl MaxIndicatorValue 300 342 Auto Indicator Classes VB rtAutoMeterIndicatorl GraphFormat 0 rtAutoMeterIndicatorl InitStrings Format 0 Fahr rtAutoMeterIndicatorl LowAlarm AlarmLimitValue 50 rtAutoMeterIndicatorl HighAlarm AlarmLimitValue 233 rtAutoMeterIndicatorl MinIndicatorValue 0 rtAutoMeterIndicatorl MaxIndicatorValue 300 Dial Indicator Class RTAutoDialIndicator System Windows Controls UserControl ChartView RTAutoIndicator 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 l
374. t Get the text color of the panel meter A complete listing of RTPanelMeter properties is found in the QCRTGraphSLCompiledHelpFile chm documentation file located in the doc subdirectory Positioning Panel Meters The most complicated thing about 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 OUTSIDE BAR Used when the panel meter is attached to a bar indicator
375. tString DefaultMainTitleFont DefaultTagFont DefaultUnitsFont DialInterior FaceplateBackground GraphBackground GraphBorder GraphFormat Height HighAlarm LowAlarm MainTitle MaximumSize MaxIndicatorValue MinimumSize MinIndicatorValue NumericPanelMeter PlotAttrib PlotBackground PreferredSize ProcessVariable Description Get the ArrayList holding all of the RTAlarm objects Get a reference to the RTAlarmPanelMeter object Get Set the font used for the subhead title 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 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
376. tamped 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 98 Process Variable and Alarm Classes Real Time Process Variable Class RTProcessVar ChartObj 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 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 Simpl
377. tected void OnMouseMove MouseEventArgs e VB protected void OnMouseDown ByVal e As MouseEventArgs protected void OnMouseUp ByVal e As MouseEventArgs protected void OnMouseMove ByVal e As MouseEventArgs WPF Silverlight protected void OnMouseDown MouseButtonEventArgs e protected void OnMouseUp MouseButtonEventArgs e protected void OnMouseMove MouseEventArgs e VB protected void OnMouseDown ByVal e As MouseButtonEventArgs protected void OnMouseUp ByVal e As MouseButtonEventArgs protected void OnMouseMove ByVal e As MouseEventArgs Timers It your program does any real time updates it probably uses a timer class The Net Forms timer class is System Timers Timer while the WPF Silverlight timer class is System Windows Threading DispatcherTimer They are similar in function with slightly different properties you must set The Silverlight Timer IsEnabled property is read only so you must start and stop the timer using the Timer Start and Timer Stop methods Net Forms CH System Timers Timer timerl new System Timers Timer timerl Enabled true timerl Interval 300 timerl Elapsed new System Timers ElapsedEventHandler timerl Elapsed VB 54 Class Architecture Friend WithEvents timerl As System Timers Timer timerl New System Timers Timer timerl Enabled True timerl Interval 300 WPF CH System Windows Threading DispatcherTimer timerl new System Windows Threading DispatcherTimer timer
378. ter 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 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 2 Introduction A good application for the QCChart2D 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 Real Time Graphics Tools for Silverlight integrates the QCChart2D 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 classes can b
379. th new data Method UpdatelIndicator VB Public Sub UpdateIndicator _ values As Double _ updatedraw As Boolean CH 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 AlarmIndicator AlarmPanelMeter BarAttributes BarDataValue BarEndBulb BarFillColor BarLineWidth BarOrientation BarPlot BarWidth BarWidthPixels CoordinateSystem FaceplateBackground GraphBackground GraphBorder GraphFormat Height HighAlarm InteriorAxis LowAlarm MainTitle MaxIndicatorValue MinimumSize MinIndicatorValue MultiAlarmIndicator Auto Indicator Classes 325 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 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 f
380. 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 Frequency T Ohms Capacitance 100 100 C ArrayList rangeSelectorButtons new ArrayList public void InitializeRangeSelectorButtons String selecterstrings 10 100 IK L0E 710 100 81K 10K 266 Buttons Track Bars and Other Form Control Classes 100 L600 Ig Lom ER ED IDO O LIE PLOY BLOG PE Sher pam gi wqw iO EENS String rowStrings Frequency Ohms Capacitance DC Volts AC Volts DC Amps AC Amps Stringi eoletrings pYM an ur uae RTControlButton rtbutton ChartFont buttonfont font12Bold CartesianCoordinates pTransforml new CartesianCoordinates 0 0 0 0 1 0 1 0 pTransforml SetGraphBorderDiagonal 0 25 68 0 95 0 97 ChartAttribute attribl new ChartAttribute Colors White 3 ChartObj LS SOLID ChartColor SandyBrown for int i 0 i lt selectorStrings Length i rtbutton new RTControlButton ChartObj RT CONTROL RADIOBUTTON SUBTYPE rtbutton ButtonUncheckedText selectorStrings i if i currentRangeSelectorIndex rtbutton ButtonChecked true else rtbutton ButtonChecked false rtburton Click new System Windows RoutedEventHandler this selector button Click rtbu
381. 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 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 20 Class Architecture Pace mph Numeric panel meters can be the primary display method for real time data or they can be 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 NumericLabel class that is used to specify the font and numeric format information associated with the panel meter a 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
382. their five number summaries the smallest observation lower quartile Q1 median Q2 upper quartile Q3 and largest observation Technical Analysis Uses Candlestick Plots 8 01 02 9 02 02 The Open Close box is filled if the open price is greater than the close price CandlestickPlot 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 CellPlot ErrorBarPlot FloatingBarPlot 2 N S E S Distance from Closest Walmart Miles DSP Journal PC Mag Computer Week QCChart2D Class Summary 75 Cell Plot of Population Density 100 150 200 Mean Family Income 1000 The Cell plot will plot rectangles of any size color and postion 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 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 Media Schedule Info Age 2003 Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec 2004 Year of 2003 Floating bars are useful for creating scheduling charts This class is a concrete implementation of
383. to plot multi channel data in a scrolling graph You can just use multiple RTSimpleSingleValuePlot objects as in the InitializeEnginelScrollGraph method C scrollFrame2 new RTScrollFrame this 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 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 Dim multilineplot As New MultiLinePlot pTransforml Nothing attribarray multilineplot SetFastClipMode ChartObj FASTCLIP X rtMultiLinePlot
384. to scaling classes 61 62 94 286 AutoScale i AutoScale61 62 94 224 225 226 227 228 229 230 232 233 234 235 236 237 240 241 242 282 285 286 363 364 365 374 375 385 399 Axis 14 32 63 64 68 69 88 95 165 170 171 175 180 axis 62 64 65 66 67 68 69 70 87 88 Axis v vi 9 12 13 14 17 23 25 26 31 32 33 34 45 52 56 62 63 64 65 66 67 68 69 70 87 88 90 91 93 95 117 138 142 143 144 151 155 156 157 160 162 165 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 202 225 226 227 228 229 230 234 235 241 260 261 278 279 283 287 310 312 313 319 320 321 325 326 332 333 334 335 342 344 348 350 361 362 363 364 365 366 372 374 375 384 385 397 398 399 Axis lab l classes s ade bia alia 176 AxiSLabels s uns nai 69 95 171 176 AxisLabels 17 32 34 69 70 95 143 144 156 157 160 162 165 171 175 176 177 178 180 181 182 183 202 335 344 350 385 398 AxisTitle ertet n dee 87 88 95 AxisTitle 87 88 95 313 320 321 326 332 333 361 362 Background ient mee background nean e t e teen yes 63 Background 1 2 3 v vi 13 19 20 23 28 46 56 63 96 112 113 121 122 124 125 140 142 143 144 147 148 153 155 156 157 158 159 162 176 185 188 189 190 191 192 199 200 2
385. 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 RTAutoMeterIndicator properties is found in the QCRTGraphSLCompiledHelpFile 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 Auto Indicator Classes 337 40 60 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 40 60 20 80 0 100 Ua RSI 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 J l 100 338 Auto Indicator Classes 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 format
386. tomBarWidth 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 barplot IndicatorBackground New ChartAttribute Colors Black 1 ChartObj LS SOLID Colors Black barplot SegmentSpacing 1 barplot SegmentWidth 1 barplot IndicatorSubType ChartObj RT BAR SEGMENTED SUBTYPE 149 150 Single Channel Bar Indicator 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 program file DynBarsUserControll method InitializeBar1 The default value for the IndicatorSubType property is RT BAR SOLID SUBTYPE so that does not even need to be set Pvo1 100 100 ep P 40 40 k 20 20 0 C f For solid bar indicator ChartAttribute attribl new ChartAttribute Colors Black 1 ChartObj LS SOLID double barwidth 1 0 barbase 0 0 int barjust ChartObj JUSTIFY MIN i
387. ton Click new System Windows RoutedEventHandler this selector Button Click ClearButton ButtonFont buttonfont buttonlistl Add ClearButton int numColumns 1 int numRows 4 startStopControlGrid selector Button Click new RTFormControlGrid pTransforml null buttonlist1l numColumns numRows ttribl Buttons Track Bars and Other Form Control Classes 251 startStopControlGrid CellRowMargin 0 1 startStopControlGrid CellColumnMargin 0 0 startStopControlGrid FormControlTemplate Frame3DEnable flag3DBorder chartVu AddChartObject startStopControlGrid VB Private StartButton As New RTControlButton ChartObj RT CONTROL RADIOBUTTON SUBTYPE Private StopButton As New RTControlButton ChartObj RT CONTROL RADIOBUTTON SUBTYPE Private ResetButton As New RTControlButton ChartObj RT CONTROL MOMENTARYBUTTON SUBTYPE Private ClearButton As New RTControlButton ChartObj RT CONTROL MOMENTARYBUTTON SUBTYPE Public Sub InitializeStartStopButtons Dim buttonfont As ChartFont font12Bold 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 Colors Black 5 ChartObj LS SOLID ChartColor LightBlue Dim buttonlistl As New ArrayList StartButton ButtonUncheckedText Start StartButton ButtonChecked True AddHandler StartButton Click New System Windows RoutedEventHandler AddressOf Me select
388. tor 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 IndicatorBackgroundEnable True Add panel meters chartVu AddChartObject meterarcindicator Extracted from the example program RTGraphNetDemo file SegmentedArcMeterUserControll method InitializeMeter1 C RTMeterArcIndicator meterarcindicator new RTMeterArcIndicator meterframe processVarl meterarcindicator SetChartObjAttributes attribl Meter Indicators Needle Arc and Symbol 192 meterarcindicator IndicatorSubtype ChartObj RT METER SEGMENTED ARC SUBTYPE meterarcindicator SegmentValueRoundMode ChartObj RT CEILING VALUE meterarcindicator SegmentWidth 7 meterarcindicator SegmentSpacing 10 Il C meterarcindicator InnerValueArcNormalized a Soe meterarcindicator OuterValueArcNormalized 0 85 meterarcindicator IndicatorBackgroundEnable true meterarcindicator IndicatorBackground new ChartAttribute Colors Black 2 ChartObj LS SOLID ChartColor FromRgb 60 60 60 Add panel meters to meter needle chartVu AddChartObject meterarcindicator VB Dim meterarcindicator As New RTMeterArcIndicator meterframe processVarl meterarcindicator SetC
389. tor RTMeterCoordinates frame RTProcessVar datasource 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 TRIANGLE 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 SegmentValueRoundMode Get Set that the current process value is rounded up 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 SymbolNum Set Get the symbol used as the indicator symbol Use one of the scatter plot symbol constants NOSYMBOL SQUARE TRIANGLE DIAMOND CROSS PLUS STAR LINE HBAR VBAR BAR3D CIRCLE SymbolPosPercent Set Get the radial position of the symbol indicator SymbolSize Set Get the size of the symbol indicator in points SymbolSpacing Get Set the space in degrees between adjacent symbols A complete listing of RTMeterSymbolIndicator
390. tor Classes 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 update value 100 to the third shortest of the three needles Electric Meter Format 2 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 RTComboProcessVar 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 publ rt et ek rt Auto Indicator Classes 347 Example for initializing RTAutoDialIndicator objects The example below extracted from the AutoGraphDemos AutoDialsAndClockIndicatorsUserControll example draws each of the 3 different dial formats See the AutoDialsAndClockIndicatorsUserControll asml file to see how the dials are positioned in the parent window C ic void InitializeGraph his rtAutoDialIndicatorl GraphFormat 0 his rtAutoDialIndicatorl GraphBackground FillColor Colors White his rtAutoDialIndicatorl InvertColors j his rtAutoD
391. tor 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 desired 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 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 116 Panel Meter Classes BELOW CENTERED PLOTAREA ABOVE CENTERED PLOTAREA LEFT_CENTERED PLOTAREA RIGHT CENTERED PLOTAREA GRAPHAREA TOP
392. torial SLRTBrowserApplication1 A simple browser based scrolling graph example referenced in the tutorial Visual Basic VB specific code 8 Introduction Examples VB examples Same as the C examples above Critical Note Running the Example Programs The example programs for Real Time Graphics Tools for Silverlight software are supplied in complete source In order to save space they have not been pre compiled which means that many of the intermediate object files needed to view the main form are not present This means that ChartView derived control will not be visible on the main Form if you attempt to view the main form before the project has been compiled The default state for all of the example projects should be the Start Page Before you do view any other file or form do a build of the project This will cause the intermediate files to be built If you attempt to view the main Form before building the project Visual Studio decides that the ChartView control placed on the main form does not exist and delete it from the project There are two versions of the Real Time Graphics Tools for Silverlight class library the 30 day trial versions and the developer version Each version has different characteristics that are summarized below 30 Day Trial Version The trial version of Real Time Graphics Tools for Silverlight is downloaded in a file named Trial QCRTGraphSL20x The 30 day trial version stops working 30
393. tour 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 of Attribute class Auto Scale classes Charting object classes Mouse interaction classes File and printer rendering Miscellaneous utility classes 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 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 permit the user to create and move data cursors move plot objects display tooltips and select data points in all types of graphs These classes render the chart image to a printer to a variety of file formats including JPEG and BMP or to a Silverlight System Windows Media Imaging WriteableBitmap object Other classes use these for data storage file I O a
394. trib A single attribute object that applies to all control grid objects Selected Public Instance Properties CellColumnMargin Get Set the extra space between columns of the grid specified in normalized NORM PLOT POS coordinates CellRowMargin Get Set the extra space between rows of the grid specified in normalized NORM PLOT POS coordinates GraphObj ChartAttribute object GraphObj that the chart object is placed in ColumnHeaders Set Get the column headers FormControlTemplate Set Get the row headers HeadersTemplate Set Get the string template InternalAction Set Get to true if you want radio button click and scroll bar value changed events processed to update colors of buttons and numeric values of scroll bars NumberColumns Get the number of rows in the annunciator Get the number of rows in the annunciator Buttons Track Bars and Other Form Control Classes 265 NumChannels inherited from RTPlot Get the number of channels in the indicator PanelMeterList inherited from Set Get the panel meter list of the RT Plot RTPlot PositionType TI from Get Sets the current position eu GraphObj e RadioButtonChecked Get Set the extra space between columns of the apice specified in normalized NORM PLOT POS coordinates RowHeaders RTMultiValueIndicator variables for the indicator A complete listing of RTFormControlGrid properties is found in the QCRTGraphSLCompiledHelpFile chm documentation file located in
395. tribute defaultattrib new ChartAttribute Colors Green 1 0 ChartObj LS SOLID Colors Green RTAlarm lowheartratealarm new RTAlarm ChartObj RT ALARM LOWERTHAN 30 lowheartratealarm AlarmMessage Low Heart Rate lowheartratealarm AlarmSymbolColor Colors Blue lowheartratealarm AlarmTextColor Colors Blue RTAlarm highheartratealarm new RTAlarm ChartObj RT ALARM GREATERTHAN 160 highheartratealarm AlarmMessage High Heart Rate highheartratealarm AlarmSymbolColor Colors Red highheartratealarm AlarmTextColor Colors 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 110 Process Variable and Alarm Classes MessageBoxButton buttons MessageBoxButton OKCancel MessageBoxResult result result MessageBox Show Emergency Heartrate Shutdown Emergency buttons VB Dim defaultattrib As New ChartAttribute Colors Green 1 0
396. ts inherited from changes on an alarm Use one of the constants RTSingleValueIndicator RT INDICATOR COLOR NO ALARM CHANGE RT INDICATOR COLOR CHANGE ON ALARM ContrastTextAlarmColor Set Get a contrast color to use for text when the object inherited from is in alarm and the background color of the panel meter RTPanelMeter changes CurrentProcessValue inherited Get the current process value of the primary channel from RTSingleValueIndicator Frame3DEnable inherited Set Get to true to enable a 3D frame for the panel from RTPanelMeter meter PanelMeterNudge inherited Set Get the xy values of the PanelMeterNudge from RTPanelMeter property The PanelMeterNudge property moves the relative position using window device coordinates of the text relative to the specified location of the text PanelMeterPosition inherited Set Get the panel meter position value Use one of the from RTPanelMeter panel meter position constants See table for positioning constants PositionReference inherited Set Get an RTPanelMeter object used as a positioning from RTPanelMeter reference for this RTPanelMeter object 114 Panel Meter Classes PrimaryChannel inherited Set Get the primary channel of the indicator from RTPlot RTDataSource inherited from Get Set the array list holding the RTProcessVar RTSingleValueIndicator variables for the indicator RTPlotObj inherited from Set Get the reference RTPlot object RTPanelMeter TextColor Se
397. tsburgh EST VB rtAutoClockIndicatorl GraphFormat 0 rtAutoClockIndicatorl GraphBackground FillColor Colors White rtAutoClockIndicatorl InvertColors rtAutoClockIndicatorl InitStrings Boston EST rtAutoClockIndicator2 GraphFormat 1 rtAutoClockIndicator2 GraphBackground FillColor Colors White rtAutoClockIndicator2 PlotAttrib FillColor Colors Blue rtAutoCclocklndicatorz InitStrings Pittsburgh EST Scrolling Graph Horizontal Indicator Class RTAutoScrollGraph System Windows Controls UserControl 354 Auto Indicator Classes ChartView RTAutoIndicator RTAutoBarlIndicator 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 InitRTAutoScroll 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
398. tton ButtonFont buttonfont rangeSelectorButtons Add rtbutton int numColumns 4 int numRows 7 RTFormControlGrid controlgrid new RTFormControlGrid pTransforml null rangeSelectorButtons numColumns numRows Colstrinygs rowstrinys attribl controlgrid CellRowMargin 0 05 controlgrid CellColumnMargin 0 1 controlgrid FormControlTemplate Frame3DEnable true controlgrid HeadersTemplate LineColor Colors Black controlgrid HeadersTemplate TextFont fontl4Bold chartVu AddChartObject controlgrid VB Buttons Track Bars and Other Form Control Classes 267 Private rangeSelectorButtons As New ArrayList Public Sub InitializeRangeSelectorButtons Dim selectorStrings As String G 10 100 LK LIOR LOS LOO IET LOR LOU IOO ia Lom D I I1 I0 IDD D Im IW STO TIO 08 ISO IQ LUO DIEM Sie Te KIDS Dim rowStrings As String Frequency Ohms Capacitance DC Volts AU Volts DC Amps AC Amps Dim colStrings As String Tm ww ww Dim rtbutton As RTControlButton Dim buttonfont As ChartFont 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 Colors White 3 ChartObj LS SOLID ChartColor SandyBrown For i As Integer 0 To selectorStrings Length 1 rtbutton New RTControlButton ChartObj RT CONTR
399. ty 1s expressly permitted by applicable law notwithstanding this ii 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 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 ackn
400. ude line plots scatter plots line marker plots and an annotation class AntennaPlot This class is an abstract base class for the polar plot classes 270 180 AntennaLineMarkerPlot AntennaLinePlot This class is a concrete implementation of the AntennaPlot class and displays data in a simple line plot format The 82 QCChart2D Class Summary AntennaScatterPlot AntennaLineMarkerPlot AntennaAnnotation lines drawn between adjacent data points 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 Pie and Ring Chart Classes 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 Click again on the pie wedge to remove detail PieChart The pie chart plots data in a simple pie chart format It uses data organized as arrays of x and y values where an x value
401. ue 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 A complete listing of RTRoundedRectangle2D properties is found in the QCRTGraphSLCompiledHelpFile chm documentation file located in the doc subdirectory Example for drawing RTRoundedRectangle2D objects The example below extracted from the RTGraphNetDemo example file NeedleMeterUserControll method InitializeMeter2 draws a large rectangle with rounded corners as the frame of the meter and a smaller filled rectangle at the bottom 296 Miscellaneous Shape Drawing C RTRoundedRectangle2D rr new RTRoundedRectangle2D meterframel 0 25 0 01 0 45 0 43 0 01 ChartObj NORM GRAPH POS ChartAttribute backattrib new ChartAttribute Colors Black 2 ChartObj LS SOLID Colors White rr SetChartObjAttributes backattrib rr SetChartObjClipping ChartObj NO CLIPPING chartVu AddChartObject rr RTRoundedRectangle2D rrr new RTRoundedRectangle2D meterframel 0 25 0 35 0 45 0 09 0 0 ChartObj NORM GRAPH POS ChartAttribute backattrib2 new ChartAttribute Colors Black 2 ChartObj LS SOLID Colors Black rrr SetChartObjAttributes backattrib2 rrr ZOrder 60 make it be drawn after needle hiding needle pivot point rrr SetChartObjClipping ChartObj NO CLIPPING chartVu AddChartObject rrr VB Dim rr As New RTRoundedRectangle2D meterframel 0 25 0 01 0 45 0 43
402. umRows ParentChartView ParentTransform PreferredSize ResizeMode Right RowHeaderAttribute RowHeaderFont RowHeads SmoothingMode Process Variable Viewer 303 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 DatasetViewer 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 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 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
403. und 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 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 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 Get Set the array list holding the RTProcessVar variables for the indicator Get Set the displayable low 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 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
404. urtis chart2dsl ChartPlot RTPlot RTMultiValueIndicator 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 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 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 ChartAttributel _ 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 CellColumnMargin Get Set the extr
405. using a combination of HTML in the design mode and C or VB in the behind code section of the page In Silverlight applications the user interface layout is defined as an XAML page using a text tag format based on XML and user interface events are processed in a C or VB behind code page In a Silverlight program which uses QCRTGraph the QCChart2D class ChartView is referenced as a visual element in a windows the XAML file as below lt UserControl x Class BarApplicationl MainPage xmlns http schemas microsoft com winfx 2006 xaml presentation xmlns x http schemas microsoft com winfx 2006 xaml xmlns d http schemas microsoft com expression blend 2008 xmlns mc http schemas openxmlformats org markup compatibility 2006 mc Ignorable d xmlns my clr namespace com quinncurtis chart2dsl assembly QCChart2DSL xmlns my2 2 clr namespace com quinncurtis rtgraphsl assembly QCRTGraphSL d DesignHeight 800 d DesignWidth 1000 gt lt Grid x Name LayoutRoot Background White gt lt my ChartView Margin 5 5 5 5 Name barAppl gt lt Grid gt lt UserControl gt In this example the ChartView is placed as the only visual element of the standard Silverlight layout panel Grid Since the ChartView object is given a Name it can be accessed in the behind code of the window using the variable name barAppl In general all of the chart definition and initialization takes place in the the behind code using either C or VB
406. ustomBarOffset 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 RIMultiBarIndicator 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 T This centers the bar segments 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 pTransforml As New CartesianCoordinates 0 0 0 0 1 0 100 0 Multiple Channel Bar Indicator 163 pTransforml SetGraphBorderDiagonal 0 0
407. ute attrib Parameters transform The coordinate system for the new RTAlarmPanelMeter object datasource The process variable associated with the panel meter attrib The color attributes of the panel meter indicator Selected Public Instance Properties Get Set the string template defining the panel meter alarm 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 QCRTGraphSLCompiledHelpFile chm documentation file located in the doc subdirectory Example of RTAlarmPanelMeter used with RTBarIndicator 124 Panel Meter Classes 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 ChartColor SteelBlue 3 ChartObj LS SOLID Colors Black ChartAttribute paneltagmeterattrib new ChartAttribute ChartColor SteelBlue 0 ChartObj LS SOLID Colors White RTNumericPanelMeter panelmeter new RTNumericPanelMeter pTransforml panelmeterattrib panelmeter Panel
408. ution Explorer vIXx Gaas od Solution SLRTBrowserApplication1 2 projects E Wei SLRTBrowserApplication1 Sa Properties 3j References ie App xaml Z a SLRTBrowserApplication1 Web Sa Properties 3j References I ClientBin 35 Silverlight js Ez SLRTBrowserApplication1 TestPage aspx sl SLRTBrowserApplicationi TestPage html H ES web config m e E E E E E E Looking at the Solution Explorer the top part of the project contains the program specific files They are all the same as the SLRTApplicationl except that the namespaces have been changed to reflect the new SLRTBrowserApplication namespace References to the QCChart2DSL and QCRTGraphSL libraries are added Also the class ScrollingGraph is added as described in Chapter 20 The MainPage xaml and MainPage xaml cs vb files are also modified as in Chapter 20 The bottom part of the project contains a web deployment specifics After you successfully compile the project you will find a XAP file with the same name as the project in the ClientBin folder The XAP file is a zip file containing all of the files need to run the application There are also aspx and html test pages which can be used to run the program 406 Using QCRTGraph for Silverlight to Create Web Applications The defaults created for the project do not specify anything about the actual web site the application is to be published to This looks to be a complicated topic involving many o
409. ved from the RTMultiValueIndicator class are attached to a collection of RTProcessVar objects This includes multi channel bar indicators which includes solid 28 Class Architecture segmented custom and pointer bar indicators multi channel annunciator indicators and scrolling graph plots based on a QCChart2D GroupPlot 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 The only limit to the number of annunciator cells you can have in an RTMultiValueAnnunciator graph is the size of the display and the readability of the text 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 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 Class Architecture 29 800 600 400 200 i 3 L d e D Each bar in t
410. video content in Silverlight applications System Windows Media Imaging Provides types that are used to encode and decode bitmap images System Windows Input Provides types to support the Silverlight input system This includes device abstraction classes for mouse keyboard and stylus devices a common input manager class support for commanding and custom commands and various utility classes System Windows Shapes 6 Introduction Provides access to a library of shapes that can be used in Extensible Application Markup Language XAML or code Directory Structure of QCRTGraph for Silverlight The Real Time Graphics Tools for Silverlight class library uses the following directory structure Drive Quinn Curtis Root directory DotNet Quinn Curtis Net based products directory Docs Quinn Curtis Net related documentation directory Lib Quinn Curtis Net related compiled libraries and components directory QCRTGraph Language specific code directory Visual CSharp C specific directory QCRTGraphSL contains the source code to the QCRTGraphSL dll library installed only if the source code has been purchased Examples C examples directory AutoGraphDemo Demonstrates the RTAutoBarIndicator RTAutoMultiBarIndicator RTAutoNeedleMeterIndicator RTAutoDialIndicator RTAutoClockIndicator RTAutoPanelMeterIndicator and RTAutoScrollGraph classes AutoInstrumentPanel A simulation of an automobile control panel
411. w 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 chart2dsl 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 C public RTRoundedRectangle2D PhysicalCoordinates transform Rectangle2D r double corner int postype Parameters transform Places the RTRoundedRectangle2D object in the coordinate system defined by transform The size and position of the rectangle Miscellaneous Shape Drawing 295 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 CornerRadius Get Set the corner radius of the rounded rectangle FillColor inherited from GraphObj ____ LineColor inherited from GraphObj LineWidth inherited from GraphObj Width ZOrder inherited from GraphObj Sets the z order of the object in the chart Every object has a z order value Each z order val
412. xisting Item and select the file ScrollingGraph vb from our SLRTApplicationl example folder If you do that make sure you change the declared namespace at the top of the file matches your projects namespace 396 Using Real Time Graphics Tools to Create Silverlight Applications Add New Item SLRTApplication1 Installed Templates Sort by Default cab Type Visual Basic Code Ye class Visual Basic i Data An empty class definition General B Module Visual Basic Web Silverlight kj Code File Online Templates Visual Basic ScrollingGraph vb The resulting ScrollingGraph vb file will contain Public Class ScrollingGraph End Class Modify the ScrollingGraph file to create the desired chart Most all of our examples are structured the same way The constructor is changed to pass in a ChartView object Then a chart initialization routine is called which customized the chart See the ScrollingGraph vb file of the SLRTApplicationl example Imports com quinncurtis chart2dsl Imports com quinncurtis rtgraphsl lt summary gt Summary description for ScrollApplicationUserControll III lt summary gt Public Class ScrollingGraph Private Private Private Private Private Private Private Private Private Private Private Private Private Private Private Using QCRTGraph to Create Silverlight Applications 397 timerl As New System Windows Threading DispatcherTimer
413. y 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 SetEnable 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 ChartObjEnable ChartObj OBJECT ENABLE Re establish scroll mode scrollFrame2 ScrollScaleModeX ChartObj RT FIXEDEXTENT MOVINGSTART AUTOSCROLL ScrollFrame2 ChartObjEnable ChartObj OBJECT ENABLE Zooming Render graph this UpdateDraw Visual Basic Dim Datasetl As New SimpleDataset First xl yl Dim Dataset2 As New SimpleDataset Second x1 y2 Dim Dataset3 As New SimpleDataset Third x1 y3 Dim Dataset4 As New SimpleDataset Fourth x1 y4 Dim Dataset5 As New SimpleDataset Fifth xl y5 Dim 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 pTransfo
414. yle in Net and WPF is a DashStyle type while in Silverlight it is an integer type Example System Drawing WPF C DashStyle ls DashStyle Solid DashStyle ls DashStyles Solid VB Dim ls as DashStyle DashStyle Solid Dim ls as DashStyle DashStyles Solid Silverlight C int ls ChartObj LS SOLID VB Dim ls as Integer ChartObj LS SOLID The Silverlight line style constants are public const int LS SOLID 0 A public const int LS_DASH 8 4 1 public const int LS_DASH 4 4 2 public const int LS_DASH 4 2 3 public const int LS_DASH_2_2 4 public const int LS_DOT_1 1 5 public const int LS_DOT_1 2 6 public const int LS_DOT_1 4 7 public const int LS_DOT_1 8 8 public const int LS_DASH_DOT 9 Fonts It is strange but WPF and Silverlight do not encapsulate font properties into a single class like the System Drawing Font class Instead WPF Silverlight text objects which require a font specification use separate properties for the font name font size font style and the font weight We found this to be inconvenient so we created a simple ChartFont class which superficially looks like the old System Drawing Font class That way we could keep source codes consistent System Drawing CH Class Architecture 51 Font theFont new Font Microsoft Sans Serif 10 FontStyle Regular VB Dim theFont As New Font Microsoft Sans Serif 10 FontStyle Regular WPF Silverlight References to Font are replac

Download Pdf Manuals

image

Related Search

Related Contents

Samsung Soundbar HW-E350  主な適用機種は KM306・KM307  MAC 301 Wash  FIRECLASS, User Guide, doc. version 1, 120.515.085_FC-P-U  

Copyright © All rights reserved.
Failed to retrieve file