Jump to content

Gary Rubin

Members
  • Posts

    633
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by Gary Rubin

  1. Hi gurus,

    I am trying to optimize a real-time data processing application. I believe that a big chunk of my time is associated with moving large arrays into and out of subvis, rather than actual calculation time. The nature of the processing does not lend itself well to parallelization, and 3rd-party driver considerations prevent us from using LVRT.

    Here's my question. Are there advantages (i.e. regarding inplaceness, etc.) to keeping vi's that share data in the same execution thread? Or conversely, are there penalties for spreading large memory blocks among various execution threads?

    Thanks,

    Gary

  2. Hi all,

    I've never done much with Ethernet communication in my LabVIEW code, so this may be trivial... Here's what I'm looking to do:

    We have a system which is crunching numbers and generating results. This system has 3 ethernet ports. During normal operation, it will be using one of those ports to transmit data (via TCP/IP, I think) to a consumer of the data. I don't think there'll be an ethernet hub, at least not one that we'll have access to. What I've just described ought to be pretty straightforward.

    Here's where it gets tricky, at least in my mind: I'd also like to have the ability to walk up to the system with a laptop, plug a CAT-5 cable into one of the other ethernet ports, and start receiving the same transmitted data that's going over the TCP/IP. I was thinking of doing this one as UDP, however, so I don't have to worry about the system monitoring whether that laptop is connected or not.

    I guess my big question is whether port numbers are tied to the physical ports on the computer? In otherwords, do I need to assign my TCP/IP connection to Local Area Connection 1, and my UDP to Local Area Connection 2?

    Thanks,

    Gary

    Figured it out.

    Gary

  3. QUOTE(torekp @ Jul 13 2007, 08:18 AM)

    Gary, could you please post this binary search VI?

    Paul, Are you asking for the plain binary search, or my modified one with the interpolation at the end?

    EDIT: I've not been able to find my modified one, so here's the standard binary search. The modification was pretty simple - if the key is not found, lookup the array values associated with the upper and lower indices (upper will be smaller than lower), and interpolate between them.

  4. Has alfa branched out to other languages?

    This showed up on the Matlab usenet.

    QUOTE

    Do a monte carlo simulation of the value of Pi and use my odds and even program to determine what the next value of Pi will be with MATLAB.

    It is call PROCESS PHYSICS EQUATION or PSE rather than the opposite the unscience ESP.

    It is also the Jesus equation program hence it is rational.

    Try it out on Matlab.

    Steve.

    WHY IS IT NOT SO THAT DETERMINSM IS TRUE.?

  5. QUOTE(DDAdevil @ Jun 20 2007, 11:48 AM)

    Hi,

    I have a program I need to run on one computer that uses the DAQ Ni software to read data and is wired into a laboratory. I want to be able to view the same front panel display screen and access this from different computers that are networked. I believe it is more complicated than merely having an .exe file on labview capable computers that are networked as only one program can be reading the data from the inputs at a time. Any help on this process would be appreciated.

    Thanks

    I might not be understanding exactly what you're looking to do, but if you just want to monitor remotely, is Windows Remote Desktop or a similar 3rd party application a possibility?

  6. QUOTE(orko @ Jun 19 2007, 03:48 PM)

    No, LV 8.x BD objects look identical whether or not they have a description and/or tip. There are a few ways you can get this information though.

    1) If you have the context help on, you can mouse over the objects and see the descriptions

    2) If you do a find/replace with a regular expression of "^.+" (without the quotes) and filter just on the front panel and description (under more options), you can see which objects have anything in their descriptions or tips.

    3) Programmatically, you could list them by checking for an empty string in the "Description" or "Tip Strip" properties.

    Hope this helps.

    Thanks!

    I was looking for something other than #1, as it'd be a pain to mouse-over everything. Also, it doesn't seem to work on structures in 7.1.1. I see the context help for the structure, but it doesn't include my description like it does for other objects.

    Number 2 is an interesting trick. What exactly does that funky-looking string refer to?

    Thanks again,

    Gary

  7. My undergrad Computational Mechanics professor was into some of that "odd" stuff, especially synchronicity. Maybe one day I should read his book. I certainly have to credit him for getting me into the computational stuff I do now.

  8. QUOTE(crelf @ Jun 14 2007, 05:02 AM)

    I'm sure I'm not the only modern physicist here that, at least internally, responds with an "that's absolutlety NOT an accurate description of quantum machanics".

    I'll second you on that one...

  9. QUOTE(eaolson @ Jun 5 2007, 04:48 PM)

    The closest I can find is Application Note 168, "LabVIEW Performance and Memory Management," where it says a DBL-to-SGL conversion on an array is done better inside the For loop, rather than outside (page 15). This App Note came with my 7.1 distribution, but I can't find it on the NI website anymore.

    That sounds familiar. Does it have other examples of operations inside and outside loops?

  10. QUOTE(eaolson @ Jun 5 2007, 11:18 AM)

    I can't find the example, but I was pretty sure it used a For loop.

    I'm glad that you seem to have the same recollection that I do. I'm away from my office right now, but I'll have to look hard for that document when I get back.

  11. QUOTE(Aristos Queue @ Jun 4 2007, 02:23 PM)

    Try putting the random number generation node *outside* the loop and then wire it through the loop tunnel. That should give comperable results to wiring the array directly.

    Yes, when I do that they run at the same speed, which was what got me confused again about why I thought I remembered reading that there's a performance difference between operations inside loops vs. operating on arrays.

    I'm beginning to think that I must have missed a distinction between always avoiding operations inside loops vs. avoiding operations inside loops that result in extra memory allocations. Either that or I'm thinking back to LV5-era guidelines that no longer apply.

  12. QUOTE(Omar Mussa @ Jun 4 2007, 10:37 AM)

    That's not necessarily a valid comparison -- the 25x faster is misleading. The reason replacing the constant with a random number generator is not a valid performance test is because in the FOR LOOP version, you actually are generating N random numbers while in the primitive version you generate 1 random number.

    You are correct.

    :oops:

    I need to stop trying to think on Monday mornings. It just isn't working out well...

    That means my previous question still applies. Am I just imagining a past App Note that recommended operating on arrays rather than on each element inside a for loop?

  13. QUOTE(tcplomp @ Jun 4 2007, 09:05 AM)

    That is a good example of compiler optimization, if you change the constant to a control, the code should not run with the same speed.

    Very good point. If I replace the constant with a the Random Number primitive, the array implementation is 25 times faster than the loop implementation.

  14. QUOTE(Mike Ashe @ May 31 2007, 09:42 AM)

    I didn't tie, I translated.

    LabVIEW Embedded did not (and does not currently as far as I know, someone correct me if I am out of date) support calling MATLAB code. We were taking algorithms in MATLAB and translating them into LabVIEW Embedded for the AD Blackfin processor. To do that I (we) made up several libraries to handle the MATLAB style matrix manipulations.

    I see. Thanks.

    I was thinking you were passing data between Labview Embedded and Matlab.

  15. QUOTE(Mike Ashe @ May 31 2007, 09:23 AM)

    I did a fair amount of this last year on a project using LabVIEW Embedded and Matlab. I had to do it using loops and under NDA, so I can't post that code, but what you want isn't a huge amount of work.

    Mike,

    I understand that your NDA may prevent you from saying much, but can you talk about the nature of how you tied Labview Embedded and Matlab together?

    Gary

  16. I've been working with Matlab recently and have been really impressed with some of its array indexing capabilities, in particular the ability to use an vector as the index argument and a boolean array for indexing.

    For example, it would be nice to be able to do the following in Labview LabVIEW:

    http://forums.lavag.org/index.php?act=attach&type=post&id=5989

    Given LabVIEW's polymorphic operators (i.e. same operator for scalar, vector, matrix, etc. inputs), I would naively think this would be feasible.

    I could clearly write subvis to replicate this behavior but I don't see any way to do it without some sort of looping, which would be slower than a native capability.

×
×
  • Create New...

Important Information

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