Navigation: Standard Controls > Analog Plot >

Digital Plotting

 

 

 

 

The analog plots now allow digital plotting as well, commonly called Mixed Mode. This allows easier synchronization between digital data and analog data for analysis. It also alleviated needing to add a digital plot for monitoring a handful of traces, such as the state of some actuator.

 

Mixed Mode plotting is supported as of version 0.99850. This allow analog and digital data to plotted on an Analog Plot. This provides an easier means to synchronize/analyze analog and digital data and limit area needed to monitor both.

 

 

To plot digital data, it must be enabled using the plot's pop-up menu by selecting "Plot Digital Channels". Note that analog and digital may be plotted or shown or not.

 

Data arriving as digital data, such as %1010, will show the traces and the digital trace name.

 

The plot's settings can be used to configure many aspects of digital plotting:

 

Individual channels may be enabled or not, the name of the trace set, and a formula set if desired. The high and low colors may be set as well along with the width of the traces.

 

When Number Bits is 0, only the amount of received data will be plotted, such as 4 channels for %0011. Once plotted, they can be access as plot.bit0 or plot.chD0 for the LSB value and plot.bit3 or plot.chD3 for the MSB. If another bit is sent with the string, %10011, a new trace will be added for bit4. By setting the number of bits to say 5, 5 traces will be plotted even if 5 bits are not sent. In some uses, such as with:
Serial.print("%");
Serial.print(value, BIN);
leading 0's are truncated. By setting the Number Bits it will force traces to be plotted for those missing 0's.

 

As data arrives, by default channel 0 is the LSB value of the digital string or din0, channel 1 is din1, etc. By using formulas the order may changed or data may be modified or evaluated as in the following formula examples

[din20]            plot bit 20

+ ![din0]            complement din0 - leading + is used to force a space before ! as required

[ain0] > 10            1 or 0 depending on result
[din0] & [din1]          2 bits ANDed together

 

Entering off for a formula will prevent that channel from being plotted.

 

Data is sent normally for digital as %1001 for example. Data can be accessed from LSB to MSB using [din0] to [din3] for this example. Once plotted it can be accessed using [plot.chD0] to plot.chD3] or [plot.bit0] to [plot.bit3]. Up to 10 digital values may be plotted (0 to 9).

 

Additional Properties Supporting Digital

Note: In many instanced a D is added to the property name to separate it from the analog names.

plotDigital                    Enables/disables digital plotting (1/0)

showDigital                    Enables/disables showing the digital traces (1/0)

numberBits                    Number of bits to forced for plotting. If 0 the plot will auto-determine.

channelDWidth                    Width of the plotted traces

lowColor                    Trace color representing a LOW

highColor                    Trace color representing a HIGH

nameChD0 to nameChD9          Name of the trace for annotating the plot. Name will not show if no that channel has no data.

showChD0 to showChD9          Enable/disable showing that trace.

formulachD0 to formulaD9          Formulas to apply when the trace is plotted.

 

Examples:

!plot.plotDigital=1

!plot.numberBits=5

!plot.lowColor=BLUE

!plot.nameChD0=Flow Rate

!plot.formulaChD1=[din0] & [din1] || [din2]

 

Additional Values Supporting Digital

Note: In many instanced a D is added to the property name to separate it from the analog names.

digitalString                    The original digital string received.

bit0 to bit99                    The value of the bits after plot processing.

chD0 to chD9                    The value of the plotted bits.

timeChD0 to timeChD9                    The time the channel bit was last plotted in seconds.

 

Examples:

? [plot.digitalString]

!txtIncoming = [plot.digitalString]

? [plot.chD0]

ledBit0 = [plot.bit0]

 

Additional Instructions Supporting Digital

!plotDChan channel, value (1/0)          Manually plots a trace on defined channel for value
!plot.plotDChan 3,1

 

 

 

 

 

Copyright © 2024 SelmaWare Solutions, LLC