Jump to content

AlexA

Members
  • Posts

    225
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by AlexA

  1. What happens if I have 3 while loops trying to enqueue elements to the same queue? Is the queue "locked" while in the process of being enqueued? If this is the case, do the while loops wait until the queue has unlocked and then grab it for their own enqueue operation?

    Regards

    Alex

    Whoops, forgot to include picture of code in first post, here it is.

    post-16778-12646423994_thumb.png

  2. Hey all

    I'm currently trying to simulate a block of FPGA code which performs an FFT. I am having a lot of trouble getting the simulation to store the output of the FFT

    Here's the FPGA code:

    post-16778-126377381736_thumb.png

    And here is where I seem to be having problems with the test bench:

    post-16778-12637739835_thumb.png

    I've verified that the input case works, i.e. the FPGA code produces a graph corresponding to the input code I'm providing to the test bench, but the output case doesn't seem to populate the FFT results global, and I can't figure out another way to look at the results of the FPGA code.

    Any help would be much appreciated.

    Regards

    Alex

  3. I don't know in what sense you mean moving but in my mind it is moving. As I imagine it the "window" is tracking across the data, effectively creating a subset of the data upon which the mathematics are performed.

    In the current implementation of the code the data points are not mutually exclusive from one iteration to the next, the window shares all the same data points except for one new column. This is enormously expensive so I'm rewriting it to "tile" rather than raster. So the data points will be mutually exlcusive, i.e. the window will never share the same data points, in terms of the picture, the new window will be adjacent to the previous window rather than overlapping.

    I hope this clarifies what I am trying to do.

    I guess I'll try writing doubles of all my VI's, one for a 1D interpretation of the image data, and one for a 2D reconstruction. The 2D is more intuitive but I'm wondering if there will also be some sort of labview indexing trick that makes it more computationally efficient.

  4. Hey guys

    I have a section of my code that I want to make into a sub vi, this sub vi would always be inside a loop and needs to use the index of the loop it's called from. I was wondering what the best paradigm would be to implement this. Is it as simple as making a terminal which takes the index or is there a better way of doing it?

    Regards

    Alex

    Edit: For context and also because it leads me to another question. I'm trying to write a VI to raster a window through an image calculating the contrast in each section of the image. My image data currently exists as a 1D array so I've written my VI with this in mind, i.e. each time I shift the window I have to build the Region Of Interest (raster window) from the 1D data. I was wondering whether it would be smarter to cut the original 1D image data into rows, build a 2D array, and then raster a 2D sub window over the data?

  5. Well I've run that VI for a range of data from 1000 samples in length to 1,000,000. The algorithms are both size dependant, but any differences are obscured by the fact that changing the wiring gives different results, also, in both wiring examples, reversing the order of the VI's in the flat sequence reverses the timing results.

    I thought I had an idea about how to benchmark this stuff but I'm clearly missing something crucial.

  6. Hey guys

    So I'm trying to benchmark a couple of labview algorithms to be able to say something about which is more efficient before I go about trying to expand on that method for my final purpose of image processing.

    Here's how I've set it up so far. (Attached Image)

    Depending on how I wire the waveform into the sequence part I can get significant differences in the speeds of each algorithm. The first front panel is the result corresponding to the first block diagram. The second front panel corresponds to the second block diagram. Note the only difference is where I wired the waveform into the sequence. Could someone please explain this phenomenon to me? Also any suggestions for a better way to go about this would be much appreciated.

    Regards

    Alex

    post-16778-126031921966_thumb.png

    post-16778-126031922637_thumb.png

    post-16778-126031937673_thumb.png

    post-16778-12603193948_thumb.png

  7. Hey, I'm not sure who's in a position to answer this, but I know there are a few NI guys floating around the forums.

    Could someone in the know explain to me how the autocorrelate80 function works. When I found out the autocorrelate vi makes a call to this function I tried to disassemble it to see how it worked (probably naughty I know). I didn't understand at all (understanding of machine code to slim).

    Is this performing some sort of FFT based approach? Or a direct time domain approach to auto-correlation?

    Your help much appreciated as always

    Cheers

    Alex

  8. Hey guys

    I'm not savvy with how to make my code appear in my post but I've attached the vi at the bottom. Please note it was saved from Labview 2009, I'm not sure how to save it as an earlier version so if you guys can't see it please let me know along with a quick explanation how to save it as an earlier version.

    I'm attempting to iterate through each row of the array which represents my picture (basically checking each line of the picture), and perform an autocorrelation. I'm then summing the results of the autocorrelations and finally averaging the resulting array. It's not behaving as I expect.

    My questions:

    1. When passing an array into a shift register, does it pass it like a "single element", i.e. is the whole array stored in the shift register?

    2. When summing two arrays using the plus operator, I expect it to sum each element of the first array with the corresponding element of the second array, is that the case? Or do I have to iterate through the arrays "manually" to sum each element?

    3. When performing a divide operation on an array how does Labview behave? Does it divide each element or do something else wacky?

    Finally, I've performed a search of the forums for words surrounding this topic obviously, but if I've missed anything obvious or if there is a good external link please let me know.

    Cheers

    Alex

    ImgAnlysAutoCorrelateBasic.vi

  9. Ahem, I haven't bothered with error clusters in general so far, though I did use it once in the same manner as your first example (I was copying a labview example). Is the use of sequence structures as opposed to "data dependency" a purely stylistic choice or are there programmatic reasons (efficiency etc) for using data dependency?

    Thank you for your answer btw, it was exactly what I needed to know.

  10. Hey All

    I would like to know how Labview handles multiple "while loops" by default? I am not very experienced with Labview and definitely have no experience with the fundamentals of loop timing and such.

    I've done a search of the forums for "multiple while loops" and I couldn't find any simple answers. To give an example which will hopefully clarify exactly what I'm asking. If I drop two independent while loops into a VI, independent in the sense that neither while loop requires any information from the other to proceed to some conclusion, in what order will they execute? How can I control this order?

    Regards

    Alex

×
×
  • Create New...

Important Information

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