03-20-2008 04:29 AM - edited 03-20-2008 04:31 AM
03-20-2008 05:52 AM
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);03-26-2008 09:08 AM
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,
04-02-2008 04:57 AM
04-03-2008 06:17 PM
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,