Jump to content

Tomi Maila

Members
  • Posts

    849
  • Joined

  • Last visited

  • Days Won

    9

Posts posted by Tomi Maila

  1. QUOTE (crelf @ May 16 2008, 05:39 PM)

    It can't gaurantee determinism, but do you need to display the movie through LabVIEW? Could you just launch media player and play it as an avi or the like?

    Well, we have tried. Windows Media Player is everything else but deterministic, at least under XP. It may be that the playback is better under Vista, at least MS claims so. We need to synchronize the playback with measurement and that's how LabVIEW needs to be involved at somelevel. Our LabVIEW application needs to know which frame is being played...

    Maybe the few ms accurancy is actually not what we need but we need to get less than a frame duration accurancy, if only possible. We can use LV realtime, if it just supports deterministic video output. Expensive PXI system could be overkill though for the application we are thinking. It should be rather cheap to reach the audience.

  2. Hi,

    We've to write a medical application that needs to display video (a long sequence of pictures) on a LCD/CRT screen or a projector in deterministic manner. No frames may be skipped, the timing of the frames needs to be exact within about a few ms accurancy. I tried to google about determinism of video signal but couldn't find much anything. I tried to browse NI products but no-one talks about determinism of the video output. I tried to look for the specifications of PC graphics cards but also there is no information about the determinism of the graphics cards. We experimented a little with a Windows PC running LabVIEW and it seems that some frames of image sequence get skipped for still an unknown reason.

    Does anyone have experience on deterministic video displaying. Any suggestions to any direction?

  3. QUOTE (neB @ May 15 2008, 03:39 PM)

    For the application I have in mind to try out the LVOOP technology, the array version rather than the stacked version will probably fit my needs better.

    Just quickly now... The recursive case is a "must" when you don't know in advance the type of the nodes in your recursive data structure. In array case your nodes are always of the same type and the recursion from one node to next happens in the same way always. However there are cases when the recursion itself may depend on the node. Then it's easier to represent such a recursive data structure with some sort of tree or graph where each node of the tree or graph can be of different type. Only the nodes know how to recurse the tree or graph further so you cannot represent the data structure very well with any predefined format. Also recursion trought the data structure is easier with call recursion rather than any other method.

    As an example think of drawing of arbitrary shapes, where some but not all shapes can contain subshapes. For example to draw a house one needs to draw many windows and a door. To draw a window, one needs to draw some squares etc. However, to draw a square, one only needs to draw a square and nothing else. The simplest way to represent a shape house is as a collection of subshapes. To draw a house, one simply draws all subshapes. As subshapes can contain further subshapes, the drawing of the house ends up to be a task where the recursive data structure "house" is recursed with call recursion of method Draw.

    Ben, I'm sure you will learn LVOOP... after a year you'll be answering LVOOP questions here and on NI forums. :)

  4. The only way to get the right clone instance of right dynamic dispatch VI to a subpanel is to ask the VI reference or the clone name from the dynamic dispatch VI itself. First assume you have a class hierarchy with multiple dynamic dispatch VIs of the same name in the hierarchy. Any one of those VIs can be called when the dynamic dispatch VI subVI node is executed so you cannot use static linking to some specific VI. Also, if the dynamic dispatch VI is reentrant, then also any clone instance of any of those dynamic dispatch VIs in the hierarchy can be called when the dynamic dispatch VI subVI node is executed. As a result, you cannot use open VI reference based linking to any specific VI unless you also know the VI clone name. The only way you can get either the VI reference or the clone name is to ask the dynamic dispatch VI being executed to return it to you somehow while it executes. You can for example use a single element queue to pass the VI reference asynchronously from the dynamic dispatch VI to the calling VI. At least that's what I would do.

  5. QUOTE (Val Brown @ May 14 2008, 08:37 PM)

    2. Anyone know of any way to fix a corrupt 8.5.1 lvproj file?

    Val, what way do your lvproj files get corrupted? The project files are xml files and are rather easy to edit with a text or XML editor such as freely available Microsoft XML Notepad. One thing you can try to do is to remove the "items in memory" section from the lvproj file or if that doesn't help then all the dependencies.

    ps Are you using LV Classes?

    Tomi

  6. QUOTE (neB @ May 13 2008, 07:42 PM)

    The figures on the image have a certain order as layers from the bottom to the top of the image. The figures on higher layers can exist on top of figures on lower layers. Therefore the figures need to always be drawn in order i.e. you simply cannot change the color of some figure by redrawing it and ignore all other figures as this would make the drawn figure to appear on the top.

    In this example I would do the color change the following way.

    - Iterate trough the Picture stack to see which figures are selected. To iterate the stack, use a method similar to Picture.lvclass:Draw.vi which iterates the stack and draws each item in the stack.

    - For each selected item in the stack, call the set color method to set the color of that item

    - Then call Draw method for the whole stack, the whole picture will be redrawn (do not undraw, it's more complicated)

    QUOTE (neB @ May 13 2008, 07:42 PM)

    2) If I wanted to allow the user to click on a previously drawn object and change it to a different shape, how can I use the click coordinates to figure out which of the objects it goes with?

    Create a selection tool in a similar way to the other drawing tools. For the Mouse Down method of the selection tool, iterate the picture stack the same way as above from top to bottom to see which item was clicked. The way I would do it is to add a new dynamic dispatch method to graphics object class for checking if this particular object was clicked. Then implement the method on each of the shape classes. The method would return true if the click occurred on the item. Then when iterating the stack, class this method for each item in the stack. The first item this method returns true would be the one that was clicked on.

    QUOTE (neB @ May 13 2008, 07:42 PM)

    3) Your examples keeps the shapes in what appears to be a stack that you add to or remove from. How does LVOOP let me get at arbitrary shapes with out popping them of the stack?

    You can use array instead of the stack. I used the stack to show how data and call recursion work in LVOOP. If your items are in a stack, you need to iterate trought the stack. There are no references. However memory wise, LabVIEW can iterate the stack in-place. However, if you use recursive calls to iterate the recursive data structure, you end up having many clones of your iteration methods in memory. At least as long as AQ decides to implement something called tail recursion. Last time I asked, the answer was it won't be implemented anytime soon.

    Tomi

  7. Hi,

    When developing with large LVOOP projects or small LVOOP projects with lots of class dependencies clicking save all button (Save all this project) is disaterous. LabVIEW consumes tens of minutes on my dual core laptop doing something on a project that does not contain any changes. What does LabVIEW do when I click the save all button? Why does it actually do something even when nothing has changed. The same thing does not happen if I use Shift + Ctrl + S (Save all) instead.

    The following screen capture is from my laptop when LabVIEW has been not responsive for the last 10 minutes. LabVIEW consumes all of the processor power of another processor. Luckily I've two of them and LabVIEW compiler is not multithreaded.

    EDIT: Is this the same process that occurs when one tries to close LabVIEW OOP project and LabVIEW takes tens of minutes to close?

    post-4014-1210584179.png?width=400

  8. QUOTE (ancle @ May 12 2008, 02:25 AM)

    The Drawing Tool example application can be downloaded from this link. If you are logged in to ExpressionFlow.com, you'll see a download button. If you are not logged in, you'll see the notification below.

    604.7 KB
    You must be logged in to download this item!

    Please
    or
    now.

    To proceed with the download, you need to have an expressionflow user account. The user account is free and anyone can register.

  9. QUOTE (Aristos Queue @ May 8 2008, 09:47 PM)

    Today, I am working from home. I have my Mac Pro laptop... and a stable build of an unreleased version of LabVIEW.

    Did you get a mac at home so you would have a good excuse to every now and then test the macintosh build of LabVIEW at home ;)

  10. QUOTE (Aristos Queue @ May 8 2008, 04:20 PM)

    Are there any objections from you if DevDays presenters in other cities use material from your presentation? If not, I'll add it to my "list of resources for presenters" that I keep getting asked for.

    My general principle is that my presentation material cannot be copy-pasted to a presentation of someone else. However, under certain circumstances I can allow using my presentation material; when a clear attribution to expressionflow.com is used when the material is presented, I can consider allowing the usage of the material. However, this should be agreed with me as by-case basis.

    EDIT: If you are interested in aquiring the right to use the material in NI presentations, you should contact me directly.

    Tomi

    • Like 1
  11. Yesterday I was giving a presentation titled Software Development with LabVIEW Object-Oriented Programming at NIDays in Finland. As part of the talk, I prepared Drawing Tool, an example application that utilizes LabVIEW Object-Oriented Programming and tries to introduce several LabVIEW Object-Oriented Programming techniques. It is a simple drawing application for drawing various shapes of different colors on a drawing area. The application is based on a state-machine where the state of the application is presented with several LabVIEW objects. The application demonstrates how a simple state machines based application can be created using LabVIEW classes as state parameters.

    post-4014-1210251069.png?width=400

    ALERT: The intention of the application is to show various LVOOP features and programming techniques. To make the application easily understandable to LVOOP beginners, I used architectural choices that make the application more readable rather than more sophisticated and easier to extend. So the example application is not intended as a guide how to develop LVOOP application but merely as an example introducing how several LVOOP techniques can be used in application development.

    Download Drawing Tool

    Download the NIDays presentation slides

    • Like 1
    • Sad 1
  12. CAR #106982, a development time LVOOP type propagation bug resulting into broken wires, when interconnecting LabVIEW class wires between multiple shift registers in a circular manner.

    Workarounds: 1) use a single shift register with cluster of class types instead or 2) typecast the class wires to the class itself using to more generic primitive immediately after left hand side shift registers.

    Tomi

    post-4014-1209757649.png?width=400

  13. We can specify Mechanical actions for buttons such as Latch when released. The value of the button is reverted when the control value is read. However when using event structure with value change event with latch when released button, the value of the button doesn't revert back to original when reading the new value terminal of the event structure. Instead the control needs to be placed inside the event structure.

    Does anyone know why does the reading of the new value input not revert the state of the button? I've been wondering it for ages. In general the control BD terminal cannot be used to read the value of a control within an event structure as in general there may be multiple value change events in the event queue and the control terminal always returns the value of the latest value change and not the value change being handled by current event case. If the events are not properly handled in order, a state of the program may become inconsistent with the user actions. Instructing users to use the latching button terminals withing event structure guides users to bad programming habits that may result in bugs when used with fastly varying controls.

  14. QUOTE (rolfk @ Apr 24 2008, 08:32 AM)

    That was my first reaction when reading the OP. Does it handle Little Endian and Big Endian TIFF files alike given that it was tested on a Mac only :-)

    The code tries to handle the byte order issue but it seems that at least in this one place I fixed, it was ignored. There may be other byte order bugs as well, I only used one type of TIFF image to test the code.

    Furthermore, be careful when using this code in a parallel application. The library uses LV global to specify the byte order of a single file. If multiple files with different byte orders are read in parallel, the code will fail. This would be rather easy to fix, but I didn't fix it yet. Maybe I will in a month or so as I need to start reading TIFF files for a project.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.