04-08-2011 08:35 AM - edited 04-08-2011 08:41 AM
Hi everyone,
We are currently making acquisitions on the eight channels of the PXi-4204 and we would like to synchronize it with another and external device.
This device, actually a camera, outputs a TTL 0-5V when a capture occurs and we thought of sending it to the SMB connector of our card.
Is this possible to externally triggers and synchronize this card?
If yes, what do you recommend to use? I thought of using VIs like :
- DAQmx Start Trigger (Digital Edge) with the source set to PFI0 to start the acquisition
- DAQmx Timing (Change Detection) with sources of rising and falling edges set to PFI0 to synchronize the card.
[Edit]
Is there a solution with AI Start TRIG and AI Sample clock ?
If you have any suggestions or example codes, thanks in advance!
Regards,
Christophe
04-11-2011 09:08 AM - edited 04-11-2011 09:09 AM
Ok, it seems that my question doesn't inspire anyone.
To be more clear, I just want to acquire data each time an external camera captures an image. The camera outputs a TTL 0-5V that I send to the input PFI0 of a PXI 4204.
I don't really know how to program with DAQmx the acqusition of one sample triggered by an external TTL.
Please find attached my code (I used the example Acq&Graph Voltage-Int Clk-Retriggerable.vi).
Thanks for your time!
04-12-2011 03:29 AM
Hi,
Of course it's possible. You can use your camera as external clock. I recommend the example Cont Acq&Graph Voltage-Ext-Clk-Dig Start.vi
Steps:
1. Create an analog input voltage channel.
2. Define the parameters for an External Clock Source. Additionally, define the sample mode to be continuous. The external clock rate is given to allow the internal characteristics of the acquisition to be as efficient as possible.
3. Set the parameters for a digital edge start trigger.
4. Call the Start VI to start the acquisition.
5. Read the waveform data in a loop until the user hits the stop button or an error occurs.
6. Call the Clear Task VI to clear the Task.
7. Use the popup dialog box to display an error or warning if any.
Could you try this example? Say me if it works.
Moreover, you can check this link, it can help you.
http://zone.ni.com/devzone/cda/tut/p/id/11549
Regards
Samuel G.
Samuel G. | GEMESIS
Certified LabVIEW Architect
Certified TestStand Developer
04-13-2011 03:39 AM
Thanks for answering!
I have looked at your example and I understood clearly the digital start.
However, I don't get why I must specify the sample clock.
I just don't know it. The camera captures given tension levels which vary "randomly". The capture of the image can occur anytime but when it occurs it delivers a 5V TTL.
Thanks again Samuel,
Christophe.A
04-13-2011 07:30 AM
Hi,
I didn’t understand. Consequently your example was the good one. Sample clock is used to specify the sample numbers that you need.
Regards
Samuel G.
Samuel G. | GEMESIS
Certified LabVIEW Architect
Certified TestStand Developer
04-18-2011 09:23 AM
I tested the code I posted and it doesn't work.
I always have the same error : -200452 : Property specified is not supported.
Do I have to understand that this card can not acquire on external digital pulses ?
Thanks
Christophe.a
04-19-2011 02:30 AM
You can use this card in order to acquire on external digital pulses.
Could you give me more information about your error (which block doesn’t work)?
Could you execute your program step by step (use the spotlight)?
Did you use L.V. example or your VI?
Samuel G.
Samuel G. | GEMESIS
Certified LabVIEW Architect
Certified TestStand Developer
04-19-2011 03:02 AM
The error appears after retriggerable property node. If I use right click/filter/properties only for the 4204, i can't access this property anymore.
I consequently understood that I can't use this card for a retriggerable acquisition.
I browsed the forum and found a workaround with the use of counters. I plan to use another M-series card to retrigger a finite pulse train each time a digital pulse is received. This pulse train would be sent as the source of the sample clock of the 4204 Card through the PXI_TRIG0 line.
Please find attached my code!
Christophe.A
04-20-2011 06:18 AM
I managed to make the program work but I got a problem :
- it seems that the counter misses a lot of pulses : there are only 3us wide (the counter is on the 6230 PXI card).
Is there a limitation ? I tried with 500us wide pulses and I still have the same problem.
- The pulses are at 4kHz : is the program fast enough to retrieve 4k samples/second ? I need only one sample per pulse and since i don't use any buffer, I am wondering if the program will not miss a lot of values.
I hope someone will be interested!
Christophe