Presentation is loading. Please wait.

Presentation is loading. Please wait.

Useful LabVIEW 8.20 Features CS Workshop 2007 February 2nd, 2007 Holger Brand, GSI.

Similar presentations


Presentation on theme: "Useful LabVIEW 8.20 Features CS Workshop 2007 February 2nd, 2007 Holger Brand, GSI."— Presentation transcript:

1 Useful LabVIEW 8.20 Features CS Workshop 2007 February 2nd, 2007 Holger Brand, GSI

2 January 1st, 2007H.Brand@gsi.de 2 Contents Project Explorer Libraries Shared Variables Custom DSC IO Server –Periodic –OnChange Classes –Simple class hierarchy Online Tutorial: How to create and inherit from LVOOP classes –LVOOP Examples, Graphics.lvproj, Board Testing.lvproj –LVOOP DesignPatterns http://wiki.gsi.de/cgi-bin/view/NIUser/LabVIEWObjectOrientedProgramming http://wiki.gsi.de/cgi-bin/view/NIUser/LabVIEWObjectOrientedProgramming Referenced Object, Singleton, Agent Factory, Hierarchy Composition, Delegation, Aggregation, Specification, Channeling, Visitor XControls -> Talk of D. Beck

3 January 1st, 2007H.Brand@gsi.de 3 Project Explorer A Project contains all project resources –Documents *.vi, *.doc, *.html, *.c etc. organized in Folder and libraries –Hardware configuration Local hardware Remote systems – Documents » *.vi, *.doc, *.html, *.c etc. – Hardware configuration –Dependencies –Build Specifications A Project is an Application instance –closed shell or sandbox! –e.g. Queues with the same name are different in different application instances and do not know each other! - You can supply a project description an define condtional disable symbols

4 January 1st, 2007H.Brand@gsi.de 4 LabVIEW Libraries A Library defines a namespace – Like package in Java – So, different libraries can contain different VIs with the same name. – A Library-VI name is always automatically prefixed with the library name – A Library-VI is part of the owning Library and can not be opened without. It has a version numer, default icon, etc Library items can have public or private scope – Private items can be accessed from within the library only A library has its own DSC settings

5 January 1st, 2007H.Brand@gsi.de 5 Shared Variables I Successor of DataSocket variables Variable Types –Single Process Time stamped, Real-Time-FIFO –Network published Buffered, Bind to Source, e.g. OPC item, Single Writer, Real-Time-FIFO –Time-Triggered IEEE 1588-Standard, Deterministic Ethernet Data Types –All standard data types and array of them, Variant, Bit-Field –Custom Typedef Can be linked to DataSocket, OPC, ChannelAccess, Custom-IO Server Can have DSC properties: Scaling, Alarming, Trending, Security etc. Shared Variable are alway part of a LabVIEW Library

6 January 1st, 2007H.Brand@gsi.de 6 Shared Variables II Tools –Shared Variable Variable Manager, Multiple Variable Editor, Front Panel Binding Mass Configuration –DSC-Module Monitor Variables, View Historical Data Migrate: Configuration (.scf), Front Panel Security VI Based Server Wizard –On Input Change –Periodic Examples –Help->Find Examples...->Browse by Task->Fundamentals->Shared Variable-> Shared Variable Client – Server.lvproj –Help->Find Examples...->Browse by Task->Toolkits and Modules->DataLogging and Supervisory Control->Fundamentals->DSC Event Structure Demo.lvproj

7 January 1st, 2007H.Brand@gsi.de 7 Custom DSC IO Server I An I/O server is an application that communicates with and manages input/output devices such as programmable logic controllers (PLCs), remote input/output devices, remote Shared Variable Engines, and data acquisition (DAQ) plug-in devices. These servers read selected input items and write to the selected input items on demand.Shared Variable Engines The I/O server starts running when you deploy the project library that defines the server and stops when you stop or undeploy the project library.project library Applications can be used as OPC Server if the Installer includes the Shared Variable Engine

8 January 1st, 2007H.Brand@gsi.de 8 Custom DSC IO Server II You might want to create a custom I/O server in the following example situations: –You do not have an OPC server to handle communication between hardware and LabVIEW. Custom VI-based I/O servers can interface directly with the hardware and expose data items through the Shared Variable Engine. –You want to create a simulation server to emulate hardware connections. You can create two types of custom I/O servers: –Periodic I/O Server does not need controls or indicators on the connector pane is running continuosly –On Input Change I/O Server needs controls and indicators on the connector pane is called on change of input control value MyIOServer.lvproj –MyPeriodicIOServer, MyOnChangeIOServer, MyOnChangeDIMServer

9 January 1st, 2007H.Brand@gsi.de 9 Custom DSC IO Server III Periodic IO Server On Change IO Server

10 January 1st, 2007H.Brand@gsi.de 10 Simple Class Hierarchy 1.Create a new LV-Project: MyFirstClass 2.Create a new class: Automobile 1.Add Description 2.Edit Icons 3.Add Attributes: Number of Gears, Number of Doors, Make, Model 4.Add Methods: setAutoAttribute, getAutoAttribute, Start, Stop 3.Create Subclasses 1.Truck 1.Add Attributes: Short Bed?, Four Wheel Drive 2.Add Methods: setTruckAttribute, getTruckAttribute 2.Car 1.Add Attribute: Number of Seats 2.Add Methods: setCarAttribute, getCarAttribute 4.Create a Main.vi and use that classes


Download ppt "Useful LabVIEW 8.20 Features CS Workshop 2007 February 2nd, 2007 Holger Brand, GSI."

Similar presentations


Ads by Google