Page 1 of 1

continuous acquisition and slopes counting

Posted: Mon Jul 28, 2014 6:28 pm
by adam.polak
Hello!

I have new task in my job and it concerns RedPitaya. And let’s not skip the fact that it will be my first project and first steps with RP (I have experience with other programming, but this is something new for me). I have install all necessary soft and have gone through the first demo examples given on the wiki page.. but now’s the time to start making my project.

I need to have continuous acquisition of both fast analog input channels. On channel 1 there will be square signal with reoccurring fixed amount of rising and falling slopes (it should work as a clock) with frequency of about 1.5MHz. I need to count all rising and falling slopes to know where “on the clock” I'm at specific moment (so value ‘n’ will be the n-th counted slope). On channel 2 there will be signal with local maxima, and the software need to find these local max, compare them with signal on channel 1 and identify position of this local maximum (it means on which ‘n’ or between which ‘n-1’ and ‘n’ it occur). At the end the software need to do some maths based on this ‘n’ value and write a number to the file (and maybe display on the screen).

It sound simple, but for somebody as new for this as me it’s still quite a challenge. I saw the example of continuous acquisition and I’m thinking to build other things on this example, but everything I’m doing are baby steps. I’ll be very grateful anybody could give me some suggestions of how to count these slopes, how to use the buffer to do all the calculations on time (actually these maxima will take place only on certain part of the clock, but still I need to count all the slopes to know when should I zero the counter), how to send the information to the computer in most efficient way… I’m feeling more confident in working with C/C++ than with java, so for the time I would aim in developing working solution to be controlled by console and leave the web page app for some other time.

I’m not sure if the information I’ve provided is enough to give me any good feedback, but if you are willing to help and only lack of input – please ask! Any help, suggestions, examples of similar tasks where I can learn from.. all will be greatly appreciated!
Thank you!
Adam

Re: continuous acquisition and slopes counting

Posted: Mon Aug 18, 2014 1:24 pm
by Crt Valentincic
Part of the solution was already described here.