 SpotLight

ISaGRAF SpotLight tool allows the user to define watch lists that can be displayed either as graphic pictures or as lists during debug. Graphic items must be linked to the variables of the ISaGRAF project. The graphic picture is both defined and animated "on line".

Building graphic layout

The list layout

Defining item style

Commands of the "File" menu

Note for ISaGRAF V3.2 users

To force the value of a variable, double click on the corresponding item from graphic or list layout, or hit ENTER when it is selected.

You also can lock the document (deny any modification) using the "File / Lock" command. When a document is locked, you still can force variables by double clicking on their symbol.


Building graphic layout

A chart is made of background pictures (bitmaps or metafiles), and a set of graphic items that will be animated during debug. To enter the chart, the following operations must be performed: Insert background pictures, insert graphic items, link objects to the variables of the project

Background pictures

The following graphic items can be inserted in the graphic layout:

Single text display

 	Unipolar and bipolar bar graphs

Curves

Boolean icons

Bit fields

When graphic layout is ready, you can modify or complete it:

Select, move or resize items

 	Group items / dissociate groups

Change the style of items


The background picture
Background pictures

The background pictures are "bitmap" (.BMP) or “metafile” (.WMF) files. Numbers of pictures included in the graphic layout is not limited. Pictures can be moved or resized in graphic layout. They do not appear in list layout. Pictures are built with other tools. SpotLight does not include a painting tool. The "Options / Background color" command is used to select a solid color for empty space in graphic layout.

Note:	Bitmaps consume a large amount of memory. It is highly recommended to correctly size the picture, and limit the unused space inside the bitmap rectangle.


Single text display

A “single text” item is a text written in a rectangle. The text displayed is the value of the attached variable. Thus, such item can be linked to message string variable.

The rectangle where text is displayed can be either filled with color or transparent. The character font used to display text is adjusted to fit the height of the rectangle when item is resized.


 	Unipolar and bipolar bar graphs

A bar graph is a rectangle with a colored part that represents the numerical value of the attached variable. Optionally, the rest of the rectangle can be filled with color. A bar graph can be either horizontal or vertical.

Unipolar bar graphs can grow in any direction: to the top, to the bottom, to the left or to the right.

Bipolar bar graphs can grow either in positive or negative direction, according to the value of attached variable. In case of a bipolar bar graph, the maximum allowed value is the same for both negative and positive scales.


Curves

It is possible to insert a curve in a document. A curve shows the history of the attached variable. Although it is not a precise measurement tool, it can give useful debug information about synchronism between various variables.

A curve stores the 200 last values of a variable. The number of samples is not changed when the curve item is resized in the graphic layout.


Boolean icons

A “boolean icon” item is used to display a binary state. One icon (.ICO) file is defined for FALSE or 0 value. Another icon is defined for all other non zero values. As SpotLight does not include an icon editor, icon files should be prepared with another tool.


Bit fields

A “bit field” item shows in a graphic panel the 32 bits of an integer value. The less significant bit is always displayed on the right. It is not recommended to use bit field for other data types such as real analog values, as the displayed information can lead to confusions.


Select, move or resize items

Selecting graphic objects is needed for most of the editing commands. SpotLight enables the selection of one or more existing objects in the chart area. To select objects, the "select" (button with an arrow) choice must be checked in the editor toolbar. To select one object, the user simply has to click on its symbol. To select a list of objects, drag the mouse in the drawing area to select a rectangle area. All the graphic objects that intersect the selection rectangle are marked as "selected". A selected object is drawn with little black squares around its graphic symbol.

By making a new selection, any previously selected objects are unselected. To remove the existing selection(s), simply click with the mouse on an empty area outside of the rectangle which borders the selected objects.

To move objects, you first have to select them. Then place the mouse cursor on the border of the selected item and drag it to other location.

To resize an object, you first have to select it. Then place the mouse cursor on one of the small rectangles displayed in the selection border, and drag it in appropriate direction to resize the object. Pictures can also be resize. In such case, the corresponding bitmap or metafile is stretched to fit the new specified item rectangle.


 	Group items / dissociate groups

You can group items together so that they are managed as one item. To make a group, select items in graphic layout and run the “Edit / Group” command. The “Edit / Dissociate” command is used to restore items of the selected group as separated ones.

A group may contain a picture. A group may also contain another group.

When items are grouped, their style cannot be changed anymore. Items of the group are still displayed, but cannot be used (with double click) to modify the value of attached variables.

A group appears at just one line in the list layout.


Defining item style

The graphic style and settings of an existing item can be modified, by double clicking on its symbol in the graphic area, or by running the “Edit / Set style” command when item is selected in graphic or list layout. The “Style” dialog box is also opened when a new item is added to the document. It groups the following pieces of information to be selected by the user:

Graphic style and settings:

The display style (single text, bar graph, curve…) of an item can be changed dynamically. When foreground and background colors are used, they can be customized using the corresponding boxes. When style is “boolean icon”, the pathname of corresponding .ICO files has to be specified. Use “…” buttons close to these controls to browse icon files existing on the disk.

Scale:

This is the maximum value that can be displayed in bar graphs and curves. For bipolar bar graphs and curves, the same absolute value is used for both positive and negative axis.

Variable name:

When the "Name" field is the active field, pressing the "…" button close to edit control enables the user to find the names of the variables already declared in the project dictionary.

Caption:

A caption can be displayed closed to the graphic item in graphic layout. You can customize the location of the caption text (top, bottom, left or right) and its contents. Caption can be any combination of the variable name and its value formatted as text. Caption customization has no effect on list layout.

Command variable:

If the "Command variable" option is set, the user can modify the value of the linked variable during debug by double clicking on the item graphic symbol.


Commands of the "File" menu

The "File" menu contains commands that allow the user to manage the complete document.

The "New" command of the "File" menu starts the editing of a new document. The number of documents defined for a project is not limited by ISaGRAF. Before editing the new chart, the previously opened chart is closed. The SpotLight cannot be used to edit several charts at once. However, multiple SpotLight windows can be opened simultaneously with each used to edit a different document.

The "Open" command of the "File" menu allows the user to close the currently edited document and to start editing another document of the current project. The new selected document replaces the current one in the editing window. When selecting the new document, the "Delete" button can be used to delete an existing file, in order to clean up the project directory. Icon and bitmap files referenced in a chart are not erased when the chart is deleted.

The "Save" command of the "File" menu stores the currently edited document on the disk. If it is a new untitled document, the user must give it a name before saving it. Naming a document must conform to the following rules:

•	The length of the name cannot exceed 8 characters

•	The first character must be a letter

•	The following ones must be letters, digits or underscore characters

•	Naming is case insensitive

The "Save as" command of the "File" menu allows the user to store the currently edited document under another name.

dually.


The list layout

At any time, you can swap between graphic and list layout, by pressing this button. You can also use the “Options / List - Graphic layout” command.

In the list layout, items are shown in a classical list box. The height of each item is calculated according to its drawing style. Pictures (bitmaps and metafile) are not visible from the list layout. A selection is available in list layout, and should be used to set item style or change the value of a variable. Multiple selection and commands using it are not available in this mode.

 	You can re-order the items in the list using the “Edit / Move in list” commands. The item to be moved should be selected in the list.


Note for ISaGRAF V3.2 users

Spotlight can read graphics and lists of time diagrams built with the tools of ISaGRAF V3.0 or V3.2. Such files appear in the "Open" dialog box, with the description of their origin. Files can be read and freely modified with SpotLight.

When opening an ISaGRAF V3.2 graphic, the document is automatically marked as "Locked". Remove the "Lock" option from the "File" menu if you want to make changes in the graphic.

When an ISaGRAF 3.2 graphic or list of time diagram is open, SpotLight always proposes to save it in native SpotLight format. The "Save As" dialog box is systematically open when closing such a document.