07-23-2017 04:46 PM
Hello,
I am new to LabVIEW and FPGAs, and I have a assignment where I need to do photon counter on LabVEIW to collect counts from APDs. In my lab, I have a NI USB-7856R Module. I would appreciate any initial guidance or ideas since I am very new. I visited/read several LabVIEW forums about FPGAs, but I didn't learn much of them.
Thanks,
07-24-2017 01:09 PM
I'm not sure you actually need an FPGA. It sounds like a regular multifunction DAQ device would work and would probably be a little easier to develop. Still, if that's all you have, maybe start here? http://zone.ni.com/reference/en-XX/help/371599N-01/lvfpgahelp/fpga_getting_started/
Do you have your signal conditioning well defined? If your signals are coming in really fast you might be able to connect it to a digital input and just detect transitions from false to true or vice versa. Otherwise, if it's slow enough, you can probably just set a threshold voltage and count how many times the voltage goes over or below that threshold.
07-25-2017 04:13 PM
Thank you for your reply!
I know the signal is a TTL pulse where I am required to pick it up on my Module (NI USB-7856R). I have attached a vi that is clearly wrong and missing things, but I gave it a shot.
I am still new to this, but I know that I will have to use this LabVIEW FPGA Module that will be connected to APDs to pick up signals (1 for signal, 0 for nothing).
07-25-2017 04:48 PM
Actually you look like you aren't too far off. You need to maintain a count on the FPGA which should look like this code:
All your other code can run on the general purpose computer. For example:
07-25-2017 07:42 PM
Better would be to have the FPGA reset the loop counter on the rising edge as well. You should also only update the indicator on the rising edge. So a case structure should be used
07-26-2017 01:51 PM
Thank you so much for your reply. Could you explain the second vi for me? What is the counters box and all the other components?
Best,
07-26-2017 02:14 PM
The counters box is a read write control node. Its job is to transfer the value that's on the FPGA to the general purpose computer. Events is the number of times the FPGA went from false to true. Stamp is the number of fpga loops that have occurred. We're subtracting so that we compare how many events and how many clock cycles have occurred since 100 ms ago. Then we divide events by seconds to get events per second.. You can use the context help to hover over any other functions you're not clear on.
07-26-2017 03:57 PM
Thank you so much for your help. I have one thing remaining which is adding a time stamp for the counts and binning the data. Would you be able to help me with this?
07-26-2017 06:20 PM
I'm not clear on the requirement. You want to record a timestamp for every event? Isn't that potentially a huge amount of data?
07-26-2017 08:21 PM
Yes, that will be a huge amount of data, but our scans are very short (micro seconds).