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.
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.
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).
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:
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
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?
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.
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?
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?