Presentation is loading. Please wait.

Presentation is loading. Please wait.

Jddd Training for advanced users Elke Sombrowski.

Similar presentations


Presentation on theme: "Jddd Training for advanced users Elke Sombrowski."— Presentation transcript:

1 jddd Training for advanced users Elke Sombrowski

2 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 2 MVS Vakuum Übersicht mit freundlicher Genehmigung von M. Boehnert jddd panels at Desy MPS Interlock Übersicht mit freundlicher Genehmigung von S. May HASYLAB - FLASH Control Center mit freundlicher Genehmigung von M. Trompeter AMTF Interlock Bedienfeld

3 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 3 Statistics The number of created panel is growing rapidly at Desy. Nearly 100 Desy people attended a basic jddd training. In this new training you will learn how to design good panels using advanced jddd features.

4 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 4 Content What is good panel design? > Optimal panel size > Design hints for colors > Design hint for On/Off Switches > Structure your panel > Tips to avoid long panel startup times Making complex panels > The LocationChooser: Paint one panel for all locations > Using dynamic components > Buttons with special functions > Exercises 1 > Plots… > Tables, AliveComponent > JavaScript for simple calculations

5 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 5 Content > Using an indirect address > Layers > Exercises 2 Debugging methods > How to monitor the panel performance > Panel runtime during the last 365 days > File dependencies Miscellaneous > SVN folder structure > Tips for ddd to jddd panel conversion > How to start jddd > Save sessions > Status displays > How to make bug reports

6 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 6 What is good panel design? Optimal panel size Design hint for panel size: > If the panel if permanently running, use a full screen or half screen size. > If the panel is running only short times on demand, dont use a full screen size, because you cant see the panels behind.

7 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 7 What is good panel design? Design hints for colors A panel with design hints for colors is available in the SVN: /svn/examples/design_hints. xml

8 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 8 What is good panel design? Design hint for On/Off Switches Using a ToggleButton for switching a device on and off is dangerous, because its not clear if the button text describes the state or the action. In ddd there are different solutions how to display On/Off Switches. In jddd we propose to use a checkbox with bigSize setting.

9 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 9 What is good panel design? Structure your panel > Use TabbedPanes > Use LayeredPanes instead of groups > Use Include Components for identical components with different base address

10 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 10 What is good panel design? Tips to avoid long panel startup times Graphical widgets in Java have slow startup times try to reduce the number of widgets in your panel: > If possible replace nested If components by a Switch

11 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 11 What is good panel design? Tips to avoid long panel startup times Graphical widgets in Java have slow startup times try to reduce the number of widgets in your panel: > Replace If component containing coloured rectangles by a ColouredIndicator > Use IncludeComponents and images in their original size to avoid size recalculation.

12 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 12 Making complex panels The LocationChooser: Paint one panel for all locations A LocationChooser changes the base address of the whole panel.

13 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 13 Making complex panels The LocationChooser: Paint one panel for all locations A LocationChooser in the new rpc_test panel: /svn/global/propertiesTable.x ml

14 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 14 Making complex panels Using dynamic components Dynamic list: > Place only one row of components in the editor > Set base address for the list: TTF2.VAC/PUMP_STATION/*/ > Set address for all components, e.g. ///DREHZAHL > In run mode all locations are read from DOOCS > The list is automatically filled for all locations > Optional: use regexFilter and checkAdr

15 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 15 Making complex panels Using dynamic components paint a single component read x, z-pos from DOOCS use dynamic include component Dynamic includes for displaying BPMs

16 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 16 Making complex panels Using dynamic components Dynamic includes for displaying BPMs

17 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 17 Making complex panels Buttons with special functions

18 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 18 Making complex panels Buttons with special functions Restore button: A button with restore function highlights all restorable values on mouse over (values with expert property restoreValue). A mouse click restores the highlighted values. See also: /svn/examples/RestoreButton.xml

19 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 19 Exercises 1 > Exercises 1a) Create a panel with a DynamicList for pump stations including pump station name, Drehzahl, online status (base address of the dynamic list is: TTF2.VAC/PUMP_STATION/*/). 1b) Add a button with Set component property function to set a regex filter for the dynamic list. 2) Create a panel with a DynamicIncludes component for BPMs. The BPM component should change its color if it is enabled (use e.g. TTF2.FEEDBACK/ORBIT/9ACC2.X/BPM_ENABLE). 3) Create a panel with arbitrary singenerator settings and use a Restore button for restoring old values.

20 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 20 Making complex panels History Plots: Scales and Data Tip unused Limits during run-time Scale info from server start of plot Enable Data Tips in editor Or Run-time Data Tip: store user comments

21 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 21 Making complex panels Plots Historien und Zeitreihendarstellungen Maximum; t max Minimum; t min 2 x standard deviation mean value candlestick representation fourier transformation

22 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 22 Time Domain Correlation Plot > refAdr: data for X-scale > adr0..adrN: can be xxx.TD or single values with interpretation as I or Q > Run-time: single values are displayed as horizontal or vertical lines

23 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 23 Time Domain Plots Enables Persistence Mode 1/16 resolutionFull resolution Mean of 16 values or max value, calculated on server Auto mode: No more than one value per pixel: speed-up drawing

24 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 24 Making complex panels Plots Master scale > Plots with the same masterXScale zoom simultaneously within a jddd application

25 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 25 Making complex panels Tables A table displays the content of an array. A colormap can be used to highlight values.

26 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 26 Making complex panels Alive Component > The Alive component is a transparent layered pane where one or multiple components can be placed. > In run mode the components change their position or size related to control system values. > Example: BPM position display

27 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 27 Making complex panels JavaScript for simple calculations The "dataOp" property is used to perform mathematical operations with control system values using JavaScript syntax. This property is an expert property and is available for the jddd components Button, Value, ProgressBar, ColouredIndicator, StatusRegister and Switch. An example how to use this property is available as tooltiptext in the properties table, e.g.: dataOp = $adr*2+${FAC/DEV/LOC/PROP} At runtime "$adr" and "${FAC/DEV/LOC/PROP}" are replaced by the values read from the corresponding addresses. See also: /svn/examples/dataOp.xml

28 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 28 Making complex panels Using an indirect address The property "indirectAdr" is a control system value containing an address string. The indirect address can be placed either in the "indirectAdr" property or directly in the "adr" or the buttons "xmlFile" property. In the "adr or "xmlFile" property an indirect address string has to be marked by "${indirect address string}". For example: indirectAdr = ///ADR_SV.LEFT adr = ${///SADR} xmlFile = commonFCT_CODE_${///FCT_CODE}.xml See also: /svn/examples/IndirectAddress.xml

29 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 29 Making complex panels Layers > Each component can be placed on a specific layer, which is visible or invisibe at runtime. > The predefined layers are "NONE" and "EDIT". Additional layer names may be set in the expert property "layerList" of the background "EditorPanel. > By default new components are placed at layer "NONE", which means that they are always visible at runtime. > The "EDIT" layer is used for components, which are only visible in edit mode. > If a layer name starts with "!" it is invisible at panel startup.

30 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 30 Making complex panels Layers Layers can be toggled at runtime: > In the context menu > With a Checkbox

31 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 31 Exercises 2 > Exercises 1) Plot Exercise… 2a) Create a panel containing 3 different spectrum plots of singenerator data (e.g. TEST.DOOCS/SINGENERATOR/SIN/DATA.TD). Use the master scale to zoom all plots at the same time. 2b) Start the panel twice and test the zoom functionality. 3) Create a panel with an AliveComponent, which moves a circle. Use singenerator data (TEST.DOOCS/SINGENERATOR/SIN/DATA.TD) for testing. 4) Repaint the /svn/examples/dataOp.xml panel. 5) Create a panel with an Oval and a Rectangle. Use layers to show/hide these components.

32 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 32 Debugging methods How to monitor the panel performance > Watch the memory bar (in the upper right corner of the application) It displays Used/Max memory > In the About panel: Check the component count Check the number of calls per second

33 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 33 Debugging methods Panel runtime during the last 365 days

34 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 34 Debugging methods File dependencies Jddd provides information about SVN file dependencies: > 1.Tab: displays all file paths with the wanted file name > 2. Tab: displays all include components and files opened on a button click > 3. Tab: displays where the file is used as include component and from which panels it can be started

35 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 35 Miscellaneous SVN folder structure Conventions for SVN file names and folder structure: > The main panel has to contain the word main. This file is displayed in bold letters in the SVN browser. > Use images folder for image files. > Use includes folder for included components. > Use expert folder for expert panels.

36 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 36 Miscellaneous Tips for ddd to jddd panel conversion > To convert from ddd into jddd one has to start ddd, load a, select the panel in the list (e.g. "main_select"), click on file and on "Test: Save as XML".

37 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 37 Miscellaneous Tips for ddd to jddd panel conversion Reworking the converted panel: > Buttons which are placed on top of each other have to be replaced by a single button in jddd. > Alive and StatusRegister components have to be reworked, because they cannot be converted correctly. > Use LayeredPanes instead of rectangles to structure your panel. > Replace nested "If" components by a "Switch component if possible. > Replace If components showing coloured rectangles by a ColouredIndicator if possible. > Use a TabbedPane to combine standard and expert view in one panel. > Think about using new jddd widgets like DynamicList, DynamicIncludes, Tables…

38 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 38 Miscellaneous How to start jddd > Start jddd via Java Webstart from your browser > Start jddd via command line (works only at Desy and only on Linux or Mac): jddd-run -file /svn/examples/test.xml jddd-launcher -file /svn/examples/test.xml (see jddd help page for command line options) > Your Java Webstart link for special panels: javawshttp://ttfinfo2.desy.de//common/applications/jddd_xml/svn_jnlp.jsp?run=true&file=/svn /global/WatchdogOverview.xml&address=TTF2.SYSTEM/TTF2DAQ5.WATCH//' /global/WatchdogOverview.xml&address=TTF2.SYSTEM/TTF2DAQ5.WATCH//'

39 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 39 Miscellaneous Save sessions A session saves a set of jddd panel names, sizes, positions and special settings.

40 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 40 Miscellaneous Status displays jddd panels can be saved as png files on a local disk with a selected update rate (the default is 60 seconds). For writing png's with jddd you have to use the -png option like: jddd-run -file /svn/examples/singenerator.xml -png /home/elkes –rate 10 Here is an example how to display these panel pictures in a web browser: Test jddd png Output setInterval('reloadImage()', 2000); // 2 seconds function reloadImage() { img = document.getElementById('theimage'); img.src = '/home/elkes/singenerator.png?' + Math.random(); } Test png file creation!

41 Elke Sombrowski | Training for advanced jddd users | May 2013 | Seite 41 Miscellaneous How to make bug reports > The bug report should contain the following information: Operating system jddd version number Panel name and path in SVN Screenshot Detailed description > Please send your bug report to


Download ppt "Jddd Training for advanced users Elke Sombrowski."

Similar presentations


Ads by Google