High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

How to delay a trigger with PXI-5122 before routed to PFI line

Solved!
Go to solution

Here is what you need to change:

1. Delete VIs #8 and #9.  The niScope Export Signals is only for configuring output events, not input triggers.  For the NI-SCOPE API, we define an event as an output, and a trigger as an input to the device, as seen on the State Machine Diagram.

 

2.  To Actually setup the start and reference trigger, you will need to add a niScope property node before niScope Initiate Acquisition.vi, with the following two properties, to configure the input events.  This is because there is not a VI you can use to configure the start and advance triggers:

   - Syncrhonization >> Start Trigger >> Source

   - Synchronization >> Advance Trigger >> Source

 

Also, its important to note that the nIScope Configure Trigger.vi only configures the Reference Trigger.

 

I hope this helps!

Regards,

Nathan

Systems Engineer
SISU
0 Kudos
Message 11 of 24
(3,719 Views)

Nathan,

 

I apologize for taking your time. Actually, I don't have a basic knowledge of coding. Thank you very much.

This is the edited. Please confirm or correct if I'm doing something wrong.

 

6_The sequence.jpg

0 Kudos
Message 12 of 24
(3,716 Views)

Hi Mercredi,

I appreciate you asking for help, since that is how we all learn.  I have been taking the time to answer your questions to help, but also to teach you how to use the NI-SCOPE API, so you can be self-reliant in the future.  

 

If you don't wish to learn coding, then I can point you to our Alliance Parter Network.  There you will find many companies that would be able to write your code for you:  

http://www.ni.com/alliance/

 

As the Product Support Engineer for our Digitizers/Oscilloscpe product line, I'm evaluating our Getting Started Material and Experience, so what kinds of resources do you feel that you are missing to enable you to successfully use our products?  Have you found or used any of our getting started resources?  How much experience do you have with LabVIEW?  All these questions can help me undertand your needs so I can ensure they are addressed.  

 

You can find our provided documentation for your PXI-5122 under the resources tab here: http://sine.ni.com/nips/cds/view/p/lang/en/nid/12615

 

Alright, now let me answer your question.  You code will not run as is, you should get an error when it gets to the property nodes.  Have you tried this?  There are a couple of issues with the Property Nodes:

 

1. The Start Trigger Source and Advance Trigger Source properties need to either be in a different niScope Property Node block, or be placed above the Property "Active Channel".  Properties are set in order from top to bottom, and for NI-SCOPE, when "Active Channel" is set, then all the properties below it need to be Channel Properties, or an error will occur.  The Start and Advance Triggers are not channel properties, but device properties.

 

2. For the Start Trigger Source and Advance Trigger Source Properties, "Exernal TRIG" is not a valid value.  See the documentation for these properties in the help file (also online here):

http://zone.ni.com/reference/en-XX/help/370592W-01/scopepropref/pniscope_starttriggersource/

http://zone.ni.com/reference/en-XX/help/370592W-01/scopepropref/pniscope_advancetriggersource/

 

These two triggers are required to be digital triggers, where the TRIG line is primarily used for analog triggers.  Therefore, you will need to use either PFI0 or PFI1 on the PXI-5122 in import your trigger.  Valid, trigger routing info is also documented in the PXI-5122 Specifications Document, in the Trigger section on page 16, and the PFI0/1 Section on page 19:

http://www.ni.com/pdf/manuals/371172m.pdf

 

I hope this helps!

Regards,

Nathan

 

   

 

Systems Engineer
SISU
0 Kudos
Message 13 of 24
(3,711 Views)

Hi Nathan,

 

I'm sorry for my stupid codes. I'm just a beginner in LabVIEW and trying to study coding. I really appreciate your help. It helps me a lot.

After one day reading the documents and your leadership, I hope this is the solution:

 

7_The sequence.jpg

 

Please teach me if I'm doing something wrong. I ordered an Aux100 (cable delivers BNC connectivity for PFI0 and PFI1 inputs on the 9-pin DIN connector labeled AUX). However, it takes a few days for the delivery. I will try it A.S.A.P after receiving the cable.

 

Regard,

0 Kudos
Message 14 of 24
(3,689 Views)

Your code looks functionally correct, so it should work once you get the cable you need.

 

Good luck!

Nathan

Systems Engineer
SISU
0 Kudos
Message 15 of 24
(3,687 Views)

Hi Nathan,

 

There were some mistakes so I just got the cables two days ago. I had tested the code. You're right, the setup works well with a pretty synchronization.

8_The sequence.jpg

However, there is still a problem. The digitizer couldn't detect any signal at pre-trigger samples.

8_The sequence.jpg

Could you please tell me why I couldn't acquire the signal at pre-trigger period?

 

Thank you for all your helps.

 

Regards,

 

John C.

0 Kudos
Message 16 of 24
(3,564 Views)

What reference position and record length did you use?  I can't see those since they are controls in the latest code you posted.

Systems Engineer
SISU
0 Kudos
Message 17 of 24
(3,562 Views)

The Refecence Position is 33%

The Min. Record Length is 1200 (@ Min. Sample Rate is 100MS/s).

 

9_The sequence.jpg

0 Kudos
Message 18 of 24
(3,560 Views)

If the signal is actually there, there should be no issues with acquiring it.  The acquisition engine takes pre-trigger samples and puts them into a circular buffer while waiting for the reference trigger.  So the data is acquired and in memory, so the likelyhood of the acquisition not working right for just pre-trigger samples is low.

 

Could it be that the signal your missing is more than 4us before the reference trigger?  Try increasing the record size to zoom out and see where the actual signal (if any) is.

 

Regards,

Nathan

 

Systems Engineer
SISU
0 Kudos
Message 19 of 24
(3,546 Views)

Thanks Nathan, I also think the code is functionally correct. The one thing I'm curious is the pre-trigger samples period has negative value on the time axis. It's from -4us to 0, where 0 is reference position. Is it right?

signals2.jpg

 

Anyway, I will check it again.

 

Best regards,

 

John C.

0 Kudos
Message 20 of 24
(3,543 Views)