05-18-2012 04:54 PM
Hi this question might be a bit specific, but I'm having trouble combining the two programs below. The "digital testing 2.vi" is programmed for a light sensor, which output true or false and trigger an digital led. The second program is used for recording the timestamp and the count for each time u use boolean switch. I'm trying to add the programming for the timestamp and the count to the sensor program, but with no success. I thinks the problem occur when I included value change from the "daqmx read.vi" as one of the event in the event structure.
Thanks a lot, any suggestion is appreciated.
charledepper
05-18-2012 05:00 PM
I forget, the problem to the program after I integrate the second program, is that the digital led indicator for the first program stop working, even though I have input a "5 volt" wire into the port of the daq continuously.
05-20-2012 05:31 PM
The immediate problem I see is that you have two while loops with no "wait" timers in them. Add a fixed time delay to each main while loop, say 100 ms., and give it a try.
Dave
05-20-2012 07:54 PM
I don't think the event structure is going to work for you here. I would just is a single loop to read the DI and process it as needed.