Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

How to specify Gate and Aux input signals when using TwoEdgeSeparationChannel

I have searched in the forum, read C++ examples and tried to find information in the Measurementstudio help. I still don't know how to specify what signals you feed into the counter when using a TwoEdgeSeparationChannel.
 
I have an analog filter and need to measure the phase-difference between the input and output. I think that one way you can do that is to use two analog triggers, both will trigg on the rising slope when the voltage is zero. The first trigger will start the counter and the second one will stop the counter.
 
The output from the first trigger will be routed to Aux
The output from the second trigger will be routed to Gate
I want the source clock to be the 80 MHz clock of the NI6259
 
I can't find where to specify the information for the counter (Aux, Gate and Timebase) when using Measurementstudio for VC++.
 
/pek
 
 
0 Kudos
Message 1 of 2
(2,988 Views)

Hello!

Really sorry that I don't understand your question fully but have you tried to generate code with the DAQ Assistant? There you can see the basic architecture of the programming flow and the basic function calls you need. The extra features you then need such as routing among other things can then be added to this generated code.

Also make sure that the routing paths are possible with the board you are using.

Attached is a small example that I generated with the DAQ Assistant:

#include "stdafx.h"
#include "DAQmxTask1.h"


CDAQmxTask1::CDAQmxTask1 ()
    : CNiDAQmxTask(_T("CDAQmxTask1"))
{
    this->Configure();
}

void CDAQmxTask1::Configure ()
{
    this->CIChannels.CreateTwoEdgeSeparationChannel(_T("Dev2/ctr0"), _T("TwoEdgeSeparation"), 1E-06, 1, DAQmxCITwoEdgeSeparationFirstEdgeRising, DAQmxCITwoEdgeSeparationSecondEdgeFalling, DAQmxCITwoEdgeSeparationUnitsSeconds);
    this->Timing.ConfigureImplicit(DAQmxSampleQuantityModeContinuousSamples, 100);
}

Routing of signals can be achieved with the CNiDAQmxExportSignals::ExportHardwareSignal() function for an example.

Hope this information at least get you started.

Regards,

Jimmie A.

Applications Engineer, National Instruments

 

 

 

 

Regards,
Jimmie Adolph
Systems Engineering Manager, National Instruments Northern European Region

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