Jesse O
2006-09-07 18:10:10 UTC
Hello Vladimir,
To clarify a little more, when using change detection/notification in DAQmx you
configure change detection for the task with the DAQmx timing VI.
When you use the timing VI, you set the condition for when new data is available. In the
case of change notification you have available data everytime there is a change
in one of the lines you are looking at.
This means that if you perform a DAQmx read it will wait for a change to occur
before returning. If no change occurs within the amount of time specified
by the timeout parameter of the read function, it will return invalid data along with an error status code. I believe this is
what is happening to you. This is why performing a single software timed
read before you start your change notification task allows you to read valid
data.
Secondly, you are limited to a single change detection event. For example, if you try to create a change detection task for
Dev1/port0/line0, and another change detection task for Dev1/port0/line1 you
should receive error -50103 which states that "The specific resource is
reserved. The operation could not be completed as specified."
Finally, I have tried the change detection example I mentioned to you in both Visual C++ 6 and .NET 2003. I have had no problems running these examples. I have tried all combinations of running and closing the examples with no problems. Could be more specific into exactly what you did to get the program to crash.
Regards,
Jesse O.
Applications Engineering
National Instruments
To clarify a little more, when using change detection/notification in DAQmx you
configure change detection for the task with the DAQmx timing VI.
When you use the timing VI, you set the condition for when new data is available. In the
case of change notification you have available data everytime there is a change
in one of the lines you are looking at.
This means that if you perform a DAQmx read it will wait for a change to occur
before returning. If no change occurs within the amount of time specified
by the timeout parameter of the read function, it will return invalid data along with an error status code. I believe this is
what is happening to you. This is why performing a single software timed
read before you start your change notification task allows you to read valid
data.
Secondly, you are limited to a single change detection event. For example, if you try to create a change detection task for
Dev1/port0/line0, and another change detection task for Dev1/port0/line1 you
should receive error -50103 which states that "The specific resource is
reserved. The operation could not be completed as specified."
Finally, I have tried the change detection example I mentioned to you in both Visual C++ 6 and .NET 2003. I have had no problems running these examples. I have tried all combinations of running and closing the examples with no problems. Could be more specific into exactly what you did to get the program to crash.
Regards,
Jesse O.
Applications Engineering
National Instruments