High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

PXI 5154 trigger on external input

Solved!
Go to solution

I am using a PXI 5154 and would like to modify my previous program to trigger from the external source. I am feeding the external source from a 2.5 V source and it seems to trigger fine. However when acquiring data the vertical range of the oscilloscope goes to 5 V which for my application is too high as I am acquiring in the range of millivolts. I tried to display the vertical range of the channel I am aquiring but although I set it as the active channel I get the following error:

 

Error -1074118616 occurred at Property Node (arg 1) in PD_measurements_v11_test.vi

 

Getting a channel based attribute value failed because the queried channels have different values.  Please specify a channel when querying a channel based attribute.

 

I am attaching a printsceen of the relevant part of the code.

 

Regards,

 

Demetres

0 Kudos
Message 1 of 14
(7,277 Views)

Hi demetres76,

 

As you mentioned, this error occurs when you attempt to read properties that are not common between channels. As a result, specifying the active channel is important before calling the "Vertical Range" property node. From the screenshot you provided, I could not decipher what you set as the active channel.

 

However, I would like to point you to the KnowledgeBase, here. It provides a solution for configuring the vertical range for each channel independently. 

Tunde S.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 14
(7,260 Views)

Dear Thunde,

 

I tried to change the vertical settings of the channels in the way you describe both by calling the vertical settings of the oscilloscope and setting the property nodes. I am triggering on the external trigger of NI 5154 and then trying to change the vertical range of channel 0 but the vertical ranges stays on 5V which is the preset range of the external trigger. Could this be an issue with the exernal trigger?

0 Kudos
Message 3 of 14
(7,257 Views)

After modifying your code, are you still getting error -1074118616?

 

The PXI-5154 is a SMC-based digitizer and I would like to point you to its Acquisition Engine State Diagram, which can be found, here. This document better explains why the hardware attributes such as the vertical range is not set until the Initiate command is called.

 

According to this help document, if you want to modify certain attributes such as the vertical range, you should put your device in an idle state by stopping any acquisition, apply the changes, and then reinitiate the device.

 

Tunde S.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 14
(7,248 Views)

Dear Tunde,

 

If I understood correct from the diagram that you send and from your previous email then there is no way to trigger on the external input and acquire data on channel 0 or 1 in a range other that 5 V. Is this how the PXI is uppose to work? Because it is not of much use being able to trigger on external input but only on a specific vertical range.

 

Regards,

 

Demetres

0 Kudos
Message 5 of 14
(7,239 Views)

The voltage levels for Channel 0 and Channel 1 for your PXI-5154 is 0.1, 0.2, 0.5, 1, 2, 5 Vpk-pk, as defined in the PXI-5154 Specifications document. Also, the vertical range is coerced to the next higher valid vertical range for the digitizer, as defined here.

 

You should have configured your device’s vertical range, and trigger source and then initiate your device. The niSCOPE EX Configured Acquisition.vi, LabVIEW shipping example shows this programming flow. You can also find this example in the <LabVIEW>\examples\instr\niScope directory on your machine.

Tunde S.
Applications Engineer
National Instruments
0 Kudos
Message 6 of 14
(7,233 Views)

Dear Tunde,

 

This is exactly what I do. I define the vertical and horizontal settings and trigger source and then initiate and acquire data. This flow works very well when triggering on channel 0 or 1 and acquring on the same channel. However when changing the trigger to external it acquires data on channel 0 or 1 but in the range of 5 V.  Therefore there is no way to trigger on external trigger and acquire data on channel 0 or 1. Once choosing external trigger all vertical ranges on all channels are set to 5 V. If the procedure according to the triggering sequence is followed to change the vertical range the acquisition needs to be stopped which eans that it is not possible to trigger on external trigger. My feeling is that this is not how it is supposed to work. If this is how it works then external trigger is not very useful. 

 

Regards,

 

Demetres

0 Kudos
Message 7 of 14
(7,230 Views)

I was able to use an external trigger and my vertical range for CH 0 was as I configured it. I used the niSCOPE EX Configured Acquistion.vi LabVIEW example and the vertical range that I configured was the vertical range that I read back through the property node. The only modification I made to the example was adding the NI-SCOPE property node (shown below) after the niSCOPE Multi Fetch Cluster.vi.

 

Vertical_Range.png

 

If you make this modification to the example, are you unable to read back the vertical range that you specified? 

Tunde S.
Applications Engineer
National Instruments
0 Kudos
Message 8 of 14
(7,223 Views)

Dear Tunde,

 

I followed your changes and it seems to give me the following error when I add the property node you suggested:

 

Error -1074118540 occurred at niScope Initiate Acquisition.vi:2

 

Possible reason(s):
Requested vertical range is invalid.

Device: PXI1Slot3
Channel Name: 0

Status Code: -200579

 

I am also attaching a printscreen of the error.

 

 

0 Kudos
Message 9 of 14
(7,219 Views)
Solution
Accepted by topic author demetres76

Dear Tunde,

 

I managed to make the changes you suggested and the example works. I will look into my code and see what is wrong. I will get back to you whether it has been resolved in my code or not.

0 Kudos
Message 10 of 14
(7,218 Views)