Saturday, November 13, 2010

Complex data interface in LabVIEW

As I posted before I’m doing an application to manage and control data acquisition from some specific instruments. The application have some tabs with different controls and indicators and in the background have a very complex data flow that have been processing as fast as the computer can. All this data must be showed to the user but with the smallest amount of resources.

In LabVIEW it’s easy to implement a refresh routine to shown data. It’s easy as:

imageThis basic loop puts data into a control every iteration, but as you can see is not controlled in time or in valid data at the input. Of course this loop takes all the processor and resources of the system.

How about this solution?:

image

Ok, as you can see it’s a much more smart solution, didn’t it? It have a strong synchronization not only with the data flow (because of the notifier used) it have a minimum refresh interval that can be configured. An the case structure avoids the write of not valid data. This is a better implementation for data interface update, I'm not absolutely sure that is the best, because depends of the application, but is quite good.

Now I want to show my problem and my solution.

When I started to develop Lightbox I have a huge problem: A lot of different interfaces must be showed to the user only when they are needed. My first design consist on a hard and big galaxy of cases and loops. It was unreadable, and I’m sure that uses a lot of resources.

I improve the system with the next solution that I think it’s much more dynamic and light.

The interface:

image image

Let’s think that the interface has some controls in two tabs because it’s the same information but with different representations process. Also we have a very fast data flow in the background that has being processing in parallel.

Ok, the representation of a graph is much more heavy than the numeric indicators, but this two representations doesn’t need to be done at the same time because the user can’t see both together. (Think in too much tabs and more complex data right now… It can be a chaos!!)

What we can do?… Dynamic events, you can synchronize the update instructions with the next system:

image image

It’s quite complex for basic purposes, but when you have a big application it’s good:

  • The program only update the values when the user are seeing it.
  • The refresh time can be dynamically defined if you want. It can depends on the user, other vi’s that calculates the power of the PC or something like that.
  • The update is done as fast as the system look at the event structure.
  • In some complex cases you can use all the possibilities of the timed loop structures to prioritize or dynamically control the system. (Think about a terminal program to show results that gets data from a shared variable in a network. This system can also control the usage of the network or thinks like that).

Here end’s this post. I hope that you meet it useful… What do you think?

Tuesday, November 9, 2010

Firefox 4.0 Beta

imageWell, some weeks ago I started to use Firefox 4.06 Beta, and I’m very happy with it. It’s too similar to Crome, but is what the people want. Firefox is elegant and fast with pages, but it’s slow at the opening. In my computer (I5, 4GB of ram, nvidia 9500) takes 4 seconds to open the program with some complements, and there is a white window during the opening…What the hell is that?!

Some days ago the Mozilla team have launched the 4.07 Beta. It’s really awesome! Some bugs have been solved like the previous one. But also the interface has changed a little bit:

THERE IS NOT AN STATUS BAR! Why it’s an advantage? Well, a navigator must be like the air. The only purpose of these programs is to show as fast as it can pages. The navigator must show to the user the minimum information, because the focus is the page not the navigator. Crome implements this idea very well, but the Google empire frightens me and I decide not use it.

The new interface is clear and user friendly. Only shows the information when needed. For example, the new interface show the link information at the right of the address bar only when the mouse it’s over a link (like Crome). The reload bottom it’s embedded into the address bar and is the reload and cancel button only when needed.

image

As strong points in Firefox 4.07b  we have a very good support to html 5, webGL and direct2d to improve speed and functions. All the improves are in the Mozilla page.

I think that this navigator is a big step for every Firefox user. What do you think?