07-09-2012 05:41 PM
I am building a confocal laser scanning microscope and am currently attempting to develop labview controls for it. I have a fast steering mirror (FSM) which takes analog voltage inputs to control it's x and y angle and I have an avalanche photo diode (APD) which sends a TTL pulse for each photon detection event. For now, I am trying to create a program which will send out two analog signals to create a 2d raster scan with the FSM and count the number of pulses from the APD per pixel. I have been trying to make the program from https://decibel.ni.com/content/docs/DOC-5779 work, but I keep running into counter issues. I am using a generated pulse train from the other counter on my device (NI 6011E) as the period.term input, but I get a "Two consecutive input signals occurred without a counter timebase edge" error if I increase the frequency of the pulse train too high. Unfortunately, the number of pixels I can acquire seems to be limited to twice the frequency of the counter, so I cannot just use a lower frequency train. I believe that the error is occurring because the count rate from the APD is very low and that there are simply no photons hitting the detector in the time period between pulses.This is not a problem, but I would like to know how to simply record a 0 and continue with the scan, rather than have the entire program exit with an error.
Alternatively, if this does not seem like the correct way to accomplish what I am trying to do, I am open to new directions.
07-11-2012 08:24 AM
Hi,
can you post your vi? If so please mark the spot where the error is thrown in the block diagram with a comment.
Regards
Florian
07-11-2012 10:16 AM
nsteins,
Here is a resource that describes how to ignore specific error codes in your program:
Ignoring a Particular Error in an Error Cluster in LabVIEW
http://digital.ni.com/public.nsf/allkb/BF72229C53F7633386256EDD0069331B?OpenDocument
Try this out and see how it works. If you still run into problems, we can look into some other methods to accomplish your goal.
07-11-2012 02:44 PM
So simply ignoring the error did not work, because the DAQmx subroutine stops collection when the error is detected. I think I may need to come up with a different approach to synchronize the counting of TTL pulses with an analog output. Attached below is the code I have been working with.
07-12-2012 01:51 AM
Thanks for the vi,
when setting up your counter in task you choose a PFI line as timebase input - whatever is connected to this PFI determines how fast your timer counter counts.
Couldn't you change that to something like /Dev1/80MhzTimebase (don't have a device on my hands now, so I can't say exactly) so you don't miss signal changes?
I guess the important point is that your timebase needs to be faster as the update rate for your analogue out.
Strictly faster should be enough - no Nyquist needed this time.
Additionally, as you are reading row after row, the rows mustn't be too small - otherwise you might risk the loop iterating too slowly (mainly because windows isn't a realtime OS).
I hope this helps.
Florian