Note: Digital Data may also be plotted on the analog plots to allow viewing digital data in time with the analog data. Please see Mixed Mode Plotting.
Digital Plots are similar in operation to Analog Plot.
Up to 99 channels of digital data, sent as %10101 for example. From right to left (LSB to MSB), the bits are stored in din0 to din99 with up to 10 plotted.
The incoming digital data may be accessed as [din0] to [din99].
There are various way to send a string of binary data from controllers, such as the Arduino, but ensure the strings sent starts with % and ends with a carriage return or line feed.
The Settings window from the pop-up menu may be used to configure the digital channels.
When plotted, the LSB (right most) is plotted as channel 0 or bit0.
Number of Bits defines how many bits to automatically plot, even if only a few bits are received. The digital plot will plot up to 10 bits if sent, but by setting the bit number higher will force more bits to be plotted. Some controllers truncate leading 0's, so a value such as 000101 would only send 101. Setting the number of bits to 6 will ensure all bits are plotted even though zero. Once a channel begins to plot, it will continue to do so even if not sent in the string.
Note that values entered would normally be [din0] to [din??], or the control name.bit value, such as [dplot.bit0] or [dplot.ch0]. Logical operations may be performed for a channel such as ANDing 2 bits together: [dplot.bit0] and [dplot.bit1] or [din0] & [din1]
Results of conditionals may be used also, such as: [ain0] > 100
Entering off will prevent the channel from being plotted.
Data from the controller, such as the Arduino, may be sent as a string in different ways, such as the following for 3 bits to plot: Serial.print("%");
Serial.print(bit0);
Serial.print(bit1);
Serial.println(bit2);
|