09-11-2010 03:18 PM
I setup a DAQMx event and event structure to trigger when a digital input goes high to low, that works great in the event structure but once I configure that in the beginning of the application I cannot see the state of that same digital input. Pleas share how to do that after the DAQ event is setup.
Thanks
09-13-2010 01:59 PM
Hi Mike,
What hardware are you using? Can you detect the change event fine? You should still be able to read those lines after configuring them for change detection; I was able to verify here at my desk. What are you ultimately trying to accomplish?
09-13-2010 02:43 PM
Using a PCI 6221 but I have the event structure in one while loop which pushes states onto a message Queue for the upper loop to do the work, (based off producer/consumer framework), not sure if makes a difference.
All I want to do is setup the daq event on p0.0 for a high to low transition caught in the event structure (works fine) but in the timeout (100ms) of the event structure, I want to look at that same p0.0 line for it's status. Whenever I try to put the daq read in the timeout of the event it seems to hang the app.
see attached app.
09-14-2010 10:18 AM
Hi Mike,
It looks like you have your digital task’s sample clock configured as “Change Detection”, therefore when a change is detected all your lines configured in the task are sampled and you can then read them in your event structure. In the timeout case of your event structure your digital read will time out because there was no sample clock pulse and therefore no samples to read.
09-14-2010 01:58 PM
I will try that but I'm pretty sure if I put that digital read in the state machine loop, the read fails but I will try both and report, thanks!