Nov
10

Unlimited parallelism & concurrency with recursive dataflow

by Tomi Maila, Nov 10, 2009 at 4:09 pm
1 Star2 Stars3 Stars4 Stars5 Stars (4 votes, average: 4.50 out of 5)
Loading ... Loading ...

In my previous post I introduced the design pattern of worker pool based on dataflow recursion. In this post the pattern is revisited. I explain the theoretical concept of unlimited parallelism and concurrency that is a consequence of recursion in dataflow based programming languages. Furthermore I present how worker threads can be reused to manage system resource consumption.

more…

Print This Post Print This Post

Nov
04

Worker pool – a design pattern for parallel task execution in LabVIEW

by Tomi Maila, Nov 4, 2009 at 2:00 pm
1 Star2 Stars3 Stars4 Stars5 Stars (6 votes, average: 5.00 out of 5)
Loading ... Loading ...

Creating parallel code in LabVIEW is simple; simply place parallel tasks parallel on VI block diagram and the tasks are executed in parallel. However this design doesn’t bend to use cases when the number of parallel tasks is not known at development time but needs to be specified at runtime.  In this post I present simple design pattern for parallel code execution based on recursion. In my next post I study the recursive concurrency in more detail.

more…

Print This Post Print This Post

Oct
23

Introduction to generic programming with type parameters

by Tomi Maila, Oct 23, 2009 at 1:28 pm
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Many modern programming languages implement generic programming support with the concept of type parameters. Generic programming using type parameters is the feature I have been missing the most in LabVIEW. Generic programming is about writing reusable blocks of code in terms of types that are specified in later time. In LabVIEW terminology type parameters would specify the type of wires and terminals of generic type. Type parameters can either be implicit or explicit. Implicit type parameters are determined by the compiler automatically where as explicit type parameters are specified by the developer. Furthermore type parameters can have variation limits, specifying what kind of type are accepted. Type parameters could be in principle applied to a VI, to a class, to a library, to a mixin class (trait), to an interface or any other kind of module that includes executable code or front panels. (EDITED Introduction & title 10/25/2009 9:36 GMT)

more…

Print This Post Print This Post

Sep
15

Limits of for-loop parallelism, how parallel they really execute?

by Tomi Maila, Sep 15, 2009 at 7:21 pm
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 4.00 out of 5)
Loading ... Loading ...

I was today attending LabVIEW Developer Education Day in Helsinki (Espoo), Finland. The NI application engineer was introducing the new parallel for-loop structure released in LabVIEW 2009. The idea is that a for-loop iterations can be run in parallel when the loop iterations do not depend on one another. The concept is nice and I have been waiting for NI to introduce such a concept for some years. I was positively surprised when I noticed that LabVIEW 2009 is shipping with this new feature.

more…

Print This Post Print This Post

Feb
26

Agile 4 – LabVIEW software consulting start-up from Finland

by Tomi Maila, Feb 26, 2009 at 11:14 am
1 Star2 Stars3 Stars4 Stars5 Stars (5 votes, average: 2.80 out of 5)
Loading ... Loading ...

Dear ExpressionFlow readers and fellow LabVIEW developers. I’m very excited to tell you, that recently I’ve founded a new Helsinki based company, Agile 4, providing LabVIEW software development related consultation services. Today, it’s time to come out of the shadows and public with the company.

Agile 4 Ltd. is a software design, development, and software strategy consulting start-up specialized in building state-of-the-art LabVIEW based technology solutions. We are comitted to providing our customers with the best possible software solutions and world class software expertise.

We at Agile 4 are enthusiastic about software development with LabVIEW. We want to help our customers succeed in their business environment by helping them to make the best possible software solutions for their market. We understand that software development is an investment and we think our customers should get the best value for their software related investments.

ExpressionFlow will continue to as a LabVIEW and visual programming blog. I’ll do my best to keep posting articles on subjects close to me and Agile 4.

For more information on the company, please visit Agile 4 website.

Print This Post Print This Post

Nov
02

Enhanced user experience with contextual error messages

by Tomi Maila, Nov 2, 2008 at 11:15 am
1 Star2 Stars3 Stars4 Stars5 Stars (4 votes, average: 4.50 out of 5)
Loading ... Loading ...

How many times you have seen an error message window to pop-up in an application giving you a meaningless error message and all you can do is to press “Ok” or “Cancel” without any idea where the error message was related to. At best the error message gives you some hint what was wrong and you may get back on track with the application. However once you close the pop-up, you no longer have the details of the error message to help you with fixing the problem. Do the applications you yourself have developed behave this way?

Well, things don’t have to be this way? On the contrary, you as a developer should design applications so that you never let your users to find  themselves in situations like this. It’s not only a benefit of the user, but also a benefit of you as a developer. Once your applications works fluently and gives your users intuitive feedback, you need to spend much less time for the user support and you’ll have much more time for your most important tasks.

One way to increase the usability of your application is to avoid pop-up windows altogether and instead display contextual error-messages in-place as close to the actual point-of-problem as possible. For example, when you have a user editable string control, your application should display the error message right next to the string control and instruct the user right away fix the problem occurred.

more…

Print This Post Print This Post

Jul
07

Objects and Classes

by Tomi Maila, Jul 7, 2008 at 7:10 am
1 Star2 Stars3 Stars4 Stars5 Stars (9 votes, average: 4.44 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

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 (8 votes, average: 5.00 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

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

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.40 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

My bloody valentine download movie Ronin download movie My big fat greek wedding download movie Ken park download movie My bloody valentine download movie Ronin download movie My big fat greek wedding download movie Ken park download movie