04-21-2008 09:03 AM
{
string channelName = string.Empty; // Set this to -1 to let the NI driver decide which terminal configuration to use int useDefaultTerminalConfig = -1; // Get the name of the current channelchannelName = BASE_CHANNEL_NAME + channelIndex;
// Create the channelm_DAQmxTask.AIChannels.CreateVoltageChannel(m_Device.AIPhysicalChannels[channelIndex], channelName, (
AITerminalConfiguration)useDefaultTerminalConfig,-10.0, 10.0,
AIVoltageUnits.Volts);}
foreach (AIChannel curChannel in m_DAQmxTask.AIChannels)
{
curChannel.DataTransferMechanism =
AIDataTransferMechanism.Interrupts;}
// Setup the sample clockm_DAQmxTask.Timing.ConfigureSampleClock(
string.Empty, m_ClockFrequency, SampleClockActiveEdge.Rising, SampleQuantityMode.FiniteSamples, m_NScans); // Setup the reference triggerm_DAQmxTask.Triggers.ReferenceTrigger.ConfigureDigitalEdgeTrigger(
"PFI1", DigitalEdgeReferenceTriggerEdge.Rising, m_PreTriggersScans); // Set the time outm_DAQmxTask.Stream.Timeout = (m_Timeout * 1000) - 500;
Solved! Go to Solution.
04-22-2008 04:45 PM
05-09-2008 09:51 AM