11-16-2005 08:38 AM
11-16-2005 09:07 AM
11-16-2005 09:16 AM
If you change the mechnical action of your boolean so that it does not latch, then the boolean value will revert back to False after cycling the save one time (see attached JPG). You get there by right clicking on the Boolean. Additionally, if you want to continuously read your device, then you will need to 'wrap' you while loop around your device read as well.
Hope this helps.
11-16-2005 09:22 AM
11-16-2005 09:36 AM
11-16-2005 09:41 AM
11-16-2005 10:02 AM
My first thought was the shift register, but I believe we are not seeing everything, and to a new person, shift registers can be difficult to get a grasp on, especially as the application grows and you have to start carrying the shift register through lots of case structures. BUT it is the most appropriate way of solving the problem.
That being said, it is not good programming practice to use local variables everywhere, but as you are a self-proclaimed newbie, I thought it might be the simplest to get a grasp on.
Attached is an example using the shift register with one method to do it. I also took the liberty to adjust your time calculation to calculate from the start of testing, otherwise it will almost always be zero of close to it.
11-17-2005 10:32 AM
11-17-2005 11:34 AM