LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

triggering off a counter

Hi I am using Labwindows & the NI DAQPAD-6015.  I am using the counter (ctr0) in order to enable a voltage.  The counter is user configurable to pulse widths 1ms and greater. 
 
During this pulse I want to be able to use DAQmxReadAnalogF64 to read two different voltages.  Am I able to use the level of the counter to enable reading of the analog signal?  Or do I have to use the posedge/negedge to trigger?  I havent been able to use any of these supplementary functions ( DAQmxCfgSampClkTiming, DAQmxCfgDigEdgeStartTrig) succesfully but I think they are the ones I need.  When I try to use ctr0 as the trigger source for DAQmxCfgDigEdgeRefTrigCan it complains that the requested value is not supported.  Do I need to wire the counter output to one of the PFI pins?  But when I try this pin as the trigger source it gives the same not supported error. (When I click on the trigger source parameter in the function panel it says 'a custom control callback raised an exception' & I am not able to select anything and I have to type in the parameter)-So I think something is going on here...
 
 
Also I am just outputing the result of the analogOutput to a numeric on the .uir not a graph.  None of the examples show this kind of thing either? Can anyone help me out with this, I cant find any relevant examples for either of these problems.
 
thanks in advance
0 Kudos
Message 1 of 2
(2,766 Views)
Hi eward,

To use a level trigger, you will need to set up an analog trigger.  You can then set a threshold for this trigger, where if your signal crosses the threshold, your analog input task will trigger and begin aquiring.  Unforunately, the DAQPad-6015 does not support analog triggering.  The KnowledgeBase here lists the triggering capabilities of our multi-function DAQ devices.  In case you wanted to check out the programming examples of how to set up an analog trigger anyway though, you should be able to find them in the following directory:
C:\Program Files\National Instruments\CVI71\samples\DAQmx\Analog In\Measure Voltage\Cont Acq-Int Clk-Anlg Start

Your 6015 is capable of using digital triggers though.  This will trigger off of the positive or negative edge of your signal.  What is sounds like you want though is your analog acquisition to start when you see a positive edge, and pause when you see a negative edge.  This example code will be helpful in setting this up.  See if you can run that example code.  I would also be more descriptive with the error messages you are getting as well, as this will help us troubleshoot with you if you run into a problem with the example code.

Thaison V

0 Kudos
Message 2 of 2
(2,746 Views)