I am writing an application using Measurement Studio 2005 and DAQmx 8.3 but I am having a bit of a design issue. I am attempting to use an NI USB-6229 to read the value of a contact switch, and I am interesting in the transition from high to low, low to high, but also the present value of the digital line. I am using an asynchronous callback function to handle the transition of the digital channel, but this has created a problem with reading the channel value. Because of the callback, I don't know of a good way to read the current value of the channel without causing a runtime error. Using an separate tasks to handle the callback and reading the current value doesn't work because the channel is continuous processing the callback function.
Is there a way to read the digital channel without stop the asynchronous callback? This would seem to be a common problem, but I am not sure of the best way to hand this in measurement studios. Is there a different solution?
Thanks in advance!