Console Application Programming Brian Hendricks. Getting Started On the web –New user help adcon.fnal.gov/controls/clib/new_user.html –Library help adcon.fnal.gov/controls/libraries.html.

Slides:



Advertisements
Similar presentations
Introduction to C Programming
Advertisements

Introduction to Visual Basic.NET Uploaded By: M.Sheraz anjum.
JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
Java Script Session1 INTRODUCTION.
Chap 2 System Structures.
The Web Warrior Guide to Web Design Technologies
Carl Schumann 1 June 2012.
© by Pearson Education, Inc. All Rights Reserved.
Chapter 5 Input/Output Clocks User Interfaces: Keyboard, Mouse Power.
VBA Modules, Functions, Variables, and Constants
MIRC Matthew Forest. Introduction mIRC itself is a program designed for text based messaging via the IRC (internet relay chat) protocol. (Link:
1 Case Study 1: UNIX and LINUX Chapter History of unix 10.2 Overview of unix 10.3 Processes in unix 10.4 Memory management in unix 10.5 Input/output.
CSCI 4550/8556 Computer Networks Comer, Chapter 3: Network Programming and Applications.
Linux+ Guide to Linux Certification, Second Edition
Chapter 7 Improving the User Interface
Creating a Console Application with Visual Studio
1 Semester 2 Module 2 Introduction to Routers Yuda college of business James Chen
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter Ten String Manipulation and Menus.
Infinity-project.org Engineering education for today’s classroom The Infinity Project SM LabVIEW for The Infinity Project.
Saving and Loading Simple Text Files A sequential file stores characters one after the other like songs on a cassette tape. New characters are added to.
A First Program Using C#
ACNET Alarms Brian Hendricks October 18, Alarm Types analog – simple comparison to minimum and maximum values single set of limits digital – nominal.
Introduction to Java Appendix A. Appendix A: Introduction to Java2 Chapter Objectives To understand the essentials of object-oriented programming in Java.
LabVIEW an Introduction
Java Programming, 3e Concepts and Techniques Chapter 3 Section 62 – Manipulating Data Using Methods – Day 1.
Each VI has 2 Windows Front Panel User Interface (UI) –Controls = Inputs –Indicators = Outputs Block Diagram Graphical Code –Data travels on wires from.
Diagnostic and Hardware Index Page Application Survey Brian Hendricks.
Week 7 Working with the BASH Shell. Objectives  Redirect the input and output of a command  Identify and manipulate common shell environment variables.
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Operating.
Chapter 1 Introduction. Goal to learn about computers and programming to compile and run your first Java program to recognize compile-time and run-time.
UNIX and Shell Programming (06CS36) Unit 1 Continued… Shrinivas R. Mangalwede Department of Computer Science and Engineering K.L.S. Gogte Institute of.
Chapter 19: Visual Lisp. After completing this Chapter, you will be able to do the following: What is AutoLISP Launching Visual LISP Terminology and Fundamental.
Linux+ Guide to Linux Certification, Third Edition
Fundamentals of GUI Programming. Objectives: At the end of the session, you should be able to: describe the guidelines that are used for creating user-friendly.
1 Programming in C Hello World! Soon I will control the world! Soon I will control the world!
Copyright © 2010 Certification Partners, LLC -- All Rights Reserved Perl Specialist.
Chapter 5: More on the Selection Structure Programming with Microsoft Visual Basic 2005, Third Edition.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
A first program 1. #include 2. using namespace std; 3. int main() { 4. cout
Virtual Instrumentation With LabVIEW. Front Panel Controls = Inputs Indicators = Outputs Block Diagram Accompanying “program” for front panel Components.
EPICS Release 3.15 Bob Dalesio May 19, Features for 3.15 Support for large arrays - done for rsrv in 3.14 Channel access priorities - planned to.
State Devices (The Untold Story) Brian Hendricks.
Copyright © 2003 ProsoftTraining. All rights reserved. Perl Fundamentals.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
4P13 Week 12 Talking Points Device Drivers 1.Auto-configuration and initialization routines 2.Routines for servicing I/O requests (the top half)
Introduction to Files in VB Chapter 9.1, 9.3. Overview u Data Files  random access  sequential u Working with sequential files  open, read, write,
Chapter 9: Completing the Basics. In this chapter, you will learn about: – Exception handling – Exceptions and file checking – The string class – Character.
Postgraduate Computing Lectures PAW 1 PAW: Physicist Analysis Workstation What is PAW? –A tool to display and manipulate data. Learning PAW –See ref. in.
Purpose of Operating System Monil Adhikari. Agenda Introduction Responsibilities of Operating System User Interfaces Command Line Interface Graphical.
Operating System Concepts Three User Interfaces Command-line Job-Control Language (JCL) Graphical User Interface (GUI)
Sem 2v2 Chapter 5 Router Startup and Setup. A router initializes by loading the bootstrap, the operating system, and a configuration file. If the router.
TBPM Front-End Software Design Review L.Piccoli April
Linux+ Guide to Linux Certification, Second Edition
Fermilab Accelerator Controls Console Introduction for Users Charlie Briegel Fermilab Controls Brian Hendricks, Jim Smedinghoff.
Chapter 5 Introduction To Form Builder. Lesson C Objectives  Use sequences to automatically generate primary key values in a form  Create lists of values.
Control System Overview J. Frederick Bartlett Fermilab June 1,1999.
Linux Administration Working with the BASH Shell.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
Exceptional Control Flow
Resource scripts.
Clocks, I/O devices, Thin Clients, and Power Management
Chapter 2: System Structures
Introduction to Operating System (OS)
An overview of the kernel structure
Introduction to Classes and Objects
DATA EXCHANGE.
Chapter 2: Operating-System Structures
Presentation transcript:

Console Application Programming Brian Hendricks

Getting Started On the web –New user help adcon.fnal.gov/controls/clib/new_user.html –Library help adcon.fnal.gov/controls/libraries.html Console introduction area (cns_intro) –Skeleton program –Help files

Development Environment Language is C MECCA –builds and archives code Libraries –CLIB –User libraries Program testing facility Skeleton program Example programs (W1-W7)

Guidelines Application style guide –describes user interface expectations in terms of both appearance and functionality –adcon.fnal.gov/controls/clib/application_style_guide.html Application programming guidelines –describes standard coding practices –adcon.fnal.gov/controls/clib/application_guidelines.html

MECCA Works on a single directory Handles compiling and linking Supports testing environment Archives operational code Simple command line interface –mecca/copy {program} (copy from archive) –mecca/dev {program} (build test version) –mecca {program} (build and release) Maintains history and keeper information

Libraries CLIB –Generic functionality –>2000 entry points –Runtime linking User libraries –Generally more specific functionality –Few hundred entry points –Statically linked –Maintained in MECCA

Testing Environment Z index page –Allows access to all users (unless protected) –Cleaned up at 3 AM every day –mecca/dev support it Debugger –Command line and windowed versions –Help at adcon.fnal.gov/controls/clib/intro_debugger.html

Testing Environment (contd) Redirection –Redirect data acquisition to a memory model Settings locks CLIB Peeker (D22) –View inner workings of CLIB routines DPM Peeker (D3) –View data acquisition requests

Skeleton Program Basic paradigm is infinite event handling loop Events are served by calls to ‘window_intype’ –Initialization (occurs once) –Periodic (15 Hz) –Keyboard (mouse clicks) –Termination (occurs once) Alternative is ‘window_intype_loop_c’

Program Skeleton Event Loop

A Word About ACNET Devices… Fundamental organizational block of control system information Configuration data in central database Power supply paradigm Consists of properties –smallest addressable unit of data –reading, setting, digital status, digital control, analog alarm, digital alarm Properties can be atomic values, arrays, or structures (default length vs. maximum length)

ACNET Devices (contd) Addressed by an 8 character ASCII name or an integer key called a device index ACNET device access protocols –RETDAT for reading properties –SETDAT for setting properties Setting property can be read as well as set Digital control property can only be set

ACNET Devices (contd) Devices can be grouped as families or linked as siblings Front ends return only “raw” data Scaling routines convert raw data to primary units (volts) or common (engineering) units Database dump program (D80) displays fairly complete information about devices

Database Dump Program (D80)

Anatomy of a Library Routine Help Entry Functional description of routine List of arguments with data types –{name}.{data type}.{passing mechanism} Description of each argument Description of returned status (if applicable) Required header file(s) Related functions Usage example

Anatomy of a Library Routine Help Entry (continued) Arguments having the type ‘.ch.d’ can be passed either by descriptor or by reference Arguments enclosed in square brackets are optional Default values of optional arguments should be listed –Zero is NOT the universal default value

CLIB Functional Groups dio_xxx – Data I/O –supports reading/setting devices –supports reading device database information –typically uses device index/property addressing –maintains usage/error statistics db_xxx – DataBase access –accesses relational database

CLIB Functional Groups (continued) window_xxx – alphanumeric window access –row/column addressing wn_xxx – graphic WiNdow access –views created in unitary coordinate system –each view has its own internal coordinate system error_xxx –displays/logs error and informational messages str_xxx – STRing functions –adds to C RTL string support

User Libraries ul_cbsaux – CLIB auxiliary routines –BPM support –GPIB support –waveform generator support ul_physlib – generic physics routines –contains ‘Numerical Recipes in C’ routines ul_model – lattice database access

User Libraries (continued) ul_pasa and ul_net – networking support ul_scopes – GPIB scope support ul_sequencer – Sequencer interface routines ul_windowlib –additional window_xxx routines ul_dialoglib – special user dialogs

BPMUTI Part of ul_cbsaux General BPM support for all accelerators Key routines –bpm_machine_c – select BPM system –bpm_get_data_c – read BPM data –blm_get_data_c – read BLM data –bpm_plot_data – makes BPM plots Based upon configuration database Supports BPM file system