Polybench® Reference
Viewer for viewing samples in time of live data streams.

Y-T Viewer

Overview

The Y-T Viewer is a signal viewer that displays sample values against time. This viewer is optimized to display sample values in real-time, for small but also very large time ranges. The component offers a large number of properties to change its appearance and behavior.

Operator ports

Input S: Floating point values

Paired User Interface Object

This operator is loaded simultaneously with a user interface object. The user interface object can be moved to another page, and would normally be displayed in the end-user application. The operator and this user interface object can never be separated. If you delete the operator, the user interface is deleted automatically as well. Note that you cannot delete the user interface, only the operator symbol!

Properties

Find more information about changing properties here: link

History buffer size
type: See description
Maximal time in seconds that samples should be buffered, in order to change signals in history. Note that buffering may cost a lot of memory! Buffer times below 5 seconds will be reset to 0.

Set this value greater than 5, if you require the viewer to redraw itself if some visual property of the signals changes. For example, if your time range is 20 sec and the history buffer size is also 20 sec (or more), then the signals in the viewer will immediately show any changes to the signals, like changes of range, offset and color. However, if the history buffer size is less than 20 sec (or even 0), then the viewer cannot show any history of the signals, so changes are displayed for newly drawn values only.

The buffered samples are also used to calculate AutoScale, Autorange and AutoOffset, so if there are less samples buffered than are displayed on screen, the auto scale functions will measure only the last part of the signals.

Notice that it depends on the number of channels, and the sample frequency, and the computer memory, how many samples can be buffered.
As a rule, fill in the following values:
- If you want signal history to be re-drawn: take the largest number of seconds the time range of the viewer can be
- You you want no history to be drawn: set to 0.
- If your viewer has a very large time range (for example, more than one hour at 500 Hz sample rate), set to 0. Redrawing of signals in history is not possible.

The maximum number of samples the viewer can redraw cannot exceed 50 MB worth of data. If you display 10 channels at 1000 Hz, then the maximum buffer time is approx. 520 seconds. If you fill in a larger value, the value will be corrected to the maximum buffer size possible automatically.

There is also a minimum buffer size, which is 5 seconds. This minimum is required to cope with a fluctuating screen update frequency. If you set a value smaller then the system minimum, the value will be corrected to 0.

Scroll mode
type: True or False
Set to true if the viewer should scroll all signals, or to false if the viewer should show a moving cursor.
Select one of those presets:
True or False
True may also be read like 'yes' and false like 'no'


CursorWidth
type: Integer value
The width of the drawing cursor. This value must be greater than or equal to 0. By default it is 10.


CursorImage
type: Known image name
An image that forms the drawing cursor. By default no image is drawn. The image will be stretched so that it fits the set cursor width.

This property uses the Image Repository. For more information about the use of images in a project, refer to link

BackgroundColor
type: Known color name
The color of the background.

This property uses the Color Repository. For more information about the use of colors in a project, refer to link

ForegroundColor
type: Known color name
The color of the title, axes and other lines around the graph.

This property uses the Color Repository. For more information about the use of colors in a project, refer to link

GridColor
type: Known color name
The color of the grid or markings.

This property uses the Color Repository. For more information about the use of colors in a project, refer to link

SelectionColor
type: Known color name
The color for channel selections.

This property uses the Color Repository. For more information about the use of colors in a project, refer to link

BorderStyleOutside
type: See description
Select a style for the outer border of the viewer.


BorderStyleInside
type: See description
Select a style for the border of the panel where the viewer contents or graph is drawn.


Title
type: See description
The title above the graph. You may use variables in the text.

Variables that are used as part of the viewer title are only updated if the viewer itself is updated, so you cannot for example display a clock as title.
One example of use is to display the name of the file that is currently viewed in the viewer. Your title then may look like this:

Viewing file $Design.File Replay.Caption$ (date: $Design.File Replay.FileDate$

Y_Label
type: See description
The label along the Y-axis.


Y_LabelVisible
type: True or False
Set to False to disable the label along the Y-axis
Select one of those presets:
True or False
True may also be read like 'yes' and false like 'no'


X_Label
type: See description [this value cannot be changed]
The label along the X-axis.


X_LabelVisible
type: True or False
Set to False to disable the label along the X-axis
Select one of those presets:
True or False
True may also be read like 'yes' and false like 'no'


FontTitle
type: Known text font name
The text font of the title (select from the Font repository).

This property uses the Font Repository. For more information about the use of text fonts in a project, refer to link

FontMetaData
type: Known text font name
The text font of all meta data, such as channel names (select from the Font repository).

This property uses the Font Repository. For more information about the use of text fonts in a project, refer to link

FontContents
type: Known text font name
The text font of values and labels of the shown contents or graph (select from the Font repository).

This property uses the Font Repository. For more information about the use of text fonts in a project, refer to link

SingleBaseline
type: True or False
Set this value to 'true' if you want all the signals to be drawn around one baseline.
Select one of those presets:
True or False
True may also be read like 'yes' and false like 'no'


ExtraRoomTopBottom
type: True or False
If true, a full baseline distance is added above the first channel and below the last; if false only half a baseline distance is added. If only one channel is visible, this setting may influence your Range/Offset settings.
Select one of those presets:
True or False
True may also be read like 'yes' and false like 'no'

Per default, the distance between a signal baseline and the top or bottom of the view pane, is equal to the distance between two baselines. If however only one baseline with signals is displayed in the viewer, the extra room above or below a baseline makes it very difficult to set the range or offset of the signals. For example, if you require a single baseline to be on the bottom of the view pane, you would set this property to False.

AllowChannelSelect
type: True or False
If true, the user is able to select channels by clicking one or more channel names.
Select one of those presets:
True or False
True may also be read like 'yes' and false like 'no'


AllowZooming
type: True or False
Set to true if the end-user is allowed to change the time range from within the viewer, by scrolling the scroll wheel of the mouse.
Select one of those presets:
True or False
True may also be read like 'yes' and false like 'no'


NumberFormat
type: See description
Determines how values are displayed in the viewer. Examples: ',2' (decimal comma), '.3' (decimal dot), ';1' (decimal comma or dot). This only regulates sample values, not time labels.

For more information about Number Formats, please refer to link.

ClockTime
type: True or False
Determines if times are displayed as a continuous time (set to false), or as clock time (set to true). Clock time makes the time always be between 12 or 24 hours (depending on your culture).
Select one of those presets:
True or False
True may also be read like 'yes' and false like 'no'

In Clock Time mode, the viewer assumes the sample time to be a time in one day. The sample with t=0 is then considered to occur at midnight.
After 24 hours worth of samples, the time will change from 24:00:00 to 0:00:00 (or 12:00:00 AM, or similar).
The time that is displayed is formatted according to the cultural settings of your operating system.

BackgroundImage
type: Known image name
The name of the background image. The image name can be selected from the Image Repository (press the small button).

This property uses the Image Repository. For more information about the use of images in a project, refer to link

Caption
type: Word or phrase
The name of the object in the project. This name must not contain '.' or '$' characters.

Every object has the Caption property. This property is very important, because it is the name by which Polybench recognizes this object.
It is allowed to give multiple objects the same name, as long as the objects are of the same type. In that case, a reference to this caption includes all the objects with the same caption.
In Polybench, every object can be addressed by an Address specifier, which starts with the dollar sign, for example: $My Page.My Object. 'My Page' would be the Caption of a page, and 'My Object' the Caption of an object on that page.

Documentation
type: See description
Optional documentation of this object.

It is good practice to write in short notes why you have used this object, and why its properties are set the way they are set. If this object is an operator, the Documentation text is displayed below the operator symbol.

Extra dialog to change properties of this object: Layout


Variable Parameters

Find more information about Variable Parameters here: link

ImageName
type: See description
The name of the background image, which is an image in the Image Repository


TimeLabelOffset
type: See description
The time offset of the time labels in the viewer. Setting this value will change the time that is displayed for the current signals. The time is expressed in hour:minute:second, or in seconds.


ClockTime
type: See description
Determines if times are displayed as a continuous time (set to 1), or as clock time (set to 0). Clock time makes the time always be between 12 or 24 hours (depending on your culture).

In Clock Time mode, the viewer assumes the sample time to be a time in one day. The sample with t=0 is then considered to occur at midnight.
After 24 hours worth of samples, the time will change from 24:00:00 to 0:00:00 (or 12:00:00 AM, or similar).
The time that is displayed is formatted according to the cultural settings of your operating system.

Functions

Find more information about Functions here: link

AutoScale
Changes the range and offset of all (or selected) channels in a way, that all signals in the current view are entirely visible. There must be a preparation operator before the viewer operator that set the ranges and offsets, e.g. the Prepare Ranges and Offsets (link).

AutoRange
Changes the range of all (or selected) channels in a way, that the signals in the current view are entirely visible, without changing the offset. There must be a preparation operator before the viewer operator that set the ranges and offsets, e.g. the Prepare Ranges and Offsets (link).

AutoOffset
Changes the offset of all (or selected) channels in a way, that the signals in the current view are evenly spread in the view, without changing the range. There must be a preparation operator before the viewer operator that set the ranges and offsets, e.g. the Prepare Ranges and Offsets (link).

Erase
Erases the signal pane and sets the cursor to the left border.

Details

Changing signal properties

The Y-T Viewer only offers settings for the viewer in general. You cannot set any properties for the different signal channels that the viewer displays. If you want to change any properties of one or more signal channels, you need preparation operators that are connected just before the Y-T Viewer. For more information, please refer to the section about preparation operators (link).

No data review

Note that this viewer does not allow the user to scroll back to previously measured data. To re-view data, use the Y-T Reviewer (link). The reason for this is that the Y-T Viewer does not have access to stored signal data.

Because the Y-T Viewer only draws signals on the time the signals come into the Y-T Viewer, re-drawing the signals would not be possible. But sometimes the user whishes to change the time range of the viewer, add or remove channels, or change for example the color of a signal channel. In those cases, the user expects the signals to be redrawn using the new settings.
This is only possible if the Y-T Viewer remembers the signals that it needs to redraw. The question is only how long back in time?

This issue is solved by using the property History buffer size. In this property you determine how long back in time signals can be redrawn. If you define that a Y-T Viewer shows signals over a time range of less than one minute, then you need a history buffer size of 60 seconds.
If you then show a larger time range, signals are not any longer redrawn if a channel property changes.

User Interface Object on Printable Pages

The user interface of this component will be printed on a report, if it is put on a Printable Page (see link).

Examples

Example: Y-T Viewer Background Image Parameter Demo
Shows that the background image of a Y-T Viewer can be changed on the fly.
Examples\DF0305009_001_Y-TViewer_Background_Image_Demo.xmc

Example: Viewers Tutorial
Small tutorial that shows various aspects of Y-T Viewers (for live data viewing), and also how to use the various Viewer Preparation Operators.
Examples\DF0305009_003_Y-TViewers_Tutorial.xmc

Example: AutoScale, Auto Range and AutoOffset Demo
This demo shows the difference between the AutoScale, AutoRange and AutoOffset functions of Y-T Viewers. Those three functions are related, but either of them will make sense for specific signal views, with specific time ranges, and user requirements.

For example, viewer 1 at 35 sec time range will profit most from the AutoScale. Viewer 3 at 5 sec time range could very well use AutoOffset, to let the view move along with the signal. Viewer 2 at 5 sec time range changes its amplitute and could profit from AutoRange. Which of the functions is the right one, also strongly depends on user requirements.
Just try out the possibilities in this demo!
Examples\DF0305009_004_AutoScale_AutoRange_AutoOffset_Demo.xmc