02-04-2016 08:26 AM
I would like to trigger the start of a multi-line aqusition on a PXIe-6535 when IO line Port3 Line 7 goes high, within the DAQmx .NET API. I would settle for being able to to trigger it on a PFI line, but that doesn't seem possible either.
I have tried:
readTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger("PXI1Slot6/PFI4", DigitalEdgeStartTriggerEdge.Rising);
and
readTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger("PXI1Slot6/Port3/Line7", DigitalEdgeStartTriggerEdge.Rising);
but the code lines keeps throwng a DAQmx Exception:
Make sure the terminal name is valid for the specified device. Refer to Measurement & Automation Explorer for valid terminal names. Property: NationalInstruments.DAQmx.DigitalEdgeStartTrigger.Source Property: NationalInstruments.DAQmx.DigitalEdgeStartTrigger.Edge Source Device: PXI1Slot6
How can I start a waveform aquisition when Port 3 Line 7 goes high?
02-04-2016 12:22 PM
After some brute-force experimentation, here are the possible trigger sources:
PXI_Trig0
PXI_Trig1
PXI_Trig2
PXI_Trig3
PXI_Trig4
PXI_Trig5
PXI_DSTARA
DI/SampleClock
DI/StartTrigger
DI/ChangeDetectionEvent
Notable sources that are missing:
PXI_Trig6, PXI_Trig7, and the PFI lines.
I can see why the normal IO lines are non-triggerable (even though it would just be fantastic if they could be triggerable), but why are PXI_Trig 6 and 7, and all of the PFI lines non-triggerable?
02-05-2016 10:53 AM
I believe page 3 of this file has the information you need:
http://www.ni.com/pdf/manuals/374373g.pdf
It seems only PXI_TRIG 7 is not supported, not sure why you are having trouble triggering from PXI_Trig 6. Is it giving out an error when you try triggering from PXI_TRIG 6?
02-09-2016 07:35 AM
It throws a DAQmx exception when I attempt to configure the start trigger with any of the PFI lines (docs says PFI lines should be good), PXI_TRIG 7 (can't use TRIG7 as a source? Why?), or PXI_TRIG 6 (docs says TRIG 6 should be good as well).
02-09-2016 07:59 AM
Hmmm.... I think I'm going partly insane.
I figured out the problem I was having the PFI lines. In order to use them, they must have the correct string format.
These will all fail:
PXI1SLot6/PFI0 PXI1SLot6/PFI1 PXI1SLot6/PFI2 PXI1SLot6/PFI3 PXI1SLot6/PFI4 PXI1SLot6/PFI5
These will all succeede:
/PXI1SLot6/PFI0 /PXI1SLot6/PFI1 /PXI1SLot6/PFI2 /PXI1SLot6/PFI3 /PXI1SLot6/PFI4 /PXI1SLot6/PFI5
The leading forward slash is optional when using PFI lines for general input or output, but it must be there when configuring PFI lines for trigger use. Once again, we see why magic strings should be avoided, especially on a public-facing API....
Also, the PXI_TRIG6 lines starting working, and I have no idea why.
02-10-2016 08:47 AM - edited 02-10-2016 08:48 AM
I'm not sure what the issue was with PXI_TRIG6, but PXI_TRIG7 shouldn't work as a trigger input, so I believe everything is working as it should now.
EDIT: From Manual: "PXI_TRIG7 is not supported as input trigger."
02-11-2016 08:03 AM
Yeah, I went digging through the manual again and saw that TRIG7 can't be used an input trigger.
National Instruments really has a nack for using the same name for different functionality....
03-08-2016 10:36 AM
If you open up MAX, you can navigate to your device and pull up the signal routing table which provides a matrix of all supported source/destination pairs on the board. The information should also exist in the help documentation. Apologies that you had a difficult time figuring this out.