Error -200774: Terminal Has Already Been Configured with a Different Minimum Pulse Width

Updated Oct 23, 2018

Reported In

Hardware

  • USB-6356

Driver

  • NI-DAQmx

Programming Language

  • C# .NET
  • Visual Basic .NET

Issue Details

When I run my code that sets the Minimum Pulse Width property for an encoder on an NI-6356 using the .NET DAQmx API I see the following error:

Status Code: -200774

Terminal has already been configured with a different Minimum Pulse Width by another property in this task. 

Device: Dev1
Terminal:PFI8
Requested Value: No Filter
Configured Value: 5.120E-006

Task Name: Encoder




Why do I get this error and how can I fix it?
 

Solution

This error can occur when you have configured two signals (channels, sample clocks, triggers, etc.) in a program or task to look at the same PFI or physical line and only one signal has digital filtering enabled.

You can resolve this issue by configuring the filtering properties on both signals to be the same, or by changing the physical lines or terminals of your signals to be different.

Configuring Filter Properties
Depending on the type of signals you're using, you will have similar, but slightly different properties to set to enable the filters and configure them to be the same. An example using an externally-clocked and triggered Analog Input task on the same physical line is shown below:

C#

// Create a new task
myTask = new Task();

// Create a virtual channel named myChannel
myChannel = myTask.AIChannels.CreateVoltageChannel("/Dev1/ai0", "AIChannelName",
            AITerminalConfiguration.Differential, 0.0, 10.0, AIVoltageUnits.Volts);

// Configure the sample clock to use PFI0
myTask.Timing.ConfigureSampleClock("/Dev1/PFI0", 10000,
             SampleClockActiveEdge.Rising, SampleQuantityMode.ContinuousSamples, 1000);

// Enable digital filtering on the external sample clock
myTask.Timing.SampleClockDigitalFilterEnable = true;
myTask.Timing.SampleClockDigitalFilterMinimumPulseWidth = 0.0000512;
                    
// Configure a start trigger for the acquisition on PFI0
myTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger("/Dev1/PFI0",
             DigitalEdgeStartTriggerEdge.Rising);
                    
// Enable digital filtering on the start trigger
myTask.Triggers.StartTrigger.DigitalEdge.DigitalFilterEnable = true;
myTask.Triggers.StartTrigger.DigitalEdge.DigitalFilterMinimumPulseWidth = 0.0000512;

VB .NET

' Create a new task
myTask = New Task()

' Create a virtual channel named myChannel
myChannel = myTask.AIChannels.CreateVoltageChannel("/Dev1/ai0", "AIChannelName", _
            AITerminalConfiguration.Differential, 0.0, 10.0, AIVoltageUnits.Volts)

' Configure the sample clock to use PFI0
myTask.Timing.ConfigureSampleClock("/Dev1/PFI0", 10000, SampleClockActiveEdge.Rising, _
            SampleQuantityMode.ContinuousSamples, 1000)

' Enable digital filtering on the external sample clock
myTask.Timing.SampleClockDigitalFilterEnable = True
myTask.Timing.SampleClockDigitalFilterMinimumPulseWidth = 0.0000512

' Configure a start trigger for the acquisition on PFI0
myTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger("/Dev1/PFI0", _ 
            DigitalEdgeStartTriggerEdge.Rising)

'Enable digital filtering on the start trigger
myTask.Triggers.StartTrigger.DigitalEdge.DigitalFilterEnable = True
myTask.Triggers.StartTrigger.DigitalEdge.DigitalFilterMinimumPulseWidth = 0.0000512


Using Separate Lines
You can do this in the .NET API by accessing a single channel object in your channel collection and setting the terminal property explicitly. An example changing the default output line of a  Counter Output Pulse Frequency task is shown below:

C#

//Construct a new task object myTask
myTask = new Task();

//Create a new Pulse Frequency channel at 1000 Hz and a 50% duty cycle
myChannel = myTask.COChannels.CreatePulseChannelFrequency("/Dev1/Ctr0",
                "CounterChannelName", COPulseFrequencyUnits.Hertz, idleState, 0.0,
                1000, 0.5);

//Change the output terminal of the newly created CO Channel
myChannel.PulseTerminal = "/Dev1/PFI0"

VB .NET

'Construct a new task object myTask
myTask = New Task()

'Create a new Pulse Frequency channel at 1000 Hz and a 50% duty cycle
myChannel = myTask.COChannels.CreatePulseChannelFrequency("/Dev1/Ctr0", _
                "CounterChannelName", COPulseFrequencyUnits.Hertz, idleState, 0.0, _
                1000, 0.5)

'Change the output terminal of the newly created CO Channel
myChannel.PulseTerminal = "/Dev1/PFI0"

Additional Information

The filter configuration for all signals is disabled by default. If two signals or channels are configured to use the same physical line, one will try to enable digital filtering while the other will try to disable it, causing the error above to occur.

WAS THIS ARTICLE HELPFUL?

Not Helpful