ADE Rapid Application Development Environment based on LabVIEW For the LabVIEW expert training, I have hidden slide 4-6, 8-9, 14-15, 30. based on LabVIEW RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA Outline MTA Why RADE? The challenge Coping with large applications RADE today Hands On session RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA labview.support@cern.ch RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA The Challenge Linux Windows Mac GPN TN DB CMW RBAC Timing Files PLC DAQ OBSTACLES Different protocols, libraries, file types, hardware layers. -> To teach LabVIEW to understand them all? Different platforms (Windows, Linux, Mac) Different networks (GPN, TN) To make your LabVIEW application communicate with the accelerator, you have to go through all these obstacles. (It would be a maze without RADE :) ) RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA Initial Requirements Fast programming Rapid learning curve Drag and drop GUI development Wide range of analysis libraries Light/independent environment LabVIEW Integration with CERN infrastructures Applications that are developed rapidly, that can be easily maintained even though the implementation time is short. Two aspects: RADE based on LabVIEW (LabVIEW covers many of the requirements, but we need some more.) Light: no database declarations, no external libraries (everything encapsulated in LabVIEW) LabVIEW: all in one (no editor/compiler separately) RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA RADE Framework Training Support Templates Configuration files Documentation LabVIEW DB Files JAPC libs PLC CMW Java Based on LabVIEW (covers many of the requirements already) 1) Communication with different front-ends and protocols 2) To properly use the communication libraries, we have created templates, config files, help documentation 3) RADE offers you a space in nfs where to store your config files (centralized location in nfs) RADE Applications EN-STI-ECE-MTA
RADE Core Technology LabVIEW user application LabVIEW C/C++ shared lib Server Server Server 3 different mechanisms: 1) Natively in LabVIEW 2) Shared libraries 3) Connection to a server LabVIEW <-(HTTP)-> Tomcat server <-> Java services Next slide: what this architecture means to the user (it’s simple, just the beautiful LabVIEW palette) Java Java Java SDDS PLC MTA-lib RBAC RIO SQL TGM ALARM eLogBook RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA RADE Palette How the programmer sees RADE. RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA Outline MTA Why RADE? The challenge Coping with large applications RADE today Hands On session RADE Applications EN-STI-ECE-MTA
Coping With Large Applications “RADE phase one” resulted in complicated applications that had to be maintained. -> Next step was to take care of the applications. - Large applications, maintenance, multiple developer communication etc. Short-life applications (“We’re gonna use it just for a month”) becoming part of the infrastructure (totem, post mortem) Some times they changed to long-term application. They have to be maintainable. -> we needed development rules and ways to work - Programmer can change, protocols might change, etc. Many different ways to do the same thing RADE Applications EN-STI-ECE-MTA
Large Application Requirements Fast programming Rapid learning curve Drag and drop GUI development Wide range of analysis libraries Light/independent environment LabVIEW Integration with CERN infrastructures Source control and distribution Dedicated templates Applications that are developed rapidly, that can be easily maintained even though the implementation time is short. Two aspects: Animate new req. After existing RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA Source Control The main source control system at CERN is Subversion RADE Applications EN-STI-ECE-MTA
State Machine Template Several design patterns and concepts in the form of templates, adapted to RADE and CERN specific requirements RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA Development help RADE design patterns and templates LabVIEW Guides: cern.ch/enice/RADE-Guides Code review: make LabVIEW code beautiful Use templates -> create clean code RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA Outline MTA Why RADE? The challenge Coping with large applications RADE today Hands On session RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA RADE today RADE Applications EN-STI-ECE-MTA
Rapid Application Development Environment The RADE framework RADE: a safe harbour for your development! Tomber en RADE? NO! Rapid Application Development Environment
RADE Applications EN-STI-ECE-MTA LabVIEW & RADE Support labview.support@cern.ch cern.ch/labview cern.ch/rade Thank you for your attention ! RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA Outline MTA Why RADE? The challenge Coping with large applications RADE today Hands On session RIO: Live data from the front-ends RBAC: Role based access control SQL: CERN Database connections MTAlib and OpenG toolkits RADE Applications EN-STI-ECE-MTA
RADE Input/Output (RIO) Live data from the front-ends RADE Applications EN-STI-ECE-MTA
What is RIO? Client applications RADE Input/Output (RIO) InCA JAPC InCA CERN front-ends RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA JAPC or CMW? Which protocol to use: in GPN use JAPC not in GPN, use CMW DIP (Data Interchange Protocol) to transmit data from accelerator to experiments. JAPC and InCA could be replaced by DIP. Only publisher/subscriber. To get and set data CMW was implemented. Then we could think of JAPC as an extension for Java development. InCA JAPC RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA RIO: Basics 1. 2. 3. RADE Applications EN-STI-ECE-MTA
Get data from front-end RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA Set data to front-end RADE Applications EN-STI-ECE-MTA
Subscription to front-end data Put operation.vi in a loop Check for timeout and error RADE Applications EN-STI-ECE-MTA
RIO data types Field name in LV = field name of device Field type in LV = field type of device Japc2Lv_T2-abcopm02/Mixed: Field name Field data type D Double Bool Boolean C2D300 String [ ] I642D300 I64 [ ] [ ] C1D300 String RADE Applications EN-STI-ECE-MTA
Exercise Get, Set and Subscribe data on a CERN device Goal: Implement GET/SET/Subscribe operations for CERN device using RIO Toolkit. RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA Quiz 1 The device “PR.GSQDN1/CCV” has the following fields: lambdaX: I32 data: Double msg: String Which of the following Data Type is not correct? 1. 2. 3. 4. RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA Quiz 2 The device “PR.BPM/Setting” has the following fields: bucketBBB: I32[ ] bucketSelect: I16 gain: I32 Which of the following Data Type is not correct? 1. 2. 3. 4. This is a trick. All are correct. RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA Quiz 3 What is wrong with this VI? RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA Quiz 3 This VI is correct. RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA Outline MTA Why RADE? The challenge Coping with large applications RADE today Hands On session RIO: Live data from the front-ends RBAC: Role based access control SQL: CERN Database connections MTAlib and OpenG toolkits RADE Applications EN-STI-ECE-MTA
RBAC Role Based Access Control RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA RBAC Usage The token is stored by a numeric reference Valid until expired or destroyed Don’t store your password on the block diagram: Enter your password in a GUI at startup of your application RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA Outline MTA Why RADE? The challenge Coping with large applications RADE today Hands On session RIO: Live data from the front-ends RBAC: Role based access control SQL: CERN Database connections MTAlib and OpenG toolkits RADE Applications EN-STI-ECE-MTA
SQL CERN Database Connections RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA Query to Database RADE Applications EN-STI-ECE-MTA
LHC Logging and Measurement databases RADE Applications EN-STI-ECE-MTA
LHC Logging and Measurement databases Extracts statistics for a signal data: RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA Search signal names RADE Applications EN-STI-ECE-MTA
Exercise Extract data from LHC Logging DB Goal: Extract signal data from LHC Logging DB using the SQL_MA.vi RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA Quiz 4 Which VI is used to execute SQL queries for CERN databases? SQL.vi Where can we find it in the RADE palette? RADE -> SQL RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA Quiz 5 How to extract signal data from LHC logging Database? SQL-MA.vi -> lhclog RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA Outline MTA Why RADE? The challenge Coping with large applications RADE today Hands On session RIO: Live data from the front-ends RBAC: Role based access control SQL: CERN Database connections MTAlib and OpenG toolkits RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA MTA-lib OpenG: Community reviewed to a certain extent. One has to know that the VIs exist to use them. No performance guarantees. RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA OpenG community Non-NI LabVIEW community Several green “time-saving” VIs Many polymorphic VIs → build executable to improve performance Non-NI LabVIEW Communities: www.openg.org – Forum and wiki www.lavag.org – Forum and file repository - One of the few non-NI LabVIEW communities. You’d like to have something more in the MTA palette? -> Let us know RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA MTA-lib: Data Palette Variant: A container that can contain different data types. Great for generic programming, but can add overhead. RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA OpenG Use case: Variants containing generic data. RADE Applications EN-STI-ECE-MTA
MTA-lib: Array Palette RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA OpenG Use case: Array manipulation Remove Duplicates From 1D Array Filter 1D Array RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA OpenG Use case: Array manipulation Search 1D array Sort array RADE Applications EN-STI-ECE-MTA
MTA-lib: String Palette RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA MTA-lib: Time Palette RADE Applications EN-STI-ECE-MTA
RADE Applications EN-STI-ECE-MTA OpenG Use case: Wait/delay LabVIEW OpenG Additional functionalities: Wait on Error? Abort (optional) Also “Wait Until Next ms Multiple” RADE Applications EN-STI-ECE-MTA
MTA-lib: Application Control Fit front panel to largest decoration The right size front panel without effort ! RADE Applications EN-STI-ECE-MTA
www.cern.ch/rade
RADE Applications EN-STI-ECE-MTA Questions RADE Applications EN-STI-ECE-MTA