Jump to content

LAVA 1.0 Content

Members
  • Posts

    2,739
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by LAVA 1.0 Content

  1. When I turn 70...

    I'm going to do yoga and meditate continiously, with a copy of alfa's book :book: in my lap until I spontaniously combust and end my life and that of my book SI-MUL-TANIOUSLY :D

    PS there's a 97.7% chance I will attend NIWeek this year. Is that good, or bad :unsure:

  2. I see we have a bear feeding the bears...

    Maybe Ben is a Communist bear just trying to extract information from alfa.

    "Vee have vays of making you tock, commerad :shifty: "

  3. C'mon guys, what do you think this is, the NI discussion forums? :P:star::star::star::star:

    Ooo, Ooo, Ooo!

    +1 for me by just replying to this message! Where do they issue the LAVA weenie beanie caps?

    +1 for me by just replying to this message! Where do they issue the LAVA weenie beanie caps?

    121...

    Ooo, Ooo, Ooo!

    +1 for me by just replying to this message! Where do they issue the LAVA weenie beanie caps?

    121...

    What?! Replying to you own post doesn't give you more?! Now I've REALLY gotta work :angry:

  4. I've been working on a project that requires logging multiple data streams via TCP at about 2.5 mbit/second each. The messages are fixed length and contain a counter at the beginning, to determine timing and if data is missing.

    I have an architecture based on a tight loop that pulls data from the TCP connection and places it in a queue. A logger task pulls data from the queue and writes it to disk. I have written a serving vi that simulates my data device, and have been able to source and log data at about 4.5 mbit/sec over a gigabit point to point Ethernet segment with no data loss. :)

    I now need to add event detection logging :blink: . Events will be determined by placing a subset of the messages into a UI data queue that will be evaluated separately. I was thinking of just storing the counter when an event occurs and using that to determine an offset position in the file. I'm not sure how large the log files are going to get; they may exceed 4GB, and require multiple files for a single test.

    I've been reading various app notes :book: on NI's site about using circular buffers to log event data, such as:

    This is my first high-speed logging application. Am I approaching this the right way by using queues, or are there factors I have not yet discovered that will cause me grief later on?

    I'm concerned about switching to a circular buffer and possibly losing data if my logger function is delayed by some sort of system event. I've got 2 GB physical memory, and the queue works well so far. I'm seing about 8-12% cpu utilization with a single channel. The additional channels will each have their own Ethernet controller (again, point to point).

  5. There is also a manual way to duplicate project quite easily. Create a project as you normally do. Then when you want to duplicate the project do the following.

    1. Create a new library (lvlib) to the root of your project and add all of your project files to this new library. Save the library for example with name orig_lib.lvlib.

    2. Save a copy of the library with Save as... using for example name new_lib.lvlib. A complete copy of the library with name new_lib.lvlib will be made.

    3. Create an empty project. Add the new library new_lib.lvlib to the project. Save the new project.

    4. In the original project, move all the files from the library new_lib.lvlib to the project root. This will move the files back out of the library. Save all.

    5. Do the same thing for the new library. Now you have copy of the project.

    There are some bugs in the lvlib implementation of LV 8, so you may experience problems with nested libraries i.e. if you have multiple levels of libraries inside one another.

  6. If you are looking for a solution for creating a polymorphic VI with LabVIEW Scripting, I am affraid, I have bad news. As far as I know, there is none. I was searching for this, allmost 2 years ago (with the help of this forum) and noone had an idea how this could be accomplished ...

    if you find a solution, I would be glad to know how it can be done!

    CB

    I2dx, I'm happy to tell you that you are wrong, check the old topic for solution . :yes:

  7. It is set to zero at the start of the vi.

    Note that there are two ways to run the vi. Run, and Run Continiously. (ying-yang type arrows?).

    If you press Run Continiously (not generally advised), the counter will increase and increase until you press it again, or Abort Execution. If you press the front panel stop button while using Run Continiously, the loop will exit, reset the counter to zero and start running again.

    You should always include a stop button on looping vis (as you did), and ONLY use that to stop the vi; do NOT use the Abort Execution (stop sign) at the top of the window :nono:. This is for aborting a hung vi during development. Looping vis should always initialize shift registers on entry and have a clear method to exit and close any references (if you haven't wotked with these yet, you will soon :) )

  8. And there are similar other applications. I really seldom have seen any of these applications peak even a single time close to 100% CPU time other than when switching from a different application to that application on older low end machines when all the user interfaces need to completely be redrawn.

    I agree with bsvingen that even though many applications don't consume much processor power there is still a need for efficient code for those applications that do consume as much processor power as thery can get. If a computationally demanding data-analysis VI doesn't consume all of the available processor power then there is something wrong with the implementation of either the algorythm or LabVIEW. I myself are using LabVIEW to analyze huge amounts of data and it is really slow. However it would take even more time to code all those analyses in C instead of G ;)

    Just as trivia here, if you have the Application Builder you already have a C compiler on your system. It is the LabWindows CVI compiler engine packed into an Active X Automation Server. This is used to compile the C stub wrappers and link the final DLL executable image for DLL targets. The C stub wrappers are the actual functions exported from the DLL and take the stack parameters and translate them into LabVIEW datatypes, then invoke the actual VI through the LabVIEW runtime engine and reverse the data translation for any return values before returning to the caller. But LabWindows CVI never has been and most probably never will be a highly optimized C compiler. And it doesn't have to be because it's strength is in the Test & Measurement integration and the shaving off of a few nanoseconds runtime performance is almost never critical to any application that might ever get created in LabWindows CVI. And if you ever happen to get across a function library that needs this high optimation then you will have to get the Intel C compiler and create an object library that you can link into your project, not really that a high investment actually :)

    I'm not familiar with LabWindows but as far as I understand if the generated C code is ansi compilant then it could be compiled with any ansi compilant C compiler. So it should be possible to use some other C compiler instead of LabWindows CVI in theory. Intel and PathScale compiler should be very good but new versions of Visual C++ and Gnu compiler are not bad either. Why this option of using some other compiler instead of LabWindows CVI couldn't be possible. All it requires is will from NI to put some effort on it. There could be a new High Performance LabVIEW toolkit that would use high performance compilers from other vendors. Of course it can be that LabVIEW generates code that is far from ANSI C and only LabWindows could be used to compile it.

  9. I have a c++ dll that has a function inside that returns a boolean value. Is there a way to receive a boolean from a c++ dll and read it in labview?

    Select adapt to type and connect boolean to the input. In this way boolean is passed as unsigned char * (or LVBoolean * which is the same thing) . All the values differing from 0 are regarded as true and 0 is regarded as false. You can also use macros LVTRUE and LVFALSE in the C code. Remember to include "extcode.h" from CIN directory to be able to use the macros and LVBoolean type defenition.

  10. I am currently using LabVIEW 8.0.1 and the technique mentioned does not work in this version of LabVIEW.

    I came up with a solution yesterday when I noticed a bug in one of the NI timed loop XNodes which I was unable to remove from the block diagram. Since XNodes require licensing you can use Extended Nodes instead to do the same thing. Create an Extended Node on the Block diagram that doesn't allow removal of the node from the block diagram. Since your Extended Node doesn't need to have any other functionality, it should be "quite simple" ;) . You can create an image of any size to be the icon for the Extended node water mark. I assume that you can also disallow moving of the node or even allow no changes to the block diagram alltogether. See Scripting section on Lava Forums for more information. You'll need LabVIEW 7.1.1 or earlier to create the node but it should work on Labview 8.0.1. with a small change (see my previous post).

  11. Hi all,

    I'm not certain if this is known stuff. I just noticed by examining external node front panels of storage VIs in LabVIEW 8 that there is an extra control compared to external nodes in LabVIEW 7.1. I tested adding the missing control to ;DAHR_MergeErrors-src.vi (http://xnodes.lavag.org/) and it seems to run and compile when placed on the block diagram on LabVIEW 8 :D . To get LabVIEW 7.1. created External Nodes to run and compile under LabVIEW 8, add the attached ring control to the front panel of external node and connect it to the only remaining free connector. The ring control "Node type" contains the following items:

    UPDATE

    READ

    QUERY

    CREATE CHILD

    CREATE

    CONNECT

    DISCONNECT

    post-4014-1149618501.png?width=400

    What is the function of this new control is however somewhat unknown to me. EDIT 6.6.06 1825 GMT: I ran some test by using the attached Node_type_probe.vi. I connected the probe to the Node type input of the ;DAHR_MergeErrors-src.vi. It seems that at least when using the external node interactively by placing the node on a block diagram only the UPDATE event is occurs. UPDATE event is triggered a few times when the node is placed on the block diagram, when every you move your mouse over the node, connect the node, add controls to the front panel of the VI that contains the node, wire the node etc. I wonder if the "Node type" input is still unused or if it gets different values when the node is accessed using scripting.

    post-4014-1149618552.png?width=400

    EDIT: Removed "(XNode)" from the subject line since External Nodes are not really XNodes even though the purpose of them is similar.

    Jimi

    Download File:post-4014-1149611516.ctl

    Download File:post-4014-1149617560.vi

  12. hmm ... alfa, I guess, he will simply count you to the other 97,9% ;)

    Yes.. That's exactly what I'd be afraid of... then it would push the pencentage to 98.0%..

    I gatta stop reading his messages.. He's way too depressed. And to think that he wants gov't assistance $$$ for him to publish a book that says the gov't is stupid and 97.9% of Canadians are stupid.. well.. he's stupid!! To insult the people that actually support such a thing with our hard-earned $$$, that's just not right.

    Parasites.. :thumbdown: that's what it is ... a parasite.. :headbang:

×
×
  • Create New...

Important Information

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