EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan. 2009. Masanori Satoh/ KEK, Jan. 27-30, 2009 for EPICS seminar at RRCAT, Indore Database.

Slides:



Advertisements
Similar presentations
Epics Configuration Management Steve Hunt v1.0. Goals Maximize control system availability Minimize development cycle time Reduce risk.
Advertisements

1 1999/Ph 514: Working With an IOC EPICS Working with an IOC Marty Kraimer APS.
January 2009EPICS Seminar in Indore1 Practice EPICS Start up and MEDM Tatsuro KEK January 2009.
Computer Basics Hit List of Items to Talk About ● What and when to use left, right, middle, double and triple click? What and when to use left, right,
1 2003/P571: IOC Development Environment EPICS IOC Development Environment with EPICS on Ubuntu Based on “IOC Development Envirnment” by Andrew Johnson,
© Paradigm Publishing, Inc Excel 2013 Level 2 Unit 2Managing and Integrating Data and the Excel Environment Chapter 7Automating Repetitive Tasks.
Status of VDCT Mark Pleško, Matej Šekoranja, John Maclean EPICS Meeting – Japan, 2004.
Getting Started: Ansoft HFSS 8.0
COE201 – Computer Proficiency Mr. Hamze Msheik
Microsoft Word Objectives: Word processing using Microsoft Word
© by Pearson Education, Inc. All Rights Reserved.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
Visual Basic 2010 How to Program Reference: Instructor: Maysoon Bin Duwais slides Visual Basic 2010 how to program by Deitel © by Pearson Education,
Exploring Office Grauer and Barber 1 Creating More Powerful Applications: Introduction to VBA(Wk9)
Customizing Word Microsoft Office Word 2007 Illustrated Complete.
RIMS II Online Order and Delivery System Tutorial on Downloading and Viewing Multipliers.
Eclipse IDE. 2 IDE Overview An IDE is an Interactive Development Environment Different IDEs meet different needs BlueJ and DrJava are designed as teaching.
Working with SharePoint Document Libraries. What are document libraries? Document libraries are collections of files that you can share with team members.
WorkPad 4 Quick Start WorkPad 4 Quick Start  Business Optix brings the rigor and discipline of business modelling and design into.
Input/Output Controller (IOC) Overview Andrew Johnson Computer Scientist, AES Controls Group.
Database Design with VisualDCT Nicholas Di Monte.
SNS Integrated Control System EPICS IOCs – Relational DB Connectivity Bridge A. Liyu, A. Zhukov.
IT 211 Project Integration and Deployment Lab #11.
IE 411/511: Visual Programming for Industrial Applications
Database Design with VisualDCT Nicholas Di Monte.
1 Data Bound Controls II Chapter Objectives You will be able to Use a Data Source control to get data from a SQL database and make it available.
Session 1 SESSION 1 Working with Dreamweaver 8.0.
Domain 3 Understanding the Adobe Dreamweaver CS5 Interface.
EPICS Overview 25 August 2009 Matt Boyes EPICS Overview Lecture 1 Matt Boyes.
Introduction to Engineering MATLAB – 6 Script Files - 1 Agenda Script files.
Open Source Server Side Scripting ECA 236 Open Source Server Side Scripting Installation and Testing.
A U.S. Department of Energy Office of Science Laboratory Operated by The University of Chicago Argonne National Laboratory Office of Science U.S. Department.
Tools Menu and Other Concepts Alerts Event Log SLA Management Search Address Space Search Syslog Download NetIIS Standalone Application.
Copyright © 2010 Wolters Kluwer Health | Lippincott Williams & Wilkins Introduction to Windows Chapter 2.
Key Applications Module Lesson 21 — Access Essentials
1 1999/Ph 514: EPICS Database II EPICS EPICS Database II Ned D. Arnold APS.
Prachi Chitnis.  The CSS feel  SDS – Synoptic Display Studio  ADL Converter  PV table, Probe…
1 1999/Ph 514: IOC Development Environment EPICS IOC Development Environment Marty Kraimer APS.
A U.S. Department of Energy Office of Science Laboratory Operated by The University of Chicago Argonne National Laboratory Office of Science U.S. Department.
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
An Introduction to Designing and Executing Workflows with Taverna Aleksandra Pawlik materials by: Katy Wolstencroft University of Manchester.
Version How to Use Packet Tracer MarinaMD.
DAQ Control GSI, Aug 2005Hans G. Essel CBM - DAQ Control1 MBS monitor (FOPI) (J.Adamczewski, M.Stockmeier)
January 2009EPICS Seminar in Indore1 Practice SNL and Sequencer Tatsuro KEK January 2009.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
WaveMaker Visual AJAX Studio 4.0 Training Basics: Building Your First Application Designer Basics.
Programmable Logic Training Course HDL Editor
Graphical Enablement In this presentation… –What is graphical enablement? –Introduction to newlook dialogs and tools used to graphical enable System i.
ICALEPCS (Geneva, Switzerland, October, 2005) Visual DCT’s Latest Hits Jaka Bobnar Matej Sekoranja, Igor Verstovsek.
Managed by UT-Battelle for the Department of Energy CSS Update Matthias Clausen, Helge Rickens, Jan Hatje and DESY Delphy Armstrong, Xihui Chen,
Use of a Relational Database at Leda Bob Dalesio
Visual DCT upgrade Gasper Jansa, Cosylab SLAC, April 2005.
1 2003/P571: Lab #2 : IOC Database EPICS Lab #2 IOC Database.
SNS EPICS Config. Database Control System Configuration DB Workshop, Sep. Jlab … participants from BESSY, BNL, JLab, PSI IOC DB meeting, Oct. 2-3.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
SNS EPICS Config. Database May 2001 Kay-Uwe Kasemir, LANL.
Matthias Clausen, DESY EPICS Training – Client Tools/ CSS EPICS collaboration meeting EPICS Training Client Tools EPICS collaboration meeting 2008.
EPICS Records J. Frederick Bartlett Fermilab June 1,1999.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Integrating Components and Dynamic Text Boxes with the Animated Map– Lesson 101 Integrating Components and Dynamic Text Boxes with the Animated Map Lesson.
Chapter 10 Using Macros, Controls and Visual Basic for Applications (VBA) with Excel Microsoft Excel 2013.
1 1999/Ph 514: Lab #2 : IOC Database EPICS Lab #2 IOC Database.
This material is based upon work supported by the U.S. Department of Energy Office of Science under Cooperative Agreement DE-SC , the State of Michigan.
DB Implementation: MS Access Forms. MS Access Forms: Purpose Data entry, editing, & viewing data in Tables Forms are user-friendlier to end-users than.
Dive Into® Visual Basic 2010 Express
IOC Application Development / Debugging
Using a set-up file to read ASCII data into SPSS
DB Implementation: MS Access Forms
DB Implementation: MS Access Forms
Presentation transcript:

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan Masanori Satoh/ KEK, Jan , 2009 for EPICS seminar at RRCAT, Indore Database Configuration tools Text editor and VDCT w/ hands-on (*) Many parts are quoted from Dr. N. Yamamoto’s lecture material.

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan Management of Database Database = *.db file (Record instances) Text file There are many ways to edit *.db file Text editor (most simple way): vi, emacs, etc VDCT: java application w/ GUI (KEKB Linac Control G.) Old tools: DCT, GDCT, CAPFAST (KEKB Control G.) Automatic *.db file generation is also available if you need. (RDB, etc)

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan Management of Database (cont’d) *.db file: When an IOC start up, an iocsh read the database file. dbLoadDatabase => Load *.dbd file dbLoadRecords => Load *.db file dbLoadTemplate => Load *.substitutions file Example: …./iocBoot/iocxxx/st.cmd #!../../bin/linux-x86/example < envPaths cd ${TOP} ## Register all support components dbLoadDatabase "dbd/example.dbd" example_registerRecordDeviceDriver pdbbase ## Load record instances dbLoadTemplate "db/userHost.substitutions" dbLoadRecords "db/dbExample.db","user=myHost" cd ${TOP}/iocBoot/${IOC} iocInit()

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan Management of Database (cont’d) Example: envPaths file epicsEnvSet("ARCH","win32-x86") epicsEnvSet("IOC","iocexample") epicsEnvSet("TOP","/home/tp/epics/epicsApp") epicsEnvSet("EPICS_BASE","/home/tp/epics/epicsApp/../base ")

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan Most Simple Record record(ai,”myAI:record”){} Record type : ai (Analogue Input) Record name: “myAI:record” If you do not define the field values, a record will be generated by the default values.

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan Record Type ai/ ao: Analogue input/ output bi/ bo: Binary input/ oputput mbbi/ mbbo: Multi-bit binary input/ output calc/ calcout: calculation waveform: waveform fanout: fanout …

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan Simple Record record(ai, “myAIRecord”) { field(DESC, “sample record”) field(SCAN, “1 second”) field(DTYP, “Soft”) field(VAL, “0.1”) field(INP, “myCalcRecod PP MS”) } All record types have DESC, SCAN,DTYP, VAL, etc

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan Simple Record (cont’d) field(DESC, “sample record”) # Record Description field(SCAN, “1 second”) # SCAN: Record Process Timing # Periodic/IO Intr/Event/Soft field(DTYP, “Soft”) # DTYPE: Device Type field(VAL, “0.1”) # VAL: Initial Value field(INP, “myCalcRecod PP MS”) # INP: Data source # depends on DTYP

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan What’s VDCT : Visual Database Configuration Tool It began as a project funded by the Swiss Light Source developed by Cosylab ( Recent development has been funded by the APS, Diamond and the SNS. The code development is being done by Cosylab. (open source license) Visual Tool for database configuration Java–based application: It’s executable on many environments. (Linux, Windows, etc ) Useful tools w/ GUI. Easy to manage the complex database file.

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan VDCT GUI Example

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan CapFast/EPICS

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan /xxxApp/src files  EPICS Application name: myExample  dbd/myExample.dbd:  Record/ Device definition by EPICS base  Record types, device support options, choice menus, and other configuration options are defined in Database Definition files (.dbd).  During the IOC boot process, one or more.dbd files are loaded.

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan xxxApp/xxx/Db/Makefile  Database should be described in Makefile  DB += xxx.db  After type “make”, xxx.db will be copied to /db.  For many same type of devices, it is convenient for you to use template and substitution files.  Templatefile : yyy.template record(ai,”$(USER):aiExample$(NO)”){… }  Corresponding substitution : yyy.substitutions file yyy.template { {USER=“mrk”,NO=“1”} {USER=“mrk”,NO=“2”} }

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan Template example  userHost.substitutions # Example substitutions file file "db/dbExample1.db" { { user = "masanoriHost" } } file db/dbExample2.db { pattern { user, no, scan } { "masanoriHost", 1, "1 second" } { "masanoriHost", 2, "2 second" } { "masanoriHost", 3, "5 second" } }  dbExample2.db record(calc, "$(user):calcExample$(no)") { field(DESC, "Counter No. $(no)") field(SCAN,"$(scan)") field(FLNK, "$(user):aiExample$(no)") ….

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan iocBoot/iocxxx  You can use the script “st.cmd” to start iocsh.  The commands to load database: dbLoadRecords dbLoadTemplete  A vxWorks st.cmd file looks like < cdCommands cd appbinld < iocCore ld < xxxLib cd startup dbLoadDatabase(“../../dbd/xxxApp.dbd”) dbLoadRecords(“../../db/xxx.db”,”user=mrk”) dbLoadRecords(“../../db/yyy.db”,”user=bob”) dbLoadRecords(“../../db/zzz.db”,”user=JO”) dbLoadTemplate(“../../db/templte_file_name”) iocInit

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan How to Get VDCT  Go “cosylab Visual DCT Web page”  DCT/  Then download  Latest Version:  *.zip file  VisualDCT.jar, VisualDCT-src jar, doc folder, runScript java -cp VisualDCT.jar - DEPICS_DB_INCLUDE_PATH=$EPICS_DB_INCLUDE_PATH com.cosylab.vdct.VisualDCT $*  In EPICS training CD, you can find it.  /opt/epics/extensions/src/VDCT/

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan Getting started: *.db file configuration w/ VDCT To Start up VDCT You can use runScript /opt/epics/extensions/src/VDCT/ *.dbd file in xxxApp/dbd directoory (or use vdct xxxApp/dbd/xxxApp.dbd)

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan VDCT Command Option Options: --dbd-file if this command is followed by the name of a.dbd file, the.dbd file is loaded before database is generated --enable-global-macros enables global macro evaluation --disable-global-macros disable global macro evaluation --enable-capfast enable production of hierarhical names like CapFast --disable-capfast disable production of hierarhical names like CapFast

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan VDCT Environment Variables  -DVDCT_DIR=  VDCT_DIR: Default working directory  -DVDCT_CONFIG_DIR=  VDCT_CONFIG_DIR: Default working directory for plugin  -DEPICS_DB_INCLUDE_PATH=  EPICS_DB_INCLUDE_PATH: Database directory  e.g.): java -cp VisualDCT.jar com.cosylab.vdct.VisualDCT - DVDCT_CONFIG_DIR=/users/devl/config/vdct test.dbd test.db

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan Example: Main Window of Visual DCT

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan Example: Keyboard shortcuts  Zoom  InShift + Right  OutShift + Left  SelectionShift + Space  Move  UpCtrl + Up  DownCtrl + Down  LeftCtrl + Left  RightCtrl + Right

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan Example: Record creation  On workspace, click right button  Select “new records…”  Or, Double click right button

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan Example: Record creation (cont’d)  Select the Record type  Define the Record name  e.g.) 「 $(user):ai 」  If name already exists it will report it

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan Example: Select Multiple Records  Way to select multiple records  Left button : Select first record  Ctrl +Left button : Select Multiple records  Drag left button : Select Multiple records

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan Example: Move Record  Move record  Select record  Drag left button and move to any location.

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan Example: Move Multiple Record  Move Multiple Record  Select mutiple records  Drag left button and move to …

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan Example: Link (FLNK)

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan Example: Link (FLNK)

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan Example: Link (INLINK)

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan Example: Alarm Level  You can define the Field related to alarm level.  HIHI, HIGH, LOW, LOLO, e.g.) field(HIHI, "8") field(HIGH, "6") field(LOW, "4") field(LOLO, "2") field(HHSV, "MAJOR") field(HSV, "MINOR") field(LSV, "MINOR") field(LLSV, "MAJOR") e.g.)

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan Example: Edit the Field Variables  Inspector Windows  Show/Edit Record Field Setting  Double click Active  Double click speed can be adjusted: ”View -> settings... ->Visual” menu  Object combo box  Show record name  You can change the selected record.  Property table  Show/ Edit: Field name and value  Select display order (Group/ ア Alphabetical/DBD definition Order )  Label: ”Value” and ”Name” are reversed!!!  Comment text area  Comment for Record  Status bar  Simple description for field functionality

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan Masanori Satoh/ KEK, Jan , 2009 for EPICS seminar at RRCAT, Indore Database Configuration tools Text editor and VDCT: Hands-on Instructions

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan Hands-on (0): Preparation for practice  Set environment variable:  USER=Pcname  export USER (*) PCname: your own PC name  Build EPICS application:  cd  mkdir app  cd app  makeBaseApp.pl –t example myExample  makeBaseApp.pl –i –t example myExample

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan Hands-on (1)  Start VDCT  cd /opt/epics/extensions/src/VDCT/ ./runScript  Select dbd file  xxx/app/dbd/myExample.dbd  Check the basic functionality  Create a new Record  Make the link

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan Hands-on (2)  Create two ai records and a calc record:  $(user):aitest1, $(user):aitest2, $(user):calctest1  Modify them so that $(user):aitest2 returns the value of “2x+3x”. (x: value of $(user):aitest1).  Save file as xxx/app/myExampleApp/Db/dbExample3.db  At the same place (under Db directory), modify the Makefile so as to add dbExample3.db.  Modify the xxx/app/myExampleApp/Db/userHost.substitutions.  e.g.) add the lines like file "db/dbExample3.db"{ { user = “PCname"}(*) Pcname is your own PC name. }  Type “make” under myExampleApp directory.  Check app/db/*.db files (Can you find dbExample3.db?)  Example of result:  caput PCname:aitest1 10  caget PCname:aitest2  50

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan Hands-on (3)  Create a record which counts up from 0 to 20, repeatedly, in dbExample3.db.  Edit Alarm level  HIHI: 18  HIGH: 15  LOW: 5  LOLO:2  Check it by “camonitor” command.  Hints:  See dbExample1.db file.

EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan Hands-on (4)  Try to create a Fibonacci progression record in dbExample3.db.  Fibonacci progression can be expressed by: F 0 =0, F 1 =1, F n+2 =F n +F n+1 e.g.) 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, …  Hints:  Use calc record, ai record