17
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS [email protected] 2011, October 17-21 at CEA Saclay, France Control System Studio Training - Compiling, configuring, running CSS

Control System Studio Training - Compiling, configuring, running CSS

  • Upload
    jaeger

  • View
    62

  • Download
    0

Embed Size (px)

DESCRIPTION

Control System Studio Training - Compiling, configuring, running CSS. Kay Kasemir ORNL/SNS [email protected] 2011, October 17-21 at CEA Saclay, France. Getting CSS to run from source code. Get Java, Eclipse, CSS Sources Start Eclipse “Import” sources into Workspace - PowerPoint PPT Presentation

Citation preview

Page 1: Control System Studio Training - Compiling, configuring, running CSS

Managed by UT-Battellefor the Department of Energy

Kay Kasemir

ORNL/[email protected]

2011, October 17-21 at CEA Saclay, France

Control System Studio Training

-Compiling, configuring,running CSS

Page 2: Control System Studio Training - Compiling, configuring, running CSS

2 Managed by UT-Battellefor the Department of Energy

Getting CSS to run from source code

1. Get Java, Eclipse, CSS Sources

2. Start Eclipse

3. “Import” sources into Workspace

4. Open CSS *.product file, Launch

5. Maybe export *.product

Page 3: Control System Studio Training - Compiling, configuring, running CSS

3 Managed by UT-Battellefor the Department of Energy

Java, Eclipse

Check: Is java available?java -version

Need Java 1.6, Sun/Oracle; Not GCJ, OpenJDK

Start Eclipse eclipse/eclipse“Workspace”:use CSS/Workspace in your home directory

Page 4: Control System Studio Training - Compiling, configuring, running CSS

4 Managed by UT-Battellefor the Department of Energy

Eclipse Workspace Workspace:

Directory with“.metadata”subdir.– Tracks currently

open window, …

Source code:May be in Workspace dir.or elsewhere– We use CSS/Sources in home dir.

Page 5: Control System Studio Training - Compiling, configuring, running CSS

5 Managed by UT-Battellefor the Department of Energy

Eclipse Workspace

“Import” Sourcesinto Workspace:– File/Import…,

General,Existing Projectsinto Workspace

– Select source directory,import all projects found

– Do not“Copy projects into Workspace”

Note: Need to “Import” even if sources are already located in workspace directory

Page 6: Control System Studio Training - Compiling, configuring, running CSS

6 Managed by UT-Battellefor the Department of Energy

Run Product

Open org.csstudio.basic.epics.product/*.product

Press1. Synchronize2. Launch an Eclipse application

Page 7: Control System Studio Training - Compiling, configuring, running CSS

7 Managed by UT-Battellefor the Department of Energy

Control System

Want to concentrate on CSS

.. still need a control system to talk to

a)Use built-in simulation PVssim://sine sim://ramp sim://noise

b)Use provided demo databasessoftIoc -m user=demo1 –s -d tank.db -d control.db

Use your group number instead of “1”.Run ‘dbl’ to see list of records.

Page 8: Control System Studio Training - Compiling, configuring, running CSS

8 Managed by UT-Battellefor the Department of Energy

First Steps

Check CSS/Preferences/CSS Core/EPICS– Channel Access address list: 127.0.0.1?

CSS/Diagnostic Tools/Probe CSS/Diagnostic Tools/EPICS PV Tree Move Windows around Context menu

Page 9: Control System Studio Training - Compiling, configuring, running CSS

9 Managed by UT-Battellefor the Department of Energy

Check Point

We can compile, launch, use CSS Brief Look: Composition of a “Product” Hierarchical Preferences

Page 10: Control System Studio Training - Compiling, configuring, running CSS

10 Managed by UT-Battellefor the Department of Energy

Product, Features

Page 11: Control System Studio Training - Compiling, configuring, running CSS

11 Managed by UT-Battellefor the Department of Energy

Brief Look: Plugins, Extension Points

org.csstudio.diag.probe– plugin.xml– Dependency on ..utility.pv

org.csstudio.utility.pv– Extension point pvfactory

org.csstudio.utility.pv.epics– Implements that ext. point for “ca”– Depends on ..libs.epics

org.csstudio.platform.libs.epics

Page 12: Control System Studio Training - Compiling, configuring, running CSS

12 Managed by UT-Battellefor the Department of Energy

Hierarchical Preferences

org.csstudio.platform.libs.epics preferences.ini:addr_list=

Product’s plugin_customization.ini:org.csstudio.platform.libs.epics/addr_list=127.0.01

Command-line

Page 13: Control System Studio Training - Compiling, configuring, running CSS

13 Managed by UT-Battellefor the Department of Energy

Exercise: Preferences In your home directory, create a file

“my_css_settings.ini” Add a line

org.csstudio.platform.libs.epics/addr_list=127.0.01 1.2.3.4

– Use the IP address of your computer instead of 1.2.3.4

Run CSS with option -pluginCustomization /path/to/your/my_css-settings.ini

– Need to check menu Run/Run Configurations… to do this from within the IDE

When you now view the CSS/Preferences/CSS Core/EPICS settings, press “Default”, does it use the value from your settings.ini?

Page 14: Control System Studio Training - Compiling, configuring, running CSS

14 Managed by UT-Battellefor the Department of Energy

Exporting a Product

Export Product– Root Directory

Name, e.g. “css” no path!

– Destination Directory

Path,e.g. /usr/fred/CSS/bin

– Un-check “Generate metadata repository”

Finish, try the result

Page 15: Control System Studio Training - Compiling, configuring, running CSS

15 Managed by UT-Battellefor the Department of Energy

Exercise: Various smaller CSS Products

Find all *.product files (see docbook) Start from IDE, or export & then start:

org.csstudio.archive.engine/ArchiveEngine.productorg.csstudio.archive.config.rdb/ArchiveConfigTool.productorg.csstudio.alarm.beast.server/AlarmServer.productorg.csstudio.alarm.beast.configtool/AlarmConfigTool.productorg.csstudio.sns.jms2rdb/JMS2RDB.product

The point is to be able to start these tools.They will exit with errors, for example about missing database connections.For now you should simply be able to start them.

Page 16: Control System Studio Training - Compiling, configuring, running CSS

16 Managed by UT-Battellefor the Department of Energy

Advanced Exercise: Update Repository Export product, copy somewhere

– This will be the “old” product.

Change something in code– Product’s into/overview.xml?– Product’s plugin_customization.ini settings

Increment version number of affected plugin, feature, product

Export new product with “Generate metadata repository”– This is now the “new” product. Locate the generated repository.

You could run the new product, but start the old Product, then use Help/.. to update from repository to the new product

Page 17: Control System Studio Training - Compiling, configuring, running CSS

17 Managed by UT-Battellefor the Department of Energy

Advanced Exercise: Headless Build Read the docbook chapter Check scripts of one or more existing

headless build setups Try to use one