Presentation is loading. Please wait.

Presentation is loading. Please wait.

Owned and operated as a joint venture by a consortium of Canadian universities via a contribution through the National Research Council Canada Propriété.

Similar presentations


Presentation on theme: "Owned and operated as a joint venture by a consortium of Canadian universities via a contribution through the National Research Council Canada Propriété."— Presentation transcript:

1 Owned and operated as a joint venture by a consortium of Canadian universities via a contribution through the National Research Council Canada Propriété d’un consortium d’universités canadiennes, géré en co-entreprise à partir d’une contribution administrée par le Conseil national de recherches Canada Canada’s National Laboratory for Particle and Nuclear Physics Laboratoire national canadien pour la recherche en physique nucléaire et en physique des particules Running BACnet for EPICS Using the System Rod Nussbaumer | ISAC Controls | TRIUMF

2 January 2010BACnet for EPICS Bacnet 'stack' Runtime Multi-step Procedure Discover full BACnet database – bacnet4linux snoops BACnet traffic – Stores specified XML database Prune database and generate synchronized component parts – XML for bacnet4linux, DB for EPICS, EDL for EPICS Acquire live data to EPICS

3 January 2010BACnet for EPICS Bacnet 'stack' Runtime Acquiring EPICS Data Start bacnet4linux with XML input Start EPICS with corresponding runtime DB Start EDM with corresponding menu & panels

4 January 2010BACnet for EPICS Bacnet 'stack' Runtime Bacnet4linux: discovery Specify output XML data file with -w commandline argument Monitor discovery process with HTTP interface – When all Devices are bright green, terminate bacnet4linux – Ctrl-C to shut down Observe graceful shutdown statistics on console

5 January 2010BACnet for EPICS Bacnet 'stack' Runtime Bacnet4linux Console A couple of screenshots of the bacnet4linux console – First is debug level 4 Very verbose and detailed – Second is debug level 2 Almost readable in real time Limited detail – Note timestamps Debug level set with HTTP Interface

6 January 2010BACnet for EPICS Bacnet 'stack' Runtime

7 January 2010BACnet for EPICS Bacnet 'stack' Runtime

8 January 2010BACnet for EPICS Bacnet 'stack' Runtime Prune the database TRIUMF BACnet reveals approximately 6500 Objects – Only 400 are interesting to Operations Use BACnet Web Tool (bacnetDb.pl) to import XML to relational database Subscribe to objects of interest Create Output XML, EDL, & DB files

9 January 2010BACnet for EPICS Bacnet 'stack' Runtime Run bacnet4linux with -r (read XML) argument to initialize Run EPICS IOC with corresponding runtime DB Run EPICS EDM with EDL Menu

10 January 2010BACnet for EPICS Bacnet 'stack' Runtime Starting bacnet4linux (1 of 2) bacnet4linux --help BACnet4Linux - Version 0.3.10 An Open-Source BACnet Protocol stack for Linux. Copyright (C) 2003 Greg Holloway BACnet4Linux comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. Usage:./bacnet4linux [options] -c# BACnet COV support (0=disable,1=enable) -C### BACnet COV lifetime (seconds) -D# debug level, larger is more verbose (0-9) -e# EPICS watchdog services (0=disable, 1=enable) -h### HTTP server port (0-65534) -I### Number of concurrent queries (invoke ids)

11 January 2010BACnet for EPICS Bacnet 'stack' Runtime Starting bacnet4linux (2 of 2) -m Mountpoint of virtual filesystem -q### Initial query delay (seconds, 0=disable query) -r Initialize device database from XML 'filename' (multiple -r's OK) -s### BACnet Sync Time Periodic (seconds,0=disabled) -w Write device database to XML 'filename' -x###-### eXclude devices except range ### to ### (multiple -x's OK) -d### BACnet device instance number (0-4194303) -e# BACnet Ethernet (0=disable,1=enable) -iname BACnet Ethernet interface name (eth0, eth1, etc.) -m### BACnet MS/TP port number (0-65534) -p### BACnet/IP UDP port number (0=disabled,1-65534,0xBAC0) -t### BACnet APDU timeout (seconds) -v### BACnet Vendor Identifier (0-65534) -V Returns the version information default settings: -c1 -C300 -D1 -h8000 -I1 -q5 -s0 -d2 -e1 -ieth0 -m0 -p47808 -t10 -v6

12 January 2010BACnet for EPICS Bacnet 'stack' Runtime A useful script for starting discovery $ DATE=`date "+%F"` $ sudo./bacnet4linux -p0 -c0 -D3 -I2 -d5551 -e1 -ieth1 \ -v1000 -wdiscovery"$DATE".xml Creates data-stamped XML file – 'discovery2010-01-22.xml' No COV subscriptions Useful console message verbosity

13 January 2010BACnet for EPICS Bacnet 'stack' Runtime Bacnet4linux args -v vendor ID – BACNet standard requires official vendor ID – At TRIUMF we made one up: 1000 -d device ID – B4l is a device – Choose arbitrarily large device ID – Use existing tools to learn device IDs a priori

14 January 2010BACnet for EPICS Bacnet 'stack' Runtime Bacnet4linux args -m mountpoint of virtual filesystem – Used in EPICS interface and for test & diagnostics – device/object/property hierarchy exposed as files during b4l runtime

15 January 2010BACnet for EPICS Bacnet 'stack' Runtime Bacnet4linux args -w & -r XML filespec for write/read – Mutually exclusive: write in discovery mode, read elsewise – (No whitespace between switch and filename argument)

16 January 2010BACnet for EPICS Bacnet 'stack' Runtime TRIUMF Runtime Config. EPICS-compatible runtime bacnet4linux -p0 -c0 -D2 -I2 -d5551 -e1 -ieth1 -v1000 -m/mnt/BACnet \ - r/usr1/local/epics/appl/bacnet/xml/trbac201001200650.xml Uses BACnet/ethernet on eth1 – Site-specific network arguments Exposes virtual filesystem at /mnt/BACnet/....

17 January 2010BACnet for EPICS Bacnet 'stack' Runtime Bacnet4linux HTTP Useful for browsing the BACnet Very useful for determining completion of discovery process – 'Devices' change color as discovery proceeds – All devices green indicates completion

18 January 2010BACnet for EPICS Bacnet 'stack' Runtime Discovery In Process A series of views of the discovery process taking place Left column shows BACnet Devices – Color changes as more is learned about Devices and their child Objects – Green indicates full discovery Two greens: subscribed and unsubscribed Objects & Devices

19 January 2010BACnet for EPICS Bacnet 'stack' Runtime Discovery startup. All Devices Red: Still finding devices

20 January 2010BACnet for EPICS Bacnet 'stack' Runtime Discovery progression. All Devices Orange: Now finding Objects

21 January 2010BACnet for EPICS Bacnet 'stack' Runtime Discovery progression. Some Devices Yellow: Device has found all Objects. Now finding Object Properties

22 January 2010BACnet for EPICS Bacnet 'stack' Runtime Discovery progression. More Devices Yellow: Discovering Object Properties Property Discovery. Object has Present-Value and Name properties

23 January 2010BACnet for EPICS Bacnet 'stack' Runtime Discovery Progression. All Devices Yellow: Discovering Object Properties for all Objects. More properties now found in object list.

24 January 2010BACnet for EPICS Bacnet 'stack' Runtime Discovery Complete. All Devices Green: All properties of all Objects now known.

25 January 2010BACnet for EPICS Bacnet 'stack' Runtime Discovery Complete. All Devices Green: Present-Value, Name, and Units properties shown for all Objects.

26 January 2010BACnet for EPICS Bacnet 'stack' Runtime Object Properties Frame loaded into separate browser window for easy refresh.

27 January 2010BACnet for EPICS Bacnet 'stack' Runtime Runtime Screens Screeshots of runtime views. – Using pruned XML file and populating EPICS device-support interface. – Only subscribed Objects are displayed

28 January 2010BACnet for EPICS Bacnet 'stack' Runtime

29 January 2010BACnet for EPICS Bacnet 'stack' Runtime Runtime Object List. Only Subscribed devices.

30 January 2010BACnet for EPICS Bacnet 'stack' Runtime Building bacnet4linux Prerequisites: – libfuse Filesystem in USErspace http://fuse.sourceforge.net/ – libexpat Expat XML parser library http://expat.sourceforge.net/ – libpthread POSIX threads library Probably supplied by default with Linux

31 January 2010BACnet for EPICS Bacnet 'stack' Runtime Building bacnet4linux Build: – Unpack tarball – Edit Makefile Select IPCMSG Seeds MOUNTPOINT_SEED_0 must be existing directory at b4l runtime – make Fast to build, < 1 min. – Runtime binary = bacnet4linux

32 January 2010BACnet for EPICS Bacnet 'stack' Runtime Building EPICS BACnet 2 Packages – BACnetSupport EPICS device-support Creates BACnetSupport library – BACnetApp Sample BACnet application Uses BACnetSupport Lib. Install in the usual EPICS way – Edit configure/RELEASE to specify localizations

33 January 2010BACnet for EPICS Bacnet 'stack' Runtime Building EPICS BACnet BACnetApp sample EPICS startup script – Edits required: sh-bang line BACnet VFS mountpoint – per b4l -m switch IPCMSG Seeds – per b4l Makefile EPICS db file – From database config tool EPICS CA config – per local requirements

34 4004 Wesbrook Mall | Vancouver BC | Canada V6T 2A3 | Tel 604.222.1047 | Fax 604.222.1074 | www.triumf.ca Thank You! Merci! Good-bye


Download ppt "Owned and operated as a joint venture by a consortium of Canadian universities via a contribution through the National Research Council Canada Propriété."

Similar presentations


Ads by Google