Analog trigger for NIDAQ Tools Pulse Train Generator
I am trying to get analog triggering to work using the NIDAQmxPulseTrainGenerator that came with NIDAQ Tools. I have a PCIe-6363 and BNC2090A. When I try to use an analog trigger with the source being "\dev1\APFI0" and type "analog level", I get the following:
NI-DAQmx driver error while calling function DAQmxCfgAnlgEdgeStartTrig;
device Dev1:-200077: Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.
Extended info:
Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.
Property: DAQmx_StartTrig_Type
Requested Value: DAQmx_Val_AnlgEdge
Possible Values: DAQmx_Val_None, DAQmx_Val_DigEdge
Task Name: Dev1_CTR_0
Status Code: -200077
Unless I have misread the specs, I am almost certain that this card supports analog triggering. I have tried different strings for the source ("APFI0","dev1\APFI0","APFI1", etc.), but still get this same error. Is there something I am missing? Any help would be appreciated. Thanks!
I think the analog trigger is only available for analog input scanning (I suppose because it depends on the ADC). I think the part of the error message that says, "The property value may be invalid because it conflicts with another property" is a red herring. If you can set up an input scan, then you can attach your counter trigger to /Dev1/ai/StartTrigger.
January 25, 2019 at 09:41 am - Permalink
I don't think I understand. Is there no way to trigger a pulse train off of an analog signal? For the DAQmx_CTR_OutputPulse, there is a /TRIG flag where it seems that analog trigger is an option. Am I misunderstanding how this function works? Thanks again for your help.
January 25, 2019 at 02:55 pm - Permalink
The analog trigger depends on hardware support. The error message you got indicates that your hardware doesn't support an analog trigger for the purpose.
My earlier suggestion was a work-around for using the analog trigger available for scanning in order to trigger your pulse train.
Perhaps you should tell us what your goal is- perhaps there is a different way to solve the bigger problem. It is easy to fall into the trap of asking questions about implementing a particular approach to solving your problem, when it may be that what you need is a different approach.
January 25, 2019 at 05:00 pm - Permalink
I am recording a quasi-periodic signal with the FIFO procedures. Whenever it reaches a certain level, I want to trigger a short pulse train with a certain latency.
Your solution, if I understand correctly, is to split off this signal and use it as a trigger for a separate input scan. The start of this scan can then be used as a trigger in the pulse train generator panel. I will give it a try.
Just out of curiosity, what is the property of the ADC that would allow analog triggering for the pulse train generator? I ended up buying a specific card (PCIe-6363) because the specs said it had analog triggering, but is there an additional feature I should have been looking for?
Thanks again for all your help!
January 28, 2019 at 05:12 am - Permalink
If you are already using the analog inputs, you can't set up a separate analog input task for this purpose.
I've done a bit of reading in the PCIe-X series user manual- it seems that analog input, analog output and digital I/O can all use analog triggers. If you aren't using one of those systems, you could set up a task with analog trigger just so that you can route the start trigger signal to the counter's trigger input.
I am not really an NI hardware expert, though I know quite a bit about it because I wrote NIDAQ Tools MX. I am not aware of a device that has the capability you want.
You can also sign up for the NI forums- you might get better answers there. But be prepared to get answers with Labview connection diagrams!
January 28, 2019 at 10:37 am - Permalink