Bret01
2008-06-02 12:40:08 UTC
I am using visual studio C++. I have created individual tasks for each line using
DAQmxCreateTask("",&m_pDigInTask[x]); where this is in a loop.
I then assign the individual lines using
DAQmxCreateDIChan(m_pDigInTask[x],tempString,"",DAQmx_Val_ChanPerLine);
Where tempString is the indivdual channel for example: "dev1/port11/line4"
I also create digital output tasks along same lines as above except using DAQmxCreateDOChan.
The objective is to control each digital line seperately. My problem is that if I set two output lines to a value, for example
p11.0 and p11.1 and then I read an input line p11.4 then both p11.0 and p11.1 are reset from the value I had written to them earlier. I thought that by separating the lines to individual tasks and channels as I showed above, this would make them independent of each other so that what I do on one line does not affect the others. Is this not the case, or am I doing something wrong?
Thanks for any help.
DAQmxCreateTask("",&m_pDigInTask[x]); where this is in a loop.
I then assign the individual lines using
DAQmxCreateDIChan(m_pDigInTask[x],tempString,"",DAQmx_Val_ChanPerLine);
Where tempString is the indivdual channel for example: "dev1/port11/line4"
I also create digital output tasks along same lines as above except using DAQmxCreateDOChan.
The objective is to control each digital line seperately. My problem is that if I set two output lines to a value, for example
p11.0 and p11.1 and then I read an input line p11.4 then both p11.0 and p11.1 are reset from the value I had written to them earlier. I thought that by separating the lines to individual tasks and channels as I showed above, this would make them independent of each other so that what I do on one line does not affect the others. Is this not the case, or am I doing something wrong?
Thanks for any help.