Drawing Basics
Home ] Up ] Basic Concepts ] Serial Connection ] Plotting Basics ] Logging, Saving and Printing ] Interactive Control ] Macro Basics ] Macros - Default & Events ] Macro Math Discussion ] Defined Macro Buttons/Menus ] [ Drawing Basics ] Media and Paths ] Drawing Coordinate Modes ] Plot Objects ] Macro Editor ] Using Templates ] External Applications ] Historical/Logged Data ] Internet ] Binary and Special Data ]


Using drawings instructions you can create points, lines, circle, filled circles, arcs, pies, filled pies,  place text and lay down images on your plot. In general, each requires X and Y coordinates and the color needs to be given (some instructions use more).

bulletDrawing Instructions
The different shapes are created using the following commands:
bullet LINE - Line
bulletDPNT - Draw Point
bulletCIRC - Unfilled Circle
bulletFCIR - Filled Circle
bulletDARC - Draw ARC
bulletDPIE - Unfilled Pie
bulletFPIE - Filled Pie
bulletRECT - Unfilled rectangle
bulletFREC - Filled rectangle
bulletTEXT - Write text.
bulletIMGP - Plot an image
bulletPWAV,IWAV - Play a WAV file.

bulletDrawing Prefixes
Each instruction must be prefixed with either a @, ^ or ~. Here's the difference:
bulletTemporary Drawings ~
Instructions are temporary. They are not stored in any manner once they are drawn. This allows you to repeatedly update the status of an image while not using up data points. Of course, you won't be able to play them back either. In fact, plotting doesn't even have to be on to use them. Just connect and send!

bulletConstant Drawings @
Instructions are termed Constant Drawings. These will be held in special memory and redrawn fully any time the plot is refreshed or redrawn. They are NOT deleted by resetting a plot. This allows static images to be produced to be constant to the plot even if you reset and collect new data. To delete these, use Plot --> Clear constant drawings ( the instruction CLRC - !CLRC) or start a new plot. There is a limit of 500 Constant Drawings per plot, and all in memory are performed when the grid is drawn prior to re-plotting the data. Again, the plot need not be enabled to use these.

bulletSaved Drawings ^
Instructions are saved as data points to be saved with the plot or re-created on play-back. In order for these to operate, plotting must be enabled.
bulletSaves and restricts to plot-grid area !
Similar to Saved Drawings, but in addition the shapes and images are restricted to the grid area of a plot preventing them from shifting outside the boundaries of the grid.  Rectangular shapes will compress, circular shapes will remain unless the center is outside the grid.
bulletIn addition to the drawing commands, many command instructions can be used with these prefixes to be saved along with your plot. (See the full Drawing Instruction Summary)

bulletDrawing Locations and Formats.
Drawing may be performed on:
bulletThe main plot area.
bulletPlotting Objects
bulletThe plot object background
bulletWithin meter objects.
bulletDrawing in the main plot area.
Drawing in the main plot area takes the format of:
(prefix)Drawing_Instruction param,param2,etc

Test the following code using the Immediate/DEBUG CLI text box.

'Start a new plot
!NEWP

' Delete the plot objects
!POBJ Clear
' Enable plotting
!PLOT ON
' Draw a filled circle using temporary
~FCIR 10,20,10,(GREEN)
' Draw a filled rectangle using saved
^FREC 30,20,50,80,(RED)
' Draw an unfilled pie using constant
@DPIE 60,20,10,45,180,(BLUE)
'Plot an image and restrict to grid area
!IMGP 80,20,100,125,shapes\water\rect.jpg



bullet

Now that we have 3 shapes, use the plot position and span buttons to shift the plot coordinates.

bullet

When the plot is shifted, the green circle vanished. It was drawn using a ~, or temporary prefix.  When the plot is redrawn, it does not return.
Also note that the shapes shift with the plot.  They were drawn with relative components which will be discussed in the next section.

bullet

Shifting the plot up, the blue image will compress to stay with the grid borders because it used a ! prefix.

bullet

Now reset the plot, which clears all saved data, such as our plotted graphs.

Notice that the red square disappears.  It was drawn using ^ or saved data prefix.  When the plot is reset, the saved data is erased.  (saved refers to in-memory, not saved to disk).

bullet

Now finally, use the file menu or enter !NEWP to start a new plot.  Finally, the constant drawing (@) is erased.

bullet

Object Background:
Drawing on the object background may be performed in a similar fashion
bullet

The coordinates are always (0,0) lower left to (100,100) upper right.

bullet

The syntax is:
(prefix)POBJ oBack.Draw=Drawing Inst param1,param2,etc

bullet

Enter the following example into the Immediate/DEBUG CLI:
'  Set plot to small area percent
!PPER 20,20
'  Draw blue filled rectangle
^POBJ oBack.Draw=FREC 40,40,60,60,(BLUE)

 

bullet

The Values Window may be used to obtain coordinates as the mouse moves over the object background.

bullet

Drawing on Plotting Objects and meters
Drawing on plotting objects and meters is preformed in the same fashion:
(prefix)POBJ objName.Draw=instruction,param1,param2,etc

bullet

Please see the Drawing Summary for a complete list of instructions and syntax.