1 / 41

jddd Training for advanced users

jddd Training for advanced users. Elke Sombrowski. j ddd panels at Desy. MPS Interlock Übersicht. HASYLAB - FLASH Control Center. AMTF Interlock Bedienfeld. mit freundlicher Genehmigung von M. Boehnert. MVS Vakuum Übersicht. mit freundlicher Genehmigung von M. Trompeter.

kathy
Download Presentation

jddd Training for advanced users

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. jddd Training foradvancedusers Elke Sombrowski

  2. jdddpanelsatDesy MPS Interlock Übersicht HASYLAB - FLASH Control Center AMTF Interlock Bedienfeld mit freundlicher Genehmigung von M. Boehnert MVS Vakuum Übersicht mit freundlicher Genehmigung von M. Trompeter mit freundlicher Genehmigung von S. May

  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. 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. 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. 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, don’t use a full screen size, because you can’t see the panels behind.

  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. What is “good” panel design?Design hint for On/Off Switches Using a ToggleButton for switching a device on and off is dangerous, because it’s 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. 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. 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. 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. Making complex panelsThe LocationChooser: Paint one panel for all locations A LocationChooser changes the base address of the whole panel.

  13. Making complex panelsThe LocationChooser: Paint one panel for all locations A LocationChooser in the new “rpc_test” panel: /svn/global/propertiesTable.xml

  14. Making complex panelsUsing 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. Making complex panelsUsing dynamic components Dynamic includes for displaying BPMs paint a single component read x, z-pos from DOOCS use dynamic include component

  16. Making complex panelsUsing dynamic components Dynamic includes for displaying BPMs

  17. Making complex panelsButtons with special functions

  18. Making complex panelsButtons 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. 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 it’s 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. Making complex panelsHistory Plots: Scales and Data Tip unused Limits during run-time Scale infofrom serverxxx.EGU@ start of plot Data Tip: storeusercomments Enable Data Tips in editor Or Run-time

  21. Making complex panelsPlotsHistorien und Zeitreihendarstellungen Maximum; tmax candlestickrepresentation 2 x standarddeviation meanvalue Minimum; tmin fouriertransformation

  22. Time Domain Correlation Plot • refAdr: data for X-scale • adr0..adrN:can be xxx.TDor single values with “interpretation” as I or Q • Run-time:single values are displayed as horizontal or vertical lines

  23. Time Domain Plots Enables “Persistence Mode” 1/16 resolution Fullresolution Mean of 16 values or max value, calculated on server Auto mode: No more than onevalue per pixel:speed-up drawing

  24. Making complex panelsPlots Master scale • Plots with the same masterXScale zoom simultaneously within a jddd application

  25. Making complex panelsTables A table displays the content of an array. A colormap can be used to highlight values.

  26. Making complex panelsAlive 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. Making complex panelsJavaScript 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, StatusRegisterand 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. Making complex panelsUsing 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. Making complex panelsLayers • 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. Making complex panelsLayers Layers can be toggled at runtime: • In the context menu • With a Checkbox

  31. Exercises 2 • Exercises • 1) Plot Exercise… • 2a) Create a panel containing 3 different spectrum plots of singeneratordata (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. Debugging methodsHow 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. Debugging methodsPanel runtime during the last 365 days

  34. Debugging methodsFile dependencies Jdddprovidesinformationabout SVN filedependencies: • 1.Tab: displays all filepathswiththewantedfilename • 2. Tab: displays all includecomponentsandfilesopened on a buttonclick • 3. Tab: displayswherethefileisusedasincludecomponentandfromwhichpanelsitcanbestarted

  35. MiscellaneousSVN 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. MiscellaneousTips 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. MiscellaneousTips 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 StatusRegistercomponents 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. MiscellaneousHow 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: • javaws‘http://ttfinfo2.desy.de//common/applications/jddd_xml/svn_jnlp.jsp?run=true&file=/svn/global/WatchdogOverview.xml&address=TTF2.SYSTEM/TTF2DAQ5.WATCH//'

  39. MiscellaneousSave sessions A session saves a set of jddd panel names, sizes, positions and special settings.

  40. MiscellaneousStatus 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–rate10 Here is an example how to display these panel pictures in a web browser: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Test jdddpng Output</title> <script type="text/javascript"> setInterval('reloadImage()', 2000); // 2 seconds functionreloadImage() { img = document.getElementById('theimage'); img.src = '/home/elkes/singenerator.png?' + Math.random(); } </script> </head> <body> <h1>Test png file creation!</h1> <p><imgsrc="/home/elkes/singenerator.png" name="testbild"id="theimage"></p> </body> </html>

  41. MiscellaneousHow 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 jddd@desy.de

More Related