Plotting Object
Home ] Up ] General Object Information ] Label Object ] Button Object ] Text Object ] Banner Object ] Scrolling Text Object ] List Object ] Drop-Down Object ] Check Box Object ] [ Plotting Object ] Slider Object ] Bar Object ] Meter and Gauge Objects ] Image Object ] Image Button Object ] Back, Timers and Reset Objects ]


The Plotting Objects (oPlot) may be used as a separate plotting window and for drawing.  It is not as fully capable as the main plot, but is still extremely useful.

In this example a plotting object was added to plot a single channel of the four.

bulletThe X and Y axis of the plotting object may be independently controlled.  If A is entered for a scale value, or left blank, that scale value will follow the main plot on shift, etc.
bulletChannel defines what analog channel to use for plotting (0-9).  Each analog trace must use a unique channel number (similar to the ACHN instruction).  In the main plot, 4 analog channels are being plotted (0-3), so  9 was used to trace this channel, though it is a duplicate of one in the main plot.  To disable plotting of all the channels in the main plot, set Use Analog for Macro only in the macro menu. (!USEA ON).
bulletThe update value is what quantity you desire to plot.  In this example Analog input value 2 (AINVAL2) is being plotted.  Another interesting choice may be the maximum obtained (AINMAXVAL2).  Or, as with all objects, perform a little math before plotting. [(AINVAL2),TAN] = the tangent of value 2.
bulletOf course, to update the plot, the !POBJ Update instruction needs to be issued.  To ensure that every value arriving is plotted, this object was named beginning with DA_ so the event triggers when data arrives.  Only use !POBJ Update in one area of your macro configuration.
bulletShow Grid enables/disables the grid for the plotting object from being shown.
bulletRefreshes enables this plotting area to be redrawn every time the main plot refreshes.  Disable this if you are using the plotting object for history.

bulletCreating:
!POBJ oPlot.objName=L,T [,W,H,AMIN,AMAX,TMIN,TMAX,Channel,Grid,Refreshes,X Label,Y Label
!POBJ oPlot.Plot1=60,95

bulletFunctions:
SET (.Set or may be omitted)
Plots the value
objName.Set=Value
!POBJ Plot1.Set=50
!POBJ Plot1=100


CLEAR (.Clear or .Clr)
Clears the plot of data and all graphics, grids, etc.
!POBJ List2.Clear

Text Tip (.Tip)

Sets the text pop-up tip
!POBJ objName.Tip=Text string

Move (.Move or .M)
Moves the object to new coordinates/changes sizing
!POBJ objName.Move=[L,T,W,H]   or !POBJ objName.M=[L,T,W,H] 

Set Focus (.SF)
Sets the current focus of the application to the object
!POBJ objName.SF


Grid
Redraws the grid with the optional settings.
objName.Grid=[ymin,ymax,xmin,xmax,x label, y label.]

SNAP
Takes a jpg snapshot of the plotting object using the defined filename
objName.Snap=filename
!POBJ Plot1.Snap plot1



DRAW
The plotting object supports all drawing commands.  Note the structure.
@POBJ objName.Draw=FCIR 50a,50a,10,12

 

bulletUpdate Value (.Update or .U)
Sets the value to plot on data arrival
!POBJ objName.U=[text]
!POBJ Plot1.U=(AINVAL3)

bulletValues
(objName.T)
- Top coordinate
(objName.L) - Left coordinate
(objName.W) - Width
(objName.H) - Height
(objName.B) - Bottom
(objName.R) - Right
(ME) - Used only in its event code, returns object name.