Jump to content

AlexA

Members
  • Posts

    225
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by AlexA

  1. Thanks, I managed to find a really helpful book after posting the OP. So if anyone wants help with DSP it seems to be a free online book. http://www.dspguide.com/ch16/3.htm
  2. Hey, I'm not sure if this is the right subforum. I'm in the process of trying to recreate the approach taken by the tone search algorithm in FPGA hardware. I've read through Alain Moriats 1999 presentation on the algorithm and spent a lot of time figuring out the maths myself, and finally googling a phenomenon that Alain makes note of, specifically, mirroring or wrapping round of the sinc (or Hanning modified sinc) envelope in the frequency domain off of DC and Nyquist. My question is, what is the basis of this phenomenon? I can't find a reference to it in any literature so I was wondering if someone could illuminate by what mechanism the envelope is mirrored off DC and Nyquist? Regards, Alex
  3. So I have 2 x 6052E DAQ cards. I want to generate a counter on one card, and pass it to the other card to use an edge detection method on it. But I keep getting "resource is in use" errors. Anyone got any advice on how to go about something like this? Alex
  4. Mark, as regards an event structure. Do you believe that it will make a significant difference given that the limiting factor on my code is the tone search algorithm??
  5. Hey guys Yeah I reached the conclusion that a 0 timeout on the enqueue is just gonna result in data not getting enqueued at all for that loop iteration, what I was wondering is what happens to that data? Regards Alex
  6. This is another bump from a guy who's currently trying to push an algorithm as fast as it will go. Looking for memory savings where possible. Did you ever finish the run through on queues AQ?
  7. And another quick question about queues, if I tell something to enqueue as fast as possible (0 timeout) and my dequeing code can't possibly keep up, what happens to the data? Is it destroyed or lost somehow? Or does the code behave like a lossy enqueue rather than a normal one? Regards Alex
  8. Hey Mark Thanks for your solution, I had a little trouble implementing it initially because I didn't put in the case structure, i.e. if no error -> do code, otherwise -> do nothing. As an aside, how much does having the error checking case slow the code down in your experience? Is an error signal a logic 1 or 0? If so I can't imagine it slowing things down too much, if it's a package containing error information with every check that might slow things down. Your thoughts? I ask because speed is crucial in the application I'm trying to create. Kind Regards Alex
  9. Hey everyone I'm reaching the end of my tether with these while loops running in parallel. My program seems to run fine but then when I hit the stop button it just hangs and doesn't exit. Can someone tell me, or link me to an explanation of how to propagate a stop condition in producer consumer loops, in addition, how should I destroy the queues so that they are destroyed in the right order? My code is attached if it's of any help at all. Regards and thanks for your time. Alex
  10. Hey Shane Thanks heaps for your help, that's definitely an interesting architecture. I've split things up a little differently than in my original code but I'm still using while loops. Your examples were much appreciated though. Regards Alex
  11. Hi Shane Sorry but I don't quite understand your architecture here? I'm having a bit of a dull moment at work so I'm not thinking at my best. Is what you propose supposed to be for the intermediary step of processing the data and enqueing it to an output? Regards Alex
  12. I know, I haven't actually written the enqueue part in, but for the sake of argument, assume that the results of the calculation in each loop (the average frequency values) are enqueued into a single queue, what will happen?
  13. 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.
  14. 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: And here is where I seem to be having problems with the test bench: 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
  15. 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.
  16. 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?
  17. I think I might genuinely be moderately retarded. I just realised the results swap because they are the same run times but in different fields (which I haven't renamed). I managed to confuse myself into thinking the actual run times were changing. I'm still curious as to why it makes a difference where you wire the wires in though.
  18. 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.
  19. 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
  20. 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
  21. Hey Ton I think I might have put an old version of my VI in by accident, silly me. Anyway, here's the picture I took of my most recent attempt. (I got the code capture tool, took a snap shot, but I'm still not sure how to insert it directly into my post, my forum-fu sucks).
  22. 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
  23. Wow, an absolute plethora of information in here, thanks heaps guys the help is very much appreciated.
  24. 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.
  25. 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.