Operácie

Stamp Plot Manual: Rozdiel medzi revíziami

Zo stránky SensorWiki

Balogh (diskusia | príspevky)
Nová stránka: == Stamp Plot Control Codes == The plot may be configured from the Stamp using the following control codes: !TITL message Sets to title of the form to the message !USRS ...
 
Balogh (diskusia | príspevky)
Riadok 1: Riadok 1:
== Stamp Plot Control Codes ==


== Stamp Plot Control Codes ==
The plot may be configured from the microcontroller using the following control codes:


!TITL message Sets to title of the form to the message
!USRS message Sets the User Status box to display the message
!BELL Sounds the bell on the PC
!AMAX value    Sets the plot maximum analog value
!AMIN value Sets the plot minimum analog value
!SPAN minValue, MaxValue
                Sets the plots analog maximim and minimum as above
                but also adds the range to the Range Drop-Down box.
!AMUL value Sets the value to multiply incoming data by
!TMAX value    Sets the plot maximum time (seconds)
!TMIN value Sets the plot minimum time (seconds)
!PNTS value Sets the number of data points to collect
!PLOT ON/OFF Enables/disables the plotting of data
!RSET Resets the plot and all data
!CLRM Clears the message list
!CLMM Clears the min/max recorded values
!CMMR ON/OFF Enables/Disables clearing of Min/Max recorded values
                on reset
!MAXS Sets the plot to STOP when datapoints are full
!MAXR Sets the plot to RESET when datapoints are full
!SHFT ON/OFF Enables/disables the plot from shifting when recording data
                (may cause a loss of data accuracy if enabled)
!TSMP ON/OFF Enables time stamping of list messages, messages
and data saved to files
!SAVD ON/OFF Enables saving of analog and digital data to files (stampdat.txt)
!SAVM ON/OFF Enables saving of messages to a file (stampmsg.txt)
!DELD Deletes the saved data file (stampdat.txt)
!DELM Deletes the saved message file (stampmsg.txt)


The plot may be configured from the Stamp using the following control codes:
See also: Data and Message Saving


        !TITL message Sets to title of the form to the message
Example:
!USRS message Sets the User Status box to display the message
printf("!SPAN 0, 500\n !RSET\n !PLOT ON\n");
!BELL Sounds the bell on the PC
!AMAX value    Sets the plot maximum analog value
!AMIN value Sets the plot minimum analog value
!SPAN minValue, MaxValue
Sets the plots analog maximim and minimum as above
but also adds the range to the Range Drop-Down box.
!AMUL value Sets the value to multiply incoming data by


!TMAX value    Sets the plot maximum time (seconds)
!TMIN value Sets the plot minimum time (seconds)
!PNTS value Sets the number of data points to collect
!PLOT ON/OFF Enables/disables the plotting of data
!RSET Resets the plot and all data
!CLRM Clears the message list
!CLMM Clears the min/max recorded values
!CMMR ON/OFF Enables/Disables clearing of Min/Max recorded values
                        on reset
!MAXS Sets the plot to STOP when datapoints are full
!MAXR Sets the plot to RESET when datapoints are full
!SHFT ON/OFF Enables/disables the plot from shifting when recording data
(may cause a loss of data accuracy if enabled)
!TSMP ON/OFF Enables time stamping of list messages, messages
and data saved to files
!SAVD ON/OFF Enables saving of analog and digital data to files (stampdat.txt)


        !SAVM ON/OFF Enables saving of messages to a file (stampmsg.txt)
=== Recommendations ===
!DELD Deletes the saved data file (stampdat.txt)
!DELM Deletes the saved message file (stampmsg.txt)


See also: Data and Message Saving


Example: printf("!SPAN 0, 500\n !RSET\n !PLOT ON\n");
Upon microcontroller reset for configuring:


Recommendations:
* Pause for 500 mSec to allow PC buffer to clear.
* Reset (!RSET) prior to any time/value changes to clear data.
* Reset (!RSET) at end of configuration to reset plot to time 0
* The application requires a minimum processing time.<BR>A short pause (10mSec on fairly fast computers) may be required in short programs.


Upon microcontroller reset for configuring:


    * Pause for 500 mSec to allow PC buffer to clear.
=== Data and Message Saving ===
    * Reset (!RSET) prior to any time/value changes to clear data.
    * Reset (!RSET) at end of configuration to reset plot to time 0
    * The application requires a minimum processing time.
      A short pause (10mSec on fairly fast computers) may be required in short programs.


Data and Message Saving


Data and messages may be recorded to a file.
Data and messages may be recorded to a file.

Verzia z 22:53, 30. november 2008

Stamp Plot Control Codes

The plot may be configured from the microcontroller using the following control codes:

!TITL message	Sets to title of the form to the message
!USRS message	Sets the User Status box to display the message
!BELL		Sounds the bell on the PC
!AMAX value    Sets the plot maximum analog value
!AMIN value	Sets the plot minimum analog value
!SPAN minValue, MaxValue
               Sets the plots analog maximim and minimum as above
               but also adds the range to the Range Drop-Down box.
!AMUL value	Sets the value to multiply incoming data by

!TMAX value     Sets the plot maximum time (seconds)
!TMIN value	Sets the plot minimum time (seconds)
!PNTS value	Sets the number of data points to collect
!PLOT ON/OFF	Enables/disables the plotting of data
!RSET		Resets the plot and all data
!CLRM		Clears the message list
!CLMM		Clears the min/max recorded values
!CMMR ON/OFF	Enables/Disables clearing of Min/Max recorded values
               on reset
!MAXS		Sets the plot to STOP when datapoints are full
!MAXR		Sets the plot to RESET when datapoints are full
!SHFT ON/OFF	Enables/disables the plot from shifting when recording data
               (may cause a loss of data accuracy if enabled)
!TSMP ON/OFF	Enables time stamping of list messages, messages

and data saved to files

!SAVD ON/OFF	Enables saving of analog and digital data to files (stampdat.txt)

!SAVM ON/OFF	Enables saving of messages to a file (stampmsg.txt)
!DELD		Deletes the saved data file (stampdat.txt)
!DELM		Deletes the saved message file (stampmsg.txt)

See also: Data and Message Saving

Example:

printf("!SPAN 0, 500\n !RSET\n !PLOT ON\n");


Recommendations

Upon microcontroller reset for configuring:

  • Pause for 500 mSec to allow PC buffer to clear.
  • Reset (!RSET) prior to any time/value changes to clear data.
  • Reset (!RSET) at end of configuration to reset plot to time 0
  • The application requires a minimum processing time.
    A short pause (10mSec on fairly fast computers) may be required in short programs.


Data and Message Saving

Data and messages may be recorded to a file.

Messages will be saved to a file named "stampmsg.txt" in the application directory. They will be time stamped if enabled.

Data will be saved to a file names "stampdat.txt" in the application directory The data will be time stamped if enabled.

The data file has the following format:

[System time, plot time in seconds,] analog data point value, analog value, digital datapoint value, digital data.

NOTE: Writing to the file is based on ANALOG DATA ARRIVING ONLY. If you are dealing with only digital data, transmit a 0 analog value along with your digital data.

i.e.: DEBUG DEC 0,CR, IBIN8 INS, CR

When deleting the data or analog files (from the application or from the microcontroller), if file save is enabled the files will be re-created and new data will be saved. Examples

Simplest possible example for analog value and digital one.

See the code or download it.