Jump to content

LAVA 1.0 Content

Members
  • Posts

    2,739
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by LAVA 1.0 Content

  1. Brian's BLOG is at http://detritus.blogs.com/lycangeek/ or you could contact him via his LAVA profile I looked at your code, and saw nothing unusual about it. Keep us up to date as you learn more...
  2. Something like this? http://members.lycos.co.uk/sgctek/motor.html
  3. If your problem is this easy, you should be easily able to use brute force to compute all possible routes and then choosing the best alternative. Start by dividing time into segments so that around 10 objects fits into one segment (I think brute force for ten is managable if not go to smaller number). For each segment determine all possible routes. The speed of your sensor limits the amount of possible routes quite a lot so you should't really get too many possible routes. You don't have to consider all possible routes, you can limit to those rotes where your camera either stays where it is or moves at maximum speed to either of the directions. In addition the movement between two objects can be centered in time so that the movement happens in halfway of the two object the sensor crosses. Below there is one example of such route. If you then compute all possible this kind of routes using brute force for each time window, you get close to optimal route. You can optimize this route by allowing the windows to overlap so that in the middle of previous window you change strategy to the that of the next overlapping window. At the limit where the the temporal length of the window increases to infinity and the overlapping of two consequetive window is near to total you get best possible route, I think you get optimal existing route of all possible routes in the route-space. If you want something more theoretical, try to check out this http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm
  4. If I recall correctly there was a LabVIEW OOP demo at NI Week on August about identifying objects using LabVIEW OOP. Maybe you can try to get the implementation of this demo into your hands, that may help you to identify the objects. Of course it may very well be that the demo really was just a demo with nothing real behind the scenes as it often is the case.
  5. It was unclear to me what do you know of the system at runtime. The moving speed of the camera is probably known. How about the positions of the items, do you know it or do you have to use the cam to find the positions out? Do you know the number of items, the speed of the belt, the distance of the items along the belt or anything like that? The problem depends really on what you need to be able to do. If you have a very fast moving camera and you already know all the positions of all the objects, then you don't really need to do anything. Just hover above one item at a time for constant time and then move to next one. I assume however that this is not your case, so what is it?
  6. I assume that quite many of you LAVA forum members have been somehow acquainted with patenting related issues. I'm not totally new to the field either. Previously I however worked for a large corporation which had its own patenting policy and I didn't really have much part in what happened to the applications after I worked with one of the patent offices named by our company. Now I'm in a new position, I've to find out how to protect inventions we have made. I have an experience that patent offices are really not equal in their competence and in the quality of the applications they write. Writing the application by oneself is really not that difficult but there are all those little things you should really be aware of to guarantee as good a protection as possible. First I was wondering in which countries should one apply a patent for an invention. An innovation officer at our university really couldn't help in this issue at all. Many companies seem to apply for a patent in U.S., Europe, Japan and Canada. I was wondering if this is really enough as it seems that for example China and India are really large markets in the next 20 years the patent will be valid. Second I was wondering what would be the best way to apply international patents. One can apply via World Patent Office or via European Patent Office or directly via national patent offices. The process seems quite laborous especially when the patent is applied in every country separately. Does anybody have experience and recommendations on this field. Third if you guys have good experience on good patent offices, well almost anywhere, I appreciate your recommendations. The office should have special skills in patenting software and computer system innovations. The reason I ask this is that I'm not really that trusting in connections local patent companies have to other international patent companies. It may be benefitial to connect the companies directly, get better application and save money.
  7. Well, according to uncertainity principle of quantum mechanics, you should already at least partially be there (or it depends on your wave (step) length and walking speed).
  8. These three files are three of the classes i.e. .lvclass files. These three files are among those 151 files already saved previously, so I wasn't exact enough in my sentence. Also two files from vi.lib belong to these 151 files. I assume the unsaved ones are the 4 polymorphic VIs. 151 saved files + 4 unsaved polymorphic + 1 unsaved lvlib -> 154 files in project + 2 files in vi.lib.
  9. I've a LabVOOP 8.20 project with very odd behaviour. When I open the project and close it immediately LV claims that the project has unsaved changes. When I use "Explain Changes" to view the changes, they are following: For three static method VIs belonging to three different classes (root, childA & childB) the changes are VI recompiled. SubVI call(s) modified. For two classes (root & childA) the changes are following Name or location of items in the file system changed. The private data control for this class changed. If I then select Save all, LabVIEW still claims that one of the classes (childA) still has unsaved changes and asks me to save the class. Both the root clas and childA class have an array of objects in their private data cluster. Root refers to an array classes in another hierarchy and childA refers to an array of class root to allow tree structure. There is a third class baybyC which also has an array of root as private data but the problems seem no the be related to that class; however I do not yet use that class in any of the VIs. When I open the project and press Save All, LV saves five files. When I press Save all again, LabVIEW saves one file. When I press save all third time, LV doesn't save any more files. My project has 154 files including 1 lvlib library, 4 typedefs, 4 polymorphic VI encapsulating static class methods, 18 classes, 126 class methods inlcuding static, dynamic and override methods and 1 top level VI. Everything else except the top-level VI are part of one of the classes in the class hierarchy. Everything belongs to a single lvlib library mentioned above. When I open the top-level VI and press ctrl+shift+run, LabVIEW compiles all the VIs (?). If I then press Save All, LabVIEW saves 151 files. When I press Save all again, LV saves 3 more files. When I press save all the third time, LV has nothing to save. If I close the project now and reopen it, LV has again unsaved changes as described above. If I manually open each and every VI front panel and then press ctrl+shift+click on the top level VI, the behaviour is exactly the same, i.e., the odd behaviour is not due caused by the fact that there would be some VIs that were not in memory. I thought the odd behaviour would be caused by calling class methods using call-by-reference node. So I removed this and replaced it with stack recursion, but the odd behaviour still remained. Any clues what could cause this odd behaviour? Is LabVIEW functioning as expected or is there something weird in the behaviour as I expect. This same project has shown corruptive behaviour, I don't know if this corruptive behaviour and crashing is related to this same odd behaviour or something else. As a conclusion I expect this odd behaviour to be related to using tree structure in classes root and childA so that childA refers to an array of root class in its private data cluster. When I compile all, the compilation process probably doesn't understand this recursive structure and therefore compilation isn't complete even after pressing Ctrl+Shift+Run.
  10. If one of the five dimensions would be time, and you consider time to behave as it does now, then you would only have four spatial dimensions left to deal with. Perhaps your computer would have three dimensional screen trying to display projections of four dimensional objects. Your LabVIEW programs would be three dimensional as well and nodes would be boxes. Instead of wires, you'd have pipes connecting the cubes. Front panel would be a shell around your block diagram so that you could really see your front panel connecting to your block diagram by zooming trough the front panel surface. The fron panel doesn't of course need to be flat, it can be any surface connected to your block diagram with pipes. When you debug your program you would of course see the data flowing inside the hollow pipes. Additional dimension would make your programs really more like spagetti with some meat cubes mixed in. LAVA would hold yearly programming competition on who can create a program that looks most like spagetti.
  11. Can the destructors be called recursively? High-performance recursion is what I need, reentrancy without recursion is useless for this use case.
  12. I keep talking to myself as it seem nobody takes part in to these discussions I try to initiate. Consider the following problem. You have an object that needs closing, because it may contain a reference to a file or something similar. So how do you deal with it? LabVOOP doesn't have destructors and if I have understood correctly LabVOOP will not have destructors for classes anytime soon if ever. So you have to write your own destruction method that takes care of object cleanup. How to implement such a destruction method. In order to cleanup the object to the following. Close all resources such as files and database connections etc Close all private member objects Call parent class destructor Your destructor needs to be dynamic VI so that the correct destructor gets called for each object. So your destructor first cleans up all the non-object stuff such as closes files that has been opened. Then it needs to call destructor for all member objects if they have destructor. In general member objects of course do have destructor so these need to be called. Last a "call parent method node needs to be called so that also parent class objects get correctly cleaned up. So this is a general procedure that applies to any class that may need cleanup. As your destructor needs to be dynamic VI, it cannot be reentrant and even if it could recursive calls cannot be made in LabVIEW. So you may easily run in trouble when cleaning stuff up if your object hierarchy has recursive data structures. Consider for example that you object that refers to a file system object (my standard example). It has subclasses file and folder. As files and folders have a operating system handle, this handle needs to be closed for each opened file and folder. So you need to have a destructor for you file system object class and it's decendent classes file class and folder class. Consider now that you have an open folder which has another folder inside it and this folder has a file inside it. So the directory structure looks the following: C:\DataMyFile.txt You try to use LabVOOP to encapsulate such a structure. So you use the following class hierarchy to represent file system. File System ObjectFolder (Array[File System Object]) File Where expression (Array[File System Object]) means that Folder refers to zero or more subobjects of class File System Object. File System object has a Dynamic VI "Close.vi" to handle cleanup. File and Folder classes both have an override VI "Close.vi" overriding parent method. So what happens when we call Close.vi for the object "C:\". It needs to clean up it's member objects. So how to do this? Call close for each member objects. So in order to cleanup properly Folder class object "C:\" needs to call close for Folder class object "Data". This however is not possible as the call would be recursive. Nasty, isn't it? I'm facing this very problem of closing a file hierarchy. How to implement it properly? I have no idea of any good solution. I think LabVIEW 8.0 without recursive calls was managable. LabVOOP without recursive calls to dynamic VIs is fatally handicapped as stack based recursion cannot be used since the whole class hierarchy is not know in general during the development time of the root class. Therefore the developer of the root class cannot know what kind of stack recursion algorith he should use to take care of all possible uses of the class.
  13. I've had troubles with the following kind of recursive call acrhitecture (see attachment). The class structure is of course much more comlicated and constantly changing. However, the problem seems to be realted to the addition of this kind of recursive call to the project. The project may get corrupted, LabVIEW may start behaving strangely by claming that there are unsaved changes in files that are just saved. There are crashes and freezees. And all this is very hard to replicate each time until the project already is somehow corrupted. Aristos, should this structure work with LabVIEW or does your intuition tell that there is something wrong with this. I admit I do not close VI references but LabVIEW seem to close them as the VI exits, so it shouldn't case the problems... Download File:post-4014-1164235857.zip
  14. I can replicate it from my home computer, Windows XP Pro SP 2, AMD Athlon XP 3200+, 1GB mem, Radeon 9550, LV 8.20. I cannot replicate it on my work laptop, Windows XP Pro SP 2, Intel Pentium M 1.6Ghz, 1GB mem, Mobility Radeon 9000, LV 8.20. Both computers have LabVIEW 8.20 loaded from NI web site and installed using same serial number. Both computers have Windows XP installed from same installation media. Both computers have F-Secure Anti-Virus Client Security, although the version at my home computer is 6.01 and laptop 6.00. In both cases I extracted the Brian's ZIP on a New_Notifier_Problem_v3 folder at my Windows Desktop. EDIT: The bug is INI file dependent, I copied my INI file to the other computer and it triggered the bug. I attatch the INI file that can trigger the bug. INI is in the attached ZIP. Download File:post-4014-1164231624.zip
  15. I think you should use a Notifier. Create a notifier with a data type of boolean. Wire the Notifier reference to the producer and consumer loops. In the Producer loop, place a Wait for Notification with a timeout of zero (default is -1, or FOREVER! not what you want). You can OR the output of the Wait on Notification with your Stop control to exit the Producer loop. In the Consumer loop, you place a Send Notification primitive, wire the reference, and use your stop condition logic to send a True to the producer. The Producer will read the notification, the producer loop will exit, the Release Queue that Aristos mentioned will invalidate the refnums and the consumer loops will "error out". I noticed you are converting the data to a variant and also using named queues. In the example you provided, this is a lot of overhead. Change the datatype of the queue to an array of doubles, then get rid of all the variant conversions. Instead of naming and retrieving the queues, just pass queue refnums into the loops; In your example you are actually obtaining a reference to the queues every time you send the data ... 45 minutes of data while creating TWO references every 125 ms is something like 21,000 refs! I tried to edit and post, but I've run out of time (have to buy my turkey!). Here is a picture of your code and my suggestions (not tested just the idea...) Your original My suggestions
  16. I can now get it crash every time. Unzip. Make sure LabVIEW is not running? Double click on the project. Open Notifier class branch from the project explorer. Double Click Wait for Notification Dynamic.vi. Press Ctrl + E to show block diagram. Put your mouse cursor on the right half of the wire connecting Notifier Class in and Notifier Class out and wait for vanish... Brian, you are left handed, aren't you? EDIT: Even easier method to get crash (LabVIEW vanishes). Make sure LabVIEW is not running. Double click "Wait for notification Dynamic.vi" from Windows explorer. Click ok for warnings. Front panel appears. Press Ctrl+E. Put your mouse cursor on the right half of the wire connecting Notifier Class in and Notifier Class out inside the case structure and wait for vanish... Does it work for anybody else? I shall call this vaporizer bug. (Vaporizer was used in Space Quest 3 to vaporize stuff, especially content of waste basket...)
  17. It's unrealistic to expect NI R&D leaders to make their developers to rewrite existing code. From a business decission point-of-view there simply is not enough proof that the current method is not working. So that decission will not be made. If the current implementation later on prooved to be total catastrophy (which I dout), then the NI leaders could make that decission. But defenitely not yet. That's just how large organization work. So it is not realistic from a organizational psychology point of view. Techically your suggestion is probably feasible.
  18. Have you tried disabling front panel updates before starting to disbale controls and turning updates back on after you have disabled them all?
  19. Do you mean that you would compile a VI into an exe? Or do you mean you first open LabVIEW and then run a VI inside LabVIEW? Or do you mean you do not compile VI into a binary but you would like to open LabVIEW and get it automatically to run a VI with some command line args. Command line arguments can be read using property node for Application class. Application class has a propety called Application -> Comman Line Arguments. -jimi-
  20. C++ has references in addition to values and pointers. I don't think this comparison is flawed. Honestly I don't think this suggestion is realistic. I also don't understand how the ability to use by-value objects harms those who want to use only by-ref objects.
  21. Hi people. My name's Matteo, 28, i'm a computer engineer and i live and work in Torino, Piedmont, Northern Italy. My main field is plant automation project and developmnet, but I've been involved in some research & developmnet which brough out a totally-LabVIEW based product, SIMAUTO, which is and engine control unit tester, under constant developmnet. :laugh: See you!
  22. I haven't experienced runtime crashes but rather weird crashes during development time and weird corruption of the project. Both of these occurred when I started using call by ref node with class methods. EDIT: I wonder if the connector pane constant doesn't get properly updated.
×
×
  • Create New...

Important Information

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