Polybench® Reference
Enables the setting of graphical properties for signals in viewers.

Prepare Signal Graphics

Overview

This is a special operator that does not perform any mathematical functions, but that only reads the signal channel configuration to be able to prepare certain properties for a signal viewer.

This operator should only be used if it is connected to a data viewer input, or to another viewer preparation operator.

This preparation operator tells a data viewer what graphical properties the signals in each channel should have.

For more information about this class of operators, read 'Viewer Channel Configuration Overview' (link).

Operator ports

Input S: Any sample type. The connection is not limited to one type of signal.

Output S: Any sample type. The connection is not limited to one type of signal.

Properties

Find more information about changing properties here: link

Remember unconnected channels
type: True or False
Decides if settings from channels that are currently not connected should also be stored to disk.
Select one of those presets:
True or False
True may also be read like 'yes' and false like 'no'

During designing, channels may be added or removed at the input of this operator. All channels that were once connected are kept in memory, so that when you re-connect them, the settings are still available.
Normally, when you save your project to disk, those unconnected channel settings are not stored, because they may take unnecessary space.
However, sometimes your design may be so that different sets of known channels could be connected, in which case you want the settings to be available for all those channels. So, then Polybench should save the settings for the channels that are not connected as well. In that case, set this flag to True.

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.

Special dialog to change properties of this object: Graphical


Variable Parameters

Find more information about Variable Parameters here: link

VisibilityAndName
type: Parameter list (see link)
A parameter list with information about whether channels are visible in a viewer or not. Channels are marked with pseudo-boolean '1' if visible and '0' if hidden. This list also shows the channel names when used in a List Viewer.

This variable is about the same property as Visibility. The difference is that if this list is shown in a List Viewer (link), that also the channel names are displayed.
Channel names cannot be edited using this variable.

Visibility
type: Parameter list (see link)
A parameter list with information about whether channels are visible in a viewer or not. Channels are marked with pseudo-boolean '1' if visible and '0' if hidden.

Use the address of this variable in a List Viewer (link). It will then show check boxes for each channel, which you can use in your user interface.

Functions

Find more information about Functions here: link

DisableAll
Sets all channels invisible.

EnableAll
Sets all channels visible.

InvertEnabled
Sets all channels visible that are invisible and vise versa.

Details

The Prepare Signal Graphics operator specifies how signals are shown in viewers that follow this preparation operator. A number of properties of the signal display can be changed (the next items are part of the table in the properties dialog):

Visible
Click the check box to make the signal visible or not. For some viewers, the result of making a signal invisible will be that the other visible signals are stretched to fill the new free space.

Color
Click to select a color for the signal. The standard Windows color picker is displayed. Signal colors are not related to the Color Repository (link), because the number of signals you want to colorize may be large, which would make the use of the Color Repository inefficient. Also, signal colors are independent of user interface colors.

Line Width
In this column you select the thickness of the signal lines, if that is relevant for the viewer. Normally, this value is 1. You may want to make lines thicker for signal viewers that are used to create high resolution images or for printing. Note that signal lines are not thickened automatically if you zoom into a signal viewer; you need this Prepare Signal Graphics operator to make signal lines as wide as is suitable for the display they are shown on.
Please note that for live data viewers, such as the Y-T Viewer (link), lines with a width greater than 1 may cost more processing power. Also, thick lines may be less smooth, showing small gaps between line segments in some cases.

High Quality
If you check the High Quality check box for a signal channel, then the subsequent viewer may draw the signal using anti-aliasing. Anti-aliasing is a trick to make lines appear smoother on a monitor screen.
For some data displays, the High Quality setting will improve the visual appearance of signals. However, in some cases the signals may appear to be less sharp, and for dense signal waves detail may get lost. Also, this option costs more processing power for the computer.

Note that you may select multiple signals in the table and change properties for all selected signals at once.

Using the VisibilityAndName variable parameter

You can use the variable parameters of this operator, to let the user of your app hide or show signal channels in viewers. In order to do so, you could use a List Viewer (link) and set the Address property of the List Viewer to the VisibilityAndName variable of a specific Prepare Signal Graphics operator. The List Viewer will then show a list with check boxes and channel names, which the user can click in order to hide or show signal channels.

The Visibility variable could be used to store the latest visibility settings of a viewer, using the Application Settings (link) operator.

The user interface of your app can further be extended with buttons that hide or show all signal channels at once, or that invert the visibility of all signal channels. Use a FUNCTION action (link) to call the functions as specified in this document.