01-26-2015 08:39 AM
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
01-26-2015 09:48 AM - edited 01-26-2015 10:01 AM
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.
01-26-2015
10:35 AM
- last edited on
04-26-2025
10:13 PM
by
Content Cleaner
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:
https://www.ni.com/en/partners.html
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: https://www.ni.com/en-us/support/model.pxi-5122.html
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):
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, and the PFI0/1 Section :
https://www.ni.com/docs/en-US/bundle/pci-5122-specs/page/specs.html
I hope this helps!
Regards,
Nathan
01-27-2015 10:10 AM - edited 01-27-2015 10:11 AM
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:
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,
01-27-2015 10:13 AM
Your code looks functionally correct, so it should work once you get the cable you need.
Good luck!
Nathan
03-04-2015 09:55 AM
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.
However, there is still a problem. The digitizer couldn't detect any signal at pre-trigger samples.
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.
03-04-2015 09:59 AM
What reference position and record length did you use? I can't see those since they are controls in the latest code you posted.
03-04-2015 10:05 AM
The Refecence Position is 33%
The Min. Record Length is 1200 (@ Min. Sample Rate is 100MS/s).
03-05-2015 10:28 AM
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
03-05-2015 10:54 AM
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?
Anyway, I will check it again.
Best regards,
John C.