After starting the application runtime, the "Panel"
window appears, because you have entered the path to this window in the workspace (in the PmWorkspace
object), in the Viewer of component
configurator (see Open panel after application launch
). But you have created another window during your previous work, in which you created and configured the trends viewer. How can we open the next window?
Click the "Panels
" icon in the upper toolbar in the running application in order to open the window with the list of application panels included into this list. If some window is already open (may not be visible on the screen) then this item is indicated with bold font in this list.
In this case mark the window "Panel Trends View"
and press the OK
button. Thus the window with the trends viewer opens.
Another way of opening the window "PanelTrend"
could be by the control button placed in the panel that is opened after starting the application. Now we will update the application.
Open the window with the name "Panel"
in the panel editor. Insert the Preconfigurations single state - only text
item anywhere in it from the One-state button
group. By clicking this item, its configuration window opens.
Enter the description of the button, for example, "Trends" into the Text
On the Events
page in the onButtonUp
event click right mouse button in order to open the Script Wizard.
In the item "PROMOTIC object viewer" use the "PROMOTIC object selection" - Rekative path to: PanelTrend and confirm by clicking the button "Insert into cursor position". Confirm all changes and compile the panel. The Script Wizard will create the following:
By this line you call the OpenView
method over the "Panel"
object that arranges its opening. This method opens the "../PanelTrend"
object viewer. The content is now displayed in the same window as the content of the previous "Panel"
Confirm everything by the OK
buttons, save and compile the panel. After starting the application, new button with the description "Trends" appears in the panel. If you click it and release the button, the window with the trends viewer opens.
Now you see the trends viewer on the screen in the full functionality. The table with variables
, you've configured in the viewer, is placed in the upper part. It goes about "Temperature" and "Power".
- On the left, there is the color
, which the graph of the respective variable is drawn with.
- Next to the color, you can disable/enable
drawing the respective graph by clicking the square – when disabled, the char "X
" appears in the square.
- By clicking the line, it becomes highlighted - thus the variable can be selected. The graph of the selected variable is drawn over other graphs
(important when the graphs don't overlap). By selecting the variable, the value scale (Y-axis) changes according to limits of this variable.
- The respective value of the variable on the cursor time appears in the "Value" column.
, where graphs are drawn, is situated below the table of variables.
- X-axis represents the time axis
with labels of date and time
- Y-axis represents the value axis
with labels of values of the selected variable
- By clicking the mouse in the area, you move the cursor
(white vertical line) to this place
- Handling axes and cursor movement and zooming is allowed if the area has the focus (by clicking the mouse or moving by tab) and it is as follows:
- press the keys Ctrl+Shift and drag the mouse to specify the area.
- press the keys Shift+arrows on the keyboard.
2) Axis movement:
- press the key Ctrl and drag the mouse in the area or on the scale.
- press the keys Ctrl+arrows on the keyboard.
3) Cursor movement: (only when the cursor is visible)
- press one of keys-arrows on the keyboard.
4) UNDO/REDO changes of time and value axes
- UNDO - press the key combination Alt+Backspace.
- REDO - press the key combination Ctrl+Y.
Preset buttons with various functions can be found below:
- Button "Autoscroll": By switching on the autoscroll, you'll get so called the current trend at once. The graph with the freshest collected data will be presented automatically and the graph will be moved by itself. Naturally the buttons for movement on the time axis are disabled in this mode. By switching off the autoscroll, you'll get into the mode of static viewing.
- Multifunctional switching button: For movement on the time axis forward and backward. It is possible to move by a portion of selected range, the whole range or to oldest/newest value. It is also possible to stretch/shrink the time range to defined value (1 minute, 15 minutes, 30 minutes, ...).
- Button "Move to end"
- Button "Memory M1 and Memory M2"
- Button "Zoom": Serves for extending/shortening the time interval of presented values.
- Switch button: It is used for extending/shortening the time interval to a specified time interval (1 minute, 15 minutes, 30 minutes).
- "Settings" switch button
- Reset default settings
- Load configuration group
: and Save configuration group
It is used for saving
the current state (setting) of the viewer into a file. This way you can configure the viewer according to your needs and save this configuration into a file for further use. Consequently, it will not be necessary to do the complete viewer setupa manually but everything can be configured just by loading
the corresponding configuration file.
- Trend viewer setting
: In the panel editor you've defined variables for viewing. You haven't had to do it, you could leave the viewer empty and to add variables into the viewer only when running the application. By this button the "Trends
" window opens where variables can be removed, edited and added into the trends viewer.
- Export data to CSV
- Trend print
: By this button, the prepared HTML page is loaded and the current state of the trend viewer is inserted
inside. The page is then opened in Internet Explorer
and Print menu is displayed. Then you can select and configure the printer and confirm printing.
- Button "Time": Serves for direct setting the time, which the time axis is moved to.
Now you can see how much comfort finds itself in using one preset compound graphic item. Of course, there aren't used all possibilities there that are offered by the TrendsView
object itself. Now it's up to you and your imagination how to develop the application in this direction and to use offered possibilities.