LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use digital trigger of NI-PCI-5122

Hi everyone

Recently I am using a NI-PCI-5122 as an acquisition card.

I want to use digital trigger to synchronize the acquisition.

So I connect a 5V-0V TTL square wave signal to PFI0 channel, considering this as a trigger.

However, a time exceeded error occurs.

Thus, I am completely compused.

This TTL signal is not a digital signal?

So what kind of signal shall I use as digital triggers? How can I get one? By using Function generators??

Please help me.

0 Kudos
Message 1 of 10
(2,364 Views)

Hi,

 

It sounds like it should work. Therefore, there's probably a problem in the code that you didn't describe. Can you share the code you're having a problem with?


GCentral
0 Kudos
Message 2 of 10
(2,305 Views)

Thanks 

The diagram of the code I use is in the attachment

Please check it

This is an example program downloaded from  NI

0 Kudos
Message 3 of 10
(2,220 Views)

Where does the error occur? (You can use trace execution or just add more probes/indicators to check this - probes are a good choice that won't mess up the front panel)

What is the exact message?

Is the "timeout" setting definitely longer than the expected duration of your acquisition (as set in block #5)?


GCentral
0 Kudos
Message 4 of 10
(2,213 Views)

Hi

The error is all the same with the errors that no trigger signal is input

0 Kudos
Message 5 of 10
(2,201 Views)

Thank you for your reply cbutcher

The program I use is in the attachment, you can try it if you are availiable.

I set the trigger type to analog trigger because analog signal is usually employed for us.

And even if I connect a digital signal (0-5V square wave signal) to digital trigger input, "timeout" error still exists.

 

0 Kudos
Message 6 of 10
(2,197 Views)

The screenshot of the error code is like this

0 Kudos
Message 7 of 10
(2,192 Views)

I would recommend reading the description of the triggering state machine model here: SMC-Based Digitizers Acquisition Engine State Diagram.

 

This is a fairly detailed description of the order in which various triggers are waited on/for, and how to progress to making a measurement.

 

Your front panel screenshot suggests that you have the Start Trigger set to PFI0 and the Reference Trigger set to External Trigger - you might instead want to consider (if I understood your problem correctly) setting the Start Trigger to immediate (this is the default, according to the linked description above) and the Reference Trigger to your PFI0. This should then respond to your selection of edge types and slope so on.


GCentral
0 Kudos
Message 8 of 10
(2,182 Views)

I have tried digital trigger as reference trigger signal

But it did not work

My trigger signal for both digital and analog is 0-5 V TTL square wave signal

Is this signal not right?

0 Kudos
Message 9 of 10
(2,173 Views)

@过客wasd wrote:

I have tried digital trigger as reference trigger signal

But it did not work

My trigger signal for both digital and analog is 0-5 V TTL square wave signal

Is this signal not right?


Did you set the Start Trigger to Immediate?

A square wave should be fine, and I believe that for the 5122 there should be no problem with a 5V high value.

The specifications can be found here: PCI 5122 Datasheet.

Carefully reading those specifications (at least around the Triggering options section) might give some hints.

Sorry that it's difficult to give better suggestions without more information about exactly what you're trying.


GCentral
0 Kudos
Message 10 of 10
(2,158 Views)