|
| |
Note: Text in Maroon bold
can generally be tested directly using the Immediate CLI.
StampPlot is a Line Interpreter application.
Almost exclusively, all instructions are carried out fully by interpreting a
string of text that ends with a carriage return (ASCII 13). These text
strings may come from:
In many languages, strings are used within the
language. Such as in computer BASIC programs, a typical statement may
be: PRINT "The value of X is ="; X where quotation marks
are used to identify the string portion.
StampPlot's interpreter is different. Typically, there is no
distinction for what we would term a string. StampPlot accepts a string of
data and processes it accordingly. To be able to have different data
types, math processing, variables and constants, the string is specially
formatted. When StampPlot interprets the string, it will look for certain
indicators for processing.
 | Characters !, %, ^, ~ and @ at the start of a string inform
StampPlot the string is a certain Data Type. |
 | Parenthesis in the string ( ) denote macro or object values
that may need to be replaced. |
 | Brackets in the string [ ] denote math operations to
be performed. |
 | Data markers (%m) can be used as variables to hold
an recall data. |
 | Certain data is specially denoted. |
StampPlot operates heavily by substitution.
Values, math, data markers and Data Names (friendly names assigned to data
markers) are pre-processed in most cases and replaced before the string is
processed for the intended operation. When used properly, this makes
StampPlot a very versatile program.
Take for example the string:
!STAT The time is (RTIME)
When sent by a micro, or entered directly in the CLI, the top text box of
StampPlot (User Status) will show the current time. (RTIME) is replaced
with the real time of computer's clock.
Changing the line to:
!STAT The time in one hour will be: [(RTIME),+,1:00]
This will show the time one-hour from now in the User Status. The value of
(RTIME) is replaced, then the bracketed math is performed and that string
portion is replaced.
 | Data Types:
SPP accepts serial data, and based on its structure, performs different
actions based on the data. Data sent as ASCII string must end in a
carriage return, ASCII 13 (sending data as binary values will be discussed
later).
 | Analog: Any string which begins with a numeric
value will be plotted as an analog value. Multiple values may be
separated by commas.
!PLOT ON
!RSET
10,20,30 |
 | Digital: Any string beginning with a percent
sign (%-binary indicator) containing 1's and 0's will be plotted as
individual digital traces.
%101 |
 | Control and Drawing Instructions: Strings beginning
with !,~,^ or @ will be interpreted as plot instructions.
!RSET
~FREC 40a,40a,60a,60a |
 | Messages: Strings not fitting any of the three
above structures will be listed as a message.
HELLO WORLD! |
|
 | Data Points:
 | Data arriving and being plotted is stored in Data Points.
This allows data to be saved to a file, re-drawn, and played. |
 | By Default, SP holds 500 data points, after which it resets
and starts a new plot. Using configuration options this may be
adjusted for specific uses. |
 | The total percent of data points is indicated by the top
blue status bar on the bottom left. |
 | Analog data, digital data, and drawing instructions
beginning with ^ are saved as data points. These three data types
require Plotting to be enabled for them to be acted on. |
 | The oldest data may be flushed (!FLSH ON) for continuous plotting. |
 | A maximum of 60,000 data points may be stored for a single
plot, though more than 5000 is typically not recommended due to the time
required to redraw the plots.
|
|
 | Queue:
 | As data arrives from the controller, from the Log/Debug
window, or from macros, it is held in the queue while awaiting processing. |
 | By default, the queue is set up for 3000 bytes, though this
may be adjusted (!QSIZ 10000). Should the queue reach 2x's the set
value, StampPlot will stop plotting data and disconnect. |
 | The total percent of data in the queue is indicated by the
bottom blue status bar on the bottom left (above). |
 | On a connection, the queue is emptied of old data.
|
|
 | Plot Resets and New Plots: |
When a Plot Reset occurs, using the toolbar or the instruction
(!RSET), the Data
Points are cleared, the plot is cleared and time is set is reset to 0
seconds. If drawing is used, Constant Drawings and Data Markers are NOT
cleared.
On a New Plot (!NEWP), a reset occurs, Constant Drawings are
cleared, Data Markers are cleared and all StampPlot configurations are returned
to a default setting. Plot Objects are NOT deleted or cleared. To
delete these, a StampPlot must be told to delete the Plot Objects (!POBJ
Clear)
 | Instructions:
Instructions fall into 2 main categories: Control and configuration, and
drawing instructions. All instructions are four-lettered words (symbols or
mnemonics). Instructions are simply strings which may be sent by the
controller, hand-entered, or from a macro text file. Instructions begin
typically with !, or if drawing instructions are used, ^,~ or @.
 | Control and Configuration instructions begin with ! and
are used to control StampPlot, such as enabling plotting (!PLOT ON), or to
configure StampPlot, such as setting the analog span for plotting (!SPAN
-250,250). Control instructions are also used to created and configure
Plot Objects.
|
 | Drawing Instructions begin with ~,^,@ and may be used
to draw shapes, place images and play WAV files. The 3 different symbols
denote the following:
 | ~ indicates the operation is performed once (temporary) and
it does NOT get stored as a data point. |
 | ^ indicates the operation is performed AND it is stored as
a data point for later use for re-drawing or saving the plot. |
 | @ indicates the operation is to be stored as a Constant
Drawing. Constant Drawing survive a Reset so that special plot
drawings will be re-drawn following resets.
|
|
|
 | Beyond plotting data, the data may be used to control Plot
Objects, and to create logs. |
|