Download presentation
Presentation is loading. Please wait.
Published byGervase Harrison Modified over 9 years ago
1
01-Feb-2007Dietrich Beck, GSI LabVIEW DIM-Interface Motivation Event and DIM Basics Idea of LV-DIM Interface Example Performance
2
01-Feb-2007Dietrich Beck, GSI Motivation Large Distributed Systems: One would like to get rid of node names as much as possible. –nodes might change or are replaced –processes might migrate from node to node –where is myResource? Need to avoid central bottle-necks. –peer-to-peer connections required –management of many connections can be tedious Required –full bandwidth of Ethernet –short latency time Can't use protocols or TCP/IP implementation provided by NI
3
01-Feb-2007Dietrich Beck, GSI Bad Example: CS commands prior to 3.00 LabVIEW message queue or notifier CallerCallee node1 node2 Client_node2Server_node1 LabVIEW TCP/IP or(!) DIM TCP/IP
4
01-Feb-2007Dietrich Beck, GSI Event basics an entity waits for the next event, no polling! timeout handling is an important issue publisher subscriber client receiver observer pattern: "one-to-many" command pattern: "many-to-one" data command example: radio, television added in CS 3.0 example: typical human communication sole possibility for CS < 3.0
5
01-Feb-2007Dietrich Beck, GSI DIM Distributed Information Management: www.cern.ch/dimwww.cern.ch/dim Maintained at CERN and available via GPL. Thanks to C. Gaspar et al. originally developed at DELPHI@LEP/CERN around 1991 available for a multitude of platforms and languages light-weight, aiming at high performance, based on TCP/IP today: "backbone" of control systems for LHC experiments concept: named services, peer-to-peer connections DIM server A DIM server B DIM client 1 DIM client 2 service "i" service "ii" command "iii" DIM name server (negotiates connections)
6
01-Feb-2007Dietrich Beck, GSI Concept of "Named Services" A DIM service is identifier by its name. A DIM service may exist only once within a DIM domain (If a DIM server tries to declare a service that already exists, the server is excluded from DIM.). Once declared, a service has a fixed type and size (except command services). A DIM service can be removed and re-declared. When subscribing to a service, the DIM client neither needs to know the name of the DIM server nor the node name. Once subscribed, DIM automatically (re-)connects the client to the service or informs the client if the service is not available. In mixed environments (little/big endian), DIM takes care about byte and word swapping.
7
01-Feb-2007Dietrich Beck, GSI Example for a C/C++ Application DIM dll/so, C. Gaspar, CERN myApplication "serve by routine" –myApplication provides and registers callback functions to DIM –DIM executes callback functions of myApplication "serve by buffer" –myApplication provides memory and registers addresses to DIM –DIM writes/reads to/from memory of myApplication uses write/read memory uses callback functions
8
01-Feb-2007Dietrich Beck, GSI Using DIM with LabVIEW Difficulties: –LabVIEW does not allow direct execution of code from external applications (VI Server is not performing enough) –using shared memory would require polling Solution: DIMWrapper library written in C –provides callback functions for DIM –callback functions copy data received from DIM to a LabVIEW message queue or notifier –LabVIEW applications receive data from DIM via message queue or notifier
9
01-Feb-2007Dietrich Beck, GSI New (!) LabVIEW-DIM interface DIM dll/so, C. Gaspar, CERN (dedicated patch for LabVIEW) DIM Wrapper dll/so, GSI LVEvent dll/so, GSI LabVIEW runtime engine, NI LabVIEW application "serve by routine" only using call back functions with DIM uses "native" DIM libraries (no re-write) client and server functionality for commands and services DIMWrapper (and LVEvent dll) are required to make use of the DIM callback functionality
10
01-Feb-2007Dietrich Beck, GSI Server Example
11
01-Feb-2007Dietrich Beck, GSI Client Example
12
01-Feb-2007Dietrich Beck, GSI DimWrapper Example: Change for CS commands LabVIEW message queue or notifier CallerCallee node1node2 Client_node2Server_node1 LabVIEW TCP/IP CallerCallee node1node2 old: new: or(!) DIM TCP/IP
13
01-Feb-2007Dietrich Beck, GSI Performance LabVIEW-DIM Interface
14
01-Feb-2007Dietrich Beck, GSI Conclusion Pros LabVIEW-DIM interface provides excellent performance no longer care about node names based on robust and well established protocol using pre-compiled binaries (no re-implementation in LV) Cons no longer pure LabVIEW requires experience with message queue or notifiers requires use of "typecasts" Outlook DIM-XControls for LabVIEW 8.20 (tomorrow, D. Beck) DSC-IO server for LabVIEW 8.20 (tomorrow, H. Brand) slight changes of LVEvent library for LabVIEW 8.20 probable
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.