Jul
07

Objects and Classes

by Tomi Maila, Jul 7, 2008 at 7:10 am
1 Star2 Stars3 Stars4 Stars5 Stars (4 votes, average: 4 out of 5)
Loading ... Loading ...

I’m very excited to announce a new ExpressionFlow Studio video series that will concentrate on LabVIEW software development. The first episode starts an ExpressionFlow Studio series introducing to LabVIEW object-oriented programming. The topic of the day is introducing the concepts of objects and classes.

Download Drawing Tool example presented in the video

Print This Post Print This Post

Forum discussion Forum discussion

Jun
02

Extending LabVIEW-built applications with LVOOP plugins

by Tomi Maila, Jun 2, 2008 at 8:27 am
1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5 out of 5)
Loading ... Loading ...

There are numerous reasons why you would like to allow your LabVIEW application to be extended with plugins. First you may want to allow your customer or a third party to add some new functionality to your application. LVOOP plugins provide a way for you to allow third parties to extend your application. Second you may want to separate the built and development process of the core application from the development process of the features of the applications. With OOP projects LabVIEW development environment slows down dramatically as the number of classes gets too high. It may be wise to separate your application so that only the core elements form the main application and all other elements are provided as add-on components. Third you may want to control the memory footprint of your application and specify at runtime which components are loaded into memory; there is no need to keep the code for unused features in memory. Consider for example that your application supports multiple file formats or device drivers. You can load the needed file format plugins or device drivers on demand into memory at runtime. more…

Print This Post Print This Post

Forum discussion Forum discussion

May
16

Fighting Corruption: Using Source Code Control Systems (SCC) with LabVIEW Class Files

by Omar Mussa, May 16, 2008 at 3:22 pm
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 out of 5)
Loading ... Loading ...

I started to write this article in June 2007 and a recent post on LAVA made me realize that it may still be of use :)

National Instruments (NI) has provided LabVIEW developers native OOP support (LVOOP) since LabVIEW 8.2. Users of LVOOP can quickly build single inheritance ByValue object hierarchies that are very powerful. However, there are a few corruption issues related to LVOOP that have made me realize that without SCC I would be getting nowhere on my current LVOOP project. I think these principles also apply more generically to all LabVIEW project files.

There are several hurdles that will basically ruin your day when developing in LVOOP without a good backup system in place. SCC systems provide backup and version control for all of the files that you modify during the course of development which allows you to revert your code to a known state when your files get corrupted. SCC systems basically allow you to take snapshots of your project so that you can revert your code at a very granular level should the need arise. Using SCC should be important to anyone who wants to be able to work on code which means this document applies to solo-developers and not just people working on development teams. There are no excuses for not using an SCC system!

more…

Print This Post Print This Post

Forum discussion Forum discussion

May
07

Tomi’s NIDays 2008 Presentation

by Tomi Maila, May 7, 2008 at 12:01 am
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

NI Days logo
I’m giving a presentation on LabVIEW Object-Oriented Programming at NIDays 2008 in Helsinki today. The presentation is titled Software Development with LabVIEW Object-Oriented Programming. The slides for the presentation as well as the presentation related example application can be downloaded below.

Download NIDays 2008 Presentation Slides


Drawing Tool 1.0

604.7 KB
You must be logged in to download this item!
Please login or register now.

Discussions in English | Finnish

Print This Post Print This Post

Forum discussion Forum discussion

Mar
18

ExpressionFlow opens discussion forums in affiliation with LAVA

by Tomi Maila, Mar 18, 2008 at 12:45 pm
1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 5 out of 5)
Loading ... Loading ...

EF_LAVA_balloons

I’m very excited to announce, that to celebrate its first anniversary, ExpressionFlow opens discussion forums in affiliation with the world’s number one independent LabVIEW community LAVA (LabVIEW Advanced Virtual Architects). The new forums will provide ExpressionFlow readers a rich environment for lively discussions and a convenient channel for ExpressionFlow product related support requests.

All our readers can participate in discussions on ExpressionFlow forums. A free LAVA user account registration is required. Anyone with an existing LAVA user account can already participate in the discussions on the forums.

To navigate to the ExpressionFlow forums, click on the forums tab on the top menu just below the ExpressionFlow logo. I welcome all ExpressionFlow readers to participate in the lively discussions on the ExpressionFlow forums.

Print This Post Print This Post

Forum discussion Forum discussion

Mar
18

ExpressionFlow celebrates its first anniversary

by Tomi Maila, at 11:56 am
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

EF_balloon3 Exactly one year has passed since my first post to ExpressionFlow on March 18th, 2007. The first year has been very exciting. My first initial intention was to found a blog as a channel to publish my LabVIEW and visual programming related concepts and ideas. I started by introductory posts on then recently released LabVIEW object-oriented programming [1,2,3,4,5]. On May 2007 long time LabVIEW veteran Rolf Kalbermatter from CIT Engineering joined me as an author and posted an extremely interesting article series External code in LabVIEW [6,7,8]. On July the number authors grew by one as Anthony Lukindo from MezIntel joined the ExpressionFlow authors. Also he has posted very interesting articles on using MS SQL Server with LabVIEW [9,10] and on LabVIEW queued state-machine architecture [11]. On July I posted my first video blog post LabVIEW Object-Oriented Programming Introductory Walktrough. The article comparing Erlang and LabVIEW concurrency models was a success and got a rather nice position on Reddit Programming. Inspired by this success ExpressionFlow recently released Active VI Toolkit that provides Erlang style concurrency model for LabVIEW developers.

I would like to thank all ExpressionFlow readers and authors for this tremendous year. I hope you have enjoyed the past year as much as I have. I wish you enjoyable moments with us for the forthcoming year.

Tomi Maila
Editor in Chief

Print This Post Print This Post

Forum discussion Forum discussion

Feb
29

Active VI Toolkit public alpha - Erlang style message passing concurrency toolkit for LabVIEW

by Tomi Maila, Feb 29, 2008 at 4:54 pm
1 Star2 Stars3 Stars4 Stars5 Stars (5 votes, average: 4.4 out of 5)
Loading ... Loading ...

Active VI Toolkit logo ExpressionFlow today announced a public alpha release of Active VI Toolkit, an Erlang style message passing library for development of concurrent LabVIEW applications. The toolkit provides easy-to-use LabVIEW language abstractions for writing concurrent applications based on message passing between parallelly executing VIs. ExpressionFlow Active VI Toolkit greatly simplifies the authoring of highly concurrenct LabVIEW applications.

Download now!

Background

A few months ago I compared the LabVIEW and Erlang concurrency models in my article Two Paths to Concurrency - Comparing Erlang and LabVIEW. Whereas Erlang concurrency model provides means to write highly concurrent highly scalable applications, LabVIEW dataflow model allows very easy ways to write concurrent applications taking advantage of a few processor cores.

Active VI Toolkit is a research project, whose aim is to find the best way to fit Erlang style concurrency model into LabVIEW so that LabVIEW developers can take advantage of both concurrency models depending on their needs. The main design goal in the development of the toolkit so far has been simplicity of use. To reach this design goal, the toolkit tries to utilize existing LabVIEW language aspects as well as possible; the intention is not to reinvent the wheel.

The Active VI Toolkit consists of two modules, the Active VI Toolkit module and a One-Time Store module. Active VI Toolkit module provides language abstractions for message passing whereas One-Time Store module provides language abstractions for returning values as response to received messages.

Active VI Toolkit basics

The Active VI Toolkit is based on a concept of parallely executing VIs (LabVIEW functions) called Active VIs. When a new Active VI instance is created, the connector pane connected controls are initialized in exactly the same way as in a normal subVI (function) call. When an Active VI instance is created, a new thread is spawned that will execute the Active VI. Or to be more precise, a new parallel VI is executed that will call the Active VI.

After the Active VI has been initialized and started, it can usually execute some internal initialization procedures and then start waiting for messages in a loop. The messages can be send to the Active VI with a Send Message to Active VI node. The messages are identified by label and type of some wire connected to type type input of the node. The messages are passed to Active VI as value change events of Active VI front panel controls and can received with a LabVIEW event structure.

When an Active VI needs to be stopped, it’s sent a special Close message with some timeout value using a Close Active VI node. If the Active VI cleanly closes within this timeout, the values of Active VI connector pane indicators are passed to the VI requesting the Active VI to close, otherwise the Active VI will be aborted.

The very basics of creating an Active VI, sending a simple message to an Active VI and Closing an Active VI can be seen in the figure below. The first node on the left creates a new Active VI instance from a strict static VI reference and initializes with string value expressionflow.com. The second node sends a message My Message of type I32 with value 7 to the Active VI. The third. node requests the Active VI to close with infinite timeout and returns the value of the error out indicator on the Active VI connector pane.

Creating, sending message to and closing an Active VI

Writing an Active VI itself is very simple. What is practically needed is some connector pane connected controls and indicators to pass initialization data and return values to and from the Active VI. In addition one needs some controls that define the supported messages and a event structure to handle the receiving of the messages. Usually one also wants to have a while loop to receive more than one message only. Nothing else is needed. A simple Active VI block diagram is illustrated in the figure below.

Basic Active VI block diagram

A basic library that ships with Active VI Toolkit is One-Time Store Toolkit. One-Time Store is a by-reference type that can store a single value of chosen type. It is very similar to a LabVIEW single element queue. However, once the value of the One-Time Store is set, it can never be modified again. In computer science terms One-Time Store is a dataflow variable. However I chose not to use this term as it might confuse LabVIEW users that usually think of dataflow in a little different way.

One-Time Stores can be used as place holders for asynchronous replies to sent messages. The figure below illustrates initializing an empty One-Time Store of string type and sending the One-Time Store reference to an Active VI within a message. After the message is sent, the sender can start waiting for a value of the One-Time Store to be set by the Active VI. In the figure the One-Time Store is immediately destroyed after the value is received. However this doesn’t need to be the case.

Using a One-Time Store as a place holder for a response from an Active VI

From Active VI point of view, replying to this message is simple. To respond to the sender only needs to set the One-Time Store value. Receiving the message in the above image and replying to it is illustrated in the image below.

Active VI responding to a message using a One-Time Store reference

Conclusions

In this post I covered the very basics of Active VI Toolkit. The Active VI toolkit is much more powerful a toolkit that is directly evident from this post. I left some aspects and properties of the toolkit out of this post and will discuss about them in my later posts. Also note that the Active VI toolkit is currently at alpha pre-release version targeted for mainly for concept testing and public discussion.

I’ll soon post follow-up articles on more advanced features of the Active VI toolkit. Meanwhile download the Active VI toolkit from and play around with it and provide us feedback. I especially appreciate feedback on the concept itself and how it could be made better.

Download now!

Print This Post Print This Post

Feb
01

Will Microsoft’s bid for Yahoo! have an affect on visual programming

by Tomi Maila, Feb 1, 2008 at 10:53 pm
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Today’s big news is that Microsoft made a $44.6bn takeover bid for Yahoo! And I thought Yahoo! was so 90’s.

If the deal goes ahead, will it have implications related the visual programming? We all know that NI is the leading developer of visual programming languages with its LabVIEW integrated programming language and development environment. However neither Microsoft nor Yahoo! have been completely quiet in this scene. Yahoo! has developed a domain specific visual programming environment Yahoo! Pipes for aggregating web feeds and other online information resources. Microsoft has developed a little similar tool, Mashup Creator, for their Popfly online web development environment. In addition Microsoft has a product called Microsoft Robotics Studio for robotics application development.

Even though the products of both Microsoft and Yahoo! are rather simple and restricted, they indicate that visual programming is slowly coming of age. However consolidation of services from the two companies doesn’t necessarily mean anything good for a minor field like visual programming. It’s very plausible that projects like Popfly and Pipes end up dead when giants like Microsoft and Yahoo integrate their organizations.

What do you think? Will Microsoft’s possible deal with Yahoo! have implications in the field of visual programming?

Print This Post Print This Post

Jan
19

ExpressionFlow got a major facelift

by Tomi Maila, Jan 19, 2008 at 1:25 am
1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 5 out of 5)
Loading ... Loading ...

As you can probably see, ExpressionFlow got a major facelift today. Actually almost everything else except the content has been replaced. The most important changes are

  • ExpressionFlow now has a logo and an identifiable visual appearance of its own
  • The new theme being wider is more suitable for presenting images of visual code
  • The blog software WordPress has been upgraded to the latest stable version

As this has been a major upgrade, there may be some problems still needing fixing. If you notice something wrong with the site, please inform me by posting a comment. If you are not able to post comments, you can email me. The address is firstname at the domain name.

Print This Post Print This Post

Jan
07

Recursive Data Types in LabVIEW - making recursive data structures type safe

by Tomi Maila, Jan 7, 2008 at 4:15 pm
1 Star2 Stars3 Stars4 Stars5 Stars (4 votes, average: 5 out of 5)
Loading ... Loading ...

LabVIEW Object-Oriented Programming (LVOOP) was introduced in LabVIEW 8.20. LVOOP allows developers to build recursive tree-like data structures within LabVIEW dataflow model. Recursive data structures are enabled by allowing class private data members to be of ancestor class type. As ancestor class private data members can hold descendant class objects, recursive data structures are possible.

However LabVIEW doesn’t allow using recursive type structures where a type refers to itself. I present here that indeed building such types would be possible within the dataflow framework of LabVIEW. Such recursive types would allow building recursive data structures in more intuitive and type safe manner than what is possible with current LVOOP implementation.

more…

Print This Post Print This Post