Jump to content

0_o

Members
  • Posts

    194
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by 0_o

  1. You might want to add skipNavigatorDialog=True to the labview ini file. For future reference take a look at: http://labview.brianrenken.com/INI/undoc.htm http://labviewwiki.org/LabVIEW_configuration_file/Miscellaneous However, until you know by heart what are the basic property nodes for each LV object I won't tinker with unknown tags since you might add unstable option that you might later use and without knowing cause your application to malfunction between LV versions, for example.
  2. Hi, I want to filter overshoots/undershoots from a png image or a 2d array. However, LV has only 1d filters. The implementation I'm working on is a Differential Interference Contrast Microscope where I take two interference images and run them through an algorithm based on a Kalman Filter. The overshoots I'm dealing with appear around the edges of a scanned feature (nanotube for example). If I run a profiler over such an edge I would see a noisy flat area before the edge, overshoot, undershoot and then another noisy flat area higher than the first one. I want the image to have two noisy flat areas with a step between them. Any ideas?
  3. I'm glad NI is trying to improve the courses. The level you teach is the level you get. The courses I talked about that take 2-3 days are the majority of NI courses while most serious .net courses are 0.5-1 year long. The G# and goop courses are something relatively new and I didn't get the chance to see their content yet. Your explanation for those short courses is strange. Why is it ok for courses in other languages to be that long and it is forbidden for LV? Teach 2 days courses and you approach lab rats that don't have money to pay for a course. Teach half year course with certification at the end and you approach software developers that need to work with HW and write VHDL with only programming background. Visual studio cost (7000-10000$) more than LV (4000-5000$). .net/C#/C++/C courses are much longer and cost about 4000$. It is hard to do what an experienced LV programmer can do in C. Show me another cross platform, parallel, fast development, HW integrated, fully supported language. I bet there will be a lot of managers that will go for such a course if they only hear how time wasting it is to develop a large scale app written by the graduates of those 2-3 days courses in comparison to a certified LV programmer. Since I once was a lab rat (comp eng + app phys + optoelectronics) I had to deal with the low level of understanding I had. For example, even if I didn't have to write a project, I had no idea why the code I wrote didn't run fast enough. How come LV examples maid my card ran in 20KHz while my basic code ran in 1KHz. A new user can read the help by himself. There is a need for a platform that includes the best practices with explanation why we should do it just as described for each scenario. Besides that, you just gave me an idea that I'll post on the idea exchange: add for each function in the help an efficiency analysis like, for example, O(n) and O(log(n)) and a benchmark.
  4. Yep, as you just said, I feel disappointed from the LV courses I saw till now. As for the goal and audience of those courses, I disagree. Why should a .net course designed for noobs take one year covering most of the software engineer practical and academic issues while LV courses are 2 days long and cost almost the same? I wonder if Goop and G# courses are as shallow. Take anyone from this forum and let them give a course about a live large scale example and you'll have an exciting course that all would love to take. LV reputation is that it has a very fast development time but this is true only if you have a very good LV programmer or else you'll get an unstable, slow and un-modular program. If you won't teach high level LV the community will be very small and no project could achieve the LV reputation, thus, giving LV a bad reputation.
  5. Hey, Thanks for all the replies. I didn't expect such a serious reaction to my light hearted complain. If I had a real objection for NI I would have posted at NI. I simply felt frustrated taking such a basic quiz to find out it wasn't so straight forward and easy. As for the more serious issues: I need a course/document that will show me how to create tests for OO code the right way. Especially for LV design patterns and methodologies like HAL, GUI and LVLibP Plugins. An explanation about how to design test code which will be as OO as the project itself and adapt to it is something I miss in my large scale project know how. I think that the examples NI gave for HAL should be accompanied by a testing framework that fit the design. For example, a GUI testing tool that I developed depends on having a well written code using the command design pattern and MVC. Without DSC or outside tools like Ranorex it is possible to create a general GUI testing tool by implementing AutoIT, for example, inside the code but there are no examples/documentation available. This is a very basic requirement from every real life code and I find myself inventing the wheel all the time. Ryan, if you save an array into variant attribute the array is placed inside a red black tree. That means that if you need to search or sort it would be much faster. JamesMc86, thanks for the managing software eng course reference. I think I'll go and buy the course kit if you say you went over it and it is a good one. As for LV courses, I would love to see NI take themselves more seriously and develop a course for programmers. Most graduates today know OO/Java and the courses NI offer should give them the analogy between the way things were done in other languages and LV. Instead, the courses go over the help of basic functions and give an over view of ancient producer/consumer and event structures. It is as if a C course went over 50 MSDN entries and the basic syntax and say this is a comprehensive course. I went over the OO course and I'm sorry to say but it is far far from what I expected. Maybe G# has a more relevant course. I guess most NI old users that finished the university before 2000 have no OO experience but is it that crazy to expect them to go over Cormen+Java and give us a comparative course? Why should LV give programmers the feeling that it is better integrated for data acquisition and that it is impossible to write anything else with it? Dror.
  6. Just for fun I took a short NI LabVIEW quiz - http://ni2.intellisurvey.com/run/celvbasicsquiz I guess it should be updated since, for example: 1. Can a wire be used to pass data between loops that are intended to run in parallel? The answer should be yes if you pass a reference like a DVR for example. 2. Which of the following is the best method to update an indicator on the front panel? Connecting dirrectly to the indicator might lead to low performance if you are inside a loop. 3. What is one disadvantage of using the State Machine VI architecture? With all the available state machines like a QSM and the lack of parallelism is better suited. 4. The most efficient method for creating an array is? A variant attribute 5. You develop a SubVI that only outputs a value and need to use this SubVI in a (calling) VI. Which of the following is the best way to enforce dataflow to control the execution of the SubVI? Error and sequence are about the same, however, inside a parallel program without a sync msg mechanism it is hard to control the data flow. In general, most NI courses, I think, are outdated with no OO, design patterns, HAL, MAL, Actors, advanced TDMS, Gateway Requirments, Testing, G#... Is there a course somewhere that teaches how to test an OO large scale project that uses Hardware Abstraction Layer, design patterns, UI framework and so on? I would gladly pay for an online best practices course with examples.
  7. I agree! If you are using FGV the right way they can work just as well as in my example and I have nothingto say. The thing that bugged me was "get/set FGV" you talked about. To me it sounded as if you were using the FGV to get/set the X/Y values since you don't get/set an operation. Your corrected version is not talking about get/set a value but rather do +-*/. An entire operation over the DB should be atomic, not just the get/set. Otherwise, there is no much difference between a global and FGV as Aristos Queue just said. Anyhow, this is not related to the topic and there are many posts about this issue. Dror. P.S. - 1. I think that with a global 2+2-1 could be 1 or even -1 but not 5. 2. If you parallel the operations then you can't guarantee the order of +-*/ in FGV too.
  8. Aristos Queue, oh how I wish your post appeared on page 1 instead of 2. Whoever reads only page 1 will get the wrong impression. In my job I found it really hard to make people understand what you just wrote. I spent months arguing back and forth to no avail. Pseudo FGV really turned into some kind of a religion. However, I wish NI came up with a way to speed up class control property nodes. Indexing the class controls into a red black tree over a defragged class space should make it possible to speed up the access to O(bundle/unbundle*hierarchy depth). JamesMc86, thanks for the great link. I'm using an in house hardware so I never checked out the cRio documents. This is going to change soon since our PLL project is delayed and our hardware is not fast enough without it, thus, hopefully, cRio here I come ShaunR, if you write a calculator with +-*/ that saves the state of X and Y through a pseudo FGV with no action engine around the +-*/ you'll get into race conditions. If you try to calculate in parallel both a + operand and the * operand it will depend which action checked the state of X and Y first and if each action's data flow managed to change the state before the other started. I hope I'm not trying to teach grandma to suck eggs.
  9. I attached an LV2010 version of my example. JamesMc86, if the operation is protected as a singleton you'll have the same bottleneck issues with every method you use. Using get/set version of pseudo FGV does not implement the singleton design pattern and has only a little advantage over a simple global variable. drjdpowell, great idea! I'll add it to the switch between using a vi from lvlib or using the version from lvlibp. Can the sub panel property node "allow user to open block diagram" help here along the "pause vi" method? Besides that, JamesMc86, pay attention to the vi properties being changed once it is inside a sub panel like the "prefered execution system" and to the issues of debugging reentrant vis. If you need to debug executables you can open the "debug applicatio or shared library option" or even log events into the trace toolkit. lv2010.zip
  10. I'm glad to hear that the property nodes transfer to the UI thread only in the case of front panel property nodes. I based my knowledge on posts here in Lavag, probably the wrong ones. I didn't know that it was 1300x slower than local variables. Do you know what is the difference between bundle/unbundle from a class control and a local variable? The problem with using bundle/unbundle is that is won't work outside of the class or even in it's children. I wish NI made a fast basic class control data access which is OO, takes syncing into account, allows singleton and avoids races. Yet, even before that day comes, I still think that in this case, for basic common DB parameter changing for a GUI system that might send HW requests, the example I sent is perfect. I hate having many different parameters methodologies running across my vis with wires every where. In the option I gave you'll have a single db class dvr wire running in the middle of your vi, as a life line, giving data to everyone along the data flow. As for the DVR, it allows an easier to implement singleton than FGV that has many wrong interpretations and holds the operation far away from the object that uses them and if that wasn't enough, it holds the operation and data in one level depth for all the levels of the hierarchy with no code reuse. In my option I don't have to predefine the operations I am about to use, I simply put each operation inside an in line structure inside the exact relevant place in the code. Nor do I need to manage variables spread out in my project with no way to organize them into a single logical framework. If I don't need the operations to be singleton I can use property nodes directly on the class's dvr. You just have to pay attention to the reentrancy (using several property nodes from the same class control might not work if they are all not reentrant - this is where I take the idea of a black box) and lock down problems (if you place a wait for queue element inside a dvr, for example, the dvr locks the rest of the code and you might wait forever). Dror.
  11. Hi, I use a shared DVR that contains a class with the DB that your subpanel with all the dynamically loaded vis use. I can add another class that contains messaging. Since each of the dynamically loaded vis use an in place structure while manipulating the DB/MSG class and since a DVR is a reference I can share and break the data flow, I get a parallel architecture that provides a singleton over the database and no race condition inside a single action. I assume no importance of race condition between plugins (in my real project the dynamically loaded vis are LVLibPs) actions and I have to pay attention to bottle necks: If a single DB/MSG is used among a very large number of plugins then each singleton action of one of them will halt the rest, thus, I need to break down the DB into several more specified classes if speed is an issue. Property nodes are slow since they work in the gui thread and turn the entire vi they are in into a vi running in the gui thread. Besides that, property nodes are operating through a single black box behind the scene, thus, they might turn into some kind of a bottle neck even if you make them reentrant. There is also the problem of debugging property nodes and dynamically loaded vis (moreover dynamically loaded vis from an LVLibP). However, I think this is the most clean and beautiful way to work around plugin-plugin communication that will give you the benefit of a clear design any programmer following you could understand and manipulate easily. Dror. P.S. - I attached an example. db and dynamic loading.zip
  12. Hi, I"m glad to see there is interest in the general idea. It doesn't matter to me if it is this project or another as long as we try as a community to develop something useful. Obviously, for this particular task, Perl or Ruby could fit nicely. I could even write a simple solution in access in a week. The reasons I had for choosing this project were: Hardware oriented LV project using best/new/trendy methods like MAL/HAL/UI/Actors are out there already. HW oriented real life projects depend on the type of HW each user has and one project won't be useful to all. Even though there are tools like bugzilla and req gateway or even esoteric tools like http://www.tslice.com/products/overview/overview.htm, none will fit LV users perfectly since none are open source written in G, thus, a pure LV user won't be able to customize them easily as can users in other languages. Any good project has to has it's own suited project management tool in a language all the team members know. I thought this project can be a fun and easy way to bunch together the most used tools and it can grow and develop to incorporate any future standard (undo, simulation, testing, app metrics, UI recordings and replaying, plugins, inheritance, design patterns, load/save configuration per user, translate UI, help, menu, wizard, auto builds, project overview and statistics, logger, command line inputs, API, vimp, JKI's right click framework, how to integrate into LV tools, how to integrate with a LV source control, scripts toolbox, xnodes...). If you are OK with having hundred different tools in languages you don't always know or in G but not open source than it is fine by me. I prefer the environment of Eclipse where everything is free and open in order to let the developer work in the friendliest environment. However, this is not the point here, I simply want to try a community developed project and I don't care which. Feel free to offer a different project. Birgit, any use case you want that will benefit most users is welcome. Besides that, the framework I was thinking of is a platform with basic tools that can be expanded with any idea your company has. In order to convince your boss to spend some time working on this project and share some code just let him/her understand that this will be customizable tool he/she will get for free or at least almost for free. Not to mention making an employ happy. Besides that, such a project might help you by offering code like advanced parallel TDMS access which is no simple and has to take into account advanced issues like buffer size. ShounR, your feedback is important since you are a very active member and you know what is best better than I do. Thanks for your offer to help out! Wouter, I love Python. I'm trying to learn Go and my Python days help me a lot. However, I love LV too and I think the only thing it lacks is the packages and BSD tools other languages have (beside stability). The reason for this is the simple fact that LV is not free and it hasn't got as many advanced OOP users as Java, for example, has. Do you think our small community can change this a bit?
  13. Hi, I would like to use TOOLHELP.DLL (logs crash source and state metrics) inside the application distributed to our customers and build a project management tool that will be written in G and is entirely open source (BSD) and Lavag community developed. The goal is: TOOLHELP.DLL will log the bug when the distributed application fails. Once the user checks for updates this log will be sent to a DB on a LabVIEW issue tracking tool that will be written by each of us in Lavag. The issue tracking will be written in LabVIEW and not in some external language and will handle multi user and multi projects over the net with time line and milestones organization. This project will handle basic requirements with reference to the relevant files. The manager could see statistics over the different project problems and stability. The project will run in the background and summarize how much time the user was working on each program and file (browser, office... and if it is LabVIEW then how much time was each vi being used) while taking into account mouse and keyboard actions and idle time. The project will be hosted on line so the community could work on it together and even add plugins (features like nightly builds, scripting tools and/or any other feature implementation in a different or better looking way) while maintaining best practice guidelines and use the project as a test case for new users. It might take a year since we all have other work to do. It doesn’t matter. The point here is not just building this specific tool. I could buy such a tool that will almost do what I want it to do and deal with the fact that it will never be perfect and that I’ll never be able to suite it to my exact needs. It doesn’t even bothers me that I’ll probably have to buy and learn to use several packages that each will cover some of my needs and none will handle my basic choirs like handling LV nightly builds. I could have also posted it as a LV idea exchange and wait for NI to implement it and ask me to pay for it. The point here is testing out a less individual and more communal tool development concept. Let me know what version of LV you would like to work on and I’ll load a starting point skeleton so we could start our block n’ wire session. Looking forward to see how this will come out, Dror.
  14. For future use: This might happen even in a regular local non real time project. The solution I found was double clicking the class itself from the files view or right click open from the project view. It will open a new window with only the files of that class. When you close that window, if it was just a confusion LV had then the lock should be released. The other more common case is obviously when it is not a confusion and you do actually have another project that uses the same class (dependencies or you simply added it to that project and that project is in memory.
  15. I just stumbled upon this link: http://rosettacode.org/wiki/Rosetta_Code It contains a very poor selection of code examples and I don't think you can upload entire projects so the sophistication level is low and limited. However, I love the idea! I don't remember where I saw it but I think LV 2012 is going to have project templates besides vit. If that is true I would love to share and learn from both solutions to LV exams and from general end to end project examples that cover all the bases down to testing a product. Little by little LV could get an entire toolbox of add-ons that supports code development just like Java users do with projects like Eclipse.
  16. Thanks tnt! I heard something about queues of arrays to prevent a need for a continous memory, I'll try it and report along with the boot.ini after I present the current demo with TDMS to the company's board. As for memory copies, yep, I'm aware of it. The old code used the display as database to save all the outputs while in my new code the db is on the HD. Until I have the time to test your alternative solution, do you have any input regarding the advanced TDMS questions? DD.
  17. Hi, I need to work with 5000*5000 arrays. Since LabVIEW (and Windows 32bit) can't handle it I had to write the arrays into a file. The operations need to be as fast as possible and thus, I turned to the advanced TDMS block that allow pre-allocation of both the buffers and the TDMS asynchronously (without creating the index file) while allowing an asynchronous read from an index inside the TDMS. However, this is the first time I am using those advance blocks and even though it seems to work, I'm not sure how optimized my code is and if all the parameters are correctly entered. For example, here are some questions: 1. Is it ok to use both asynchronous writing and buffering? 2. What should be the buffer size (wrong number corrupts the data)? 3. How long should I wait between the write and the read (asynchronous write means that I know when I sent the write request and I can't be sure if it is ready to read already)? 4. For some reason TDMS uses a lot of cpu, thus, if I don't have enough free cpu to spare the fast TDMS becomes suddenly very very slow. Am I right? 5. Did I enter the buffer and the allocation sizes correctly? 6. Can I read and write asynchronously at the same time? Should I read while writing? 7. Is there a better way to handle 5000*5000 arrays without getting out of memory? I attached two vis that demonstrate what I'm doing. The only difference between it and my actual code is that in my write I add 1 value to each channel in a loop (might be able to improve it by collecting more values and writing to the TDMS more rarely) and I take the index of that loop to my read subvi in order to read the file while writing it (which might result in a read that comes before the actual write from the buffers). Thanks in advance, DD. P.S - I'm working on a dual core machine with Win7 32 bit + LV11 write TDMS (SubVI).vi read TDMS (SubVI).vi
  18. I tried it too and unless we both didn't follow the instructions correctly then I guess it's not our fault. I even opened a call to NI support thinking it should have worked according to the PDF in 2010 and for some reason it stopped working in 2011. Yet, I just saw that it got updated two month ago to 2011 with a change that deals specifically with dependencies so I'll go over it one more time and report.
  19. Thank you! Thank you! Thank you! If I didn't know that child 1 worked one time for you and that it gave you the same error it gives me the second time you ran it I wouldn't know what to tell NI support when it seemed to be working for them too It appears after I close LV something is changed that causes the child1:main.vi, for example, to stop working. My guess is that there is a vi called property node that calls the vi member access which is not reentrant or has some problem working with hirarchies since it is not dynamic dispatch. What ever it is, it seems my problem is an LV bug or else how would you call a program that sometime works and sometimes doesn't. If they manage to fix it and it is not a problem with my design then I think I have a great design that can upgrade any non LVOOP program to be MVC with all the OOP benefits easily. I'm just afraid of the common reply: we opened an internal CAR and we think it will be solved around LV2022 LOL.
  20. I guess you ran the parent main by mistake or else LV is crazier than I though. Frustrating I can't have them static dispatch since the whole point is allowing the child to override the parent's implementation. I remembered I tried making them reentrant already to no avail... There are some guys at NI, like ElijaK, that I bet can explain all the quirks. Yet, the fact that only the most basic behavior is documented, is wasting a lot of my time. Why this error simply closes the app instead of propagating an error or breaking the arrow? If a property node is just an easy to use template vi why can't I use another subvi in it? Thanks for the help James! I wrote a nice long example for an interesting case that once finalized could help many people create an easy to use Model-View-Controller that even replaces the use of globals and AEs. You can find there code for recursively going over all the controls and wires of a vi nevermind how deep they are and I can add many other tricks that improve the code, but it needs to implement OO first. Please help 1. Is there a reason why my property node doesn't work? 2. Will writing my own accessor vis as a regular dynamic dispatch vi help? 3. What is the right way to make the FP changable so I can load a vi with the same FP controls but that looks differently and even add/remove controls to it in a chils. 4. Can the typedef control that holds the commands be overriden so that a child will have more commands for it's new controls while not having to change much in main.vi? For now, I'm going to send NI a question about the property node limitations and try converting to G#. Good night.
  21. Wow!!! So cool that it worked for you with no error!!! I thought I tried making them reentrant+share and it didn't help me. I'm probably doing something wrong since I tried again doing exactly what you said and still got the same error: What am I missing? I knew this should have been the solution and I got angry at my LV when it didn't work for me the first time. Moreover, I can't find the inline option in my execution menu as you can see in the first picture. As for code optimization, I stated out with a sub vi in all the property nodes yet LV gave it the same error as in the second picture saying that this sub vi was called recursively. Making that vi reetrant+share didn't help and since I didn't find the inline option I had to copy it's code into each of the property vis. I was familiar with the in place optimization but the variant red/black tree search was new to me. I always thought the day will come when I'll implement all the classic data structures in LV. There are more optimizations and features in my real code; the issue that I'm trying to solve here is the basic OOP requirements. If I'll succeed in reproducing your error free execution of child 1: main I'm almost at my goal. Please help I’m hoping that the issue is me and not LV2011 ver. LV2010. Yours truly, DD.
  22. I just now tried to download it again and open it with LV2011. Worked just fine. I compressed it to zip with LV and opened it with 7z. Here it is again... MVC.zip
  23. Thanks for the reply James! The DVR+IPE blocking access to the DB along the use of vis to access the DB will indeed slow my app down. However, any OOP program is based on using vis to access the data in order to allow inheritance. As for locking the DB, when working with references a race condition over the DB is a real problem and I wanted to add to the DVR+IPE the ESF framework which is a singleton based on notifiers: https://decibel.ni.c.../docs/DOC-12813 This is why Java with it's garbage collection is slower then a c code with the upside of quick application development. Anyhow, as I promissed, I attached a sample of my design. I ran into a few problems with it: 1. a member access vi with property node can't contain sub vis or other property nodes of that same class. DAMN!!! 2. I need to inherit the FP of the father, do some changes, integrate the changes into the member access vis. Such a change worked perfect on the father since I used bundle/unbundle in the member access vis, yet, since the child doesn't have access to that data, again, DAMN!!! I can do some walk arounds like saving the needed data from the parent cluster localy after the initialization but it will break the inheritance and I'll need to manually change code. Ideas anyone? P.S. - extract and run the project -> run the parent main.vi -> run the test in pause mode on child 2 (works fine since I only changed a function and not the FP) -> switch to child 2 and see the error from the property node within the property node. P.S.2 - there are some extra vis that list all the controls and another 2 that list all the wires. the example uses the first but not the wire listing vis. My intention is to add the ability to move labels from wires which are split from a simple tunnel, for example, in order to make it easier to upgrade BBoM. P.S.3 - many structures in the parent in particular have description, open the description to understand the logic behind the design. Thanks in advance, DD. MVC.zip
  24. I solved one of the problems: in the initialization I entered values to a list of property nodes on a single block while one of the initialized values was a queue that the rest of the property nodes were using and thus if a property node was accessed before the queue was initialized all the rest didn't run because error 1 was propagated between them. a property node of several properties is executed from the top down.
×
×
  • Create New...

Important Information

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