Data Item
Previous  Top  Next

The Data Item tool allows you to place data objects. Data objects are visible representations of the items you define in the block definition file. Data items can be displayed in a variety of formats, numeric as well as graphic formats. Please refer to the Format/Data Item section for a detailed explanation of the various formats available. The Data Item tool can also be activated from the toolbar with the tooldata button. After you finish selecting your drawing area the specific dialog for data items pops up:

dataitemdialog

This dialog allows you to select the data item you want to display. You can either select a single item directly as defined in your block definition or you can select a formula that you have loaded. The tab on top of the dialog allows you to switch between the two. Let's first take a look at the single data items.

Single Data Items
On the left hand pane select the block the item is a part of. Once you select a block the right hand listbox gets populated with the items of the selected block. If you select an array item, which is indicated by the square brackets, you have the choice to select the range of the array you wish to display. The Start Index edit box specifies the first index in the array to be displayed. Arrays are zero based. The End Index edit box specfies the last index (not including). The Step edit box can be used to skip over a number of items, i.e. if you want to display every other item you would set Step to 2. If you want to display every tenth item you would set Step to 10 and so on. After you confirm the selection the data item will be displayed on the screen within your selection area. Note that if the selection area can't hold all of the items you have selected it will only display the number of elements that fit into your selection area. This depends on the font and size you choose. When you move your cursor over the item on the screen the status bar will indicated which items are actually being displayed. Your selection area will be adjusted to fit tightly around an integral number of selected elements.
Once a data item is placed on a screen it will be updated automatically every time the according data block is generated by the system (see also the Update Properties of data items).

If the selected data item has Conversion Functions associated the dialog box will allow you to select the conversion function you wish to apply to the item before displaying it. The image below shows a dialog for a data item that has several conversion functions associated with it:

dataitemwithconversiondialog

If you choose 'No Conversion' the raw value of the data item is displayed.

Note

If your default drawing format is a graphic mode (Bargraph, Stripchart, Bitmap display formats) and the range is not set properly the display might appear empty.

Note

For fast updating items the font selection for numeric format display is critical to system performance. True Type fonts require a lot of system resources to render. The fastest fonts are fixed pitch fonts, variable pitch and True Type fonts are the slowest to display. This is mainly a problem for fast updating items (refresh time less than 100ms).

The following attributes can be set on a data item object include: Color, Text, Range, Orientation, and Data Item.


Expressions (Formulas)

Formulas let you combine several data items in a mathematical expression. This is useful if you don't want to decode a specific data block using an according mathematical expression but just want to setup an expression for display. This way you don't have to set up a decoder that decodes the source block(s) into a destination block, define the destination block and finally display the result. Once you define an Expression and load the Formula Definition file you can access the function from the dialog displayed below as well as from Python code.

Formula objects can be displayed in the same styles as a simple data item. Please refer to the Format/Data Item section for a detailed explanation of the various formats available. When you select Formula on the Data Source Dialog it will look similar to this:


dataitemformuladialog

The Formula sheet is structured into two parts. First you have to select a predefined Formula. Formulas are defined in Formula Definition files and have to be loaded before they can be accessed. If you don't find your Expression function in the drop down list you can use the GSEOS Explorer to show you all loaded Expressions. Once you select a Formula, the function is displayed with it's formal parameters. The second part of the dialog assists you with filling in the actual parameters to be evaluated. Actual parameters can either be data items as described in the block definition file or constants. It is not possible to nest Expressions. Although, when defining an Expression you can use other Expression functions and nest them in this way.

Triggers

The actual parameters of an Expression can be data items located in different blocks. This means that these blocks will arrive at different times. The question is: When should the function be evaluated? To allow you to specify the execution sequence the concept of triggers is introduced. If your function takes parameters from different data blocks you can set a trigger on any block to invoke the evaluation of the function. There only needs to be one trigger per block, however, if you set a trigger on multiple items of the same block the function is only evaluated once. There needs to be at least one trigger on one of the data items to evaluate the Expression, otherwise your data will never be updated.

To set a parameter select the according formal parameter in the Select Parameters list box. To select a data item click on the Data Item... button, to select a constant click on the Constant... button.
When you click on the Data Item... button the standard data item select dialog opens and you can specify the data item you want to use as the actual parameter. Note that you can use array items as parameters, however in this case the dimensions of all parameters need to be the same. Constants can be used in conjunction with array item parameters. To specify a constant use the Enter Constant Dialog:

constantforumlaparameterdialog

Any valid float number is acceptable as a constant.
Please note that data items are not typed, so if you need a signed or floating point representation of the bit pattern of regular data items you have to use one of the conversion functions available. For more complex Expressions a specific decoder is the more appropriate solution.

Note

If your default drawing format is a graphic mode (Bargraph, Stripchart, Bitmap display formats) and the range is not set properly the display might appear empty.

Note

For fast updating items the font selection for numeric format display is critical to system performance. True Type fonts require a lot of system resources to render. The fastest fonts are fixed pitch fonts, variable pitch and True Type fonts are the slowest to display. This is mainly a problem for fast updating items (refresh time less than 100ms).

The following attributes can be set on a data item object include: Color, Text, Range, Orientation, and Data Item.