LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger 4204 with an external TTL

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

 

 

 

 

0 Kudos
Message 1 of 9
(3,465 Views)

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!

 

0 Kudos
Message 2 of 9
(3,452 Views)

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

GEMESIS.EU

0 Kudos
Message 3 of 9
(3,441 Views)

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

0 Kudos
Message 4 of 9
(3,428 Views)

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

GEMESIS.EU

Message 5 of 9
(3,420 Views)

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

0 Kudos
Message 6 of 9
(3,401 Views)

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

GEMESIS.EU

0 Kudos
Message 7 of 9
(3,391 Views)

 

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

 

 

 

 

0 Kudos
Message 8 of 9
(3,387 Views)

 

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

 

0 Kudos
Message 9 of 9
(3,374 Views)