Download presentation
Presentation is loading. Please wait.
Published byMary Owens Modified over 9 years ago
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 BACnet for EPICS Database Configuration Tool Rod Nussbaumer | ISAC Controls | TRIUMF
2
January 13 2010BACnet for EPICS Database Configuration Tool Introduction BACnet produces large datasets –Not easily managed as flat-file data Synchronization between discrete components required Dedicated tool good for special tasks Looks similar, but not part of bacnet4linux HTTP interface
3
January 13 2010BACnet for EPICS Database Configuration Tool Purpose Trim large BACnet database to useful subset Build EPICS runtime Dbs Build EPICS Operator screens –EDM (.edl format files) All elements built from common database –Aids synchronization
4
January 13 2010BACnet for EPICS Database Configuration Tool Components Postgresql database server Apache HTTP server –Perl CGI: bacnetDb.pl –Perl helper modules: EdlBuild library –bacnetDb.css stylesheet BacnetDbCreate SQL scripts –bacnetDbCreate1.sql –bacnetDbCreate2.sql
5
January 13 2010BACnet for EPICS Database Configuration Tool Interface Views 3 Views, somewhat hierarchical –Device List view –Device Detail (Object List) view –Administrative Info BACnet Devices are Parents of BACnet Objects BACnet Devices may be Parents of other Devices Devices may be local (routers) or remote
6
January 13 2010BACnet for EPICS Database Configuration Tool Device-List Summary View Provides drill-down to Device detail –Device detail is collection of Objects Provides Drill-down to Admin screen Provides Top-level functions –Create XML and DB –Create EPICS Screens and Menus
7
January 13 2010BACnet for EPICS Database Configuration Tool
8
January 13 2010BACnet for EPICS Database Configuration Tool Device Detail (Object List) View Per BACnet device summary All BACnet objects Allows 'subscription' per object –will/won't be included in EPICS interface Builds Device-level EDM panel –Grid of Analog and Binary objects –(slide to follow)
9
January 13 2010BACnet for EPICS Database Configuration Tool
10
January 13 2010BACnet for EPICS Database Configuration Tool Admin Page Configure file and filesystem details Import un-distilled BACnet XML database Setup EPICS Elements
11
January 13 2010BACnet for EPICS Database Configuration Tool
12
January 13 2010BACnet for EPICS Database Configuration Tool Using the Tool Understanding the hierarchy –BACnet devices are two-tiered Top-tier devices are parent to other devices –Second-tier devices are parent to BACnet Objects EPICS record per Object relationship Not all Object type are EPICS-supported Not all Objects are 'interesting'
13
January 13 2010BACnet for EPICS Database Configuration Tool Using the Device-List Page Shows All top-tier Objects –'Local' Devices Select which top-tier Devices to monitor –Toggle the 'Activate/Remove' buttons –Unsubscribed Devices 'browned out' –Unsubscribed devices excluded from EPICS and bacnet4linux runtime Drill down to Second-tier Device Object lists –Click 'Modify' button per Device
14
January 13 2010BACnet for EPICS Database Configuration Tool Using the Object-list Page (1 of 2) Page shows all BACnet Objects that are parented by one BACnet Device Individual objects can be subscribed or unsuscribed by clicking the respective 'Subscribe/Unsubscribe' buttons Group subscription/unsubscription by Object Type –Buttons at left of screen
15
January 13 2010BACnet for EPICS Database Configuration Tool Using the Object-list Page (2 of 2) Build an EDM panel containing all subscribed Objects –1. Enter EDM filename in text entry box –2. Click 'Write OPI Page' button –File written to configured directory (Admin Page description explains, below) Navigate up to main Device List page –Click 'Show Devices' button at top left of page
16
January 13 2010BACnet for EPICS Database Configuration Tool Using the Admin Page (1 of 4) OPI Output Dir –Where the tool will write EDM '.edl' files EPICS DB Output Dir –Where the tool will write the EPICS runtime database '.db' file XML Output Dir –Where the tool will write XML files for use by bacnet4linux XML Source Dir –Where the tool reads full discovery XML files
17
January 13 2010BACnet for EPICS Database Configuration Tool Using the Admin Page (2 of 4) EPICS DB Scan period –How fast the EPICS database will scan –Applied universally to all records EPICS Record prefix –A prefix that will be applied to all EPICS record names, followed by a colon –Also used in lower case to prefix all EDM files and EPICS database filename
18
January 13 2010BACnet for EPICS Database Configuration Tool Using the Admin Page (3 of 4) XML Import –Reads full-discovery XML database –Eligible files selected from pull-down –Takes some time set up Apache server to allow slow CGIs –In httpd.conf, Timeout 300 works at TRIUMF –Attempts to remember old settings per Object No configuration 're-do's
19
January 13 2010BACnet for EPICS Database Configuration Tool Using the Admin Page (4 of 5) Button 'Use Config' –Accepts all Text entered in Text-input fields and stores to 'config' database table Button 'Dismiss' –Return to Device-List page without saving Button 'Reset' –Reloads original values into all fields IPCMSG/BACNET Device Support Index –Lowest Index number to use in the EPICS device support address fields (value positive, arbitrary)
20
January 13 2010BACnet for EPICS Database Configuration Tool A Peek Under the Hood All implemented in Perl as CGI Postgresql backend database Uses TRIUMF supported EdlBuild Perl modules –Default TRIUMF Look&Feel –Easily locally configurable Old database tables copied to date- stamped backups
21
January 13 2010BACnet for EPICS Database Configuration Tool Installation and Setup Install Apache webserver –Configure for long timeouts of CGI processes (3-5 minutes) –Note Apache user ID (for Postgresql access) # # Timeout: The number of seconds before # receives and sends time out. timeout 300 Copy Perl code to cgi-bin/ –bacnetDb.pl, BACnet/*.pm, Copy bacnetDb.css to html/
22
January 13 2010BACnet for EPICS Database Configuration Tool Installation and Setup Install Postgresql –Use 'bacnetDbCreate1.sql' and 'bacnetDbCreate2.sql' to initialize database First, edit to create desired database name, and database user name (from apache setup) Start 'psql', and do – '\i bacnetDbCreate1.sql' – '\c yourdatabasename' – '\i bacnetDbCreate2.sql'
23
January 13 2010BACnet for EPICS Database Configuration Tool Postgresql Setup Edit database name
24
January 13 2010BACnet for EPICS Database Configuration Tool Postgresql Setup Edit user id
25
January 13 2010BACnet for EPICS Database Configuration Tool Run Attach web browser to URL: –http://bacnethost.your.lab/cgi-bin/bacnetDb.plhttp://bacnethost.your.lab/cgi-bin/bacnetDb.pl
26
January 13 2010BACnet for EPICS Database Configuration Tool Using psql It is possible to use Postgresql console 'psql' tool to configure database –Faster than many point & click iterations –Requires some SQL knowledge –Requires some understanding of the underlying database 3 tables model BACnet hierarchy –devices, objects, properties 'config' table for Admin purposes
27
January 13 2010BACnet for EPICS Database Configuration Tool Example psql session bacnet001=# bacnet001=# UPDATE devices SET use = 't' where id = 700; UPDATE 1 bacnet001=# UPDATE devices SET use = 't' where id = 600; UPDATE 1 bacnet001=# UPDATE objects SET subscribe = 't' where type = 0; UPDATE 429 bacnet001=# UPDATE objects SET subscribe = 't' where type = 1; UPDATE 72 bacnet001=# UPDATE objects SET subscribe = 't' where type = 3; UPDATE 51 bacnet001=# UPDATE objects SET subscribe = 't' where type = 4; UPDATE 301 bacnet001=# UPDATE objects SET subscribe = 't' where name like '%SETPOINT%'; UPDATE 0 bacnet001=# UPDATE objects SET subscribe = 't' where name like '%Setpoint%'; UPDATE 250 bacnet001=#
28
4004 Wesbrook Mall | Vancouver BC | Canada V6T 2A3 | Tel 604.222.1047 | Fax 604.222.1074 | www.triumf.ca Thank You! Merci!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.