source: cssboy_deployment/docs/source/instructions.rst @ 1056

Last change on this file since 1056 was 1056, checked in by jemian, 11 years ago

more info, still needs a reorganization

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Revision Author HeadURL Id
File size: 13.8 KB
Line 
1.. $Id: instructions.rst 1056 2012-07-18 20:27:16Z jemian $
2
3==========================
4Instructions
5==========================
6
7.. caution:: At this time, this documentation is a collection of notes
8        related to installation or configuration of CSS-BOY.  It needs to be
9        set into some sort of order.
10
11Install OPI screens (and other resources such as image files, javascript,
12or definition files) into projects within your workspace.  The OPI screens
13from *synApps* [#synApps]_ will go into their own project within your
14workspace.  The screens from the APS accelerator will go into another
15project.  Your instrument and beam line screens will typically go into
16a single project but it is possible that you might have separate projects
17for upstream optics, beam line staff, and users.
18
19  Each *project* within CSS may come from a separate location:
20 
21  * local directory within your account and CSS workspace
22  * file server accessible from your directory space
23  * NFS or SMB (Samba) file server
24  * Version Control working directory
25 
26  You can't share the CSS Workspace with another user,
27  even if that other user is logged in with the same name.
28  This will likely cause abnormal behavior for CSS.
29  **But**, you can import a common or shared directory into your CSS
30  workspace.
31
32Leave the *CSS* project for use as a sandbox (special area for files
33which you are testing or using for a short time and do not wish to treat
34as part of everyone's workspace).
35
36
37Install CSS-BOY on your computer
38++++++++++++++++++++++++++++++++
39
40CSS [#CSS]_ (Control System Studio) was designed at DESY, Hamburg, Germany. 
41CSS is software that provides a rich
42environment for EPICS controls.
43
44The SNS at ORNL added the BOY (Best Opi Yet --
45where OPI is an EPICS term Operator Programmer Interface)
46component which is an EPICS display tool.
47
48        .. tip:: Use the SNS release
49               
50                For some time, APS developed a custom CSS product [#aps_css]_ to provide
51                features and customizations that were not part of the SNS build.
52               
53                It is recommended now to use the CSS-BOY as built by the team at
54                SNS [#css_boy_downloads]_.
55       
56        .. note:: 
57           You need a Java Runtime Environment (at least) to run CSS.
58           Also, you will need one or more EPICS IOCs to serve PVs
59           or all you can do is use the simulator inside CSS.
60
61#. Visit this URL and download the most-recent version of
62   **Basic EPICS** for your OS:
63   http://ics-web.sns.ornl.gov/css/products.html
64   
65   (Alternative URL: https://ics-web.sns.ornl.gov/css/updates/apps/ )
66#. Unzip the contents someplace.  Typical for me is:
67   ``~/Apps/CSS_EPICS_3.1.1``
68
69
70add OPI screens from synApps as a CSS project
71+++++++++++++++++++++++++++++++++++++++++++++
72
73#. Open the ``CSS_EPICS_3.1.1`` (or whatever version) directory
74#. Start ``css`` by double-clicking it.
75   If you use a unix or linux command line, type::
76   
77       ./css &
78   
79#. Select menu ``File-->Import ...``
80#. Open ``General`` category,
81   select ``Existing Projects into Workspace``,
82   click ``Next`` button
83#. Click ``Browse ...`` button (in *Import* window),
84   navigate to ``/APSshare/epics/synApps_5_6/support/``
85   (or ``/usr/local/epics/synAppsSVN/support/`` or wherever)
86#. Click ``Ok`` button
87#. Click ``Finish`` button (in *Import* window)
88
89.. note::  If CSS reports that your synApps directory cannot be imported
90        since it is not a *project*, you can make it a project by creating
91        a ``synApps/support/.project`` text XML file with this content::
92
93                <?xml version="1.0" encoding="UTF-8"?>
94                <projectDescription>
95                        <name>synApps</name>
96                        <comment>EPICS synApps</comment>
97                        <projects>
98                        </projects>
99                        <buildSpec>
100                        </buildSpec>
101                        <natures>
102                        </natures>
103                </projectDescription>
104
105
106define synApps default fonts and colors
107+++++++++++++++++++++++++++++++++++++++++++++
108
109#. Select menu ``Edit-->Preferences ...``
110#. Open item ``CSS Applications``
111#. Open item ``Display``
112#. Click on item ``BOY``
113#. For Color File, replace text with ``/synApps/color.def`` or *Browse...* to it
114#. For Font File, replace text with ``/synApps/font.def`` or *Browse...* to it
115#. For Top OPIs, replace with OPI file of your choice
116
117.. note:: If you get a console message that says:
118
119      2012-04-30 15:59:12 ERROR: Failed to read font definition file.
120
121   then you've got a typo or some other error.  Repeat these steps to fix it.
122
123
124Define a project for your EPICS installation
125+++++++++++++++++++++++++++++++++++++++++++++
126
127Screens for your instrument or beam line or other installation of EPICS
128may already be available.  If so, you might import them by following the steps
129above used to import synApps.  If you need to develop your own screens,
130then follow these steps:
131
132#. Select menu ``File-->New``
133#. Open ``General`` category,
134   select ``Project``,
135   click ``Next`` button
136#. Give it a Project name, something short such as *44ID* or *iocPRJ*
137   (try to avoid using spaces, it makes things harder later on),
138#. In the ``Navigator`` view,
139   open the new project by double-clicking (or any other equivalent way)
140
141Create an OPI file
142******************
143
144#. Select menu ``File-->New``
145#. Open ``BOY`` category,
146   select ``OPI File``,
147   click ``Next`` button
148#. Select the folder to contain your new OPI screen,
149   type the name of the new OPI file in the box,
150   click ``Finish`` button
151
152Your new screen will appear in a CSS-BOY editing window.
153You might consider changing to the *OPI Editor* perspective
154as this will provide much more help in editing the screen.
155
156Once you have setup the CSS-BOY project for your EPICS installation,
157you might want one particular file to be the default  *main* file
158for your CSS-BOY workspace.  Edit the menu for *Top OPIs* via:
159``Edit --> Preferences ... --> CSS Applications --> Display``
160
161
162Setting the OPI Search Path
163------------------------------------
164
165.. note:: This could be set in a ``.ini`` file.  Needs some research...
166        Check the help for "Setting Preferences"
167       
168        The default preferences can be set in ``plugin_customization.ini`` 
169        file which is located in the root of the "Product" plugin directory
170        or jar file. It is ideally used to provide site-specific default
171        preferences. For example, you can change the default BOY preferences
172        in this file with corresponding preference keys::
173
174                org.csstudio.opibuilder/color_file=http://your_site.gov/color.def
175                org.csstudio.opibuilder/font_file=http://your_site.gov/font.def
176                org.csstudio.opibuilder/opi_gui_refresh_cycle=100
177                org.csstudio.opibuilder/no_edit=true
178                org.csstudio.opibuilder/macros="N","North"|"W","West"|"SYS","LLRF"|"SubSys","HPM"
179                #popup console level, it can be NO_POP, INFO, or ALL
180                org.csstudio.opibuilder/popup_console=NO_POP
181
182 You can also give a different customization file with the command line option -pluginCustomization when starting CSS.
183
184
185Getting the synApps OPI screens
186-------------------------------------
187
188To get the synApps OPI screens, you need to do one of the following
189(subject to revision):
190
191#. import synApps project from /APSshare
192        path:   /APSshare/epics/synApps_5_6/support/all_opi
193
194
195#. checkout synApps development trunk from SVN, then import as project
196        There is a script to do the checkout::
197
198                https://subversion.xor.aps.anl.gov/synApps/support/trunk/checkout.csh
199       
200        One way is to place this file in */usr/local/epics* and then run it.
201        It will create a directory called *synAppsSVN/support* that contains
202        the development trunk.
203
204
205Importing the synApps OPI screens
206-------------------------------------
207
208To import synApps OPI screens as a project in CSS-BOY::
209
210        Menu "File"
211          -->  "Import ..."
212          open  "General"
213          select "Existing projects into workspace"
214        button [Next]
215        under "Select root directory:", browse to or enter path on file system
216        make sure checkbox is marked for "synApps"
217        button [Finish]
218
219
220You will also need to get the synApps project onto your OPI search path.  Here is how::
221
222        Menu "CSS"
223          -->   "Preferences:"
224          open  "CSS Applications"
225          open  "Display"
226          click on  "BOY"
227
228Change the text in for "OPI Search Path" to this really long string (all one line)::
229
230                /synApps/areaDetector/ADApp/op/opi | /synApps/asyn/opi/boy | /synApps/autosave/asApp/op/opi | /synApps/busy/busyApp/op/opi | /synApps/calc/calcApp/op/opi | /synApps/camac/camacApp/op/opi | /synApps/dac128V/dac128VApp/op/opi | /synApps/delaygen/delaygenApp/op/opi | /synApps/dxp/dxpApp/op/opi | /synApps/iocStats/op/opi | /synApps/ip/ipApp/op/opi | /synApps/ip330/ip330App/op/opi | /synApps/ipUnidig/ipUnidigApp/op/opi | /synApps/love/loveApp/op/opi | /synApps/mca/mcaApp/op/opi | /synApps/modbus/modbusApp/op/opi | /synApps/motor/motorApp/op/opi | /synApps/optics/opticsApp/op/opi | /synApps/quadEM/quadEMApp/op/opi | /synApps/softGlue/softGlueApp/op/opi | /synApps/sscan/sscanApp/op/opi | /synApps/std/stdApp/op/opi | /synApps/vac/vacApp/op/opi | /synApps/vme/vmeApp/op/opi | /synApps/xxx/xxxApp/op/opi
231
232Keep clicking **Ok** until you dismiss all the dialogs.
233Now the paths should work.
234
235        .. note:: From the CSS-BOY Help files:
236       
237                The path which is used to search OPI files if the given OPI path is a relative path
238                and it doesn't exist on the made up absolute path neither.
239                For example, you can put an OPI file name abc.opi or a relative path abc/def/my.opi
240                for Open OPI Action, Top OPIs, Schema OPI and so on.
241                If this OPI file cannot be found as a relative path to the OPI file, it will search the
242                OPI Search Path and return the first one found on the search path.
243                It supports workspace path, local file system path and URL path.
244                The pathes are separated by the vetical bar delimiter ``|``.  For example::
245               
246                        /synApps/areaDetector/ADApp/op/opi | /synApps/asyn/opi/boy
247
248This might be the directory::
249
250        C:\Users\Pete\Downloads\sns_css_3.1.1-win32.win32.x86_64\CSS_3.1.1\plugins\org.csstudio.sns.product_3.1.1.20120718
251
252
253Calling the synApps OPI screens
254-------------------------------------
255
256Also, when calling a synApps .opi screen from the instrument or beam line,
257it is not necessary to use the full path since there is an OPI search path
258that will locate the screen.  Example, instead of::
259
260   /synApps/motor/motorApp/op/opi/motor3x.opi
261
262Instead, you just call::
263
264   motor3x.opi
265
266.. note::  If you require a specific version of synApps, for example a specific older
267                        version of areaDetector, create a separate CSS project for it in your
268                        workspace.
269
270.. TODO: could use some instructions how to create this kind of project.  An example would help.
271
272
273Setting the OPI Search Path
274------------------------------
275
276from the ``plugin_customizations.ini`` file that comes with CSS-BOY, there are these notes::
277
278        # Fundamentally, the Eclipse preference mechanism works like this
279        # to allow customization at various levels:
280        # 1. Each plugin might contain default settings that are hardcoded
281        #    inside the Java sources of the plugin.
282        # 2. In addition, each plugin might have a file preferences.ini
283        #    in the root directory of the plugin directory or jar file.
284        #    When present, those values override the hardcoded settings.
285        #    Ideally, each plugin with preference settings has such a
286        #    preferences.ini file to define the defaults because this
287        #    provides a convenient place to locate all the available
288        #    settings of a plugin in one file.
289        # 3. A plugin_customization.ini file like this one, located
290        #    in the root of the "Product" plugin directory or jar file
291        #    can override all of the above.
292        #    It is ideally used to provide site-specific defaults
293        #    (as this one does for using CSS at the SNS).
294        # 4. When starting CSS (or any Eclipse product), a customization file
295        #    with the same format can be provided via the -pluginCustomization
296        #    command line option to override settings.
297        #    NOTE: Eclipse silently ignores missing customization files.
298        #    THERE IS NO ERROR MESSAGE when the specified file does not exist!
299        # 5. Finally, each end user can use the CSS/Preferences menu item to
300        #    interactively adjust most settings. Those changes are stored in the
301        #    workspace directory under
302        #        {Workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings
303
304::
305                             {Workspace}\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.csstudio.opibuilder.prefs
306        C:\Users\Pete\CSS-Workspaces\Default\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.csstudio.opibuilder.prefs
307
308Set OPI Search Path from .ini file
309--------------------------------------------
310
311As for how to set search path from .ini file,
312please refer to this tutorial:
313http://ics-web.sns.ornl.gov/kasemir/CSS/Training/SLAC/2_4_HierarchicalPrefs.ppt
314
315For example::
316
317   opi_search_path=/BOY Examples/|C:\users\5hz\Desktop\|http://ics-srv-web2.sns.ornl.gov/opi/
318
319
320
321Glossary of Terms
322++++++++++++++++++++++++++++++++
323
324Some of the terms used by eclipse and CSS and CSS-BOY may be unfamiliar.
325
326.. glossary::
327
328``.js``
329        javascript file
330
331``.opi``
332        display screen file used by CSS-BOY
333
334CSS
335        Control System Studio [#css]_ from DESY, based on eclipse
336
337CSS-BOY
338        CSS Best Opi Yet EPICS Display software (replacement for medm)
339
340eclipse
341        Java-based software providing a configurable interactive
342        development environment (IDE).  Eclipse [#eclipse]_ can be highly
343        customized to deliver a specific application,
344        such as CSS or CSS-BOY.
345
346Editor
347        One type of display in eclipse.
348
349Navigator
350        Used to browse the Workspace for files and subdirectories.
351
352Perspective   
353        Defined arrangement of Views and Editors in eclipse.
354        A Perspective can be customized and saved within
355        the Workspace for later recall.
356
357Project
358        subdirectory within a *workspace* containing
359        related files and subdirectories
360
361View
362        One type of display in eclipse, some can be undocked
363        (or torn-off) so they can be a spearate window.
364       
365        ??? Are undocked Views saved as part of the Perspective? ???
366
367Workspace
368        file system directory containing directories
369        and files used by a single CSS-BOY user
370
371
372
373Footnotes
374++++++++++++++++++++++++++++++++
375
376.. [#eclipse]                   http://eclipse.org
377.. [#css_boy_downloads] http://ics-web.sns.ornl.gov/css/products.html
378.. [#css]                               http://css.desy.de
379.. [#aps_css]                   http://css.aps.anl.gov
380.. [#synApps]                   http://www.aps.anl.gov/bcda/synApps
Note: See TracBrowser for help on using the repository browser.