Jump to content

Black Pearl

  • Content Count

  • Joined

  • Last visited

  • Days Won


Posts posted by Black Pearl

  1. Not in the runtime engine (because no BD there), but yes in the dev env. Of course, my first thought is, "How often are you loading broken VIs as part of a running app?" Most of the time, it seems to me, this wouldn't be a big deal. I mean, if you're loading a broken VI, my guess is that it probably isn't a part of the hierarchy you're trying to run, so there are few callers of it that would also be broken. If it is something like a template VI, you're going to need the block diagram anyway to fill in whatever is missing with scripting.

    I'm unsure about the frequency this happens. Just knowing this load-penalty will enforce a 'never-save-a-broken-build' rule and drastically reduce this issue.

    But I had to scenarios 'theoretically' in mind:

    1. Run a scripting VI, such as a VI Analyzer Test on the top-level vi, while somewhere down the hierarchy there is still unfinished work (assume it's the job of another developer to write the driver and you are just working on the top-level GUI).

    2. Having a changed ConPane in the reuse lib (new version) and propagating this change to an older project. So all kind of relinking issues.

    1. & 2. That's what I actually had in mind, a kind of 'merging' of projects and which strategy to use (bottom-up, top-down). I'm not far enough with the project to detail if it (this behavior) would affect that idea. But I already see that performance is an issue for the general architecture, so I'm concerned.


  2. In the development environment, whenever you say File >> Open and load a top-level VI, the LC and FP load into memory. If the VI was last saved as bad or broken or if it turns out to be bad/broken after it finishes loading its dependencies, then the BD also loads into memory.

    This actually means, that if I break a deep VI (e.g. from my reuse lib), I'll have a much bigger 'load' when I open the Main.vi compared to when everything is fine?

    To be more specific, if I load a VI using Vi-Server (not intended to run), I should see a big performance penalty if a subVI is broken/bad?


  3. Australia on wikileaks:


    It's talking about 'coordination with the U.S. in the Coral Triangle Initiative (CTI), Antarctic conservation and logistics, and the current whaling negotiations'.

    So austrialia seems to be a very nice eco-friendly place... ;)


  4. One scenario for class usage:

    Extension through inheritance (by the user of the class).

    Special consideration: the child-classes can override methods (not only add new ones)!

    Really powerful actually, if those methods are called from other methods of that class (where you'd use a protected 'statement'). Kind of hooks (just generic empty-implementation of pre- and post for all functions).

    But do you need to alter your math-lib in this way? :ph34r:

    Well, if this would be a product where the class user won't have access to the source, it could be useful (maybe an explanation for the JS implementation?).


  5. Has anyone actually dug into the wikileaks themselves and can confirm on denigh what I had heard reported (I read it on the internet so it must be true).

    1) There where WMD in Iraq. (T/F) ?

    2) The Climate change thing was jsut global scam to redistribute wealth. (T/F) ?

    I am NOT asserting the above statements are true. I do not know. But as far as #1 goes, I never did figure out why Sadam did not let the inspectors in since doing so would have been a saving move for himself and a way to "rub the nose" of the global community that was trying to enforce the UN's decision.

    I did some reading of the cables (but most of the information I got by various news options), so I can provide better reference in this section.

    So I want to provide a pretty tough example of misinformation from the primary source.

    Cable #08HAVANA103 states that Michael Moors film Sicko was banned in Cuba. His statement that this isn't true can be found here on his blog.

    I couldn't find the cable in the guardians files any more, they did remove it due to the false information. But is everywhere.

    I like this example because Michael Moore is biased (supporting wikileaks), so it's not in his ideological interest to show that wikileaks might contain false information.

    So even if I'd dig up something about your questions, can we believe it's true?


  6. I was not intending to take shots at the OpenG library! Definitely not! Your forums are very active and are great for LabVIEW developers! The OpenG libraries are also widely used and we're open to taking these libraries through our Gold product testing; however, with the current program requirement for a 2-day turnaround on support requests we hit a snag for one of the Gold product prerequisites as the turnaround time for support inquiries is not documented and therefore is not guaranteed for a customer/user.


    Then propably NI should hire someone to document that LAVA is doing a 7/24h support for OpenG.

    We like to do software. Documentation is a pain. So we only do it if we get paid for it. Got it?


    • Like 1
  7. Doesn't LAVA fullfil these requirements?

    1. I'm sure every single post was replied to in much less than 2 days. When I had issues to solve, posted them on lava, I received the support even on public holidays. :thumbup1:

    2. Many of the members in this community also have a brilliant record on helping others on the public NI forums. Very few of the offical NI support team will be able to compete with this on all levels (inside knownledge, number of posts, response time, real-wolrd app experience).

    Just using these two arguments, I think the complete LAVA CR (certified) section should go for Gold. :star:


    • Like 1
  8. For those that are interested more in the wikileaks issue, there is a relative recent documentary on wikileaks. It was produced before the cables, but includes the video 'Collateral Murder' posted above. It also gives some more information about what happend around this video (including wikileaks meeting the family of those killed in the video). You can find it on youtube:


    Make sure you don't just watch the first part, it's split 5 or 6 (depending on the uploader) versions.

    I am wondering why it had taken so long for this discussion to arise on the forums. I think it's one of the most significant events for global internet culture, effects of technology on mankind, ... (the stuff we as techies have something to say about).


    • Like 1
  9. While not written in LabVIEW, wikileaks is pretty high-visibility. And I must confess, the whole story did obsess me when it came into thegreater public awareness. So a lot of stories I'm going to share with my fellow wireworkers.

    As a general disclaimer, we are talking about conspiracies (both to the stories presented by wikileaks, the powers behind those stories and wikileaks itself). So even if you'd trust me, do not trust anything of the lines that follow. :ph34r:

    Concerning the suspected leak of 'the cables' and other documents, 'Manning'. I recently found somewhere (I didn't bookmark) the chat-log where he was telling another intelligence officer (?) about leaking the cables (I do not know if it was him who wrote it, and to what extend does logs might have been altered in whichever direction). To me it seemd that he was going really mad. A young guy sitting in a bunker in Iraq with a computer going mad. Others are shooting some people when they go made, more just shoot themself when they go mad, even more abuse drugs and/or alcohol. And the madness of war produces a lot of madness in people.

    This is a big questionmark for me, wether he is guilty of leaking (morally and legally).

    Second point, the legal case of Julian Assange. I do not want to defend his person (*). He might be a guy I don't want to meet in private (see the statements of people who have been working in wikileaks). But the legal case against him has a lot of strange things happening (you can read this in most news media, so I don't go into the details; it's all speculations anyhow). The most interesting of all was the recent 'leak' of information about his wrong-doings to the public media, while he stated even his lawyers can't get the information about it.

    I'm pretty sure he knows how to play the info-warefare game by now and don't trust him at all. But this attack (against Assange) was excellent. You see this at the small detail, that it was most likely the work of 'spin doctors', who are professionals in this kind of information warefare. Contrary, all media called it a 'leak' and where making jokes about it.

    Third and Forth point are about what crelf identified as 'Angst'. I could be pathetic about the dawn of information age. The internet isn't a wall-street playgroung with dotcom-bubbles any more. It never really wasn't, but in the big perception it was a place to generate new markets, win or loose big money. This actually (as many new technologies in history) also fuelled the forces of 'chaos'. See the upraising in Irania recently. See the current upraising in Tunesia. A lot of this very heavy protests are communicated via twitter, facebook and other Web2.0 content. See wikileaks, I found statistics that in the phase of eruption of the wikileaks-cae, the twitter messages where 4-10 fold from the normal level (taking the weekend peak into account).

    Going back to the pathetics, this is a real change in the world towards the information age. All the web2-0 technologies (from wikis to twitter) have made the technology available to the masses (not only geeks can produce a youtube video, almost everyone has 1000s of ways to express that his stupid dictator is an **** and many people in his country will actually read this).

    While we all can very good see what is happening when we look at countries where it's not so nice too grow up, live, and did much too young, it's much more difficult to imagine the same uprisings in our neighbourhood. But the same change is around you. And one section of people are aware about this: those in power. Simply because a change in the world will mean a shift in power and if you have a lot of power you are more likely to be we less power afterwards.

    The forth and adjected point is that this is 'planned' be Julian Assange.

    Wow, heavy statement, drifiting to much into conspiracy theory now? I read an analysis of Julian Assanges thinking in a german newspaper (for those that can read german, check at sueddeutsche). It went back to blog entries or emails that he has (might have) written back in the 90s or even 80s in which he was identified with 'Crypto-Anarchism'. They actually formulate a plan to attack 'the state' (as a conspiracy) by leaking (-> wikileaks). So if this analysis about Assange and Asange's analysis are both (at least partially) corrct, he is attacking the state in an anarchistic-'terrorist' way.

    (*) now the funny annotatin for the end. What I really like on Julian Assange: he represents the geek/nerd/hacker to the public (especially the women) at the moment (and his personal troubles are also due to his sucess in doing so). And I think he's pretty sexy. So I really think he is doing all of us (at least those that are single) a big favour at the moment. :cool:


  10. 1. Create a library for the component that exposes that functionality.

    2. Decouple the library it from my app code. (Make sure the library isn't dependent on any app-specific code.)

    3. Copy the component source to a couple more projects and use it there as well.

    Only after I've used the component in a couple different projects (which almost always results in some changes to better generalize it) will I add it to my reuse library.

    As I'm in the progress to improve and formalize my reuse process, I found that this is the way I'll naturally do it.

    I have a 'reuse candidates' folder (under SCC->track changes! and structured into different groups; access is via a Tree.vi instead of the palettes).

    During the packaging process (namespacing them with OpenG builder and packaging them with OGPB) I'll select only a subsection of the VIs that have proven in other projects. Only those make it their way on the Team share and my palettes.


  11. I. regarding threads, when is the thread released? Usually a thread gets resources and thus, when it is inactive those resources are wasted and that might slow down the design.

    In most implementations you will code, you aren't directly interfering with the threads of your OS. LabVIEW will aquire a decent set of threads from the OS. Then the compiler will schedule your code on these threads with it's exact knownledge of your architecture.

    This is due to the internal unique memory mapping of graphical programming languages.

    II. As for the enum conundrum, I want to reduce the coupling in the design and increase the upgradability. In enum I enter a list of strings for example and decide which one to use later. It is a bit like a case structure. Yet, if I want to add additional case or change the string in the enum I have to change it manually in my entire design.

    There is the option to turn it into a typedef which I prefer to avoid.

    Why? I know of no reason to not type def an enum.

    So, I wonder whether you can enter a string variable, for example, into the enum instead of a constant string. This way I can replace the key word automatically and even create a dynamic program with context enum instead of endless lists. The same goes for entering a variable as the name of a case in a case structure. I guess the answer is I can't do that.

    An enum is a compile time type. This gives you the advantage of compiler errors if something is wrong instead of run-time errors. And on the other end this means a no to dynamic enums.

    But when using LVOOP, instead of an enum you can use dynamic dispatch. As the name says, it's dynamic.

    III. To sum it up: you guys say that if I run a program that runs a loop with a vi inside that uses an instance of a child, after a million iterations I'll still have as much free memory as in the first iteration both under by ref and by val implementation?

    Yes. Because the number of wires on your code didn't change (it can't change during execution). In a simplified view, each wire segment is a single instance of your class data in the memory.

    Your question just seem to reflect the worries of a C-programmer. All these threading and memory issues are handled by LabVIEW (and it does a brilliant job since ages in this respect) and we never take care about it in most situations.


  12. As I understand it, the by val implementation duplicates the allocated memory everytime the wire is spliting (including when just a property node is created), inside loops when using shift registers and when I pass it to another vi (Are those all the cases?).

    This is a complicated topic, not only in LVOOP but in LV in general. The compiler is performing a lot of tricks that it only needs to copy the data when it's necessary. I'd guess you get even better performance using by-val instead of by-ref (each time you branch your data out of the IPE structure, it's copied as well.

    Don't care about this too much. LV is fast.

    A. When I create a child in OOP, and it is a by value design, is the memory connected to the parent and as long as the parent is alive the memory is allocated? (Do you think I should use by reference or by value when I use design patterns?)

    You always need the parents private data cluster in the memory. Any OOP language must do this, I guess. You always can access the properties of a parent from it's child (indirectly at least).

    The choice of by-val and by-ref for the design patterns is: both. Conventional OOP is always by-ref, so it translates better into by-ref-LVOOP. But things can greatly simplify if using by-val. That's the great fun in LVOOP, that you have both choices and can even mix them. Which is 'better' could result in lengthy debates with no clear outcome.

    B. After allocating the memory for an array for example and then using a block like replace array subset is the memory allocated again to contain indexes?

    C. If for example I add 1 to a variable does it lock the memory of the variable? Does the IPE lock the memory? When I pass messages between threads does it lock the memory when it is being synchronized?

    Show us code. Benchmark code on your own.

    Most of the cases we never think about troubles concerning memory allocation or multi-threading when coding in LV.

    I already know LV basics, I need to know more details about the "behind the scene" since letting LV handle automatically a bad design will cause memory problems in the first two cases and cpu slow down in the third.

    LV is doing clever things behind the scene, so most of the time we don't care. On the downside, you propably need to read 10k posts on the forums to get a glipse of what performance optimizations are happening.

    Regarding Paul at Loweel command pdf, Instead of giving a thread for each task (which will waste a lot of cpu time since some threads won't work all the time) I want to create the same number of threads yet let all of them work on a different task each time so all the threads will work all the time. Is that a logical line of thought in LV? How should I implement such a design pattern?

    Doesn't make sense. An inactive thread isn't consuming any CPU time. That's what the guys that wrote your OS were paid for.

    P.S. - is there a way to enter variables into an enum instead of constants?

    Now you lost me completely.

    Post a screenshot of what you want to achieve. Ok, write it in your favorite text-language, I'll be able to translate.

    Fear you are really coming far to much from the text-based paradigma. I'll do my best to reeducate you to data-flow thinking.

    The only advice I really can give: Post a lot the next time in the forums (LAVA and NI) to get a decent coding standard from the beginning. Asking for reviews of code will always give you some harsh critics.


  13. Yet, coming to implement it in LV I wonder what are the differences between LV and regular OOP language and what should I watch out from.

    At first you need to understand the basic by-val model. This is similar to the normal cluster in LV.

    Using by-val implementation, you don't need to take care about creating and destroying objects at all.

    There is also the possibility to implement a class by-ref (using DataValueReference+InPlaceElement structure), in wghich situation you need to writie a Create and a Destroy method (and call them).

    1. After I create and close some instances of a child is the memory they held still allocated if their parent is still alive? When does LV decide on duplicating an object in the memory and how do I release it?

    Using by-val, everything is done by LV.

    Using by-ref, use the DVR functions in the Create and Destroy methods for memory management. A by-ref class is by ref, so a branch is just creating a copy of the refnum. Using the destry method on any branched wire invalidates the refnum, hence the other branches don't reference the object any more.

    2. If I allocate the initial empty memory of an object and try keeping it on a single wire where do I need to use in-place element structure? When should I use a SQL database? I use single element queues saving the data from the hardware yet once in the logic how should I handle it?

    The IPE is to be used with DVR. Using a single-element queue (SEQ) the locking is done via the empty state of the queue, in which you can't dequeue the object before it's checked in again.

    3. What is the best way to implement the design patterns in LV (the command design pattern in particular) and what are their pitfalls in LV? Working in a closed loop (live control feedback on the hardware) is there something I should watch out of?

    For command design pattern, search LAVA for a post by Paul at Loweel with a bigger document about the command design pattern.

    For all other design patterns, do a search on LAVA and NI.com. Not everyone is demonstrated yet and some don't make sense in LVOOP. A big issue translating the design patterns is the lack of abstract classes and interfaces in LVOOP.


  14. 1. Maximizing screens

    I once got the tip (I think it was a NI screencast) to develop on a 640x480 monitor to learn discipline on using BD real-estate. Maybe give it a try?

    It actually has enough space for two loops with some SubVIs in it (Message handler, Producer/consumer). I can't really recommend it for UI code (property nodes are very large), but almost everything else can be done that small.

    In addition, you develop the habit to create a lot of SubVIs, which will help you with task 5.

    I would consider task 5 the most important. Get yourself the time to do it (implement a small feature less and have the friday afternoon for reuse design, find some excuses if necessary, accept non-perfect VIs as candidates).


  15. One option is to use a Issue tracker (or bug tracker), like Mantis. NI offers the Gateway tool for this, but i don't know if it can track to the VI-level about a state of the VI.

    Too slow/too much effort to file a bug.

    The situation I was realizing I need this feature is when you are in 'the flow'. You go through implementing a new feature and you touch/change a SubVI in another 'code modules' to make your new implementation working. In this situation making the SubVI 'clean' would throw me out of 'the flow'. I want just a amazon-one-click-buy-button to mark that SubVI as dirty and go back there later, when the 'big-picture' is implemented.

    But it would not be a bad idea to have an option to sync these statuses with a bug tracker like mantis (e.g. by writing the status in a data-base), as well as to have any status changes in the Changelog of my SCC (maybe as pre-commit hook).


    • Like 1
  16. Release everything as GPL, and offer separate commercial licensing for closed-source uses. This is about as simple as you can make it without either open sourcing or closed sourcing everything.

    At first, I was going to post the code with each VI (and folder) marked if it's GPL or BSD. I never thought about any of the code to be non-open (or pwd protected).

    Currently I'm thinking of releasing it under GPL first. This allows me to show/share an early version of the project.

    When some clean-up is done, I'll seperately release some of the reusable code under BSD. They can get a seperate entry in the CR, so confusion should be minimal. I'll also place a license-stamp on the description of each VI, so nobody should by mistake place a GPL'd version in his project.

    The project (tool) as such is comparable with OpenG builder or OpenG package builder (which are LGPL), as there is a clear input/output of (source code) data, which isn't affected by the license. I'll propably put a statement explaining this in the abstract.

    My second concern was about reusing my own work in other projects (BSD or closed-source), not applying to the tool itself but any small subVI bit I'll find useful some day. The same applies if someone wants to reuse parts of this project and contacts me, I'm able to relicense under a different license (if I understand it correctly, any license that doesn't exclude that it was also seperatly licensed under GPL)


  • Create New...

Important Information

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