Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Pause Trigger example - ContAcqVoltageSmps_IntClk_PauseTrigger

Hello Folks,
 
source:  ...\MeasurementStudioVS2003\VCNET\Examples\DAQmx\Analog In\Measure Voltage\ContAcqVoltageSmps_IntClk_PauseTrigger
 
I am using a cDAQ-9172  with 2 - NI9215 modules and 1 - NI9263 module.
In the trigger source edit box, I tried both AI and AO as source.
 
when AI as source (/cDAQ/ai/PauseTrigger),
high pause level:
->
 
 
 


Message Edited by angelmcdoggie on 03-20-2008 05:31 PM
0 Kudos
Message 1 of 5
(7,428 Views)
Hello Folks,
 
source:  ...\MeasurementStudioVS2003\VCNET\Examples\DAQmx\Analog In\Measure Voltage\ContAcqVoltageSmps_IntClk_PauseTrigger
 
I am using a cDAQ-9172  with 2 - NI9215 modules and 1 - NI9263 module.
In the trigger source edit box, I tried both AI and AO as source.
 
Experiment 1:
when AI as source (/cDAQ/ai/PauseTrigger), either high or low pause level.
Result:  the NI input graph reflected the input voltage from my power supply
 
Experiment 2:
when AO as source (/cDAQ/ao/PauseTrigger), high pause level
Result:   the NI input graph reflected the input voltage from my power supply
 
Experiment 3:
when AO as source (/cDAQ/ao/PauseTrigger), low pause level
Result:   timeout
 
Experiment 4:
Modified the program to have an output task wherein AI as source (/cDAQ/ai/PauseTrigger). 
On the hardware side, a voltage source was wired to the AI module while the AO was connected to the scope. 
 
// Create the voltage channel

m_outtask->AOChannels.CreateVoltageChannel(physicalChannel2, "", minimum2, maximum2, DAQmxAOVoltageUnitsVolts);

m_outtask->Timing.ConfigureSampleClock("", rate, DAQmxSampleClockActiveEdgeRising, DAQmxSampleQuantityModeContinuousSamples, 1000);

m_writer = std::auto_ptr<CNiDAQmxAnalogMultiChannelWriter>

(new CNiDAQmxAnalogMultiChannelWriter(m_outtask->Stream));

pData = new CNiReal64Matrix(1,1000,0.0);

int ii;  for(ii=0;ii<500;ii++)  {

          (*pData)(0,ii) = 3.0;   }

m_writer->WriteMultiSample(false, *pData);

// Configure the internal clock

m_task->Timing.ConfigureSampleClock(_T(""), rate, DAQmxSampleClockActiveEdgeRising, DAQmxSampleQuantityModeContinuousSamples, 1000);// Set up a pause

// Set up a pause trigger

//input task

// m_task->Triggers.PauseTrigger.ConfigureDigitalLevelTrigger(triggerSource, m_gateLevel);

//output task

m_outtask->Triggers.PauseTrigger.ConfigureDigitalLevelTrigger(triggerSource, m_gateLevel);

Please, refer to the attachments for the high level pause and low level pause respectively.
 
 
The fact that i have no module that has PFIO, I am not sure what to expect in this example.
With my current modules, is it possible to generate the correct output/ behaviour?  What is the
behaviour of a pause trigger for this DAQ series? Will it stop? A flatline or the waveform will disappear?
 
 
 
Thanks and thanks,
A  Robot Happy
 
Download All
0 Kudos
Message 2 of 5
(7,425 Views)

Hi angelmcdoggie,

I understand that you are modifying the Cont Acq Voltage Samples-Int Clk-Pause Trigger example to perform continuous generation. In this example the data is acquired continuously and when the pause trigger condition is met the acquisition is paused, you won’t see a flat line neither the waveform will disappear what will happen is that the device will pause the acquisition while the pause trigger condition is present. It is true that these modules don’t have PFI lines, but you can still share the analog I/O sample clock through the backplane of the chassis. I hope this is helpful,

Ana P
National Instruments
Applications Engineer
0 Kudos
Message 3 of 5
(7,384 Views)
Thanks Ana for the information and you are right about my intention.
 
It may sound dumb but I'm clueless how do I share the analog
I/O sample clock through the backplane of the chassis?
 
Thanks again!!! 😃
0 Kudos
Message 4 of 5
(7,357 Views)

Hi angelmcdoggie,

You can share the AI/AO sample clock by using the /cDAQ/ao/SampleClock or /cDAQ/ai/SampleClock. In your code, when you are configuring the internal clock, in the timing configurations you can set the signal source as /cDAQ/ai/SampleClock or /cDAQ/ao/SampleClock. I hope this is helpful,

Ana P
National Instruments
Applications Engineer
0 Kudos
Message 5 of 5
(7,329 Views)