10-09-2014 03:02 PM - edited 10-09-2014 03:03 PM
We are trying to monitor several 8 bit ports on a NI PXIe-6535 from different Task() objects using the DAQMX .NET libraries.
We thought we could create a task for PXI1Slot2/port0 and one for PXI1Slot2/port1. Each task would specify different edge bit conditions that would result in a
unique DigitalChangeDetectionEventHandler being called. This way we know which port saw the change.
No matter what we enter for the .DIChannels.CreateChannel() lines parameter we get a "Resource requested by this task has already been reserved by a different task" exception. It seems we can only have one task per PXIe-6535 device. We thought we could have one task per port.
Each task contains only 1 DigitalChangeDetection callback so we cannot create multiple channels per task, The callback event arguments don't indicate anything that tell you what port or channel was involved.
What are we missing ?
Solved! Go to Solution.
10-09-2014 03:49 PM
Can you create the tasks you want in NI-MAX?
10-09-2014 03:56 PM
I am new to all this so I don't even know what that means. I am able to create up to 5 test panels in MAX with each panel monitoring one 8 bit port.
10-10-2014 07:27 AM
10-10-2014 07:47 AM - edited 10-10-2014 07:48 AM
I went to MAX and created 3 tasks that all appear to be running at the same time.
8 bit input task on port 0
8 bit input task on port 1
32 bit input task on ports 0-3
Why can't I do this in C#?
10-10-2014 08:04 AM
You may want to see if you get more help on the DAQ forum even though yours is a software question.
I have only worked with DAQs in LabVIEW.
10-10-2014 03:31 PM
HI,
One option is to use the DAQ taks that you created in NI-MAX in your C# application
Curt
10-10-2014 04:23 PM
I was wondering if you can do that. Do you specify the named task in the Task() constructor?
10-10-2014 04:26 PM
This what I get when I try that.
{Error=0xfffcf267 Message="Task name specified conflicts with an existing task name.\n\nTask Name: DIO_PORT0_4\n\nStatus Code: -200089"}
10-11-2014 08:55 PM