January 2009EPICS Seminar in Indore1 Practice SNL and Sequencer Tatsuro KEK January 2009.

Slides:



Advertisements
Similar presentations
January 2009EPICS Seminar in Indore1 Introduction to State Notation Language (SNL) Tatsuro KEK January 2009.
Advertisements

Epics Configuration Management Steve Hunt v1.0. Goals Maximize control system availability Minimize development cycle time Reduce risk.
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.
Shell Script Assignment 1.
1 2003/P571: IOC Development Environment EPICS IOC Development Environment with EPICS on Ubuntu Based on “IOC Development Envirnment” by Andrew Johnson,
January 2009EPICS Seminar in Indore1 Introduction to Display Manager MEDM & EDM Tatsuro KEK January 2009.
EPICS EPICS Seminar 2009, RRCAT, Indor Masanori Satoh, KEK Linac, Jan Masanori Satoh/ KEK, Jan , 2009 for EPICS seminar at RRCAT, Indore Database.
Dayu Zhang 9/8/2014 Lab02. Example of Commands pwd --- show your current directory This is home of venus, not your home directory Tilde: means you are.
March Ron McFadyen1 Command The command pattern encapsulates a request or unit of work into an object. An invoker will ask a concrete command.
Linux+ Guide to Linux Certification, Second Edition
Spring 2010ACS-3913 Ron McFadyen1 Command The command pattern encapsulates a request or unit of work into an object. An invoker will ask a concrete command.
Guide To UNIX Using Linux Third Edition
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
Using Macs and Unix Nancy Griffeth January 6, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex.
Intro to PHP at Winthrop CSCI 297 Scripting Languages Day One.
CprE 288 – Quick intro for compiling C in Linux
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
Input/Output Controller (IOC) Overview Andrew Johnson Computer Scientist, AES Controls Group.
ORNL is managed by UT-Battelle for the US Department of Energy EPICS State Notation Language (SNL), “Sequencer” Kay Kasemir, SNS/ORNL Many slides from.
SNL and Sequencer 1 Controls EPICS Training Class EPICS Collaboration Meeting SLAC State Notation Language (SNL) and Sequencer April 23, 2012 Kukhee.
1 1999/Ph 514: State Notation Language EPICS State Notation Language (SNL) Ned D. Arnold APS.
Linux environment ● Graphical interface – X-window + window manager ● Text interface – terminal + shell.
1 2001: Beijing State Notation Language EPICS State Notation Language (SNL) Ned D. Arnold APS (Ron Chestnut SLAC)
Guide To UNIX Using Linux Fourth Edition
Introduction to Unix (CA263) File Processing. Guide to UNIX Using Linux, Third Edition 2 Objectives Explain UNIX and Linux file processing Use basic file.
File Permissions. What are the three categories of users that apply to file permissions? Owner (or user) Group All others (public, world, others)
Linux+ Guide to Linux Certification, Second Edition
baltrad node installation for beginners On Ubuntu Jesper Ellerbæk Nielsen Aalborg University, DK.
Debby Quock November 13, 2012 IRMIS at CLS. IRMIS Currently at CLS PV Crawler –Perl modules that parse EPICS IOC st.cmd, db, and dbd files. Information.
Creating your first C++ program
HKOI 2012 TRAINING INTRO TO LINUX /CUHK/SHB123]$ date Sat Feb 18 13:00:00 HKT 2012.
File Permission and Access. Module 6 File Permission and Access ♦ Introduction Linux is a multi-user system where users can assign different access permission.
Linux Operations and Administration
Chapter Five Advanced File Processing Guide To UNIX Using Linux Fourth Edition Chapter 5 Unix (34 slides)1 CTEC 110.
SNS Integrated Control System A process manager for soft IOCS DH Thompson.
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.
1 1999/Ph 514: IOC Development Environment EPICS IOC Development Environment Marty Kraimer APS.
March 2008EPICS Meeting in Shanghai1 KEKB Control System Status Mar Tatsuro NAKAMURA KEKB Control Group, KEK.
Managed by UT-Battelle for the Department of Energy EPICS Sequencer Kay Kasemir, SNS/ORNL Many slides from Andrew Johnson, APS/ANL Feb
Slide 1 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking Task 2 Briefing The Design of a Computer.
EPICS Application Development At The Canadian Light Source Glen Wright.
Control System Overview J. Frederick Bartlett Fermilab June 1,1999.
Lesson 3-Touring Utilities and System Features. Overview Employing fundamental utilities. Linux terminal sessions. Managing input and output. Using special.
Introduction to compilation process March 24. The following slides will show you step by step instruction how to get ready and build C language programs.
1 1999/Ph 514: Lab #3A : SNL Lab#3B : Development Environment EPICS Lab #3a State Notation Language.
A Guide to SQL, Eighth Edition Chapter Six Updating Data.
Basic Unix Commands & GCC Saurav Karmakar Spring 2007.
EValid LoadTest, eV.manger and Validation. Agenda Load Test capability of eValid How to execute load test by using eValid Introduction to eV.manager Validation.
 Prepared by: Eng. Maryam Adel Abdel-Hady
 Prepared by: Eng. Maryam Adel Abdel-Hady
State Notation Language and the Sequencer Andrew Johnson APS Engineering Support Division October 2008 INFN EPICS Training.
Ubuntu Checklist. 1.Examine the ReadMe.txt file 2.Manage user and root passwords – sudo passwd change password of username –Change password policies in.
1 1999/Ph 514: Lab #2 : IOC Database EPICS Lab #2 IOC Database.
 CSC 215 : Procedural Programming with C C Compilers.
Solvency II Tripartite template V2 and V3 Presentation of the conversion tools proposed by FundsXML France.
CPSC 233 Tutorial January 21 st /22 nd, Linux Commands.
IOC Application Development / Debugging
Computer System Laboratory
Prepared by: Eng. Maryam Adel Abdel-Hady
Chapter 3 Maintaining Security
“Basic Linux/UNIX Command Line”
A brief history of EPICS
Shell Script Assignment 1.
Tutorial of shell script
The Linux Command Line Chapter 24
Working with Mac OS and Linux
Scripts In Matlab.
The Linux Command Line Chapter 24
Presentation transcript:

January 2009EPICS Seminar in Indore1 Practice SNL and Sequencer Tatsuro KEK January 2009

EPICS Seminar in Indore2 Preparation We use Ubuntu Linux with EPICS Live DVD for the practice. –After booting Linux, To avoid record name collision, set your PC name. USER=PCname Note: PCname : use your own PC name. export USER –Then, make your application directory ( ~/app/ ) and create a new application ( myExample ). cd mkdir app cd app makeBaseApp.pl –t example myExample makeBaseApp.pl –i –t example myExample –Edit ~/app/configure/RELEASE (If you are not familiar to Linux, use gedit command to invoke editor. #SNCSEQ=$(EPICS_BASE)/../module/soft/seq  remove “ # ” and append “ / ” SNCSEQ=$(EPICS_BASE)/../module/soft/seq/ –Then make cd ~/app make

January 2009EPICS Seminar in Indore3 Run sample program (1) You can find a ready-made sample State Program “ sncExample.stt ” in the ~/app/myExampleApp/src directory. Try to run this program as follows.

January 2009EPICS Seminar in Indore4 Run sample program (2) [Step1] Edit st.cmd –Edit ~/app/iocBoot/iocmyExample/st.cmd #seq sncExample,”user=PCnameHost”  remove “ # ” seq sncExample,"user=PCnameHost" [Step2] Run st.cmd script (iocsh) cd ~/app /iocBoot/iocmyExample chmod +x st.cmd./st.cmd

January 2009EPICS Seminar in Indore5 seqShow, seqChanShow [Step3] Try to type seqShow, seqChanShow commands in the iocsh and look at the output. epics> seqShow … epics> seqShow sncExample … epics> seqChanShow sncExample …

January 2009EPICS Seminar in Indore6 Prepare database (1) [Step4] Create a database file “seqPractice.db ” ( ~/app/myExampleApp/Db/seqPractice.db ) which contains following records. $(user):Vout calc record; SCAN “.1 second” CALC field is “(A<99)?(A+1):0” INPA field is “ $(user):Vout ” HOPR field is 100.0; LOPR field is 0.0 $(user):IndicatorLight bo record; SCAN “Passive” ZNAM field is “LightOff”; ONAM field is “LightOn” $(user):Switch bi record; SCAN “Passive” ZNAM field is “OFF”; ONAM field is “ON”

January 2009EPICS Seminar in Indore7 Prepare database (2) [Step5] Make the database. –Edit ~/app/myExampleApp/Db/Makefile DB += seqPractice.db  add this line –Then make cd ~/app/myExampleApp/Db make –Edit ~/app/iocBoot/iocmyExample/st.cmd dbLoadRecords("db/dbSubExample.db","user=PCnameHost") dbLoadRecords(”db/seqPractice.db”,”user=PCnameHost”)  add this line

January 2009EPICS Seminar in Indore8 Prepare database (3) [Step6] Run st.cmd [Step7] Create a medm display that shows your records. And then … –Add a strip chart on your display to monitor your $(user):Vout record. –Try to modify SCAN field of $(user):Vout record using your display.

January 2009EPICS Seminar in Indore9 Create a SNL program [Step8] Create a SNL program “ seqPracice.st ”. Start Light is off Light is on v > 60 Turn light on v < 50 Turn light off

January 2009EPICS Seminar in Indore10 program seqtest float v; assign v to "{user}:Vout"; monitor v; short light; assign light to "{user}:IndicatorLight"; ss volt_check { state light_off { when (v > 60.0) { /* turn light on */ light = TRUE; pvPut(light); } state light_on } state light_on { when (v < 50.0) { /* turn light off */ light = FALSE; pvPut(light); } state light_off } =/app/myExampleApp/src/seqPractice.st

January 2009EPICS Seminar in Indore11 Compile the new SNL Program [Step9] compile and prepare to run –Edit ~/app/myExampleApp/src/sncExample.dbd registrar(sncExampleRegistrar) registrar(seqtestRegistrar)  add this line –Edit ~/app/myExampleApp/src/Makefile myExample_SRCS += sncExample.stt myExample_SRCS += seqPractice.st  add this line –Then make cd ~/app/myExampleApp/src make

January 2009EPICS Seminar in Indore12 Execute SNL Program [Step10] Edit st.cmd and run it. –Edit ~/app/iocBoot/iocmyExample/st.cmd seq sncExample,”user=PCnameHost”  # seq sncExample,”user=PCnameHost”  add “ # ” seq seqtest,”user=PCnameHost”  add this line –Execute st.cmd and then check how it works. Watch the display. Use dbl, dbpr, seqShow, seqChanShow commands in the iocsh. camonitor …

January 2009EPICS Seminar in Indore13 Add New State (1) [Step11] Modify seqPractice.st as follows. –Add new state “ stopped ” –“ light_on ” state goes to “ stopped ” state when time expires (10.0 sec.). –“ stopped ” state goes to “ light_off ” state when sw becomes 1. (assign sw to “ {user}:Switch ”)

January 2009EPICS Seminar in Indore14 Start Light is off Light is on v > 60 Turn light on v < 50 Turn light off Stopped delay(10.0) Turn light off sw ← 0 sw == 1 (no action)

January 2009EPICS Seminar in Indore15 Add New State (2) [Step12] Compile and execute it. [Step13] Add some object on your display to control $(user):Switch record. [Step14] Check how it works. Its behavior depends on the SCAN period of $(user):Vout record. [Step15] Try any modification you like.