Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

synchronize AI/AO double frequency

Hi,

 

I am trying to implement a lock-in kind of acquisition for a CCD camera. 

'What I need is the camera to take a picture in both the Open and Close phase of an optical chopper. 

Since the camera can be triggered with a TTL signal (coming from a BNC cable) I thought the easiest solution would be to:

 

1) read the square wave of the chopper as an analog input on my daq card (I am using a PCIe -6361 card) 

2) use both the rising and falling edges to generate a square wave with double frequency which then I send to the camera as external hardware trigger. 

3) Both square waves and camera pictures need to be recorded and everything needs to be synchronized

 

I've been trying various solutions but wasn't able, up to now, to find one where the AO is really stable and has the desired frequency.

 

Does anyone have a suggestion?

Thanks,

 

Laura

0 Kudos
Message 1 of 5
(2,728 Views)

There's going to be too much latency reading an analog input into software then using the data to generate the appropriate analog output.

 

If the output of the optical chopper is TTL, you could use a digital input change detection task (manual, example) which will let you sample a digital input off of its rising AND falling edge.  Configuring the task in this way will make available to you the "change detection event" which is a TTL pulse that occurs on every sample of the change detection task (which would be on each rising and falling edge of the signal from the optical chopper).  You could export this change detection event (using DAQmx Export Signal.vi) and use it to trigger your camera.

 

 

Best Regards,

John Passiak
Message 2 of 5
(2,718 Views)

(Duplicate Post)

 

Best Regards,

John Passiak
0 Kudos
Message 3 of 5
(2,718 Views)

I was actually thinking to something exactly like that but I'm having troubles to transform my square wave in a digital signal and viceversa.

Do you have any Idea? I'm using a BNC 2090a board to connect to the daq card. I guess the user1 and user2 connections should be the ones to use but I somehow don't manage to read the signal as a digital event

 

Laura

0 Kudos
Message 4 of 5
(2,708 Views)

If the square wave from the optical chopper is 0-5V TTL, connect it one of the pins on port 0 to be used with the change detection task.  If the BNC connector is more convenient, you can hook up the signal to user1/user2 then use a wire to connect the user1/user2 screw terminal line to one of the P0 screw terminal lines.

 

If the square wave is not 0-5V TTL, you can condition it externally OR you can:

 

1.  Connect the square wave to APFI0

2.  Configure an analog input task with an analog start trigger using APFI0 as the start trigger source

3.  Set the level and hysteresis of the trigger to something that is appropriate for your signal

4.  Export the analog comparison event to one of the PFI lines

5.  Physically wire the PFI line with the analog comparison event to one of the port 0 lines.

6.  Do everything else mentioned above with regards to the DI change detection task.

 

 

Best Regards,

John Passiak
0 Kudos
Message 5 of 5
(2,703 Views)