Discussion:
Start Trigger of a digital output
(too old to reply)
angelmcdoggie
2008-05-23 10:10:07 UTC
Permalink
Hello All,
 
I want to start trigger a digital output (NI 9401) module to generate data.  I read some info but I am having problems with my timing. 
 

m_DITask->DIChannels. CreateChannel( risingEdgeLine1, _T( ""), DAQmxOneChannelForEachLine); 
m_DOTask->DIChannels. CreateChannel( commandLine1, _T( ""), DAQmxOneChannelForEachLine);
m_DOTask->Timing. ConfigureSampleClock( "/cDAQ1Mod5/ai/SampleClock", rate, DAQmxSampleClockActiveEdgeRising,    DAQmxSampleQuantityModeContinuousSamples, samples);
m_DOTask->Triggers. StartTrigger. ConfigureDigitalEdgeTrigger( "/cDAQ1/ai/StartTrigger", DAQmxDigitalEdgeStartTriggerEdgeRising);
 
Related to trigger, this is the workaround that I am trying to achieve.
Source: <a href="http://digital.ni.com/public.nsf/websearch/67E849D5A5715BB486256F7A0064D85B?OpenDocument" target="_blank"> http://digital.ni.com/public.nsf/websearch/67E849D5A5715BB486256F7A0064D85B?OpenDocument</a>
Triggering:To trigger the waveform acquisition or generation, the source of the DIO sample clock (i.e. the&nbsp;analog sample cock)&nbsp;must be set up for the trigger and the DIO operation should just be configured to receive that clock. For example, if you were going to use the analog input sample clock to clock your digital measurements, you would configure your AI subsystem to receive a start trigger and to use an internal clock. Once the trigger arrives, the AI Sample clock is generated and passed to the DIO subsystem
My program generates the status error in the attachment.&nbsp; Another question,&nbsp; Is the link also applies&nbsp;to C - series DAQ?&nbsp; I'd like to do some post processing of samples.&nbsp; By the way, I am using a cDAQ-9172, NI-9401 for my DIO; Visual C++.&nbsp; Thanks for any enlightenment.
Please advice,
A
&nbsp;
&nbsp;
&nbsp;
&nbsp;


twoedge_meas.ppt:
http://forums.ni.com/attachments/ni/70/8906/1/twoedge_meas.ppt
Ana P
2008-05-29 15:40:08 UTC
Permalink
Hi angelmcdoggie,

&nbsp;I don?t see the status error in the attached file. However, I understand that you want to trigger the generation in a digital output of the NI-9401. Do you have other modules in the chassis more than the 9401? I?m asking that because you cannot use the AI Sample Clock if you don?t have an AI module in the chassis. So I believe that the error you are getting is related to the fact that there is no Analog module. If my assumptions are mistaken or if you have more questions please post back.
Continue reading on narkive:
Loading...