02-20-2006 11:04 AM
02-21-2006 10:48 PM
03-01-2006 09:40 AM - edited 03-01-2006 09:40 AM
DJ L.,
I am using a pulse generator to create my external trigger to aqcuire images with varing integration times. There are .VIs available to control the pulse generator which I have downloaded and run independently of any image aqcuisition software. Using these VIs I am able to communicate (GPIB) with the pulse generator to send pulses and vary the pulse characteristics. I have verified the output of the pulse generator with an oscilliscope.
Next, I ran the 1394 triggered_ grab.vi example program and manually sent pulses with the pulse generator. I was able to send different pulse widths to control the integration time of the camera (Trigger mode 1). Up to this point everything works perfectly.
However, when I combine the two programs, I had to put some delays in the program to ensure the pulse is sent during the time the camera is waiting for a pulse. I am able to play with the delay times to get the program working consistantly.
Now, when I have to make this image aqcuisition procedure part of a bigger program, the timing of the software is different depending on other things that are happening in the software (this is my theory anyway) and I will frequently get timeout errors.
I suppose my question is this: Is there a more robust way to control the timing of the aquisition portion? Where is the best place to send the command to the pulse generator to tell it to actually send the pulse?
The reason we would like to use the pulse generator as the trigger source is because once the camera recieves the trigger, there is a 20uS delay before it actually starts integrating. At that moment, the pulse generator sends a pulse to other equipment. Both triggers end at the same time.
I have attached the code for the aqcuisition portion of my program.
Frame 0 initializes the camera and enables the gamma correction.
Frame 1 sets up the pulse generator with the characteristics of the pulse the user wants, which is the integration time. The 2e-5 constants represent the 20uS delay described above. The constant of 6 represents the time (in Seconds) the pulse generator will wait after recieving the command to pulse, to physically send the pulse.
Frame 2 is a 3 second delay to give the pulse generator time to recieve and process the command
Frame 3 sets up the trigger
Frame 4 sends the command to the pulse generator
Frame 5 Takes the snap. (It is between frame 4 and 5 that the 6 seconds mentioned above come into play. It helps make sure that the snap vi is ready for the trigger before it is actually sent by the pulse generator)
Message Edited by harmond on 03-01-2006 09:43 AM
03-02-2006 06:15 PM